<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">
	<query id="JdgQcmZcChemPhyDetail.insert" desc="查询">
		<![CDATA[
 INSERT INTO QCM_ZC_CHEM_PHY_DETAIL(
        JUDGE_ID,
        DETAIL_SEQ,
        CHECK_NO,
        SAMPLE_NO,
        PHY_CODE_MIN,
        PHY_NAME_MIN,
        RATE,
        DESC_RATE,
        SAMPLE_NO_MIN,
        SAMPLE_COUNT,
        SAMPLE_LEN,
        MAT_NO,
        HEAD_MAT_NO,
        BAR_CODE,
        NK_RESULT,
        JF_RESULT,
        RESULT_SOURCE,
        CRAFT_SOURCE,
        PROCESS_CODE,
        JUDGE_STOVE_NO,
        BATCH_NO,
        JUGDE_APPLY_CODE,
        PIC,
        ZBS_VALIDFLAG)
 VALUES( 
        '#JUDGE_ID#',
        '#DETAIL_SEQ#',
        '#CHECK_NO#',
        '#SAMPLE_NO#',
        '#PHY_CODE_MIN#',
        '#PHY_NAME_MIN#',
        '#RATE#',
        '#DESC_RATE#',
        '#SAMPLE_NO_MIN#',
        '#SAMPLE_COUNT#',
        '#SAMPLE_LEN#',
        '#MAT_NO#',
        '#HEAD_MAT_NO#',
        '#BAR_CODE#',
        '#NK_RESULT#',
        '#JF_RESULT#',
        '#RESULT_SOURCE#',
        '#CRAFT_SOURCE#',
        '#PROCESS_CODE#',
        '#JUDGE_STOVE_NO#',
        '#BATCH_NO#',
        '#JUGDE_APPLY_CODE#',
        '#PIC#',
        '#ZBS_VALIDFLAG#')
		]]>
	</query>
	
	<query id="JdgQcmZcChemPhyDetail.getByBatchNoApplyCode" desc="通过炉批、送判单查询">
		<![CDATA[
SELECT A.*
  FROM QCM_ZC_CHEM_PHY_DETAIL A, QCM_ZC_JUDGE B
 WHERE A.JUDGE_ID = B.JUDGE_ID
   AND B.JUDGE_STOVE_NO = {0}
   AND B.BATCH_NO = {1}
   AND B.JUGDE_APPLY_CODE = {2}
   AND A.PROCESS_CODE = {3}
   AND A.VALIDFLAG = '1'
   AND B.VALIDFLAG = '1'
		]]>
	</query>

	<query id="JdgQcmZcChemPhyDetail.getByBatchNoZZb" desc="通过炉批、送判单查询">
		<![CDATA[
SELECT A.*
     FROM QCM_ZC_CHEM_PHY_DETAIL A
    WHERE A.JUDGE_ID =
          (SELECT MAX(B.JUDGE_ID)
             FROM QCM_ZC_JUDGE B
            WHERE B.JUDGE_STOVE_NO = {0} AND B.BATCH_NO = {1} AND
             B.ORD_LN_DLY_PK LIKE 'ZZB%' AND B.VALIDFLAG = '1')
      AND A.PROCESS_CODE = {2}
      AND A.VALIDFLAG = '1'
		]]>
	</query>
</queryMap>