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.DesignBomBlEntity;
import com.steering.pss.sale.order.bomGeneration.model.DesignBomEntity;
import com.steering.pss.sale.order.bomGeneration.model.MscBlEntity;
import com.steering.pss.sale.order.bomGeneration.model.SlmOrdDesignMscBlEntity;

public interface BomBLDaoImp {
	/**
	 * 查询备料码
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @return List<String>
	 * @throws SQLException
	 */
	List<SlmOrdDesignMscBlEntity> getBLCode(Connection con, String designKey,
			String craftFlag) throws SQLException;

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

	/**
	 * 保存备料物料与产品物料关系
	 * 
	 * @param con
	 *            连接字符串
	 * @param blInfo
	 * @throws SQLException
	 */
	void saveBLInfo(Connection con, DesignBomBlEntity blInfo)
			throws SQLException;

	/**
	 * 验证备料信息重复
	 * 
	 * @param con
	 * @param blInfo
	 * @return
	 * @throws SQLException
	 */
	int checkBLInfo(Connection con, DesignBomBlEntity blInfo)
			throws SQLException;

	/**
	 * 查询备料BOM
	 * 
	 * @param con
	 * @param BLCode
	 * @return
	 * @throws SQLException
	 */
	public List<DesignBomEntity> getBLBom(Connection con, String BLCode)
			throws SQLException;
}
