<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="同步检化验成品成分到质量成分">
	<query id="JhyCpChemToQcmChemTask.getPipeCheckConsignDetail" desc="获取成品成分实绩主表">
		<![CDATA[
SELECT *
  FROM (SELECT T.CHECK_NO,
               MIN(T.DEVICE_NAME) DEVICE_NAME,
               MIN(T.CHECK_NAME) CHECK_NAME,
               MIN(T.REMARK) REMARK,
               MIN(A.STOVE_NO) STOVE_NO,
               MIN(T.BATCH_NO) BATCH_NO,
               MIN(A.HEAT_NO) JUDGE_STOVE_NO,
               MIN(A.PLINE_CODE) PLINE_CODE,
               MIN(A.CHECK_COUNT) CHECK_COUNT,
               MIN(A.CRAFT_SOURCE) CRAFT_SOURCE,
               MIN(A.CAILI_PATH) CAILI_PATH,
               MIN(A.FUSHI_PATH) FUSHI_PATH,
               MIN(A.JINWU_PATH) JINWU_PATH,
               MIN(A.GONGCHENG_PATH) GONGCHENG_PATH,
               MIN(A.DIBEI_PATH) DIBEI_PATH,
               MIN(A.HUAXUE_PATH) HUAXUE_PATH
          FROM PIPE_CHECKCONSIGN_DETAIL T, PIPE_CHECKCONSIGN_BASEINFO A
         WHERE (T.PHY_CODE_MAX = 'HX' OR T.PHY_CODE_MAX = 'ONH')
           AND A.CHECK_NO = T.CHECK_NO
           AND A.CRAFT_SOURCE IN ('0', '1', '6', '7')
           AND T.FLAG = '4'
           AND T.VALIDFLAG = '0'
           AND (SELECT COUNT(1)
                  FROM PIPE_CHECKCONSIGN_DETAIL B
                 WHERE B.CHECK_NO = T.CHECK_NO
                   AND B.PHY_CODE_MAX IN ('HX', 'ONH')
                   AND B.VALIDFLAG = '0') =
               (SELECT COUNT(1)
                  FROM PIPE_CHECKCONSIGN_DETAIL B
                 WHERE B.CHECK_NO = T.CHECK_NO
                   AND B.PHY_CODE_MAX IN ('HX', 'ONH')
                   AND B.FLAG = T.FLAG
                   AND B.VALIDFLAG = '0')
         GROUP BY T.CHECK_NO
         ORDER BY T.CHECK_NO)
 WHERE ROWNUM <= 50
		]]>
	</query>
	<query id="JhyCpChemToQcmChemTask.getPipeCheckConsignChemDetail" desc="获取成品成分实绩主表">
		<![CDATA[
SELECT T.CHECK_NO,
       T.SAMPLE_NO,
       T.CHEM_CODE,
       T.CHEM_NAME,
       T.CHEM_TYPE,
       T.ISCHECK,
       T.ISJUDGE,
       T.ISQUOTE,
       T.COMPLEX_TYPE,
       T.CHEM_FORMULA,
       T.STDMIN_SIGN,
       T.STDMIN,
       T.STDMAX_SIGN,
       T.STDMAX,
       T.STDTARGET,
       T.STDMEMO,
       T.ELE_CODE,
       T.ELE_NAME,
       T.ELE_MIN_SIGN,
       T.ELE_MIN,
       T.ELE_MAX_SIGN,
       T.ELE_MAX,
       T.REP_CODE,
       T.REP_NAME,
       T.REP_MIN_SIGN,
       T.REP_MIN,
       T.REP_MAX_SIGN,
       T.REP_MAX,
       T.REP_VAL,
       T.SELECT_STEEL_NO,
       T.STD_STEEL_STD_VALUE,
       T.STD_STEEL_PROCESS_VALUE,
       T.ROUND_VALUE,
       T.PROCESS_VALUE,
       T.AUDIT_VALUE,
       T.QUOTE_VALUE,
       T.REMARK,
       T.CHECK_CLASS,
       T.CHECK_TEMP,
       T.DEVICE_NO,
       T.DEVICE_NAME,
       T.AUDIT_NAME,
       TO_CHAR(T.AUDIT_TIME, 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME,
       T.IS_CJ
  FROM PIPE_CHECKCONSIGN_CHEMDETAIL T
 WHERE T.CHECK_NO = '#CHECK_NO#'
   AND T.SAMPLE_NO = '#SAMPLE_NO#'
		]]>
	</query>
	<query id="JhyCpChemToQcmChemTask.getUpdateFlag" desc="修改成品成分标志位">
		<![CDATA[
UPDATE PIPE_CHECKCONSIGN_DETAIL T
  SET T.FLAG = {1}
WHERE T.CHECK_NO = {0}
  AND T.PHY_CODE_MAX IN ('HX', 'ONH')
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.getSampleByCheckNo" desc="通过检验编号获取初样">
		<![CDATA[
SELECT T.CHECK_NO,
       T.SAMPLE_NO,
       T.CHEM_CODE,
       T.CHEM_NAME,
       T.CHEM_TYPE,
       T.ISCHECK,
       T.ISJUDGE,
       T.ISQUOTE,
       T.COMPLEX_TYPE,
       T.CHEM_FORMULA,
       T.STDMIN_SIGN,
       T.STDMIN,
       T.STDMAX_SIGN,
       T.STDMAX,
       T.STDTARGET,
       T.STDMEMO,
       T.ELE_CODE,
       T.ELE_NAME,
       T.ELE_MIN_SIGN,
       T.ELE_MIN,
       T.ELE_MAX_SIGN,
       T.ELE_MAX,
       T.REP_CODE,
       T.REP_NAME,
       T.REP_MIN_SIGN,
       T.REP_MIN,
       T.REP_MAX_SIGN,
       T.REP_MAX,
       T.REP_VAL,
       T.SELECT_STEEL_NO,
       T.STD_STEEL_STD_VALUE,
       T.STD_STEEL_PROCESS_VALUE,
       T.ROUND_VALUE,
       T.PROCESS_VALUE,
       T.AUDIT_VALUE,
       T.QUOTE_VALUE,
       T.REMARK,
       T.CHECK_CLASS,
       T.CHECK_TEMP,
       T.DEVICE_NO,
       T.DEVICE_NAME,
       T.AUDIT_NAME,
       TO_CHAR(T.AUDIT_TIME, 'YYYY-MM-DD HH24:MI:SS') AUDIT_TIME,
       T.IS_CJ,
       A.BATCH_NO,
       A.MAT_NO,
       A.HEAD_MAT_NO,
       A.BAR_CODE
  FROM PIPE_CHECKCONSIGN_CHEMDETAIL T, PIPE_CHECKCONSIGN_DETAIL A
 WHERE T.CHECK_NO = {0}
   AND A.FLAG = '4'
   AND A.VALIDFLAG = '0'
   AND A.CHECK_NO = T.CHECK_NO
   AND A.SAMPLE_NO = T.SAMPLE_NO
   AND (A.PHY_CODE_MAX = 'ONH' AND T.CHEM_NAME IN ('O', 'N', 'H') OR
       A.PHY_CODE_MAX = 'HX' AND T.CHEM_NAME NOT IN ('O', 'N', 'H'))
 ORDER BY T.CHEM_NAME
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.getChemJudgeResult" desc="获取成分判定结果">
		<![CDATA[
SELECT B.CHEM_NAME, B.UNQUALIFIED_TYPE
  FROM QCM_BC_CHEMJUDGE A, QCM_BC_CHEM_RESULT B
 WHERE A.SAMPLE_ID = {0}
   AND A.SAMPLE_NO = {1}
   AND A.CHEM_JUDGE_ID =
       (SELECT MAX(C.CHEM_JUDGE_ID)
          FROM QCM_BC_CHEMJUDGE C
         WHERE C.SAMPLE_ID = A.SAMPLE_ID
           AND C.SAMPLE_NO = A.SAMPLE_NO)
   AND B.CHEM_JUDGE_ID = A.CHEM_JUDGE_ID
   AND B.JUDGE_SEQ = A.JUDGE_SEQ
   AND (B.NK_QUALIFIED = '0' OR B.JF_QUALIFIED = '0')
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.getunqualifiedSampleNo" desc="获取没有通过的试样号">
		<![CDATA[
SELECT A.SAMPLE_ID, A.SAMPLE_NO
  FROM QCM_BC_CHEMJUDGE A
 WHERE A.SAMPLE_ID = {0}
   AND A.CHEM_JUDGE_ID =
       (SELECT MAX(B.CHEM_JUDGE_ID)
          FROM QCM_BC_CHEMJUDGE B
         WHERE B.SAMPLE_ID = A.SAMPLE_ID)
   AND A.JUDGERESULT_CHEM IN ('40740102', '40740104')
 GROUP BY A.SAMPLE_ID, A.SAMPLE_NO
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.getASample" desc="获取没做复样的项目">
		<![CDATA[
SELECT *
  FROM PIPE_CHECKCONSIGN_CHEMDETAIL T
 WHERE T.CHECK_NO = 'A' || SUBSTR({0}, 2)
   AND T.SAMPLE_NO = (SELECT MAX(A.SAMPLE_NO)
                        FROM PIPE_CHECKCONSIGN_CHEMDETAIL A
                       WHERE A.CHECK_NO = T.CHECK_NO)
   AND NOT EXISTS(SELECT 1 FROM PIPE_CHECKCONSIGN_CHEMDETAIL B
   WHERE B.CHECK_NO = {0})
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.setJhyChemValidflag" desc="修改检化验有效标志">
		<![CDATA[
UPDATE QCM_JHY_ELEMENTS T SET T.VALIDFLAG = '0' WHERE T.SAMPLE_ID = {0}
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.clear" desc="清除质量理化表">
		<![CDATA[
DELETE FROM (SELECT *
               FROM QCM_JHY_ELEMENTS T
              WHERE T.SAMPLE_ID = '#SAMPLE_ID#'
                AND T.SAMPLE_NO = '#SAMPLE_NO#')
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.insertQcmJhyCheckconsign" desc="新增委托表">
		<![CDATA[
INSERT INTO QCM_JHY_PIPE_CHECKCONSIGN
  (CHECK_NO,
   CAILI_PATH,
   FUSHI_PATH,
   JINWU_PATH,
   GONGCHENG_PATH,
   DIBEI_PATH,
   HUAXUE_PATH)
VALUES
  ('#CHECK_NO#',
   '#CAILI_PATH#',
   '#FUSHI_PATH#',
   '#JINWU_PATH#',
   '#GONGCHENG_PATH#',
   '#DIBEI_PATH#',
   '#HUAXUE_PATH#')
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.updateQcmJhyCheckconsign" desc="更新委托表">
		<![CDATA[
UPDATE QCM_JHY_PIPE_CHECKCONSIGN
   SET CAILI_PATH = '#CAILI_PATH#',
       FUSHI_PATH = '#FUSHI_PATH#',
       JINWU_PATH = '#JINWU_PATH#',
       GONGCHENG_PATH = '#GONGCHENG_PATH#',
       DIBEI_PATH = '#DIBEI_PATH#',
       HUAXUE_PATH = '#HUAXUE_PATH#'
 WHERE CHECK_NO = '#CHECK_NO#'
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.getQcmJhyCheckconsignCount" desc="获取委托表数目">
		<![CDATA[
SELECT COUNT(1) COUNT FROM QCM_JHY_PIPE_CHECKCONSIGN WHERE CHECK_NO = '#CHECK_NO#'
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.updateBaseInfoFlag" desc="更新一层表状态">
		<![CDATA[
UPDATE PIPE_CHECKCONSIGN_BASEINFO T
   SET T.FLAG = '5'
 WHERE (SELECT COUNT(1)
          FROM PIPE_CHECKCONSIGN_DETAIL A
         WHERE A.CHECK_NO = T.CHECK_NO) =
       (SELECT COUNT(1)
          FROM PIPE_CHECKCONSIGN_DETAIL B
         WHERE B.CHECK_NO = T.CHECK_NO
           AND B.FLAG = '5')
   AND T.CHECK_NO = {0}
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.getPhyMinQuote" desc="获取试样组报出情况">
		<![CDATA[
SELECT A.PHY_CODE_MAX,
       A.SAMPLE_NO,
       (SELECT COUNT(1)
          FROM QCM_JHY_PHYRESULT A2
         WHERE A2.SAMPLE_ID = A.CHECK_NO
           AND A2.BATCH_NO = A.BATCH_NO
           AND A2.PHY_CODE_MIN = A.PHY_CODE_MAX
           AND A2.SAMPLE_NO = A.SAMPLE_NO) CNT
  FROM QCM_ZC_CHECKCONSIGN_DETAIL A
 WHERE A.CHECK_NO = {0}
   AND A.PHY_CODE_MAX NOT IN ('HX', 'ONH')
   AND A.VALIDFLAG = '1'
UNION ALL
SELECT NULL,
       A.SAMPLE_NO,
       (SELECT COUNT(1)
          FROM QCM_JHY_ELEMENTS A2
         WHERE A2.SAMPLE_ID = A.CHECK_NO
           AND A2.BATCH_NO = A.BATCH_NO
           AND A2.SAMPLE_NO = A.SAMPLE_NO) CNT
  FROM QCM_ZC_CHECKCONSIGN_DETAIL A
 WHERE A.CHECK_NO = {0}
   AND A.PHY_CODE_MAX IN ('HX', 'ONH')
   AND A.VALIDFLAG = '1'
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.setConsignQuote" desc="修改委托表报出情况">
		<![CDATA[
UPDATE QCM_ZC_CHECKCONSIGN A
      SET A.QUOTE_STATE = {1}, A.IS_NO_SSC = {2}, A.IS_NO_HIC = {3}
    WHERE A.CHECK_NO = {0}
		]]>
	</query>
	
	<query id="JhyCpChemToQcmChemTask.setConsignQuoteDate" desc="修改委托表报齐时间">
		<![CDATA[
UPDATE QCM_ZC_CHECKCONSIGN A
      SET A.QUOTE_DATE = SYSDATE
    WHERE A.CHECK_NO = {0} AND A.QUOTE_DATE IS NULL
		]]>
	</query>

	<query id="JhyCpChemToQcmChemTask.getChemCommon" desc="获取成分是否共样">
		<![CDATA[
SELECT *
  FROM CRAFT_ORD_DESIGN_STD_CIC A, CRAFT_ORD_DESIGN B, PLN_SALEORD C
 WHERE C.ORD_LN_DLY_PK = {0}
   AND B.ORD_LN_PK = C.ORD_LN_PK
   AND B.CRAFT_SEQ = {1}
   AND A.DESGIN_KEY = B.DESGIN_KEY
   AND A.COMMON = '1'
   AND ROWNUM <= 1
		]]>
	</query>

	<query id="JhyCpChemToQcmChemTask.getCheckConsignByCheckNo" desc="获取委托主表">
	<![CDATA[
SELECT *
  FROM QCM_ZC_CHECKCONSIGN T
 WHERE T.CHECK_NO = {0}
 AND T.JUDGE_STOVE_NO = {1}
 AND T.BATCH_NO = {2}
		]]>
 	</query>

	<query id="JhyCpChemToQcmChemTask.deleteCheckConsignByCheckNo" desc="删除委托主表">
		<![CDATA[
DELETE FROM QCM_ZC_CHECKCONSIGN T WHERE T.CHECK_NO = {0} AND T.JUDGE_STOVE_NO = {1} AND T.BATCH_NO = {2}
		]]>
	</query>

	<query id="JhyCpChemToQcmChemTask.getCheckConsignByPhyCodeMax" desc="获取委托二层表">
		<![CDATA[
SELECT *
  FROM QCM_ZC_CHECKCONSIGN_DETAIL T
 WHERE T.CHECK_NO = {0}
   AND T.BATCH_NO = {1}
   AND T.PHY_CODE_MAX = {2}
		]]>
	</query>

	<query id="JhyCpChemToQcmChemTask.deleteConsignDetailByPhyCodeMax" desc="删除委托二层表">
		<![CDATA[
DELETE FROM QCM_ZC_CHECKCONSIGN_DETAIL T
 WHERE T.CHECK_NO = {0}
   AND T.BATCH_NO = {1}
   AND T.PHY_CODE_MAX = {2}
		]]>
	</query>

	<query id="JhyCpChemToQcmChemTask.insertConsignDetail" desc="新增委托二层表">
		<![CDATA[
 INSERT INTO QCM_ZC_CHECKCONSIGN_DETAIL(
        CHECK_NO,
        BATCH_NO,
        SAMPLE_NO,
        PHY_CODE_MAX,
        PHY_NAME_MAX,
        RATE,
        DESC_RATE,
        EIC,
        SAMPLE_NO_MIN,
        SAMPLE_COUNT,
        SAMPLE_LEN,
        MAT_NO,
        HEAD_MAT_NO,
        BAR_CODE,
        NK_RESULT,
        JF_RESULT,
        RESULT_SOURCE,
        IS_QUOTE,
        VALIDFLAG,
        OLD_JUDGE_STOVE_NO,
        OLD_BATCH_NO,
        IS_MAIN,
        CREATE_TIME)
 VALUES(
        '#CHECK_NO#',
        '#BATCH_NO#',
        '#SAMPLE_NO#',
        '#PHY_CODE_MAX#',
        '#PHY_NAME_MAX#',
        '#RATE#',
        '#DESC_RATE#',
        '#EIC#',
        '#SAMPLE_NO_MIN#',
        '#SAMPLE_COUNT#',
        '#SAMPLE_LEN#',
        '#MAT_NO#',
        '#HEAD_MAT_NO#',
        '#BAR_CODE#',
        '#NK_RESULT#',
        '#JF_RESULT#',
        '#RESULT_SOURCE#',
        '#IS_QUOTE#',
        '#VALIDFLAG#',
        '#OLD_JUDGE_STOVE_NO#',
        '#OLD_BATCH_NO#',
        '#IS_MAIN#',
        SYSDATE)
		]]>
	</query>

	<query id="JhyCpChemToQcmChemTask.insertCheckConsign" desc="新增委托主表">
		<![CDATA[
 INSERT INTO QCM_ZC_CHECKCONSIGN(
        CHECK_NO,
        LOT_NO,
        JUDGE_STOVE_NO,
        BATCH_NO,
        STOVE_NO,
        PROCESS_CODE,
        PLINE_CODE,
        PLINE_NAME,
        ACT_COUNT,
        ACT_WEIGHT,
        ACT_THEORY_WEIGHT,
        CHEM_RESULT_CODE,
        PHY_RESULT_CODE,
        CHEM_RESULT_PATH,
        PHY_RESULT_PATH,
        MATERIAL_NO,
        MATERIAL_NAME,
        PRODUCCODE,
        PRODUCNAME,
        STEELCODE,
        STEELNAME,
        GRADECODE,
        GRADENAME,
        SPEC_CODE,
        SPEC_NAME,
        MODEL_CODE,
        MODEL_DESC,
        STD_CODE,
        STD_NAME,
        STD_STYLE,
        STD_STYLE_DESC,
        ACT_DIMATER,
        ACT_HEIGHT,
        ACT_LEN_MIN,
        ACT_LEN_MAX,
        PRO_ORDER_ID,
        GX_PLAN_NO,
        ORD_LN_DLY_PK,
        CRAF_NO,
        CRAFT_SEQ,
        INDEX_SEQ,
        STEEL_STANDRAD,
        CIC,
        PIC,
        BAL_YEAR_MONTH,
        LK_FLAG,
        JUDGE_MEMO,
        JUDGE_TIME,
        JUDGE_MAKER,
        AUDIT_RESULT,
        AUDIT_MEMO,
        CHEM_JUDGE_ID,
        PHY_JUDGE_ID,
        VALIDFLAG,
        CONSIGN_NAME,
        CONSIGN_TIME,
        CONSIGN_MEMO,
        CAILI_PATH,
        FUSHI_PATH,
        JINWU_PATH,
        GONGCHENG_PATH,
        DIBEI_PATH,
        HUAXUE_PATH,
        JUDGE_RESULT_CODE,
        IS_FLAG,
        CYCLES_FLAG,
        RESAMPLE,
        TARGET,
        CRAFT_SOURCE,
        IS_NO_SSC,
        APPLY_RESAMPLE,
        IS_NO_HIC,
        LOT_NO_GROUP,
        QUOTE_STATE,
        ZP_M_LH,
        ZP_COLL,
        LIKU_PROCESS_CODE)
 VALUES(
        '#CHECK_NO#',
        '#LOT_NO#',
        '#JUDGE_STOVE_NO#',
        '#BATCH_NO#',
        '#STOVE_NO#',
        '#PROCESS_CODE#',
        '#PLINE_CODE#',
        '#PLINE_NAME#',
        '#ACT_COUNT#',
        '#ACT_WEIGHT#',
        '#ACT_THEORY_WEIGHT#',
        '#CHEM_RESULT_CODE#',
        '#PHY_RESULT_CODE#',
        '#CHEM_RESULT_PATH#',
        '#PHY_RESULT_PATH#',
        '#MATERIAL_NO#',
        '#MATERIAL_NAME#',
        '#PRODUCCODE#',
        '#PRODUCNAME#',
        '#STEELCODE#',
        '#STEELNAME#',
        '#GRADECODE#',
        '#GRADENAME#',
        '#SPEC_CODE#',
        '#SPEC_NAME#',
        '#MODEL_CODE#',
        '#MODEL_DESC#',
        '#STD_CODE#',
        '#STD_NAME#',
        '#STD_STYLE#',
        '#STD_STYLE_DESC#',
        '#ACT_DIMATER#',
        '#ACT_HEIGHT#',
        '#ACT_LEN_MIN#',
        '#ACT_LEN_MAX#',
        '#PRO_ORDER_ID#',
        '#GX_PLAN_NO#',
        '#ORD_LN_DLY_PK#',
        '#CRAF_NO#',
        '#CRAFT_SEQ#',
        '#INDEX_SEQ#',
        '#STEEL_STANDRAD#',
        '#CIC#',
        '#PIC#',
        '#BAL_YEAR_MONTH#',
        '#LK_FLAG#',
        '#JUDGE_MEMO#',
        SYSDATE,
        '#JUDGE_MAKER#',
        '#AUDIT_RESULT#',
        '#AUDIT_MEMO#',
        '#CHEM_JUDGE_ID#',
        '#PHY_JUDGE_ID#',
        '#VALIDFLAG#',
        '#CONSIGN_NAME#',
        SYSDATE,
        '#CONSIGN_MEMO#',
        '#CAILI_PATH#',
        '#FUSHI_PATH#',
        '#JINWU_PATH#',
        '#GONGCHENG_PATH#',
        '#DIBEI_PATH#',
        '#HUAXUE_PATH#',
        '#JUDGE_RESULT_CODE#',
        '#IS_FLAG#',
        '#CYCLES_FLAG#',
        '#RESAMPLE#',
        '#TARGET#',
        '#CRAFT_SOURCE#',
        '#IS_NO_SSC#',
        '#APPLY_RESAMPLE#',
        '#IS_NO_HIC#',
        '#LOT_NO_GROUP#',
        '#QUOTE_STATE#',
        '#ZP_M_LH#',
        '#ZP_COLL#',
        '#LIKU_PROCESS_CODE#')
		]]>
	</query>

	<query id="JhyCpChemToQcmChemTask.getFirstChemByBatch" desc="获取初验成分">
		<![CDATA[
SELECT A.*
  FROM QCM_JHY_ELEMENTS A, QCM_ZC_CHECKCONSIGN_DETAIL B
 WHERE A.JUDGE_STOVE_NO = {0}
   AND A.BATCH_NO = {1}
   AND A.VALIDFLAG = '1'
   AND A.SAMPLE_ID NOT LIKE 'F%'
   AND EXISTS (SELECT 1
          FROM QCM_ZC_CHECKCONSIGN_DETAIL B
         WHERE B.CHECK_NO = A.SAMPLE_ID
           AND B.BATCH_NO = A.BATCH_NO
           AND B.NK_RESULT = '0'
           AND B.PHY_CODE_MAX IN ('HX', 'ONH'))
		]]>
	</query>
</queryMap>
