<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="基础信息">
	<query id="JdgQcmZcCheckConsignDetailC.insert" desc="新增">
		<![CDATA[
INSERT INTO QCM_ZC_CHECKCONSIGN_DETAIL_C(
        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)
 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#')
		]]>
	</query>
	
	<query id="JdgQcmZcCheckConsignDetailC.deleteByBatchNo" desc="通过炉批删除">
		<![CDATA[
DELETE FROM QCM_ZC_CHECKCONSIGN_DETAIL_C T
 WHERE EXISTS (SELECT 1
          FROM QCM_ZC_CHECKCONSIGN A
         WHERE A.JUDGE_STOVE_NO = {0}
           AND A.BATCH_NO = {1}
           AND A.PROCESS_CODE = {2}
           AND A.CRAFT_SOURCE = {3}
           AND A.ORD_LN_DLY_PK = {4}
           AND T.CHECK_NO = A.CHECK_NO || 'G')
		]]>
	</query>
</queryMap>