<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="热处理实绩">
<query id="FrmRclReport.doQueryAppResult" desc="外观检验实绩">
        <![CDATA[
 SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.ODMAX,
       T.ODMIN,
       T.OUTOFROUNDNESS,
       T.ENDSTRAIGHTNESS,
       T.FULLLENGTHSTRAIGHTNESS,
       M.JUDGE_STOVE_NO,
       NVL(T.CHECKPIECES,0) CHECKPIECES,
       NVL(T.PASS_NUM,0) PASS_NUM,
       NVL(T.DUBIOUS_NUM,0) DUBIOUS_NUM,
       NVL(T.WAST_NUM,0) WAST_NUM,
       T.DEF_SERIAL_ITEM,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
       DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
  FROM HTT_APPEARANCECHECK_RESULT T,PLN_ZY_RCL_M M
 WHERE 1=1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')

        ]]>
	</query>
	<query id="FrmRclReport.doQueryLoadResult" desc="查询上料台账">
        <![CDATA[
   SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       M.JUDGE_STOVE_NO,
       DECODE(T.IF_MONITOR_RCL, '1', '是', '0', '否', '否') IF_MONITOR_RCL,
       T.MONITORDEMAND,
       T.PRDCR_NO,
       T.PRODUCER,
       TO_CHAR(T.PRODUCER_TIME, 'YYYY-MM-DD HH24:MI:SS') PRODUCER_TIME,
       NVL(T.PRO_NUM, 0) PRO_NUM,
       NVL(T.PRO_WT, 0) PRO_WT,
       NVL(T.FAIL_NUM, 0) FAIL_NUM,
       NVL(T.FAIL_WT, 0) FAIL_WT,
       NVL(T.OFFLINE_NUM, 0) OFFLINE_NUM,
       NVL(T.OFFLINE_WT, 0) OFFLINE_WT,
       NVL(T.RE_NUM, 0) RE_NUM,
       NVL(T.RE_WT, 0) RE_WT,
       TO_CHAR(T.LOAD_TIME, 'YYYY-MM-DD HH24:MI:SS') LOAD_TIME,
        DECODE(T.LOAD_SHIFT,'1','早','2','中','3','夜') LOAD_SHIFT,
       DECODE(T.LOAD_GROUP,'1','甲','2','乙','3','丙','4','丁') LOAD_GROUP,
       T.LOAD_USER,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.COL_MODE,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS,
              MAT_SOURCE
  FROM HTT_LOADING_RESULT T,PLN_ZY_RCL_M M
WHERE 1=1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
          ]]>
	</query>
  <query id="FrmRclReport.doQueryHeatResult" desc="查询高温台账">
        <![CDATA[
        SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       M.JUDGE_STOVE_NO,
       TO_CHAR(T.HHEAT_ENTER_TIME, 'YYYY-MM-DD HH24:MI:SS') HHEAT_ENTER_TIME,
       TO_CHAR(T.HHEAT_OUT_TIME, 'YYYY-MM-DD HH24:MI:SS') HHEAT_OUT_TIME,
       T.HHEAT_EXIT_TEMP,
       T.HHEAT_TAKT_TIME,
       T.HHEAT_CRUVE1,
       T.HHEAT_CRUVE2,
       T.HHEAT_CRUVE3,
       T.HHEAT_CRUVE4,
       T.HHEAT_CRUVE5,
       T.HHEAT_CRUVE6,
       T.HHEAT_AVG_TEMP1,
       T.HHEAT_AVG_TEMP2,
       T.HHEAT_AVG_TEMP3,
       T.HHEAT_AVG_TEMP4,
       T.HHEAT_AVG_TEMP5,
       T.HHEAT_AVG_TEMP6,
       NVL(T.PRO_NUM, 0) PRO_NUM,
       NVL(T.PRO_WT, 0) PRO_WT,
       NVL(T.FAIL_NUM, 0) FAIL_NUM,
       NVL(T.FAIL_WT, 0) FAIL_WT,
       NVL(T.OFFLINE_NUM, 0) OFFLINE_NUM,
       NVL(T.OFFLINE_WT, 0) OFFLINE_WT,
       NVL(T.RE_NUM, 0) RE_NUM,
       NVL(T.RE_WT, 0) RE_WT,
       T.COL_MODE,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
       DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.PRODUCER,
       TO_CHAR(T.PRODUCER_TIME, 'YYYY-MM-DD HH24:MI:SS') PRODUCER_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
  FROM HTT_HHEAT_RESULT T,PLN_ZY_RCL_M M
 WHERE 1 = 1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
        
          ]]>
	</query>
	<query id="FrmRclReport.doQueryQuencResult" desc="查询淬火台账">
        <![CDATA[
         SELECT 
       T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.QUENCH_WAY,
       T.TRAFFIC,
       T.LENGTH_TIME,
       M.JUDGE_STOVE_NO,
       NVL(T.PRO_NUM,0) PASS_NUM,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
        DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.COL_MODE,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
 FROM HTT_QUENCHING_RESULT T,PLN_ZY_RCL_M M
  WHERE 1=1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
          ]]>
	</query>
	<query id="FrmRclReport.doQueryLheatResult" desc="查询低温台账">
        <![CDATA[
        SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       M.JUDGE_STOVE_NO,
       TO_CHAR(T.LHEAT_ENTER_TIME, 'YYYY-MM-DD HH24:MI:SS') LHEAT_ENTER_TIME,
       TO_CHAR(T.LHEAT_OUT_TIME, 'YYYY-MM-DD HH24:MI:SS') LHEAT_OUT_TIME,
       T.LHEAT_EXIT_TEMP,
       T.LHEAT_TAKT_TIME,
       T.LHEAT_CRUVE1,
       T.LHEAT_CRUVE2,
       T.LHEAT_CRUVE3,
       T.LHEAT_CRUVE4,
       T.LHEAT_CRUVE5,
       T.LHEAT_CRUVE6,
       T.LHEAT_CRUVE7,
       T.LHEAT_CRUVE8,
       T.LHEAT_CRUVE9,
       T.LHEAT_AVG_TEMP1,
       T.LHEAT_AVG_TEMP2,
       T.LHEAT_AVG_TEMP3,
       T.LHEAT_AVG_TEMP4,
       T.LHEAT_AVG_TEMP5,
       T.LHEAT_AVG_TEMP6,
       T.LHEAT_AVG_TEMP7,
       T.LHEAT_AVG_TEMP8,
       T.LHEAT_AVG_TEMP9,
       NVL(T.PRO_NUM, 0) PRO_NUM,
       NVL(T.PRO_WT, 0) PRO_WT,
       NVL(T.FAIL_NUM, 0) FAIL_NUM,
       NVL(T.FAIL_WT, 0) FAIL_WT,
       NVL(T.OFFLINE_NUM, 0) OFFLINE_NUM,
       NVL(T.OFFLINE_WT, 0) OFFLINE_WT,
       NVL(T.RE_NUM, 0) RE_NUM,
       NVL(T.RE_WT, 0) RE_WT,
       T.PRODUCER,
       TO_CHAR(T.PRODUCER_TIME, 'YYYY-MM-DD HH24:MI:SS') PRODUCER_TIME,
       T.COL_MODE,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
       DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
  FROM HTT_LHEAT_RESULT T,PLN_ZY_RCL_M M
 WHERE 1=1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
        
          ]]>
	</query>
	<query id="FrmRclReport.doQuerySizeResult" desc="查询定径台账">
        <![CDATA[
        SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       NVL(T.PRO_NUM, 0) PRO_NUM,
       NVL(T.PRO_WT, 0) PRO_WT,
       NVL(T.FAIL_NUM, 0) FAIL_NUM,
       NVL(T.FAIL_WT, 0) FAIL_WT,
       NVL(T.OFFLINE_NUM, 0) OFFLINE_NUM,
       NVL(T.OFFLINE_WT, 0) OFFLINE_WT,
       NVL(T.RE_NUM, 0) RE_NUM,
       NVL(T.RE_WT, 0) RE_WT,
       T.COL_MODE,
       M.JUDGE_STOVE_NO,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
       DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
  FROM HTT_SIZING_RESULT T,PLN_ZY_RCL_M M
 WHERE 1 = 1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
        
          ]]>
	</query>
	<query id="FrmRclReport.doQueryHlatrResult" desc="查询热矫台账">
        <![CDATA[
        SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.ROLL_NUM1,
       T.ROLL_NUM2,
       T.ROLL_NUM3,
       T.BEND_RATE,
       T.LSTRAIGHTEN_TEMP,
       M.JUDGE_STOVE_NO,
       NVL(T.PRO_NUM, 0) PRO_NUM,
       NVL(T.PRO_WT, 0) PRO_WT,
       NVL(T.FAIL_NUM, 0) FAIL_NUM,
       NVL(T.FAIL_WT, 0) FAIL_WT,
       NVL(T.OFFLINE_NUM, 0) OFFLINE_NUM,
       NVL(T.OFFLINE_WT, 0) OFFLINE_WT,
       NVL(T.RE_NUM, 0) RE_NUM,
       NVL(T.RE_WT, 0) RE_WT,
       T.COL_MODE,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
       DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
  FROM HTT_HLSTRAIGHTEN_RESULT T,PLN_ZY_RCL_M M
 WHERE 1 = 1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
        
          ]]>
	</query>
	<query id="FrmRclReport.doQueryClastrResult" desc="查询冷矫台账">
        <![CDATA[
        SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.ROLL_NUM1,
       T.ROLL_NUM2,
       T.ROLL_NUM3,
       T.BEND_RATE,
       T.LSTRAIGHTEN_TEMP,
       M.JUDGE_STOVE_NO,
       TO_CHAR(T.LSTRAIGHTEN_TIME, 'YYYY-MM-DD HH24:MI:SS') LSTRAIGHTEN_TIME,
       NVL(T.PRO_NUM, 0) PRO_NUM,
       NVL(T.PRO_WT, 0) PRO_WT,
       NVL(T.FAIL_NUM, 0) FAIL_NUM,
       NVL(T.FAIL_WT, 0) FAIL_WT,
       NVL(T.OFFLINE_NUM, 0) OFFLINE_NUM,
       NVL(T.OFFLINE_WT, 0) OFFLINE_WT,
       NVL(T.RE_NUM, 0) RE_NUM,
       NVL(T.RE_WT, 0) RE_WT,    
       T.COL_MODE,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
       DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
  FROM HTT_CLSTRAIGHTEN_RESULT T,PLN_ZY_RCL_M M
 WHERE 1=1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
        
          ]]>
	</query>
	<query id="FrmRclReport.doQueryCrackResult" desc="查询探伤台账">
        <![CDATA[
        SELECT T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.TESTING_TYPE,
       M.JUDGE_STOVE_NO,
       nvl(T.TESTING_NUM, 0) TESTING_NUM,
      -- NVL((SUM(T.TESTING_NUM)-SUM(T.EWASTE_NUM)),0) PASS_NUM,
       nvl(T.DUBIOUS_NUM, 0) DUBIOUS_NUM,
       nvl(T.FTESTING_NUM, 0) FTESTING_NUM,
       nvl(T.FPASS_NUM, 0) FPASS_NUM,
       T.FTESTING_REASON,
       nvl(T.EPASS_NUM, 0) EPASS_NUM,
       nvl(T.EWASTE_NUM, 0) EWASTE_NUM,
       T.EWASTE_REASON,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.COL_USER,
       DECODE(T.COL_SHIFT,'1','早','2','中','3','夜') COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲','2','乙','3','丙','4','丁') COL_GROUP,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       DECODE((SELECT T1.STATION_STATUS
                FROM HTT_COM_INFO T1
               WHERE T1.HEAT_PLAN_NO = T.HEAT_PLAN_NO
                AND T1.RESULT_NO =T.RESULT_NO),
              '1',
              '生产中',
              '2',
              '生产完成') STATION_STATUS
  FROM HTT_CRACK_DETECTION_ET T,PLN_ZY_RCL_M M
 WHERE 1 = 1 AND T.HEAT_PLAN_NO=M.HEAT_PLAN_NO AND NVL(T.ZY_BATCH_ID,'/') = NVL(M.ZY_BATCH_ID,'/')
        
          ]]>
	</query>

	<query id="FrmRclReport.doQueryOffLine" desc="查询离线实绩">
		<![CDATA[
	 SELECT T.*, (SELECT BASENAME FROM COM_BASE_INFO WHERE BASECODE=T.RETURN_PROCESS)  RETURN_PROCESS_NAME
  FROM HTT_OFFLINE_RESULT T
 WHERE 1=1
	  ]]>
	</query>

	<query id="FrmRclReport.updateSource" desc="修改收料来源">
		<![CDATA[
	  UPDATE HTT_LOADING_RESULT T SET MAT_SOURCE = ? WHERE 1=1
	  ]]>
	</query>


	<query id="FrmRclReport.ChangePline1" desc="修改收料来源">
		<![CDATA[
	  UPDATE PORT_HTT_BATCH_SAMPLE_RESULT SET PLINE_CODE = ?,PLINE_NAME = ? WHERE HEAT_PLAN_NO = ?
	  ]]>
	</query>


	<query id="FrmRclReport.ChangePline2" desc="修改收料来源">
		<![CDATA[
	  UPDATE HTT_LOADING_RESULT SET  PLINE_CODE = ?,PLINE_NAME = ? WHERE HEAT_PLAN_NO = ?
	  ]]>
	</query>

	<query id="FrmRclReport.doQueryUtResult" desc="查询探伤台账">
		<![CDATA[
          SELECT     T.RESULT_NO,
       T.HEAT_PLAN_NO,
       T.ZY_BATCH_ID,
       T.PROD_INDEX,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.TESTING_TYPE,
       T.TESTING_NUM,
       T.PASS_NUM,
       T.DUBIOUS_NUM,
       T.FTESTING_NUM,
       T.FPASS_NUM,
       T.FTESTING_REASON,
      NVL(T.EPASS_NUM, 0) + NVL(T.EPASS_NUM_ET, 0) + NVL(T.FINAL_NUM, 0) EPASS_NUM,
       T.EWASTE_NUM,
       T.EWASTE_REASON,
    T.COL_TIME,
       T.COL_USER,
       T.COL_SHIFT,
       T.COL_GROUP,
T.CREATE_TIME,
   T.UPDATE_TIME,
       T.UPDATE_NAME,
       T.PRO_YEAR_MONTH_DAY,
       T.BAL_YEAR_MONTH,
       T.PROCESS_SEQ,
       T.BATCH_NO,
       T.MANUAL_PASS_NUM,
       T.MANUAL_FTESTING_NUM,
       T.REJECTED_NUM,
       T.FINAL_NUM,
       T.REJECT_NUM,
       T.TOTAL_FAIL_LEN,
       T.EWASTE_WT,
       T.TESTING_WT,
       T.PASS_NUM_ET,
       T.DUBIOUS_NUM_ET,
       T.FTESTING_NUM_ET,
       T.FPASS_NUM_ET,
       T.EPASS_NUM_ET,
       T.EWASTE_NUM_ET,
       T.PENDING_NUM,
       T.NOTCH_INFO,
       T.NOTCH_LENGTH,
       T.NOTCH_WIDTH,
       T.NOTCH_DEPTH,
       T.TESTING_TIME,
       T.MACHINE_NO,
       T.TESTING_GRADE,
       T.JUDGE_STOVE_NO,
       T.PROCESS_CODE,
       T.DISQUALIFIED_REASON,
       T.QUALIFIED_NUM_AFTER_CUT,
       T.DISQUALIFIED_NUM,
       T.REPORT_NO,
       T.TESTING_POSITION,
       T.TESTING_STANDARD,
       T.COL_END_TIME,
        TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
          TO_CHAR(T.COL_END_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_END_TIME,
        M.ORDER_NO || '/' || M.ORDER_SEQ ORDER_NO,
        M.STEELCODE,
        M.STEELNAME,
        M.GRADECODE,
        M.GRADENAME,
        M.PRODUCCODE,
        M.PRODUCNAME,
        M.MODEL_CODE,
        M.MODEL_DESC,
        M.OUTDIAMETER,
        M.WALLTHICK,
        M.OUTNUM_CUT,
           P.REPORT_PATH
   FROM HTT_CRACK_DETECTION_ET T, PLN_ZY_RCL_M M,HTT_CRACK_DETECTION_PARA P
  WHERE T.HEAT_PLAN_NO = M.HEAT_PLAN_NO
    AND T.RESULT_NO = P.RESULT_NO

          ]]>
	</query>

	</queryMap>