<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="质量设计预处理">

	<query id="IQualityPrePDao.getDesignKeyByOrdLnPk" desc="查询  质量设计-MSC(designKey)">
         <![CDATA[
        SELECT T.DESGIN_KEY
          FROM SLM_ORD_DESIGN_MSC T
         WHERE T.ORD_LN_PK = ?
           AND T.VALIDFLAG = 1
                  ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMsc" desc="删除  质量设计-MSC（主记录）">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_MSC T WHERE T.ORD_LN_PK = ?
                 ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscJGPL" desc="删除  质量设计-MSC-接箍制程">
         <![CDATA[
         DELETE FROM  SLM_ORD_DESIGN_MSC_JG_PL T WHERE T.DESGIN_KEY=?
                 ]]>
	</query>


	<query id="IQualityPrePDao.deleteDesignStsTklgLst" desc="删除  质量设计-技术设计状态明细">
         <![CDATA[
         UPDATE SLM_ORD_DESIGN_STS_TKLG_LST T SET T.VALIDFLAG='0'  WHERE T.DESGIN_KEY = ?
                 ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStsTklg" desc="删除  质量设计-技术设计状态(合同行)">
         <![CDATA[
         UPDATE SLM_ORD_DESIGN_STS_TKLG SET VALIDFLAG = 0 WHERE DESGIN_KEY = ?
                 ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscJG" desc="删除 质量设计-接箍码集合">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_MSC_JG T WHERE T.DESGIN_KEY=? AND (T.SET_JG='0' OR T.SET_JG IS NULL)
                 ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscJGBL" desc="删除  质量设计-接箍-备料码集合">
         <![CDATA[
        DELETE FROM SLM_ORD_DESIGN_MSC_JG_BL T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscBL" desc="删除 质量设计-备料码集合">
         <![CDATA[
        DELETE FROM SLM_ORD_DESIGN_MSC_BL T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscPL" desc="删除 质量设计-制程">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_MSC_PL T
          WHERE T.DESGIN_KEY = ?
            AND T.SET_FL = '0'
         ]]>
	</query>

	<query id="IQualityPrePDao.updateDesignMscPL" desc="修改 质量设计-制程">
         <![CDATA[
        UPDATE  SLM_ORD_DESIGN_MSC_PL T SET T.DESGIN_KEY=? 
          WHERE T.DESGIN_KEY = ?
            AND T.SET_FL = '1'
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscPLPRC" desc="删除  质量设计-全制程工序及内控标准">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_MSC_PL_PRC T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscPLGZ" desc="删除  质量设计-制程适用钢种">
         <![CDATA[
       DELETE FROM SLM_ORD_DESIGN_MSC_PL_GZ T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStd" desc="删除   质量设计-交付标准">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_STD T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStdCic" desc="删除   质量设计-成分标准">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_STD_CIC T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStdPic" desc="删除   质量设计-理化标准">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_STD_PIC T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStdPicSmp" desc="删除   质量设计-理化标准-取样要求">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_STD_PIC_SMP T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStdSic" desc="删除   质量设计-公差标准">
         <![CDATA[
          DELETE FROM SLM_ORD_DESIGN_STD_SIC T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStdDic" desc="删除   质量设计-探伤标准">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_STD_DIC T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignStdWic" desc="删除   质量设计-水压标准">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_STD_WIC T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscPlGxPrl" desc="删除   质量设计-适用产线">
         <![CDATA[
          DELETE FROM SLM_ORD_DESIGN_MSC_PL_GX_PRL T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscPlSTI" desc="删除   质量设计-全制程工序点信息">
         <![CDATA[
        DELETE FROM SLM_ORD_DESIGN_MSC_PL_STI T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscPlPC" desc="删除   质量设计-制程-生产周期主表">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_MSC_PL_PC T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignMscPlPCLst" desc="删除   质量设计-制程-生产周期明细">
         <![CDATA[
         DELETE FROM SLM_ORD_DESIGN_MSC_PL_PC_LST T WHERE T.DESGIN_KEY=?
         ]]>
	</query>


	<query id="IQualityPrePDao.addDesignStd" desc="增加  质量设计交付标准">
         <![CDATA[
        INSERT INTO SLM_ORD_DESIGN_STD
  (DESGIN_KEY, CIC, PIC, SIC, DIC, WIC, GIC)
VALUES
  (?, NULL, NULL, NULL, NULL, NULL, NULL)
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteLineBom" desc="删除  质量设计-合同行生产BOM">
         <![CDATA[
         DELETE FROM SLM_ORD_LINE_BOM T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteLineBomJG" desc="删除  质量设计-合同行生产BOM-接箍BOM">
         <![CDATA[
         DELETE FROM  SLM_ORD_LINE_BOM_JG T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteLineBomBL" desc="删除  质量设计-合同行生产BOM-备料BOM">
         <![CDATA[
         DELETE FROM  SLM_ORD_LINE_BOM_BL T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSpec" desc="删除  质量设计-轧管规格">
         <![CDATA[
         DELETE FROM  SLM_ORD_DESIGN_MSC_GZ_GG T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteBlank" desc="删除  质量设计-轧管坯料断面">
         <![CDATA[
         DELETE FROM  SLM_ORD_DESIGN_MSC_BILT T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteBilt" desc="删除  质量设计-坯料规格（连铸/模铸）">
         <![CDATA[
         DELETE FROM  SLM_ORD_DESIGN_MSC_BILT_C T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSpecLine" desc="删除  质量设计-轧管规格-适用产线">
         <![CDATA[
         DELETE FROM  SLM_ORD_DESIGN_MSC_GZ_GG_PL T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteBlankLine" desc="删除  质量设计-轧管坯料断面-适用产线">
         <![CDATA[
         DELETE FROM  SLM_ORD_DESIGN_MSC_BILT_PL T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteBiltLine" desc="删除  质量设计-坯料规格（连铸/模铸）-适用产线">
         <![CDATA[
         DELETE FROM  SLM_ORD_DESIGN_MSC_BILT_C_PL T WHERE T.DESGIN_KEY=?
         ]]>
	</query>


	<query id="IQualityPrePDao.saveDesignMsc" desc="增加质量设计MSC主记录">
         <![CDATA[
           INSERT INTO SLM_ORD_DESIGN_MSC(
        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,
        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,
        SHRT_STOVE,
        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)
 VALUES( 
        '#ASSEL_FL#',
        '#PRODUCER_FL#',
        '#PRDCR_NO#',
        '#PRDCR_DESC#',
        '#MPS_FL#',
        '#MPS_NO#',
        '#MPS_DESC#',
         TO_DATE('#DELVRY_BDATE#','YYYY-MM-DD HH:MI:SS'),
         TO_DATE('#DELVRY_EDATE#','YYYY-MM-DD HH:MI:SS'),
        '#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#',
         SYSDATE,
        '#UPDATE_NAME#',
         SYSDATE,
        '#DELETE_NAME#',
         SYSDATE,
        '#ORD_LN_PK_OLD#',
        '#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#',
        '#SHRT_STOVE#',
         SYS_GUID(),
        '#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#')
         ]]>
	</query>

	<query id="IQualityPrePDao.getOrderLine" desc="查询合同行信息">
         <![CDATA[
         SELECT ORD_PK,
         CUST_ALPHA_NO2,
         MAN_INSPECTION,
         INSPECTION_VALUE,
       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,
       TO_CHAR(DELVRY_BDATE, 'YYYY-MM-DD HH:MI:SS') DELVRY_BDATE,
       TO_CHAR(DELVRY_EDATE, 'YYYY-MM-DD HH:MI:SS') 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,
       VALIDFLAG,
       CREATE_NAME,
       TO_CHAR(CREATE_TIME, 'YYYY-MM-DD HH:MM:SS') CREATE_TIME,
       UPDATE_NAME,
       TO_CHAR(UPDATE_TIME, 'YYYY-MM-DD HH:MM:SS') UPDATE_TIME,
       DELETE_NAME,
       TO_CHAR(DELETE_TIME, 'YYYY-MM-DD HH:MM:SS') DELETE_TIME,
       ORD_LN_PK_OLD
  FROM SLM_ORDER_LINE T
 WHERE T.ORD_PK = ?
   AND T.ORD_LN_PK = ?
   AND T.VALIDFLAG = '1'
         ]]>
	</query>

	<query id="IQualityPrePDao.getValidPsc" desc="验证产品码有效性">
         <![CDATA[
         SELECT PSC FROM COM_PSC T WHERE T.PSC=? AND T.VALIDFLAG='1'
         ]]>
	</query>

	<query id="IQualityPrePDao.getSpecStyle" desc="查询合同产品规格类型">
         <![CDATA[
       SELECT T.MSC_STYLE
         FROM COM_BASE_SPEC T
        WHERE T.SPEC_CODE = ?
          AND T.VALIDFLAG = 1     
         ]]>
	</query>

	<query id="IQualityPrePDao.updateTklgLstFalse" desc="修改合同行前一次质量设计明细的修改人">
         <![CDATA[
     UPDATE SLM_ORD_DESIGN_STS_TKLG_LST T
   SET T.UPDATE_NAME = ?,T.UPDATE_TIME=SYSDATE WHERE  T.DESGIN_KEY = ? AND T.VALIDFLAG = '1' AND
                       T.DESIGN_STS = 'F'
         ]]>
	</query>

	<query id="IQualityPrePDao.queryAlphaMsc" desc=" 查询生成的MSCN">
         <![CDATA[
    SELECT T.MSC
  FROM COM_PSC_R_MSC T
 WHERE T.PSC = ?
   AND INSTR(T.CUST_ALPHA_NO, ? || ';') > 0
   AND T.VALIDFLAG = '1'
         ]]>
	</query>

	<query id="IQualityPrePDao.updateLine" desc="修改合同行MSC">
         <![CDATA[
    UPDATE SLM_ORDER_LINE T
   SET T.CUST_ALPHA_NO2 = T.CUST_ALPHA_NO,
       T.MSC            = ?,
       T.MSC_DESC       = ?,
       T.USE_CODE       = ?,
       T.USE_DESC       = ?,
       T.CUST_ALPHA_NO  = ''
 WHERE T.ORD_LN_PK = ?
   AND T.VALIDFLAG = '1'
         ]]>
	</query>


	<query id="IQualityPrePDao.getOrderLineN" desc="查询合同行信息">
         <![CDATA[
         SELECT 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,
       TO_CHAR(DELVRY_BDATE, 'YYYY-MM-DD HH:MI:SS') DELVRY_BDATE,
       TO_CHAR(DELVRY_EDATE, 'YYYY-MM-DD HH:MI:SS') 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,
       VALIDFLAG,
       CREATE_NAME,
       TO_CHAR(CREATE_TIME, 'YYYY-MM-DD HH:MM:SS') CREATE_TIME,
       UPDATE_NAME,
       TO_CHAR(UPDATE_TIME, 'YYYY-MM-DD HH:MM:SS') UPDATE_TIME,
       DELETE_NAME,
       TO_CHAR(DELETE_TIME, 'YYYY-MM-DD HH:MM:SS') DELETE_TIME,
       ORD_LN_PK_OLD
  FROM SLM_ORDER_LINE T
 WHERE T.ORD_LN_PK = ?
   AND T.VALIDFLAG = '1'
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteDesignPlControl" desc="删除锁定制程表">
         <![CDATA[
           DELETE FROM  SLM_ORD_DESIGN_PL_CONTROL T WHERE T.ORD_LN_PK=?
         ]]>
	</query>

	<query id="IQualityPrePDao.saveDesignPlControl" desc="保存制程锁定表">
         <![CDATA[
           INSERT INTO SLM_ORD_DESIGN_PL_CONTROL
  (MSC, MSC_PLINE, ORD_LN_PK)
VALUES
  (?, ?, ?)
         ]]>
	</query>

	<query id="IQualityPrePDao.updateDesignMscJG" desc="修改设定制程KEY">
         <![CDATA[
           UPDATE  SLM_ORD_DESIGN_MSC_JG T SET T.DESGIN_KEY=? WHERE T.DESGIN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSlmOrdDesignCicDiff" desc="删除成分标准差值">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_CIC_DIFF T WHERE T.DESIGN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSlmOrdDesignPicDiff" desc="删除理化标准差值">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_PIC_DIFF T WHERE T.DESIGN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSlmOrdDesignWicDiff" desc="删除水压标准差值">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_WIC_DIFF T WHERE T.DESIGN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSlmOrdDesignDicDiff" desc="删除探伤标准差值">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_DIC_DIFF T WHERE T.DESIGN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSlmOrdDesignSicDiff" desc="删除公差标准差值">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_SIC_DIFF T WHERE T.DESIGN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSlmOrdDesignGicDiff" desc="删除加工标准差值">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_GIC_DIFF T WHERE T.DESIGN_KEY=?
         ]]>
	</query>

	<query id="IQualityPrePDao.deleteSlmOrdDesignAddAskDiff" desc="删除附加要求差值">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_ADD_ASK_DIFF T WHERE T.DESIGN_KEY=?
         ]]>
	</query>
	
	<query id="IQualityPrePDao.deleteSlmOrdDesignZbsTemplate" desc="删除质保书模板">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_ZBS_TEMPLATE T WHERE T.DESGIN_KEY=?
         ]]>
	</query>
	
	<query id="IQualityPrePDao.deleteSlmOrdDesignBiasC" desc="删除成分偏差">
         <![CDATA[
           DELETE FROM SLM_ORD_DESIGN_STD_BIAS_C T WHERE T.DESGIN_KEY=?
         ]]>
	</query>

</queryMap>