<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="BOM备料清单">
	<query id="CraftDao.getProDuc" desc="查询工艺评审 制程 ">
		<![CDATA[
			SELECT DESGIN_KEY, MSC_PLINE, WHOLE_BACKLOG, WHOLE_BACKLOG_DESC, SET_FL
              FROM CRAFT_ORD_DESIGN_MSC_PL T
             WHERE T.DESGIN_KEY = ?
		]]>
	</query>

	<query id="CraftDao.getGrade" desc="查询工艺评审 钢种 ">
		<![CDATA[
			SELECT DESGIN_KEY,
                   MSC_PLINE,
                   WHOLE_BACKLOG,
                   WHOLE_BACKLOG_DESC,
                   GRADECODE,
                   GRADENAME,
                   ASSORTMENT_CODE,
                   ASSORTMENT_NAME
              FROM CRAFT_ORD_DESIGN_MSC_PL_GZ T
             WHERE T.DESGIN_KEY = ?
               AND T.MSC_PLINE = ?
		]]>
	</query>

	<query id="CraftDao.getRollSpec" desc="查询工艺评审 轧管规格 ">
		<![CDATA[
			SELECT DESGIN_KEY,
                   MSC_PLINE,
                   GRADECODE,
                   GRADENAME,
                   SPEC_CODE,
                   SPEC_NAME,
                   DIMATER,
                   HEIGHT
              FROM CRAFT_ORD_DESIGN_MSC_GZ_GG T
             WHERE T.DESGIN_KEY = ?
               AND T.MSC_PLINE = ?
		]]>
	</query>

	<query id="CraftDao.getBiltSpec" desc="查询工艺评审 锻造规格 ">
		<![CDATA[
			SELECT DESGIN_KEY, MSC_PLINE, SPEC_CODE, B_SPEC_CODE, B_SPEC_NAME
              FROM CRAFT_ORD_DESIGN_MSC_BILT T
             WHERE T.DESGIN_KEY = ?
               AND T.MSC_PLINE = ?
		]]>
	</query>

	<query id="CraftDao.getBiltCSpec" desc="查询工艺评审 铸造规格 ">
		<![CDATA[
		SELECT DESGIN_KEY,
               MSC_PLINE,
               SPEC_CODE,
               B_SPEC_CODE,
               C_SPEC_CODE,
               C_SPEC_NAME
          FROM CRAFT_ORD_DESIGN_MSC_BILT_C T
         WHERE T.DESGIN_KEY = ?
           AND T.MSC_PLINE = ?
		]]>
	</query>

	<query id="CraftDao.getCraftMsc" desc="查询工艺评审  主记录 ">
		<![CDATA[
		SELECT DESGIN_KEY, ORD_PK, ORD_LN_PK, ORDER_SEQ, CUST_ALPHA_NO, PSC, PSC_DESC, MSC, MSC_DESC, MSC_STYLE, USE_CODE, USE_DESC, PRD_CLS, PRODUCCODE,
 PRODUCNAME, STD_CODE, STD_NAME, STEELCODE, STEELNAME, STD_STYLE, STD_STYLE_DESC, ORDER_SPEC_CODE, ORDER_SPEC_DESC, SPEC_CODE, SPEC_NAME, DIMATER,
  HEIGHT, MODEL_CODE, MODEL_DESC, LEN_NO, LEN_DESC, LEN_UNIT, LEN_MIN, LEN_MAX, SHRT_LEN_RATO, SHORTEST, LONG_LEN_RATO, LONGEST, SHRT_STOVE, AVG_LEN_MIN, 
  DIFRNC_LEN_MAX, ENDLEN_SPECSTD, SIGL_LEN, ORDER_UNIT, ORDER_QTY, ORD_ENSU_TOTL_LEN, PRDCT_WGT, DELVRY_RANGE_TPE, DELVRY_RANGE_MIN, DELVRY_RANGE_MAX,
   FINAL_USER, FINAL_USER_DESC, OUTS_BILLET_FL, OUTS_STL_PIPE_FL, ASSEL_FL, PRODUCER_FL, PRDCR_NO, PRDCR_DESC, MPS_FL, MPS_NO, MPS_DESC, DELVRY_BDATE,
    DELVRY_EDATE, DELVRY_DESC, TRANS_DESC, ADD_ASK_NO, ORDER_ADD_DESC, ORDER_SPECIAL_FL, ORDER_SPECIAL_HEAD, ORDER_SPECIAL_PATH, ORDER_SPECIAL_DESC, ZBS,
     ORDER_PRICE, TRANS_PRICE, TEST_ID, TEST_PRICE, OUT_PRICE, BALNCE_PRICE, BE_ORDER_LN_STATUS, BE_OBJ_STS_OP, ORDER_LN_STATUS, OBJ_STS_OP, MEMO, PRD_LEN,
      LOSS_RATE, VALIDFLAG, CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, DELETE_NAME, DELETE_TIME, ORD_LN_PK_OLD FROM CRAFT_ORD_DESIGN_MSC T WHERE T.DESGIN_KEY=?
		]]>
	</query>

	<query id="CraftDao.getOperation" desc="查询工序信息">
		<![CDATA[
			SELECT DESGIN_KEY,
       MSC_PLINE,
       WHOLE_BACKLOG,
       WHOLE_BACKLOG_DESC,
       BACKLOG_SEQ,
       PROCESS_CODE,
       PROCESS_DESC,
       PROCESS_SEQ,
       PROCESS_CODE_C,
       PROCESS_DESC_C,
       MINUTE_PRODUCT,
       MINUTE_PRODUCT_OUT,
       MINUTE_WAITE,
       MINUTE_WAITE_OUT,
       BATCH_WAITE,
       BATCH_WAITE_OUT,
       CIC,
       PIC,
       SIC,
       DIC,
       WIC,
       GIC
  FROM CRAFT_ORD_DESIGN_MSC_PL_PRC T
 WHERE T.DESGIN_KEY = ?
   AND T.MSC_PLINE = ?
   AND T.PROCESS_CODE = ?	
		]]>
	</query>

	<query id="CraftDao.getProline" desc="查询工艺评审设计 适用产线 ">
		<![CDATA[
		SELECT DESGIN_KEY,
               MSC_PLINE,
               BACKLOG_SEQ,
               PROCESS_CODE,
               PLINE_CODE,
               PLINE_NAME,
               WELL_CODE,
               WELL_NAME,
               WARN_FL,
               WARN_DESC
          FROM CRAFT_ORD_DESIGN_MSC_PL_GX_PRL T
         WHERE T.DESGIN_KEY = ?
           AND T.MSC_PLINE = ?
		]]>
	</query>

	<query id="CraftDao.checkCraftOrdLineBom" desc="验证 工艺评审-合同行生产BOM ">
		<![CDATA[
                 SELECT DESGIN_KEY, BOM
  FROM CRAFT_ORD_LINE_BOM T
 WHERE T.DESGIN_KEY = ?
   AND T.BOM = ?
		]]>
	</query>

	<query id="CraftDao.saveCraftOrdLineBom" desc="保存 工艺评审-合同行生产BOM ">
		<![CDATA[
INSERT INTO CRAFT_ORD_LINE_BOM (DESGIN_KEY, BOM) VALUES (?, ?)
		]]>
	</query>


</queryMap>