<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">
	<query id="JdgQcmZcPhyColresult.insert" desc="新增">
		<![CDATA[
   INSERT INTO QCM_ZC_PHY_COLRESULT(
        JUDGE_ID,
        DETAIL_SEQ,
        RESULT_SEQ,
        PHY_CODE_MAX,
        PHY_NAME_MAX,
        PHY_CODE_MIN,
        PHY_NAME_MIN,
        PHY_CODE,
        PHY_NAME,
        ITEM_CODE_F,
        ITEM_NAME_F,
        ITEM_CODE_W,
        ITEM_NAME_W,
        ITEM_CODE_S,
        ITEM_NAME_S,
        VALUE1,
        VALUE2,
        VALUE3,
        VALUE4,
        VALUE5,
        VALUE6,
        VALUE7,
        VALUE8,
        VALUE9,
        VALUE10,
        VALUE11,
        VALUE12,
        VALUE13,
        VALUE14,
        VALUE15,
        AVERAGE,
        NK_TOL_QUALIFIED,
        JF_TOL_QUALIFIED,
        IS_GOOD,
        IS_DEFECT,
        CHECK_TEMP,
        HARDNESS_TYPE,
        PHY_CODE_DIR,
        PHY_NAME_DIR,
        SAMPLE_STYLE,
        SAMPLE_SIZE,
        JF_MIN,
        JF_MAX,
        NK_MIN,
        NK_MAX,
        NK_ADD_MIN,
        NK_ADD_MAX,
        NK_JUDGE_BASIS,
        NK_ADD_CONDITION,
        NK_ADD_JUDGE_BASIS,
        JF_JUDGE_BASIS,
        JF_ADD_CONDITION,
        JF_ADD_JUDGE_BASIS,
        JF_ADD_MIN,
        JF_ADD_MAX,
        ALLRESULT,
        NK_QUALIFIED,
        FILE_PATH,
        JF_QUALIFIED,
        NK_ADD_QUALIFIED,
        JF_ADD_QUALIFIED,
        UNQUALIFIED_TYPE,
        SAMPLE_JB,
		NOTCH_SHAPE
		)
 VALUES( 
        '#JUDGE_ID#',
        '#DETAIL_SEQ#',
        '#RESULT_SEQ#',
        '#PHY_CODE_MAX#',
        '#PHY_NAME_MAX#',
        '#PHY_CODE_MIN#',
        '#PHY_NAME_MIN#',
        '#PHY_CODE#',
        '#PHY_NAME#',
        '#ITEM_CODE_F#',
        '#ITEM_NAME_F#',
        '#ITEM_CODE_W#',
        '#ITEM_NAME_W#',
        '#ITEM_CODE_S#',
        '#ITEM_NAME_S#',
        '#VALUE1#',
        '#VALUE2#',
        '#VALUE3#',
        '#VALUE4#',
        '#VALUE5#',
        '#VALUE6#',
        '#VALUE7#',
        '#VALUE8#',
        '#VALUE9#',
        '#VALUE10#',
        '#VALUE11#',
        '#VALUE12#',
        '#VALUE13#',
        '#VALUE14#',
        '#VALUE15#',
        '#AVERAGE#',
        '#NK_TOL_QUALIFIED#',
        '#JF_TOL_QUALIFIED#',
        '#IS_GOOD#',
        '#IS_DEFECT#',
        '#CHECK_TEMP#',
        '#HARDNESS_TYPE#',
        '#PHY_CODE_DIR#',
        '#PHY_NAME_DIR#',
        '#SAMPLE_STYLE#',
        '#SAMPLE_SIZE#',
        '#JF_MIN#',
        '#JF_MAX#',
        '#NK_MIN#',
        '#NK_MAX#',
        '#NK_ADD_MIN#',
        '#NK_ADD_MAX#',
        '#NK_JUDGE_BASIS#',
        '#NK_ADD_CONDITION#',
        '#NK_ADD_JUDGE_BASIS#',
        '#JF_JUDGE_BASIS#',
        '#JF_ADD_CONDITION#',
        '#JF_ADD_JUDGE_BASIS#',
        '#JF_ADD_MIN#',
        '#JF_ADD_MAX#',
        '#ALLRESULT#',
        '#NK_QUALIFIED#',
        '#FILE_PATH#',
        '#JF_QUALIFIED#',
        '#NK_ADD_QUALIFIED#',
        '#JF_ADD_QUALIFIED#',
        '#UNQUALIFIED_TYPE#',
        '#SAMPLE_JB#',
		'#NOTCH_SHAPE#')
		]]>
	</query>
	
	<query id="JdgQcmZcPhyColresult.getZbsByBatchNoApplyCode" desc="通过炉批+送判单号查询">
		<![CDATA[
 SELECT A.*, C.PROCESS_CODE, C.CHECK_NO SAMPLE_ID, C.SAMPLE_NO, C.JUDGE_STOVE_NO, C.BATCH_NO
   FROM QCM_ZC_PHY_COLRESULT A, QCM_ZC_JUDGE B, QCM_ZC_CHEM_PHY_DETAIL C
  WHERE B.JUDGE_STOVE_NO = {0}
    AND B.BATCH_NO = {1}
    AND ({2} is null or B.JUGDE_APPLY_CODE = {2})
    AND B.VALIDFLAG = '1'
    AND A.JUDGE_ID = B.JUDGE_ID
    AND C.JUDGE_ID = B.JUDGE_ID
    AND C.VALIDFLAG = '1'
    AND C.CRAFT_SOURCE = '0'
    AND C.ZBS_VALIDFLAG = '1'
    AND C.PROCESS_CODE = {3}
    --AND ((B.BATCH_NO = C.BATCH_NO AND C.RATE IN ('408602','408607')) OR C.RATE IN ('408603','408601'))
    AND A.DETAIL_SEQ = C.DETAIL_SEQ
		]]>
	</query>
</queryMap>