<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">


	<query id="CraftBlDao.getBl" desc="查询备料码信息">  
             <![CDATA[ 
             SELECT PSC_BL         AS ORD_LN_PK,
       PRODUCCODE,
       PRODUCNAME,
       STD_CODE,
       STD_NAME,
       STEELCODE,
       STEELNAME,
       STD_STYLE,
       STD_STYLE_DESC,
       MODEL_CODE,
       MODEL_DESC,
       MIN_D          AS DIMATER,
       MIN_H          AS HEIGHT,
       USE_CODE,
       USE_DESC,
       CREATE_NAME,
       CREATE_TIME,
       UPDATE_NAME,
       UPDATE_TIME,
       DELETE_NAME,
       DELETE_TIME,
       VALIDFLAG,
       MEMO,
       MIN_L          AS LEN_MIN,
       MAX_L          AS LEN_MAX,
       T.OUTS_BILLET_FL,
       T.OUTS_STL_PIPE_FL
  FROM COM_MSC_BL T
 WHERE T.PSC_BL = ?
                     ]]>
	</query>

	<query id="CraftBlDao.getBaseSpec" desc="验证备料码的规格在基础规格表里是否存在">
         <![CDATA[
         SELECT T.SPEC_CODE, T.SPEC_NAME
  FROM COM_BASE_SPEC T
 WHERE T.DIMATER = TO_NUMBER(?)
   AND T.HEIGHT = TO_NUMBER(?)
   AND T.MSC_STYLE = 'A'
   AND T.VALIDFLAG = '1'
         ]]>
	</query>

	<query id="CraftBlDao.getPsc" desc="通过备料码的四项标准查询产品码">
         <![CDATA[
         SELECT PSC,
       PSC_DESC,
       PRODUCCODE,
       PRODUCNAME,
       STD_CODE,
       STD_NAME,
       STEELCODE,
       STEELNAME,
       STD_STYLE,
       STD_STYLE_DESC,
       NEW_PROC_CODE,
       NEW_PROC_DESC,
       DEPARTMENT_CODE,
       DEPARTMENT_DESC,
       UNIT_CODE,
       AUTOJUDGE,
       UNIT_DESC,
       CREATE_NAME,
       CREATE_TIME,
       UPDATE_NAME,
       UPDATE_TIME,
       DELETE_NAME,
       DELETE_TIME,
       VALIDFLAG,
       MEMO,
       PSC_OLD,
       PRODUC_HEAD,
       PRODUC_TYPE,
       PRODUC_STYLE,
       PRODUC_DESC
  FROM COM_PSC T
 WHERE T.PRODUCCODE = ?
   AND T.STD_CODE = ?
   AND T.STEELCODE = ?
   AND NVL(T.STD_STYLE,'/') = NVL(?,'/')
   AND T.VALIDFLAG = '1'
         ]]>
	</query>

	<query id="CraftBlDao.getMscByPscAndUseCode" desc="通过产品码与用途码查询冶金规范码">
         <![CDATA[
         SELECT T1.MSC
  FROM COM_MSC T1, COM_PSC_R_MSC T2
 WHERE T1.MSC = T2.MSC
   AND T2.PSC = ?
   AND T1.USE_CODE = ?
         ]]>
	</query>

</queryMap>