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.DesignBomIEntity;
import com.steering.pss.sale.order.bomGeneration.model.SlmOrdDesignBlEntity;
import com.steering.pss.sale.order.bomGeneration.model.SlmOrdDesignMscJgLineEntity;
import com.steering.pss.sale.order.model.BaseProductEntity;
import com.steering.pss.sale.order.model.ComPscEntity;
import com.steering.pss.sale.order.model.DesignMscPlEntity;
import com.steering.pss.sale.order.model.DesignMscPlGxPrlEntity;
import com.steering.pss.sale.order.model.DesignMscPlGzEntity;
import com.steering.pss.sale.order.model.DesignMscBiltCEntity;
import com.steering.pss.sale.order.model.DesignMscBiltEntity;
import com.steering.pss.sale.order.model.DesignMscGzGgEntity;

public interface BomQueryDaoImp {
	/**
	 * 查询品名
	 * 
	 * @param con
	 *            连接字符串
	 * @param producCode
	 *            品名编码
	 * @return BaseProductEntity
	 * @throws SQLException
	 */
	BaseProductEntity getProductCode(Connection con, String producCode)
			throws SQLException;

	/**
	 * 查询合同行号
	 * 
	 * @param con
	 * 
	 * @param designKey
	 * 
	 * @return
	 * 
	 * @throws SQLException
	 */
	String[] getOrdLnPk(Connection con, String designKey) throws SQLException;

	/**
	 * 查询质量设计 钢种
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @param mscPline
	 *            全程产线号
	 * @return List<DesignMscPlGzEntity>
	 * @throws SQLException
	 */
	List<DesignMscPlGzEntity> getGrade(Connection con, String designKey,
			String mscPline) throws SQLException;

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

	/**
	 * 查询断面
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @param mscPline
	 *            全程产线号
	 * @return List<OrdDesignMscBiltEntity>
	 * @throws SQLException
	 */
	List<DesignMscBiltEntity> getBlank(Connection con, String designKey,
			String mscPline) throws SQLException;

	/**
	 * 查询坯料规格
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @param mscPline
	 *            全程产线号
	 * 
	 * @return List<OrdDesignMscBiltCEntity>
	 * @throws SQLException
	 */
	List<DesignMscBiltCEntity> getbilt(Connection con, String designKey,
			String mscPline) throws SQLException;

	/**
	 * 查询质量设计制程
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            质量主键
	 * @return List<DesignMscPlEntity>
	 * @throws SQLException
	 */
	List<DesignMscPlEntity> getProcess(Connection con, String designKey)
			throws SQLException;

	/**
	 * 查询是否新物料
	 * 
	 * @param con
	 *            连接字符串
	 * @param materialNo
	 *            物料编码
	 * @return String
	 * @throws SQLException
	 */
	String getFirstPrdc(Connection con, String materialNo) throws SQLException;

	/**
	 * 查询加工物料
	 * 
	 * @param con
	 *            连接字符串
	 * @param bom
	 *            产品BOM
	 * @return List<DesignBomIEntity>
	 * @throws SQLException
	 */
	List<DesignBomIEntity> getBomI(Connection con, String bom)
			throws SQLException;

	/**
	 * 查询产线
	 * 
	 * @param con
	 *            连接字符串
	 * @param designKey
	 *            主键
	 * @param mscPline
	 *            全程产线号
	 * @param processCode
	 *            工序
	 * @return
	 * @throws SQLException
	 */
	List<DesignMscPlGxPrlEntity> getProline(Connection con, String designKey,
			String mscPline) throws SQLException;

	/**
	 * 查询备料码信息
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	SlmOrdDesignBlEntity getBLEntity(Connection con, String designKey)
			throws SQLException;

	/**
	 * 备料码的四项标准查询产品码
	 * 
	 * @param con
	 * @param blEntity
	 * @return
	 * @throws SQLException
	 */
	ComPscEntity getPsc(Connection con, String producCode, String stdCode,
			String steelCode, String stdStyle) throws SQLException;

	/**
	 * 通过产品码与用途码查询冶金规范码
	 * 
	 * @param con
	 * @param psc
	 * @param useCode
	 * @return
	 * @throws SQLException
	 */
	String[] getMscByPscAndUseCode(Connection con, String psc, String useCode)
			throws SQLException;

	/**
	 * 验证备料码的规格在基础规格表里是否存在
	 * 
	 * @param con
	 * @param dimater
	 * @param height
	 * @return
	 * @throws SQLException
	 */
	String[] getBaseSpec(Connection con, String dimater, String height)
			throws SQLException;

	/**
	 * 查询备料码信息(blCode)
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	SlmOrdDesignBlEntity getBLEntityByBl(Connection con, String blCode)
			throws SQLException;

	/**
	 * 查询接箍码的产线
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	List<SlmOrdDesignMscJgLineEntity> getJGLine(Connection con,
			String designKey, String craftFlag) throws SQLException;

	/**
	 * 查询规格对应的轧管产线
	 * 
	 * @param con
	 * @param designKey
	 * @param specCode
	 * @param craftFlag
	 * @return
	 * @throws SQLException
	 */
	List<String[]> getZgPline(Connection con, String designKey,
			String mscPline, String specCode, String craftFlag)
			throws SQLException;

	/**
	 * 查询规格对应的锻造产线
	 * 
	 * @param con
	 * @param designKey
	 * @param specCode
	 * @param craftFlag
	 * @return
	 * @throws SQLException
	 */
	List<String[]> getDzPline(Connection con, String designKey,
			String mscPline, String specCode, String craftFlag)
			throws SQLException;

	/**
	 * 查询规格对应的铸造产线
	 * 
	 * @param con
	 * @param designKey
	 * @param specCode
	 * @param craftFlag
	 * @return
	 * @throws SQLException
	 */
	List<String[]> getZzPline(Connection con, String designKey,
			String mscPline, String specCode, String craftFlag)
			throws SQLException;

}
