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.qualityDesign.model.ComMscJgEntity;
import com.steering.pss.sale.order.qualityDesign.model.SlmOrdDesignMscJgBlEntity;
import com.steering.pss.sale.order.qualityDesign.model.SlmOrdDesignMscJgEntity;

public interface MscJGDaoImp {
	/**
	 * 查询接箍码
	 * 
	 * @param con
	 *            连接字符串
	 * @param msc
	 *            冶金规范码
	 * @param steelCode
	 *            钢级代码
	 * @param dimater
	 *            外径
	 * @param height
	 *            壁厚
	 * @return List<String>
	 * @throws SQLException
	 */
	List<SlmOrdDesignMscJgEntity> getJGByDAndH(Connection con, String msc,
			String steelCode, String modelCode, String dimater, String height, String ordLnPk, String keyJg)
			throws SQLException;

	/**
	 * 查询接箍码
	 * 
	 * @param con
	 *            连接字符串
	 * @param msc
	 *            冶金规范码
	 * @param steelCode
	 *            钢级代码
	 * @param specCode
	 *            产品规格
	 * @return List<String>
	 * @throws SQLException
	 */
	List<SlmOrdDesignMscJgEntity> getJGBySpecCode(Connection con, String msc,
			String steelCode, String modelCode, String specCode, String ordLnPk, String keyJg)
			throws SQLException;

	/**
	 * 保存接箍码
	 * 
	 * @param con
	 *            连接字符串
	 * @param jgEntity
	 *            接箍实体类
	 * @throws SQLException
	 */
	void saveJG(Connection con, SlmOrdDesignMscJgEntity jgEntity)
			throws SQLException;

	/**
	 * 查询接箍码对应的备料码
	 * 
	 * @param con
	 *            连接字符串
	 * @param codeJG
	 *            接箍码
	 * @return List<String>
	 * @throws SQLException
	 */
	List<SlmOrdDesignMscJgBlEntity> getJGBL(Connection con, String codeJg, String custAlphaNo, String alphaCode) throws SQLException;

	/**
	 * 保存接箍在码对应的备料码
	 * 
	 * @param con
	 *            连接字符串
	 * @param codeJg
	 *            接箍码
	 * @param pscBl
	 *            备料码
	 * @param designKey
	 *            designKey
	 * @throws SQLException
	 */
	void saveJgBl(java.sql.Connection con, SlmOrdDesignMscJgBlEntity jgBlEntity) throws SQLException;

	/**
	 * 通过冶金规范码和接箍码查询接箍信息
	 * 
	 * @param con
	 * @param msc
	 * @param jgCode
	 * @return
	 * @throws SQLException
	 */
	SlmOrdDesignMscJgEntity getJGInfo(Connection con, String jgKey)
			throws SQLException;

	/**
	 * 查询备料码技术评审状态
	 * 
	 * @param con
	 * @param blCode
	 * @return
	 * @throws SQLException
	 */
	String[] getJGBLInfo(Connection con, String blCode) throws SQLException;

	/**
	 * 接箍信息
	 * 
	 * @param con
	 * @param msc
	 * @param jgCode
	 * @return
	 * @throws SQLException
	 */
	ComMscJgEntity getJGBaseInfo(Connection con, String jgCode)
			throws SQLException;

	/**
	 * 查询设定接箍
	 * 
	 * @param con
	 * @param designKey
	 * @return
	 * @throws SQLException
	 */
	List<SlmOrdDesignMscJgEntity> getSetJG(Connection con, String designKey)
			throws SQLException;

	/**
	 * 修改设定接箍信息
	 * 
	 * @param con
	 * @param jgEntity
	 * @throws SQLException
	 */
	void updateSetJG(Connection con, SlmOrdDesignMscJgEntity jgEntity)
			throws SQLException;
	
	void deleteJg(Connection con, String designKey) throws SQLException;
	
	public String getCountByKeyJg(Connection con, String keyJg) throws SQLException;
}
