<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="基础信息">
	<query id="JdgQcmBcBatchResult.getByBatchNo" desc="通过批号查询">
		<![CDATA[
SELECT *
  FROM QCM_BC_BATCH_RESULT T
 WHERE T.JUDGE_STOVE_NO = {0}
   AND T.BATCH_NO = {1}
   AND T.PROCESS_CODE = {2}
   AND T.CRAFT_SOURCE = {3}
   AND T.ORD_LN_DLY_PK = {4}
		]]>
	</query>
	<query id="JdgQcmBcBatchResult.insert" desc="新增炉批结果表">
		<![CDATA[
INSERT INTO QCM_BC_BATCH_RESULT
  (JUDGE_STOVE_NO,
   BATCH_NO,
   PROCESS_CODE,
   CRAFT_SOURCE,
   CHEM_RESULT_CODE,
   PHY_RESULT_CODE,
   JUDGE_RESULT_CODE,
   IS_NO_SSC,
   CHECK_NO_S,
   IS_NO_HIC,
   JUDGE_TIME,
   JUDGE_MAKER,
   ORD_LN_DLY_PK)
VALUES
  ('#JUDGE_STOVE_NO#',
   '#BATCH_NO#',
   '#PROCESS_CODE#',
   '#CRAFT_SOURCE#',
   '#CHEM_RESULT_CODE#',
   '#PHY_RESULT_CODE#',
   '#JUDGE_RESULT_CODE#',
   '#IS_NO_SSC#',
   '#CHECK_NO_S#',
   '#IS_NO_HIC#',
   SYSDATE,
   '#JUDGE_MAKER#',
   '#ORD_LN_DLY_PK#')
		]]>
	</query>
	
	<query id="JdgQcmBcBatchResult.update" desc="修改炉批结果表">
		<![CDATA[
UPDATE QCM_BC_BATCH_RESULT
   SET CHEM_RESULT_CODE  = '#CHEM_RESULT_CODE#',
       PHY_RESULT_CODE   = '#PHY_RESULT_CODE#',
       JUDGE_RESULT_CODE = '#JUDGE_RESULT_CODE#',
       IS_NO_SSC         = '#IS_NO_SSC#',
       CHECK_NO_S        = '#CHECK_NO_S#',
       IS_NO_HIC = '#IS_NO_HIC#',
       JUDGE_TIME = SYSDATE,
       JUDGE_MAKER = '#JUDGE_MAKER#'
 WHERE JUDGE_STOVE_NO = '#JUDGE_STOVE_NO#'
   AND BATCH_NO = '#BATCH_NO#'
   AND PROCESS_CODE = '#PROCESS_CODE#'
   AND CRAFT_SOURCE = '#CRAFT_SOURCE#'
   AND ORD_LN_DLY_PK = '#ORD_LN_DLY_PK#'
		]]>
	</query>
	
	<query id="JdgQcmBcBatchResult.Clear" desc="清空炉批结果表">
		<![CDATA[
UPDATE QCM_BC_BATCH_RESULT
   SET CHEM_RESULT_CODE  = NULL,
       PHY_RESULT_CODE   = NULL,
       JUDGE_RESULT_CODE = NULL,
       IS_NO_SSC         = NULL,
       CHECK_NO_S        = NULL,
       IS_NO_HIC = NULL,
       JUDGE_TIME = NULL,
       JUDGE_MAKER = NULL
 WHERE JUDGE_STOVE_NO = {0}
   AND BATCH_NO = {1}
   AND PROCESS_CODE = {2}
   AND CRAFT_SOURCE = {3}
   AND ORD_LN_DLY_PK = {4}
		]]>
	</query>
	
	<query id="JdgQcmBcBatchResult.clearJudgeResult" desc="清空炉批综合结果">
		<![CDATA[
UPDATE QCM_BC_BATCH_RESULT
   SET JUDGE_RESULT_CODE = NULL
 WHERE JUDGE_STOVE_NO = {0}
   AND BATCH_NO = {1}
   AND PROCESS_CODE = {2}
   AND CRAFT_SOURCE = {3}
   AND ORD_LN_DLY_PK = {4}
		]]>
	</query>
</queryMap>