package com.steering.pss.sale.order.qualityDesign.Dao.imp;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

import com.steering.pss.sale.order.model.DesignBasePlineEntity;
import com.steering.pss.sale.order.model.DesignLengthEntity;
import com.steering.pss.sale.order.model.DesignMscGzGgPlEntity;
import com.steering.pss.sale.order.model.DesignStdSicEntity;
import com.steering.pss.sale.order.qualityDesign.model.SlmOrdDesignBomEntity;
import com.steering.pss.sale.order.qualityDesign.model.SlmOrdDesignMscGzGgEntity;
import com.steering.pss.sale.order.qualityDesign.model.SlmOrdDesignMscPlGxPrlEntity;

public interface LengthCalculateDaoImp {
	/**
	 * 查询公差数据
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	DesignStdSicEntity getSpec(Connection con, String designKey,String biasCode)
			throws SQLException;

	/**
	 * 查询基础产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param plineCode
	 *            产线代码
	 * @return DesignBasePlineEntity
	 * @throws SQLException
	 */
	DesignBasePlineEntity getBasePline(Connection con, String plineCode)
			throws SQLException;

	/**
	 * 保存长度
	 * 
	 * @param con
	 *            连接字符串
	 * @param lengthInfo
	 *            长度类
	 * @throws SQLException
	 */
	void saveLength(Connection con, DesignLengthEntity lengthInfo)
			throws SQLException;

	/**
	 * 查询长度
	 * 
	 * @param con
	 *            连接字符串
	 * @param ordLnPk
	 *            合同行号
	 * @return List<DesignLengthEntity>
	 * @throws SQLException
	 */
	List<DesignLengthEntity> getLength(Connection con, String ordLnPk)
			throws SQLException;

	/**
	 * 查询轧制产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @param mscPline
	 *            全程产线号
	 * @return List<DesignMscGzGgPlEntity>
	 * @throws SQLException
	 */
	List<DesignMscGzGgPlEntity> getRollSpecPline(Connection con,
			String designKey, String mscPline) throws SQLException;

	/**
	 * 删除长度
	 * 
	 * @param con
	 *            连接字符串
	 * @param ordLnPk
	 *            合同行号
	 * @throws SQLException
	 */
	void deleteLength(Connection con, String ordLnPk) throws SQLException;

	/**
	 * 修改轧制产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param rollSpecPline
	 *            轧制产线
	 * @throws SQLException
	 */
	void updateRollSpecPline(Connection con, DesignMscGzGgPlEntity rollSpecPline)
			throws SQLException;

	public String[] getSpecDH(Connection con, String specCode)
			throws SQLException;

	/**
	 * 查询接箍测量Ｊ值
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	public String getJgKeyValue(Connection con, String designKey)
			throws SQLException;

	/**
	 * 查询镦粗切头尾
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	public String[] getCutHeadtailE(Connection con, String inMaterialNo,
			String outMaterialNo, String plineCode) throws SQLException;

	/**
	 * 查询轧管切头尾
	 * 
	 * @param con
	 * @param inMaterialNo
	 * @param outMaterialNo
	 * @param plineCode
	 * @return
	 * @throws SQLException
	 */
	public String[] getCutHeadtailD(Connection con, String inMaterialNo,
			String outMaterialNo, String plineCode) throws SQLException;

	/**
	 * 查询钢种
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	public List<String[]> getGradeBySpecCode(Connection con, String designKey,
			String mscPline, String specCode) throws SQLException;

	/**
	 * 查询成品物料
	 * 
	 * @param con
	 * @param designKey
	 *            质量主键
	 * @param mscPline
	 *            制程
	 * @param gradeCode
	 *            钢种
	 * @param specCodeD
	 *            轧管规格
	 * @param specCode
	 *            断面规格
	 * @param flag
	 *            标识
	 * @return
	 * @throws SQLException
	 */
	public SlmOrdDesignBomEntity getSlmOrdDesignBomByB(Connection con,
			String designKey, String mscPline, String gradeCode,
			String specCodeD, String specCode, String flag) throws SQLException;

	/**
	 * 查询镦拔扩产线
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	public List<SlmOrdDesignMscPlGxPrlEntity> getPlineE(Connection con,
			String designKey, String mscPline, String processCode)
			throws SQLException;

	/**
	 * 查询钢种
	 */
	public List<String[]> getGradeByMscPline(Connection con, String desginKey,
			String mscPline) throws SQLException;
}
