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

import java.sql.Connection;
import java.sql.SQLException;
import java.text.ParseException;

import com.steering.pss.sale.order.model.DesignMscEntity;

public interface QualityPrePDaoImp {
	/**
	 * 修改设定制程主键
	 * 
	 * @param con
	 * @param designKeyB
	 * @param designKeyE
	 * @throws SQLException
	 */
	void updateDesignMscPL(Connection con, String designKeyB, String designKeyE)
			throws SQLException;

	/**
	 * 查询designKey
	 * 
	 * @param con
	 *            连接字符串
	 * @param ordLnPk
	 *            合同行
	 * @return designKey
	 * @throws SQLException
	 */
	String getDesignKeyByOrdLnPk(java.sql.Connection con, String ordLnPk)
			throws SQLException;

	/**
	 * 刪除质量设计合同行主记录
	 * 
	 * @param con
	 *            连接字符串
	 * @param ordLnPk
	 *            合同行号
	 * @throws SQLException
	 */
	void deleteDesignMsc(java.sql.Connection con, String ordLnPk)
			throws SQLException;

	/**
	 * 录入质量设计合同行主记录
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            合同行
	 * @throws SQLException
	 */
	void addDesignMsc(java.sql.Connection con, DesignMscEntity orderLine)
			throws SQLException, ParseException;

	/**
	 * 删除 质量设计-MSC-接箍制程
	 * 
	 * @param con
	 *            连接字符串
	 * @param ordLnPk
	 *            合同行号
	 * @throws SQLException
	 */
	void deleteDesignMscJGPL(Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计状态明细(修改状态)
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStsTklgLst(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计状态(合同行)(修改状态)
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStsTklg(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 接箍码
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscJG(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 备料码
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscBL(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 接箍-备料
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscJGBL(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 制程
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscPL(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 全制程工序内控标准
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscPLPRC(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 钢种
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscPLGZ(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 交付标准
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStd(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 交付成分标准
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStdCic(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 交付理化标准
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStdPic(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 交付理化标准- 取样要求
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStdPicSmp(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 交付公差标准
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStdSic(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 交付探伤标准
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStdDic(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 交付水压标准
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignStdWic(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 适用产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscPlGxPrl(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 生产周期主表
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscPlPC(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 生产周期明细
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscPlPCLst(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除质量设计 全制程工序点信息
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void deleteDesignMscPlSTI(java.sql.Connection con, String designKey)
			throws SQLException;

	/**
	 * 查询合同行
	 * 
	 * @param con
	 * @param ordPk
	 * @param ordLnPk
	 * @param orderSeq
	 *            合同行号
	 * @return
	 * @throws SQLException
	 */
	DesignMscEntity getOrderLine(java.sql.Connection con, String ordPk,
			String ordLnPk) throws SQLException;

	/**
	 * 增加质量设计交付标准索引号
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void addDesignStd(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-合同行生产BOM
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteLineBom(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-合同行生产BOM-接箍BOM
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteLineBomJG(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-合同行生产BOM-备料BOM
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteLineBomBL(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-轧管规格
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteSpec(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-轧管坯料断面
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteBlank(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-坯料规格（连铸/模铸）
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteBilt(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-轧管规格-适用产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteSpecLine(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-轧管坯料断面-适用产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteBlankLine(Connection con, String designKey) throws SQLException;

	/**
	 * 删除 质量设计-坯料规格（连铸/模铸）-适用产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @throws SQLException
	 */
	void deleteBiltLine(Connection con, String designKey) throws SQLException;

	/**
	 * 验证产品码
	 * 
	 * @param con
	 *            连接字符串
	 * @param psc
	 *            产品码
	 * @return String
	 * @throws SQLException
	 */
	String getValidPsc(Connection con, String psc) throws SQLException;

	/**
	 * 查询产品规范类型
	 * 
	 * @param con
	 * @param specCode
	 * @return
	 * @throws SQLException
	 */
	public String getSpecStyle(Connection con, String specCode)
			throws SQLException;

	/**
	 * 将现在的操作人替换成前面的状态修改人
	 * 
	 * @param con
	 * @param designKey
	 * @param userName
	 * @throws SQLException
	 */
	void updateTklgLstFalse(Connection con, String designKey, String userName)
			throws SQLException;

	/**
	 * 查询生成的MSCN
	 * 
	 * @param con
	 * @param psc
	 *            产品规格码
	 * @param alphaNo
	 *            客户Alpha
	 * @return String
	 * @throws SQLException
	 */
	String queryAlphaMsc(Connection con, String psc, String alphaNo)
			throws SQLException;

	/**
	 * 修改合同行MSC
	 * 
	 * @param con
	 * @param ordLnPk
	 * @param msc
	 * @param mscDesc
	 * @param useCode
	 * @param useDesc
	 * @throws SQLException
	 */
	void updateLine(Connection con, String ordLnPk, String msc, String mscDesc,
			String useCode, String useDesc) throws SQLException;

	/**
	 * 查询合同行
	 * 
	 * @param con
	 * @param ordPk
	 * @param ordLnPk
	 * @param orderSeq
	 *            合同行号
	 * @return
	 * @throws SQLException
	 */
	DesignMscEntity getOrderLine(java.sql.Connection con, String ordLnPk)
			throws SQLException;

	/**
	 * 删除锁定制程表
	 * 
	 * @param con
	 * @param ordLnPk
	 * @throws SQLException
	 */
	public void deleteDesignPlControl(Connection con, String ordLnPk)
			throws SQLException;

	/**
	 * 保存制程锁定表
	 * 
	 * @param con
	 * @param ordLnPk
	 * @param msc
	 * @param mscPline
	 * @throws SQLException
	 */
	public void saveDesignPlControl(Connection con, String ordLnPk, String msc,
			String mscPline) throws SQLException;

	/**
	 * 修改设定制程KEY
	 * 
	 * @param con
	 * @param designKeyB
	 * @param designKeyE
	 * @throws SQLException
	 */
	public void updateDesignMscJG(Connection con, String designKeyB,
			String designKeyE) throws SQLException;

	/**
	 * 删除成分标准差值
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignCicDiff(Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除理化标准差值
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignPicDiff(Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除水压标准差值
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignWicDiff(Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除探伤标准差值
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignDicDiff(Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除公差标准差值
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignSicDiff(Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除加工标准差值
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignGicDiff(Connection con, String designKey)
			throws SQLException;

	/**
	 * 删除附加要求差值
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignAddAskDiff(Connection con, String designKey)
			throws SQLException;
	
	/**
	 * 删除质保书模板
	 * 
	 * @param con
	 * @param designKey
	 * @throws SQLException
	 */
	void deleteSlmOrdDesignZbsTemplate(Connection con, String designKey)
			throws SQLException;
	
	void deleteSlmOrdDesignBiasC(Connection con, String designKey)
			throws SQLException;
}
