package com.steering.pss.sale.order.bomGeneration.daoImp;

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

import com.steering.pss.sale.order.bomGeneration.model.DesignBomEntity;
import com.steering.pss.sale.order.bomGeneration.model.DesignBomGEntity;
import com.steering.pss.sale.order.bomGeneration.model.DesignBomJEntity;
import com.steering.pss.sale.order.bomGeneration.model.MscBlEntity;
import com.steering.pss.sale.order.bomGeneration.model.MscJgEntity;

/**
 * 接箍物料码接口
 * 
 * @author Administrator
 * 
 */
public interface BomJGDaoImp {
	/**
	 * 查询接箍码信息
	 * 
	 * @param con
	 *            连接字符串
	 * @param jgCode
	 *            接箍码
	 * @return MscJgEntity
	 * @throws SQLException
	 */
	MscJgEntity getJGInfo(Connection con, String jgCode) throws SQLException;

	/**
	 * 查询接箍码的备料信息
	 * 
	 * @param con
	 *            连接字符串
	 * @param jgCode
	 *            接箍码
	 * @return List<MscBlEntity>
	 * @throws SQLException
	 */
	List<MscBlEntity> getBLInfo(Connection con, String jgCode)
			throws SQLException;

	/**
	 * 保存接箍物料编码
	 * 
	 * @param con
	 * @param bom
	 * @throws SQLException
	 */
	void saveJGBom(Connection con, DesignBomEntity bom) throws SQLException;

	/**
	 * 查询接箍物料编码
	 * 
	 * @param con
	 *            连接字符串
	 * @param jgCode
	 *            接箍码
	 * @return
	 * @throws SQLException
	 */
	DesignBomEntity getJGBom(Connection con, String jgCode) throws SQLException;

	/**
	 * 保存接箍
	 * 
	 * @param con
	 *            连接字符串
	 * @param bomJ
	 *            接箍类
	 * @throws SQLException
	 */
	void saveBomJ(Connection con, DesignBomJEntity bomJ) throws SQLException;

	/**
	 * 保存接箍加工
	 * 
	 * @param con
	 *            连接字符串
	 * @param bomJ
	 *            接箍加工类
	 * @throws SQLException
	 */
	void saveBomG(Connection con, DesignBomGEntity bomG) throws SQLException;

	/**
	 * 查询质量设计接箍码
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @return List<String>
	 * @throws SQLException
	 */
	List<String> getJGCode(Connection con, String designKey, String craftFlag)
			throws SQLException;

	/**
	 * 验证质量设计-BOM-接箍是否重复
	 * 
	 * @param con
	 *            连接字符串
	 * @param bom
	 *            BOM
	 * @param bomJG
	 *            BOMJG
	 * @param outMaterialNo
	 *            产出物料
	 * @return int
	 * @throws SQLException
	 */
	int checkJGCode(Connection con, String bom, String bomJG,
			String outMaterialNo) throws SQLException;

	/**
	 * 验证质量设计-BOM-加工是否重复
	 * 
	 * @param con
	 * @param bom
	 * @param inMaterialNo
	 * @param outMaterialNo
	 * @return
	 * @throws SQLException
	 */
	int checkCodeI(Connection con, String bom, String inMaterialNo,
			String outMaterialNo) throws SQLException;

	/**
	 * 验证质量设计-BOM-接箍加工是否重复
	 * 
	 * @param con
	 * @param bom
	 * @param inMaterialNo
	 * @param outMaterialNo
	 * @return
	 * @throws SQLException
	 */
	int checkCodeG(Connection con, String bom, String bomJG,
			String inMaterialNo, String outMaterialNo) throws SQLException;

	/**
	 * 查询接箍向下的备料码
	 * 
	 * @param con
	 * @param designKey
	 * @param craftFlag
	 * @return
	 * @throws SQLException
	 */
	List<String> getJGBLCode(Connection con, String designKey, String craftFlag)
			throws SQLException;
}
