<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="检化验管理_钢管实验管理_检验委托，委托明细信息表">
    <query id="JdgPipeCheckConsignBaseInfo.setFlag" desc="修改委托一层表标志">
        <![CDATA[
UPDATE PIPE_CHECKCONSIGN_BASEINFO T SET T.FLAG = {1} WHERE T.CHECK_NO = {0}
        ]]>
    </query>
    
    <query id="JdgPipeCheckConsignBaseInfo.getOriginalByBatchNo" desc="查询原始检验委托">
        <![CDATA[
SELECT T.*
   FROM PIPE_CHECKCONSIGN_BASEINFO T
  WHERE T.HEAT_NO = {0}
    AND T.PROCESS_CODE = {1}
    AND T.CONTRACT_NO = {2}
    AND (T.CHECK_NO NOT LIKE '%P%' AND T.CHECK_NO NOT LIKE '%L%')
        ]]>
    </query>
    
    <query id="JdgPipeCheckConsignBaseInfo.deleteByJudgeNoOrderNo" desc="通过炉号+合同号删除">
        <![CDATA[
DELETE FROM PIPE_CHECKCONSIGN_BASEINFO T
 WHERE T.HEAT_NO = {0}
   AND T.PROCESS_CODE = {1}
   AND T.CONTRACT_NO = {2}
   AND T.CHECK_NO LIKE '%' || {3} || '%'
        ]]>
    </query>
    
    <query id="JdgPipeCheckConsignBaseInfo.insert" desc="新增">
        <![CDATA[
 INSERT INTO PIPE_CHECKCONSIGN_BASEINFO(
        CHECK_NO,
        LOT_NO,
        STOVE_NO,
        HEAT_NO,
        STEEL_GRADE,
        STEEL_NO,
        PRODUCT_NAME,
        PRODUCT_STD,
        CRAFT_FILE_NO,
        CONTRACT_NO,
        CHECK_COUNT,
        PLINE_CODE,
        DIMATER,
        HEIGHT,
        BUCKLE_TYPE,
        PROCESS_STATUS,
        CONSIGN_DEPT,
        CONSIGN_NAME,
        CONSIGN_TIME,
        ISPRODUCER,
        SPEC_REQ,
        GET_NAME,
        GET_TIME,
        CONSIGNDEPT_SEND_NAME,
        CONSIGNDEPT_SEND_TIME,
        JG_RECEIVE_NAME,
        JG_RECEIVE_TIME,
        IS_RUSH,
        RUSH_NAME,
        RUSH_TIME,
        FLAG,
        SAMPLE_REMARK,
        REMARK,
        DATA_TYPE,
        VALIDFLAG,
        CRAFT_PATH,
        PRODUCER_DEPT,
        FINAL_USER_DESC,
        STD_STYLE_DESC,
        CAILI_PATH,
        FUSHI_PATH,
        JINWU_PATH,
        GONGCHENG_PATH,
        DIBEI_PATH,
        HUAXUE_PATH,
        PROCESS_CODE,
        MERGER_NO,
        CRAFT_SOURCE,
        JG_PRINT_COUNT,
        JG_PRINT_NAME,
        JG_PRINT_TIME,
        INDEX_SEQ,
        PIC,
        CIC,
        LOT_NO_GROUP,
        CAILI_PATH_FUJIAN,
        JINWU_PATH_FUJIAN)
 VALUES( 
        '#CHECK_NO#',
        '#LOT_NO#',
        '#STOVE_NO#',
        '#HEAT_NO#',
        '#STEEL_GRADE#',
        '#STEEL_NO#',
        '#PRODUCT_NAME#',
        '#PRODUCT_STD#',
        '#CRAFT_FILE_NO#',
        '#CONTRACT_NO#',
        '#CHECK_COUNT#',
        '#PLINE_CODE#',
        '#DIMATER#',
        '#HEIGHT#',
        '#BUCKLE_TYPE#',
        '#PROCESS_STATUS#',
        '#CONSIGN_DEPT#',
        '#CONSIGN_NAME#',
        SYSDATE,
        '#ISPRODUCER#',
        '#SPEC_REQ#',
        '#GET_NAME#',
        SYSDATE,
        '#CONSIGNDEPT_SEND_NAME#',
        SYSDATE,
        '#JG_RECEIVE_NAME#',
        SYSDATE,
        '#IS_RUSH#',
        '#RUSH_NAME#',
        SYSDATE,
        '#FLAG#',
        '#SAMPLE_REMARK#',
        '#REMARK#',
        '#DATA_TYPE#',
        '#VALIDFLAG#',
        '#CRAFT_PATH#',
        '#PRODUCER_DEPT#',
        '#FINAL_USER_DESC#',
        '#STD_STYLE_DESC#',
        '#CAILI_PATH#',
        '#FUSHI_PATH#',
        '#JINWU_PATH#',
        '#GONGCHENG_PATH#',
        '#DIBEI_PATH#',
        '#HUAXUE_PATH#',
        '#PROCESS_CODE#',
        '#MERGER_NO#',
        '#CRAFT_SOURCE#',
        '#JG_PRINT_COUNT#',
        '#JG_PRINT_NAME#',
        SYSDATE,
        '#INDEX_SEQ#',
        '#PIC#',
        '#CIC#',
        '#LOT_NO_GROUP#',
        '#CAILI_PATH_FUJIAN#',
        '#JINWU_PATH_FUJIAN#')
        ]]>
    </query>
</queryMap>