<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="炉计划利库">
	<query id="FrmRollTubeLibraryRcl.queryPlanStoveD" desc="查询热处理虚拟炉计划">
            <![CDATA[
       SELECT T.HEAT_PLAN_NO,
       T.GX_PRO_SEQ,
       T.STOVE_NO,
       T.JUDGE_STOVE_NO,
       T.BATCH_NO,
       DECODE(T.PLANSTATUS,'00','计划','10','下发','20','生产中','30','生产完成','40','关闭') PLANSTATUS,
       DECODE(T.IS_CLOSE,'0','自动','1','手动','/')  IS_CLOSE,
      DECODE(T.PER_STATUS,
              '00',
              '上料开始',
              '10',
              '高温开始',
              '20',
              '淬火开始',
              '30',
              '低温开始',
              '40',
              '定径开始',
              '50',
              '热矫开始',
              '60',
              '冷矫开始',
              '70',
              '检验开始',
              '80',
              '探伤开始',
              '90',
              '交库开始','/') PER_STATUS,
       DECODE(T.BESIDE_STATUS,
              '00',
              '上料结束',
              '10',
              '高温结束',
              '20',
              '淬火结束',
              '30',
              '低温结束',
              '40',
              '定径结束',
              '50',
              '热矫结束',
              '60',
              '冷矫结束',
              '70',
              '检验结束',
              '80',
              '探伤结束',
              '90',
              '交库结束','/') BESIDE_STATUS,
              T.UPPER_HEATPLAN_ID,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.UPPER_PROCESS_CODE,
       T.NEXT_PROCESS_CODE,
       T.GOWHERE_CODE,
       T.GOWHERE_NAME,
       T.PROD_STANDARD,
       T.OUTPUT_STANDARD,
       DECODE(T.ISENDGX,'1','是','/') ISENDGX,
       DECODE(T.IF_MATCH_ODD,'1','利库计划','2','组炉计划','3','精整计划','4','精整返线计划','6','本工序精整利库','正常计划') IF_MATCH_ODD,
       DECODE(T.IF_DO_HEAT_PLAN,'1','是','/') IF_DO_HEAT_PLAN,
       T.ORDER_SOURCE,
       T.ORD_LN_DLY_PK,
       T.ORDER_NO||'/'||T.ORDER_SEQ ORDER_NO,
       T.ORDER_SEQ,
       T.DELIVERY_NO,
       T.REQ_BL_ID,
       T.IF_EXPORT,
       T.PRIORITY,
       T.PRIORITY_MEMO,
       T.PRO_MONTH,
       TO_CHAR(TO_DATE(T.PRO_DAY, 'YYYY-MM-DD'), 'YYYY-MM-DD') PRO_DAY,
       TO_CHAR(TO_DATE(T.BAL_YEAR_MONTH, 'YYYY-MM'), 'YYYY-MM') BAL_YEAR_MONTH,
       DECODE(T.IF_MONITOR,'1','是','/') IF_MONITOR,
       T.PRDCR_NO,
       T.MONITOR_POINT,
       T.BOM,
       T.WHOLE_BACKLOG,
       T.WHOLE_BACKLOG_DESC,
       T.STATION_ROAD,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.SEC_CRAFT_FILE_NO,
       T.GRADECODE,
       T.GRADENAME,
       T.STEELCODE,
       T.STEELNAME,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.INWL_ID,
       T.INWL_DESC,
       T.OUTWL_ID,
       T.OUTWL_DESC,
       T.OUTDIAMETER_IN,
       T.WALLTHICK_IN,
       T.LENGTH_IN,
       T.LENGTHMAX_IN,
       T.LENGTHMIN_IN,
       T.OUTNUM_CUT,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.LENGTHMIN,
       T.LENGTHMAX,
       T.PLN_INSINGLE_NUM,
       T.PLN_INSINGLE_WT,
       T.PLN_INDOUBLE_NUM,
       T.PLN_INDOUBLE_WT,
       T.PLN_OUTSINGLE_NUM,
       T.PLN_OUTSINGLE_W,
       T.PLN_OUTDOUBLE_NUM,
       T.PLN_OUTDOUBLE_W,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DOWNMAN,
       TO_CHAR(T.DOWNTIME, 'YYYY-MM-DD HH24:MI:SS') DOWNTIME,
       T.INDEX_SEQ,S.PLN_DIVIDE_ID,S.ZY_BATCH_ID,
        T.DECISION,
        CASE WHEN T.UPPER_PROCESS_CODE='D' THEN
       (SELECT MAX(DECODE(Z.PLANSTATUS,'00','计划','10','下发','20','生产中','30','生产完成','40','关闭')) FROM PLN_ZY_ZG_M Z WHERE Z.FEED_HEAT_NO=T.FEED_HEAT_NO) 
       WHEN T.UPPER_PROCESS_CODE='E' THEN 
          (SELECT MAX(DECODE(Z.PLANSTATUS,'00','计划','10','下发','20','生产中','30','生产完成','40','关闭')) FROM PLN_ZY_DBK_M Z WHERE Z.JUDGE_STOVE_NO=T.FEED_HEAT_NO) 
         ELSE
           ''
           END PLANSTATUS_GX,T.FLAG_STOVE_NO,T.FEED_HEAT_NO
  FROM PLN_ZY_RCL_M T, PLN_ORDER_RCL_S S
 WHERE T.PRO_PLAN_ID = S.PRO_PLAN_ID
   AND T.GX_PLAN_NO = S.GX_PLAN_NO
              ]]>
	</query>
	<query id="FrmRollTubeLibraryRcl.queryPlanStoveDc" desc="查询热处理实际炉计划">
            <![CDATA[
         SELECT 
       T.HEAT_PLAN_NO,
       T.HEAT_PLAN_SQE,
       T.JUGDE_APPLY_CODE,
       T1.ZY_BATCH_ID,
       T.STOVE_NO,
       T.JUDGE_STOVE_NO,
       T.BATCH_NO,
       T.BATCH_GROUD_NO,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.OUTDIAMETER_IN,
       T.WALLTHICK_IN,
       T.OUTNUM_CUT,
       T.LENGTH_IN,
       T.LENGTHMAX_IN,
       T.LENGTHMIN_IN,
       T.PLAN_INDOUBLE_NUM,
       T.PLAN_INDOUBLE_WT,
       T.REAL_INDOUBLE_NUM,
       T.REAL_INDOUBLE_WT,
       T.REAL_OUTDOUBLE_NUM,
       T.REAL_OUTDOUBLE_WT,T.FLAG_STOVE_NO,T.FEED_HEAT_NO
 FROM PLN_ZY_RCL_C T,PLN_ORDER_RCL_S T1
 WHERE 1=1
  AND T.PRO_PLAN_ID=T1.PRO_PLAN_ID
 AND T.GX_PLAN_NO=T1.GX_PLAN_NO
              ]]>
	</query>
	<query id="FrmRollTubeLibraryRcl.queryPlanOrderD" desc="查询热处理排产(界面)">
             <![CDATA[  
    SELECT CASE
         WHEN TO_NUMBER(NVL(RCL.WEIGTH_S, 0)) -
              TO_NUMBER(NVL(RCL.BATCHED_WT, 0)) < 0 THEN
          0
         ELSE
          TO_NUMBER(NVL(RCL.WEIGTH_S, 0)) - TO_NUMBER(NVL(RCL.BATCHED_WT, 0))
       END REALL_WT,(SELECT COUNT(Q1.MAT_NO)
                  FROM MAT_BC_M Q1
                 WHERE Q1.PRODUCT_FLAG = '801401'
                   AND (Q1.MAT_STATUS ='80150102'  AND Q1.INSTOCK_FLAG='1' AND Q1.JUDGE_RESULT_CODE IN ('40740701','40740709') OR Q1.MAT_STATUS ='80150101'AND Q1.INSTANCY_FLAG='1')
                   AND Q1.QCM_STAUS = '00'
                    --AND Q1.LOCK_FLAG='0' AND Q1.MNG_LOCK_FLAG='0'
                   AND (CASE 
                    WHEN RCL.WHOLE_BACKLOG_DESC LIKE '%镦拔扩%' THEN
                  'E'
                 WHEN RCL.WHOLE_BACKLOG_DESC LIKE '%轧制%' THEN
                  'D'
                 ELSE
                   ''
               END) = Q1.PROCESS_CDOE
                   AND INSTR(DECODE(RCL.F_IN_MATERIAL_NO,'',RCL.INWL_ID,RCL.F_IN_MATERIAL_NO), Q1.MATERIAL_NO) > 0
              ) AS STOCK_NUM_LIKU,
       RCL.*
  FROM (SELECT 
                  (SELECT LISTAGG(B4.F_IN_MATERIAL_NO, ',') WITHIN GROUP(ORDER BY B4.F_IN_MATERIAL_NO ASC) 
                   FROM (SELECT B.F_IN_MATERIAL_DESC,B.F_IN_MATERIAL_NO,B3.ORD_LN_DLY_PK,B.MSC_PLINE,B2.CRAFT_SEQ
                  FROM SLM_ORD_DESIGN_BOM B,
                       CRAFT_ORD_LINE_BOM B1,
                       CRAFT_ORD_DESIGN   B2,
                       PLN_SALEORD        B3
                 WHERE B.BOM = B1.BOM
                   AND B1.DESGIN_KEY = B2.DESGIN_KEY
                   AND B2.ORD_LN_PK =B3.ORD_LN_PK
                  AND B2.VALIDFLAG!='0'
                   ) B4 WHERE B4.ORD_LN_DLY_PK=T.ORD_LN_DLY_PK AND B4.MSC_PLINE=T.INDEX_SEQ AND B4.CRAFT_SEQ=T.CRAFT_SEQ) F_IN_MATERIAL_NO,
       T.PRO_ORDER_NO,
       T.PRO_PLAN_ID,
       T.GX_PLAN_NO,
       T.PLAN_GROUP_ID,
       T.ORDER_SOURCE,
       T.ORD_LN_DLY_PK,
       T.PLN_DIVIDE_ID,
       NULLIF(T.ORDER_NO || '/' || T.ORDER_SEQ, '/') ORDER_NO,
       T.ORDER_SEQ,
       T.DELIVERY_NO,
       T.REQ_BL_ID,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.INWL_ID,
       T.INWL_DESC,
       T.OUTWL_ID,
       T.OUTWL_DESC,
       T.GRADECODE,
       T.GRADENAME,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.LENGTHDISC,
       T.LENGTHMAX_IN,
       T.LENGTHMIN_IN,
       T.LENGTH_IN,
       T.AIMLENGTH,
       T.IN_WEIGHT_S,
       T.IN_NUM_S,
       T.WEIGTH_S,
       T.NUM_S,
       T.MATCH_WT_IN,
       T.MATCH_NUM_IN,
       DECODE(T.IF_MONITOR_RCL, '1', '是', '/') IF_MONITOR_RCL,
       T.PRDCR_NO,
       T.MONITOR_POINT,
       T.STATION_ROAD,
       T.GX_PRO_SEQ,
       TO_CHAR(ROUND(TO_NUMBER(NVL(T.PLAN_USETIME, '0')) / 60, 2)) PLAN_USETIME,
       TO_CHAR(T.PLAN_TIME_B, 'YYYY-MM-DD HH24:MI:SS') PLAN_TIME_B,
       TO_CHAR(T.PLAN_TIME_E, 'YYYY-MM-DD HH24:MI:SS') PLAN_TIME_E,
      (SELECT SUM(NVL(M.PLN_INSINGLE_WT,0)) FROM PLN_ZY_RCL_M M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') BATCHED_WT,
      (SELECT SUM(NVL(M.PLN_INSINGLE_NUM,0)) FROM PLN_ZY_RCL_M M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') BATCHED_NUM,
      (SELECT SUM(NVL(M.PLAN_INDOUBLE_WT,0)) FROM PLN_ZY_RCL_C M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') Real_Batch_Wt,
      (SELECT SUM(NVL(M.PLAN_INDOUBLE_NUM,0)) FROM PLN_ZY_RCL_C M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') Real_Batch_Num,
      (SELECT SUM(NVL(M.REAL_INDOUBLE_WT,0)) FROM PLN_ZY_RCL_C M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') Real_Indouble_Wt,
      (SELECT SUM(NVL(M.REAL_INDOUBLE_NUM,0)) FROM PLN_ZY_RCL_C M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') Real_Indouble_Num,
      (SELECT SUM(NVL(M.REAL_OUTDOUBLE_WT,0)) FROM PLN_ZY_RCL_C M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') FINISHWEIGHT,
      (SELECT SUM(NVL(M.REAL_OUTDOUBLE_NUM,0)) FROM PLN_ZY_RCL_C M WHERE M.PRO_PLAN_ID=T.PRO_PLAN_ID AND M.GX_PLAN_NO=T.GX_PLAN_NO AND M.IF_FLAG='0') FINISHNUM,
       DECODE(T.EXE_STATUS,
              '0',
              '计划',
              '1',
              '生产中',
              '2',
              '已生产',
              '3',
              '关闭A',
              '') EXE_STATUS,
       DECODE(T.IS_REPAIR_PLN, '1', '是', '/') IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       T.ZY_BATCH_ID,
       T.ADD_WT_IN,
       T.ADD_NUM_IN,
       DECODE(T.ISENDGX, '1', '是', '/') ISENDGX,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC,
       DECODE(T.IS_PLAN_OK, '1', '是', '/') IS_PLAN_OK,
       T.STEELCODE,
       T.STEELNAME,
       T.PRO_MONTH,
       T.PREVIOUS_GX,
       T.PREV_GXPLAN_ID,
       T.IF_EXPORT,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.MEMO,
       TO_CHAR(T.ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') ISSUED_TIME,
       T.ISSUED_MAN,
       TO_CHAR(T.LAST_UNDOWN_TIME, 'YYYY-MM-DD HH24:MI:SS') LAST_UNDOWN_TIME,
       T.LAST_UNDOWN_MAN,
       T.VERSION_NO,
       T.PROCESSING_COST,
       T.TOTAL_COST,
       T.WHOLE_BACKLOG_DESC,
       T.MSC,
       T.INDEX_SEQ,
       T.BOM,
       T3.GROUP_RCL,
       T1.SALE_ORG_DESC,
       T1.PRODUCCODE,
       T1.PRODUCNAME,
       T1.STD_CODE,
       T1.STD_NAME,
       T1.STD_STYLE_DESC,
       T1.SPEC_CODE,
       T1.SPEC_NAME,
       T1.MODEL_CODE,
       T1.MODEL_DESC,
       T.CRAFT_SEQ,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       DECODE(T.IF_STOVE_ISSUED,'1','是','/') IF_STOVE_ISSUED,
       T.STOVE_ISSUED_MAN,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       NVL((SELECT A.ABRVITION
             FROM SLM_BASE_CUSTOMER A
            WHERE A.CUSTOMER_NO = DECODE(T1.FINAL_USER,
                                         NULL,
                                         T1.BUYER_ID,
                                         '/',
                                         T1.BUYER_ID,
                                         T1.FINAL_USER)),
           DECODE(T1.FINAL_USER_DESC,
                  NULL,
                  T1.BUYER_NAME,
                  '/',
                  T1.BUYER_NAME,
                  T1.FINAL_USER_DESC)) FINAL_USER_DESC,
       (SELECT T9.BASENAME
          FROM COM_BASE_INFO T9
         WHERE T9.BASECODE = T.PRIORITY) PRIORITY,
       T.PRIORITY_MEMO,
          T.DECISION,t.WEIGTH_S_MIN
  FROM PLN_ORDER_RCL_S T,
       (SELECT Q1.PRODUCCODE,
               Q1.PRODUCNAME,
               Q1.STD_CODE,
               Q1.STD_NAME,
               Q1.STD_STYLE_DESC,
               Q1.SPEC_CODE,
               Q1.SPEC_NAME,
               Q1.ORD_LN_DLY_PK,
               Q1.ORD_LN_PK,
               Q1.STEELCODE,
               Q1.STEELNAME,
               Q1.DELVRY_RANGE_TPE,
               Q1.DELVRY_RANGE_MAX,
               Q1.DELVRY_RANGE_MIN,
               Q1.DELVRY_QTY,
               Q3.CRAFT_NAME,
               Q1.FINAL_USER,
               Q1.FINAL_USER_DESC,
               Q1.BUYER_ID,
               Q1.BUYER_NAME,
               Q1.MODEL_CODE,
               Q1.MODEL_DESC,
               Q4.SALE_ORG_DESC,
               Q2.CRAFT_FILE_LV2_F
          FROM PLN_SALEORD              Q1,
               CRAFT_ORD_DESIGN         Q2,
               CRAFT_ORD_DESIGN_APPOINT Q3,
               SLM_ORDER_HEAD           Q4
         WHERE Q1.ORD_LN_PK = Q3.ORD_LN_PK(+)
           AND Q1.ORD_PK = Q4.ORD_PK(+) 
            AND Q1.ORD_LN_PK = Q2.ORD_LN_PK(+)
           AND Q2.VALIDFLAG(+) = '1') T1,
       PLN_GX_RCL_M T3
 WHERE T.PRO_PLAN_ID = T3.PRO_PLAN_ID(+)
   AND T.ORD_LN_DLY_PK = T1.ORD_LN_DLY_PK(+)
   AND (T.IS_REPAIR_PLN IS NULL OR T.IS_REPAIR_PLN='0')  
               ]]>
	</query>
	<query id="FrmRollTubeLibraryRcl.getStlChemicalStd" desc="查询热处理对应内控成分元素">
            <![CDATA[
             SELECT V.CHEM_CODE,
             V.CHEM_NAME,
             V.CHEM_TYPE,
             V.CHEM_FORMULA,
             V.STDMIN_SIGN || V.STDMIN STDMIN_SIGN,
             V.STDMAX_SIGN || V.STDMAX STDMAX_SIGN,
             V.STDTARGET,
             C.CHEM_SEQ,V.CIC
        FROM CRAFT_ORD_DESIGN_STD_CIC V, COM_BASE_CHEM C
       WHERE V.CHEM_CODE = C.CHEM_CODE
          AND INSTR(?, V.CIC) > 0
         AND V.PROCESS_CODE = 'A'
         AND V.DESGIN_KEY = ?
         AND V.MSC_PLINE = ?
         AND V.SPECL_FL = '2'
         AND V.VALIDFLAG = '1'
         ORDER BY V.CIC,C.CHEM_SEQ ASC
             ]]>
	</query>
	<query id="FrmRollTubeLibraryRcl.getPlnOrderZg" desc="查询热处理信息">
            <![CDATA[
            SELECT D.DESGIN_KEY, T.CRAFT_SEQ, T.CIC_GP, T.INDEX_SEQ,T.OUTWL_ID,T.INWL_ID,T.PLINE_CODE, T.CIC_GROUP_LK
                  FROM PLN_ORDER_ZG_S T, PLN_SALEORD T1, CRAFT_ORD_DESIGN D
                 WHERE T1.ORD_LN_DLY_PK = T.ORD_LN_DLY_PK
                   AND D.ORD_LN_PK = T1.ORD_LN_PK
                   AND D.CRAFT_SEQ = T.CRAFT_SEQ
                   AND T.PRO_PLAN_ID =?
                   AND T.GX_PLAN_NO = ?
             ]]>
	</query>
	<query id="FrmRollTubeLibraryRcl.getStlChemicalData" desc="查询判定表成分元素">
            <![CDATA[
           SELECT T2.C,
       T2.SI,
       T2.MN,
       T2.P,
       T2.S,
       T2.NI,
       T2.CR,
       T2.CU,
       T2.ASN,
       T2.TI,
       T2.V,
       T2.MO,
       T2.B,
       T2.W,
       T2.AL,
       T2.ZN,
       T2.PB,
       T2.SN,
       T2.CA,
       T2.LA,
       T2.SB,
       T2.CE,
       T2.SE,
       T2.MG,
       T2.NB,
       T2.CD,
       T2.BI,
       T2.N,
       T2.H,
       T2.O,
       T2.FE,
       T2.ALT,
       T2.ALS,
       T2.ALINS,
       T2.BS,
       T2.BN,
       T2.MGO,
       T2.SIO2,
       T2.AL2O3,
       T2.TFEO,
       T2.FE2O3,
       T2.H2O,
       T2.CAF2,
       T2.P2O5,
       T2.TFE,
       T2.CR2O3,
       T2.TIO2,
       T2.MNO,
       T2.V2O5,
       T2.FEO,
       T2.CAO,
       T2.ZR,
       T2.CO,
       T2.SAMPLE_NO,
       T2.ASSAYNO,
       T2.STOVE_NO
  FROM QCM_JHY_ELEMENTS T2,
       QCM_LG_CHEMJUDGE T1,
       (SELECT T.JUDGE_STOVE_NO, T.CHEM_JUDGE_ID
          FROM MAT_GP_M T
         WHERE T.CHEM_JUDGE_ID IS NOT NULL
         GROUP BY T.JUDGE_STOVE_NO, T.CHEM_JUDGE_ID) M
 WHERE M.CHEM_JUDGE_ID= T1.CHEM_JUDGE_ID
   AND M.JUDGE_STOVE_NO = T1.JUDGE_STOVE_NO
   AND T1.ASSAYNO=T2.ASSAYNO
   AND T2.VALIDFLAG = '1'
   AND T1.VALIDFLAG = '1'
   AND T1.JUDGE_STOVE_NO = ?
   AND T1.CHEM_JUDGE_ID= ?
 ORDER BY T2.CREATE_TIME DESC
             ]]>
	</query>
	<query id="FrmRollTubeLibraryRcl.queryMatGpTrack" desc="查询脱单利库记录">
            <![CDATA[
 SELECT 
       T.EVENT_ID,
       T.EVENT_DESC,
       T.FORM_NAME,
       T.CALL_FUNC_CODING,
       T.KEYVALUE_1,
       T.KEYVALUE_1_DESC,
       T.KEYVALUE_2,
       T.KEYVALUE_2_DESC2,
       T.KEYVALUE_3,
       T.KEYVALUE_3_DESC3,
       T.KEYVALUE_4,
       T.KEYVALUE_4_DESC4,
       T.KEYVALUE_5,
       T.KEYVALUE_5_DESC5,
       T.KEYVALUE_6,
       T.KEYVALUE_6_DESC6,
       T.KEYVALUE_7,
       T.KEYVALUE_7_DESC7,
       (SELECT I.BASENAME
          FROM COM_BASE_INFO I
         WHERE I.BASECODE = T.PRODUCT_FLAG) PRODUCT_FLAG,
       (SELECT I.BASENAME
          FROM COM_BASE_INFO I
         WHERE I.BASECODE = T.MAT_STATUS) MAT_STATUS,
       T.LOT_NO,
       T.STOVE_NO,
       T.JUDGE_STOVE_NO,
       T.BATCH_NO,
       T.BATCH_GROUD_NO,
       T.MATERIAL_NO,
       T.MATERIAL_NAME,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.STEELCODE,
       T.STEELNAME,
       T.STD_CODE,
       T.STD_NAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.SPEC_CODE,
       T.SPEC_NAME,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.ACT_LEN,
       T.ACT_LEN_MIN,
       T.ACT_LEN_MAX,
       T.ACT_COUNT,
       T.ACT_WEIGHT,
       T.ACT_THEORY_WEIGHT,
       T.PRO_ORDER_NO,
       T.PRO_ORDER_ID,
       T.PRO_ORDER_NO1,
       T.PRO_ORDER_ID1,
       T.ORD_PK,
       T.ORD_LN_PK,
       T.ORD_LN_DLY_PK,
       T.ORDER_NO,
       T.ORDER_SEQ,
       T.ORDER_SEQ_NO,
       T.OLD_ORD_PK,
       T.OLD_ORD_LN_PK,
       T.OLD_ORD_LN_DLY_PK,
       T.OLD_ORDER_NO,
       T.OLD_ORDER_SEQ,
       T.OLD_ORDER_SEQ_NO,
       T.BELONG_CODE,
       T.BELONG_NAME,
       T.MEMO,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.DEPARTMENT_CODE,
       T.DEPARTMENT_DESC,
       T.MANAGEMENT_NO,
       T.MANAGEMENT_NAME,
       T.PROCESS_CDOE,
       T.GRADECODE,
       T.GRADENAME
 FROM MAT_BC_TRACK T
 WHERE T.EVENT_ID like '%'||? ||'%' AND T.JUDGE_STOVE_NO like '%'||? ||'%' 
 AND T.PROCESS_CDOE='F'
 ORDER BY T.CREATE_NAME DESC
             ]]>
	</query>

	<query id="FrmRollTubeLibraryRcl.getPlnMatBcDbk" desc="查询热处理信息">
            <![CDATA[
SELECT *
  FROM (SELECT T.*
          FROM MAT_BC_M T
         WHERE T.JUDGE_STOVE_NO = ?
           AND T.BATCH_NO = ?
           AND T.BATCH_GROUD_NO = ?
           AND NVL(T.JUGDE_APPLY_CODE ,'/')= NVL(?,'/')
           AND T.QCM_STAUS = '00'
           AND T.HANGING_FLAG = '1'
            AND T.HEAT_PLAN_NO_NEXT=?
         ORDER BY T.MAT_NO ASC)
 WHERE ROWNUM <= ?
             ]]>
	</query>
</queryMap>