<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="质量申请放行">
	<query id="QcmZcPassApplyDAL.auditeQuery" desc="查询">
        <![CDATA[
SELECT T2.*,
       (SELECT NVL(T3.DELETE_NAME, NVL(T5.UPDATE_NAME, T5.CREATE_NAME))
          FROM CRAFT_ORD_DESIGN        T3,
               CRAFT_ORD_DESIGN_MSC_PL T4,
               COM_MSC_BACKLOG         T5,
               CRAFT_ORD_DESIGN_MSC    T6
         WHERE T3.ORD_LN_PK = T2.ORD_LN_PK
           AND T3.CRAFT_SEQ = T2.CRAFT_SEQ
           AND T4.DESGIN_KEY = T3.DESGIN_KEY
           AND T5.MSC_PLINE = T4.MSC_PLINE
           AND T5.MSC = T6.MSC
           AND T6.DESGIN_KEY = T3.DESGIN_KEY
           AND ROWNUM <= 1) CRAFT_NAME,
       (SELECT T5.UNIT_DESC_PROCESS
          FROM CRAFT_ORD_DESIGN T3, CRAFT_ORD_DESIGN_MSC T4, COM_MSC T5
         WHERE T3.ORD_LN_PK = T2.ORD_LN_PK
           AND T3.CRAFT_SEQ = T2.CRAFT_SEQ
           AND T4.DESGIN_KEY = T3.DESGIN_KEY
           AND T5.MSC = T4.MSC) CRAFT_UNIT_NAME
  FROM (SELECT 'False' CHK,
               A.PASS_APPLY_NO,
               A.JUGDE_APPLY_CODE,
               A.JUDGE_STOVE_NO,
               A.BATCH_NO,
               A.STOVE_NO,
               MIN(A.GRADECODE) GRADECODE,
               MIN(A.GRADENAME) GRADENAME,
               MIN(A.FACE_RESULT_CODE) FACE_RESULT_CODE,
               MIN(A.CHEM_RESULT_CODE) CHEM_RESULT_CODE,
               MIN(A.PHY_RESULT_CODE) PHY_RESULT_CODE,
               MIN(A.DETECT_RESULT_CODE) DETECT_RESULT_CODE,
               MIN(A.JUDGE_RESULT_CODE) JUDGE_RESULT_CODE,
               MIN(A.SPEC_RESULT_CODE) SPEC_RESULT_CODE,
               MIN(A.WPRESSURE_RESULT_CODE) WATER_RESULT_CODE,
               MIN(A.PROCESS_RESULT_CODE) PROCESS_RESULT_CODE,
               MIN(B.BASENAME) FACE_RESULT_DESC,
               MIN(C.BASENAME) CHEM_RESULT_DESC,
               MIN(D.BASENAME) PHY_RESULT_DESC,
               MIN(E.BASENAME) DETECT_RESULT_DESC,
               MIN(F.BASENAME) JUDGE_RESULT_DESC,
               MIN(F2.BASENAME) SPEC_RESULT_DESC,
               MIN(F3.BASENAME) WATER_RESULT_DESC,
               MIN(F4.BASENAME) PROCESS_RESULT_DESC,
               MIN(A.MEMO) MEMO,
               MIN(A.PLINE_CODE),
               MIN(A.PLINE_NAME) PLINE_NAME,
               MIN(A.PRO_PLAN_ID) PRO_PLAN_ID,
               MIN(A.PRO_PLAN_ID_NEXT) PRO_PLAN_ID_NEXT,
               MIN(A.AUDIT_NAME) AUDIT_NAME,
               TO_CHAR(MIN(A.AUDIT_TIME), 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME,
               DECODE(MIN(A2.AUDIT_RESULT),
                      '1',
                      '审核通过',
                      '0',
                      '审核不通过',
                      MIN(G1.BASENAME)) AUDIT_RESULT,
               MIN(A.AUDIT_MEMO) AUDIT_MEMO,
               MIN(A.PASS_APPLY_NAME) PASS_APPLY_NAME,
               TO_CHAR(MIN(A.PASS_APPLY_TIME), 'YYYY-MM-DD HH24:MI:SS') PASS_APPLY_TIME,
               MIN(A.DELETE_NAME) DELETE_NAME,
               TO_CHAR(MIN(A.DELETE_TIME), 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
               MIN(A.VALIDFLAG) VALIDFLAG,
               DECODE(MIN(A.VALIDFLAG), '1', '有效', '0', '无效') VALIDFLAG_DESC,
               MIN(A.UNIT_CODE) UNIT_CODE,
               MIN(A.UNIT_DESC) UNIT_DESC,
               DECODE(MIN(A.TYPE), '1', '紧急放行', '质量放行') TYPE,
               MIN(A2.AUDIT_UNIT) AUDIT_UNIT,
               MIN(A4.CRAFT_SEQ) CRAFT_SEQ,
               MIN(A5.ORD_LN_PK) ORD_LN_PK,
               A2.AUDIT_STEP,
               MIN(A.PROCESS_CODE) PROCESS_CODE,
               MIN(A8.PROCESS_DESC) PROCESS_DESC
          FROM QCM_ZC_PASS_APPLY A
          LEFT JOIN QCM_ZG_JUGDE_APPLY A4
            ON A4.JUGDE_APPLY_CODE = A.JUGDE_APPLY_CODE
           AND A4.JUDGE_STOVE_NO = A.JUDGE_STOVE_NO
           AND A4.BATCH_NO = A.BATCH_NO
           AND A4.IS_FLAG = '0'
           AND A4.IS_ALL_SCRAP IN ('0', '4')
          LEFT JOIN SLM_ORDER_LINE_DELIVERY A5
            ON A5.ORD_LN_DLY_PK = A4.ORD_LN_DLY_PK
          LEFT JOIN COM_BASE_PROCESS A8
            ON A8.PROCESS_CODE = A.PROCESS_CODE
          LEFT JOIN COM_BASE_INFO B
            ON B.BASECODE = A.FACE_RESULT_CODE
          LEFT JOIN COM_BASE_INFO C
            ON C.BASECODE = A.CHEM_RESULT_CODE
          LEFT JOIN COM_BASE_INFO D
            ON D.BASECODE = A.PHY_RESULT_CODE
          LEFT JOIN COM_BASE_INFO E
            ON E.BASECODE = A.DETECT_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F
            ON F.BASECODE = A.JUDGE_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F2
            ON F2.BASECODE = A.SPEC_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F3
            ON F3.BASECODE = A.WPRESSURE_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F4
            ON F4.BASECODE = A.PROCESS_RESULT_CODE, QCM_ZC_PASS_FLOW A2
          LEFT JOIN COM_BASE_INFO G1
            ON G1.BASECODE = A2.AUDIT_RESULT
         WHERE ({0} IS NULL OR A.JUDGE_STOVE_NO LIKE '%' || {0} || '%')
           AND ({1} IS NULL OR A.BATCH_NO LIKE '%' || {1} || '%')
           AND ({2} IS NULL OR
               A.PASS_APPLY_TIME >= TO_DATE({2}, 'YYYY-MM-DD HH24:MI:SS'))
           AND ({3} IS NULL OR
               A.PASS_APPLY_TIME <= TO_DATE({3}, 'YYYY-MM-DD HH24:MI:SS'))
           AND A2.PASS_APPLY_NO = A.PASS_APPLY_NO
           AND ({7} = 'admin' or
               (A2.AUDIT_UNIT NOT IN ('002001001003', '002001004001') AND
               A2.AUDIT_UNIT = {8}) OR
               A2.AUDIT_UNIT IN ('002001001003', '002001004001'))
           AND ({4} IS NULL OR {4} = '2' AND A2.AUDIT_RESULT IS NULL AND
               A2.CRT_AUDIT_STEP = '1' OR A2.AUDIT_RESULT = {4})
           AND ({5} IS NULL OR {5} = 'Quality' AND A.TYPE = '0' OR
               {5} = 'Urgent' AND A.TYPE = '1')
           AND A.VALIDFLAG IN ('1', {6})
         GROUP BY A.PASS_APPLY_NO,
                  A.JUGDE_APPLY_CODE,
                  A.STOVE_NO,
                  A.JUDGE_STOVE_NO,
                  A.BATCH_NO,
                  A2.AUDIT_STEP) T2
 WHERE T2.AUDIT_UNIT NOT IN ('002001001003', '002001004001')
    OR (T2.AUDIT_UNIT = '002001001003' AND
       (T2.ORD_LN_PK IS NOT NULL AND EXISTS
        (SELECT 1
            FROM CRAFT_ORD_DESIGN T3, CRAFT_ORD_DESIGN_MSC T4, COM_MSC T5
           WHERE T3.ORD_LN_PK = T2.ORD_LN_PK
             AND T3.CRAFT_SEQ = T2.CRAFT_SEQ
             AND T4.DESGIN_KEY = T3.DESGIN_KEY
             AND T5.MSC = T4.MSC
             AND ({5} IS NULL OR {7} = 'admin' OR {7} = T3.DELETE_NAME OR
                 T5.UNIT_CODE_PROCESS = {8})) OR
        T2.ORD_LN_PK IS NULL AND EXISTS
        (SELECT 1
            FROM COM_MSC_STD_CIC T3, CORE_APP_USER T4
           WHERE T3.CREATE_NAME = T4.USERNAME
             AND ({5} IS NULL OR {7} = 'admin' OR T4.DEPTID = {8}))) OR
       T2.AUDIT_UNIT = '002001004001' AND
       ({7} = 'admin' OR EXISTS
        (SELECT 1
            FROM SLM_ORDER_LINE T6, SLM_ORDER_HEAD T7
           WHERE T6.ORD_LN_PK = T2.ORD_LN_PK
             AND T6.ORD_PK = T7.ORD_PK
             AND T7.CREATE_DEPT = {8})))
        ]]>
    </query>
    
    <query id="QcmZcPassApplyDAL.allQuery" desc="查询所有">
        <![CDATA[
SELECT T2.*,
       CASE
         WHEN T2.ORD_LN_PK IS NULL THEN
          (SELECT NVL(T3.UPDATE_NAME, T3.CREATE_NAME)
             FROM COM_MSC_STD_CIC T3
            WHERE T3.CIC = T2.CIC)
         ELSE
          (SELECT NVL(T3.DELETE_NAME, NVL(T5.UPDATE_NAME, T5.CREATE_NAME))
             FROM CRAFT_ORD_DESIGN        T3,
                  CRAFT_ORD_DESIGN_MSC_PL T4,
                  COM_MSC_BACKLOG         T5,
                  CRAFT_ORD_DESIGN_MSC    T6
            WHERE T3.ORD_LN_PK = T2.ORD_LN_PK
              AND T3.CRAFT_SEQ = T2.CRAFT_SEQ
              AND T4.DESGIN_KEY = T3.DESGIN_KEY
              AND T5.MSC_PLINE = T4.MSC_PLINE
              AND T5.MSC = T6.MSC
              AND T6.DESGIN_KEY = T3.DESGIN_KEY
              AND ROWNUM <= 1)
       END CRAFT_NAME,
       CASE
         WHEN T2.ORD_LN_PK IS NULL THEN
          (SELECT T5.DEPARTNAME
             FROM COM_MSC_STD_CIC     T3,
                  CORE_APP_USER       T4,
                  CORE_APP_DEPARTMENT T5
            WHERE T3.CIC = T2.CIC
              AND T4.USERNAME = T3.CREATE_NAME
              AND T4.DEPTID = T5.DEPARTID AND ROWNUM = 1)
         ELSE
          (SELECT T5.UNIT_DESC_PROCESS
             FROM CRAFT_ORD_DESIGN T3, CRAFT_ORD_DESIGN_MSC T4, COM_MSC T5
            WHERE T3.ORD_LN_PK = T2.ORD_LN_PK
              AND T3.CRAFT_SEQ = T2.CRAFT_SEQ
              AND T4.DESGIN_KEY = T3.DESGIN_KEY
              AND T5.MSC = T4.MSC)
       END CRAFT_UNIT_NAME
  FROM (SELECT 'False' CHK,
               A.PASS_APPLY_NO,
               A.JUGDE_APPLY_CODE,
               A.JUDGE_STOVE_NO,
               A.BATCH_NO,
               A.STOVE_NO,
               MIN(A.GRADECODE) GRADECODE,
               MIN(A.GRADENAME) GRADENAME,
               MIN(A.FACE_RESULT_CODE) FACE_RESULT_CODE,
               MIN(A.CHEM_RESULT_CODE) CHEM_RESULT_CODE,
               MIN(A.PHY_RESULT_CODE) PHY_RESULT_CODE,
               MIN(A.DETECT_RESULT_CODE) DETECT_RESULT_CODE,
               MIN(A.JUDGE_RESULT_CODE) JUDGE_RESULT_CODE,
               MIN(A.SPEC_RESULT_CODE) SPEC_RESULT_CODE,
               MIN(A.WPRESSURE_RESULT_CODE) WATER_RESULT_CODE,
               MIN(A.PROCESS_RESULT_CODE) PROCESS_RESULT_CODE,
               MIN(B.BASENAME) FACE_RESULT_DESC,
               MIN(C.BASENAME) CHEM_RESULT_DESC,
               MIN(D.BASENAME) PHY_RESULT_DESC,
               MIN(E.BASENAME) DETECT_RESULT_DESC,
               MIN(F.BASENAME) JUDGE_RESULT_DESC,
               MIN(F2.BASENAME) SPEC_RESULT_DESC,
               MIN(F3.BASENAME) WATER_RESULT_DESC,
               MIN(F4.BASENAME) PROCESS_RESULT_DESC,
               MIN(A.MEMO) MEMO,
               MIN(A.PLINE_CODE),
               MIN(A.PLINE_NAME) PLINE_NAME,
               MIN(A.PRO_PLAN_ID) PRO_PLAN_ID,
               MIN(A.PRO_PLAN_ID_NEXT) PRO_PLAN_ID_NEXT,
               MIN(A.AUDIT_NAME) AUDIT_NAME,
               TO_CHAR(MIN(A.AUDIT_TIME), 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME,
               DECODE(MIN(A.AUDIT_RESULT),
                      '1',
                      '审核通过',
                      '0',
                      '审核不通过',
                      MIN(G1.BASENAME)) AUDIT_RESULT,
               MIN(A.AUDIT_MEMO) AUDIT_MEMO,
               MIN(A.PASS_APPLY_NAME) PASS_APPLY_NAME,
               TO_CHAR(MIN(A.PASS_APPLY_TIME), 'YYYY-MM-DD HH24:MI:SS') PASS_APPLY_TIME,
               MIN(A.DELETE_NAME) DELETE_NAME,
               TO_CHAR(MIN(A.DELETE_TIME), 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
               MIN(A.VALIDFLAG) VALIDFLAG,
               DECODE(MIN(A.VALIDFLAG), '1', '有效', '0', '无效') VALIDFLAG_DESC,
               MIN(A.UNIT_CODE) UNIT_CODE,
               MIN(A.UNIT_DESC) UNIT_DESC,
               DECODE(MIN(A.TYPE), '1', '紧急放行', '质量放行') TYPE,
               MIN(A2.AUDIT_UNIT) AUDIT_UNIT,
               DECODE(MIN(A.PROCESS_CODE),
                      'D',
                      MIN(A4.CRAFT_SEQ),
                      'E',
                      MIN(A5.CRAFT_SEQ),
                      'F',
                      MIN(A6.CRAFT_SEQ),
                      'G',
                      MIN(A7.CRAFT_SEQ)) CRAFT_SEQ,
               DECODE(MIN(A.PROCESS_CODE),
                      'D',
                      MIN(A4.CIC),
                      'E',
                      MIN(A5.CIC),
                      'F',
                      MIN(A6.CIC),
                      'G',
                      MIN(A7.CIC)) CIC,
               DECODE(MIN(A.PROCESS_CODE),
                      'D',
                      MIN(A4S.ORD_LN_PK),
                      'E',
                      MIN(A5S.ORD_LN_PK),
                      'F',
                      MIN(A6S.ORD_LN_PK),
                      'G',
                      MIN(A7S.ORD_LN_PK)) ORD_LN_PK,
               A2.AUDIT_STEP,
               MIN(A.PROCESS_CODE) PROCESS_CODE,
               MIN(A8.PROCESS_DESC) PROCESS_DESC
          FROM QCM_ZC_PASS_APPLY A
          LEFT JOIN QCM_ZC_PASS_FLOW A2
            ON A2.PASS_APPLY_NO = A.PASS_APPLY_NO
           AND A2.CRT_AUDIT_STEP = '1'
          LEFT JOIN PLN_ZY_ZG_M A4
            ON A4.PRO_PLAN_ID = A.PRO_PLAN_ID
           AND A4.GX_PLAN_NO = A.GX_PLAN_NO
           AND A4.JUDGE_STOVE_NO = A.JUDGE_STOVE_NO
          LEFT JOIN PLN_SALEORD A4S
            ON A4S.ORD_LN_DLY_PK = A4.ORD_LN_DLY_PK
          LEFT JOIN PLN_ZY_DBK_M A5
            ON A5.PRO_PLAN_ID = A.PRO_PLAN_ID
           AND A5.GX_PLAN_NO = A.GX_PLAN_NO
           AND A5.JUDGE_STOVE_NO = A.JUDGE_STOVE_NO
          LEFT JOIN PLN_SALEORD A5S
            ON A5S.ORD_LN_DLY_PK = A5.ORD_LN_DLY_PK
          LEFT JOIN PLN_ZY_RCL_M A6
            ON A6.PRO_PLAN_ID = A.PRO_PLAN_ID
           AND A6.GX_PLAN_NO = A.GX_PLAN_NO
           AND A6.JUDGE_STOVE_NO = A.JUDGE_STOVE_NO
          LEFT JOIN PLN_SALEORD A6S
            ON A5S.ORD_LN_DLY_PK = A6.ORD_LN_DLY_PK
          LEFT JOIN PLN_ZY_JGX_M A7
            ON A7.PRO_PLAN_ID = A.PRO_PLAN_ID
           AND A7.GX_PLAN_NO = A.GX_PLAN_NO
           AND A7.JUDGE_STOVE_NO = A.JUDGE_STOVE_NO
          LEFT JOIN PLN_SALEORD A7S
            ON A5S.ORD_LN_DLY_PK = A7.ORD_LN_DLY_PK
          left join com_base_process a8
            on a8.process_code = a.process_code
          LEFT JOIN COM_BASE_INFO B
            ON B.BASECODE = A.FACE_RESULT_CODE
          LEFT JOIN COM_BASE_INFO C
            ON C.BASECODE = A.CHEM_RESULT_CODE
          LEFT JOIN COM_BASE_INFO D
            ON D.BASECODE = A.PHY_RESULT_CODE
          LEFT JOIN COM_BASE_INFO E
            ON E.BASECODE = A.DETECT_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F
            ON F.BASECODE = A.JUDGE_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F2
            ON F2.BASECODE = A.SPEC_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F3
            ON F3.BASECODE = A.WPRESSURE_RESULT_CODE
          LEFT JOIN COM_BASE_INFO F4
            ON F4.BASECODE = A.PROCESS_RESULT_CODE
          LEFT JOIN COM_BASE_INFO G1
            ON G1.BASECODE = A.AUDIT_RESULT
         WHERE ({0} IS NULL OR A.JUDGE_STOVE_NO LIKE '%' || {0} || '%')
           AND ({1} IS NULL OR A.BATCH_NO LIKE '%' || {1} || '%')
           AND ({2} IS NULL OR
               A.PASS_APPLY_TIME >= TO_DATE({2}, 'YYYY-MM-DD HH24:MI:SS'))
           AND ({3} IS NULL OR
               A.PASS_APPLY_TIME <= TO_DATE({3}, 'YYYY-MM-DD HH24:MI:SS'))
           AND ({4} IS NULL OR {4} = 'Quality' AND A.TYPE = '0' OR
               {4} = 'Urgent' AND A.TYPE = '1')
           AND A.VALIDFLAG IN ('1', {5})
         GROUP BY A.PASS_APPLY_NO,
                  A.JUGDE_APPLY_CODE,
                  A.STOVE_NO,
                  A.JUDGE_STOVE_NO,
                  A.BATCH_NO,
                  A2.AUDIT_STEP) T2
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.queryByBatchNo" desc="通过轧管申请判定主键查询">
        <![CDATA[
SELECT *
  FROM QCM_ZC_PASS_APPLY T
 WHERE T.JUGDE_APPLY_CODE = {0}
   AND T.JUDGE_STOVE_NO = {1}
   AND T.BATCH_NO = {2}
   AND T.VALIDFLAG = '1'
        ]]>
    </query>
    
     <query id="JdgQcmZcPassApplyDAL.queryByPassApplyNo" desc="通过轧管申请判定主键查询">
        <![CDATA[
SELECT *
  FROM QCM_ZC_PASS_APPLY T
 WHERE T.PASS_APPLY_NO = {0}
        ]]>
    </query>
    
     <query id="JdgQcmZcPassApplyDAL.setValidflag" desc="更新有效标志">
        <![CDATA[
UPDATE QCM_ZC_PASS_APPLY T
   SET T.VALIDFLAG = {3}, T.DELETE_NAME = {4}, T.DELETE_TIME = SYSDATE
 WHERE T.JUDGE_STOVE_NO = {0}
   AND T.BATCH_NO = {1}
   AND T.JUGDE_APPLY_CODE = {2}
   AND T.VALIDFLAG = '1'
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.setJudgeResult" desc="修改综合判定结果">
        <![CDATA[
UPDATE QCM_ZC_PASS_APPLY T
   SET T.JUDGE_RESULT_CODE = {3}
 WHERE T.JUDGE_STOVE_NO = {0}
   AND T.BATCH_NO = {1}
   AND T.JUGDE_APPLY_CODE = {2}
   AND T.VALIDFLAG = '1'
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.getMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT 'FX' || TO_CHAR(SYSDATE, 'YYYYMMDD') ||
       LPAD(NVL(SUBSTR(MAX(T.PASS_APPLY_NO), 11), 0) + 1, 5, '0') MAX_VALUE
  FROM QCM_ZC_PASS_APPLY T
 WHERE T.PASS_APPLY_NO LIKE 'FX' || TO_CHAR(SYSDATE, 'YYYYMMDD') || '%'
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.GetMaxSeq" desc="获取最大序号">
        <![CDATA[
SELECT LPAD(NVL(MAX(T.PASS_APPLY_SEQ), 0) + 1, 3, '0') FROM QCM_ZC_PASS_APPLY T WHERE T.PASS_APPLY_NO = {0}
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.GetApplyCnt" desc="获取放行申请数">
        <![CDATA[
SELECT COUNT(1)
  FROM QCM_ZC_PASS_APPLY T
 WHERE T.JUGDE_APPLY_CODE = {0}
   AND T.JUDGE_STOVE_NO = {1}
   AND T.BATCH_NO = {2}
   AND T.VALIDFLAG = '1'
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.Insert" desc="新增">
        <![CDATA[
INSERT INTO QCM_ZC_PASS_APPLY
  (PASS_APPLY_NO,
   PASS_APPLY_SEQ,
   JUGDE_APPLY_CODE,
   JUDGE_STOVE_NO,
   STOVE_NO,
   BATCH_NO,
   PROCESS_CODE,
   GRADECODE,
   GRADENAME,
   ACT_COUNT,
   ACT_WEIGHT,
   ACT_THEORY_WEIGHT,
   ACT_DIMATER,
   ACT_HEIGHT,
   ACT_LEN,
   FACE_RESULT_CODE,
   CHEM_RESULT_CODE,
   PHY_RESULT_CODE,
   DETECT_RESULT_CODE,
   JUDGE_RESULT_CODE,
   MEMO,
   PRO_ORDER_NO,
   PLINE_CODE,
   PLINE_NAME,
   PRO_PLAN_ID,
   GX_PLAN_NO,
   PRO_PLAN_ID_NEXT,
   GX_PLAN_NO_NEXT,
   PASS_APPLY_NAME,
   PASS_APPLY_TIME,
   UNIT_CODE,
   UNIT_DESC,
   TYPE,
   SPEC_RESULT_CODE,
   WPRESSURE_RESULT_CODE,
   PROCESS_RESULT_CODE)
VALUES
  ('#PASS_APPLY_NO#',
   '#PASS_APPLY_SEQ#',
   '#JUGDE_APPLY_CODE#',
   '#JUDGE_STOVE_NO#',
   '#STOVE_NO#',
   '#BATCH_NO#',
   '#PROCESS_CODE#',
   '#GRADECODE#',
   '#GRADENAME#',
   '#ACT_COUNT#',
   '#ACT_WEIGHT#',
   '#ACT_THEORY_WEIGHT#',
   '#ACT_DIMATER#',
   '#ACT_HEIGHT#',
   '#ACT_LEN#',
   '#FACE_RESULT_CODE#',
   '#CHEM_RESULT_CODE#',
   '#PHY_RESULT_CODE#',
   '#DETECT_RESULT_CODE#',
   '#JUDGE_RESULT_CODE#',
   '#MEMO#',
   '#PRO_ORDER_NO#',
   '#PLINE_CODE#',
   '#PLINE_NAME#',
   '#PRO_PLAN_ID#',
   '#GX_PLAN_NO#',
   '#PRO_PLAN_ID_NEXT#',
   '#GX_PLAN_NO_NEXT#',
   '#PASS_APPLY_NAME#',
   SYSDATE,
   '#UNIT_CODE#',
   '#UNIT_DESC#',
   '#TYPE#',
   '#SPEC_RESULT_CODE#',
   '#WPRESSURE_RESULT_CODE#',
   '#PROCESS_RESULT_CODE#')
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.updateAudite" desc="修改审核人">
        <![CDATA[
UPDATE QCM_ZC_PASS_APPLY T
    SET T.AUDIT_NAME   = {1},
        T.AUDIT_TIME   = SYSDATE,
        T.AUDIT_RESULT = {2},
        T.AUDIT_MEMO   = {3}
  WHERE T.PASS_APPLY_NO = {0}
        ]]>
    </query>
    
    <query id="JdgQcmZcPassApplyDAL.updateValidflag" desc="更新有效标志">
        <![CDATA[
UPDATE QCM_ZC_PASS_APPLY T
   SET T.VALIDFLAG = {1}, T.DELETE_NAME = {2}, T.DELETE_TIME = SYSDATE
 WHERE T.PASS_APPLY_NO = {0}
        ]]>
    </query>
</queryMap>