<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">
	<query id="JdgMchFinalChekResult.getInfo" desc="获取终检信息">
        <![CDATA[
SELECT T.PRO_NUM,
       T.FAIL_NUM,
       T.QUALIFIED_NUM,
       T.UNQUALIFIED_NUM,
       T.CHECK_NUM,
       T.REPORT_PATH,
       T.RESULT_NO,
       T.PLINE_CODE,
       T.FAIL_NUM
  FROM MCH_FINAL_CHECK_RESULT T
  WHERE T.JUDGE_STOVE_NO = {0}
  AND T.BATCH_NO = {1}
        ]]>
    </query>

    <query id="JdgMchFinalChekResult.getNoCheckCount" desc="获取未抽检管号">
        <![CDATA[
SELECT COUNT(DISTINCT T.MAT_NO) COUNT
  FROM MAT_BC_M T
  LEFT JOIN MCH_FINAL_CHECK_RESULT_MAT_NO D
    ON T.MAT_NO = D.MAT_NO
 WHERE T.JUGDE_APPLY_CODE = {0}
   AND T.JUDGE_STOVE_NO = {1}
   AND T.BATCH_NO = {2}
   AND T.PROCESS_CDOE = 'G'
   AND T.QCM_STAUS = '00'
   AND D.MAT_NO IS NULL
   AND T.PLINE_CODE <> 'C034'
   AND T.PLINE_CODE <> 'C092'
   AND T.PLINE_CODE <> 'C102'
   AND T.PLINE_CODE <> 'C104'
   AND T.PLINE_CODE <> 'C107'
   AND T.PLINE_CODE <> 'C108'
   AND T.PLINE_CODE <> 'C109'
        ]]>
    </query>

    <query id="JdgMchFinalChekResult.getNoCheckTreatmentCount" desc="获取未验证处置单">
        <![CDATA[
SELECT COUNT(1) COUNT
  FROM MCH_FINAL_CHECK_RESULT_D D, MCH_FINAL_CHECK_TREATMENT T
 WHERE T.RESULT_NO = D.RESULT_NO
   AND (T.TREATMENT_NO = D.TREATMENT_NO)
   AND MAT_NO IN
       (SELECT MAT_NO
          FROM MAT_BC_M T
         WHERE T.JUGDE_APPLY_CODE = {0}
           AND T.JUDGE_STOVE_NO = {1}
           AND T.BATCH_NO = {2}
           AND T.PROCESS_CDOE = 'G'
           AND T.QCM_STAUS = '00'
           AND T.PLINE_CODE <> 'C034'
           AND T.PLINE_CODE <> 'C092'
           AND T.PLINE_CODE <> 'C102'
   	       AND T.PLINE_CODE <> 'C104')
   AND APPROVAL_STATUS != '2'
        ]]>
    </query>
</queryMap>