<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc = "管坯离线管理 ">
<query id = "FrmLGFinishing.doQueryOfflieResult" desc = "查询离线实绩">
<![CDATA[
 SELECT 
       T.FURNACENO,
       T.STOVE_NO,
       T.JUDGE_STOVE_NO,
       T.DIAMETER,
       T.LENGTH,
       T.FIX_NUM,
       T.FIX_LEN,
       T.PLINE_CODE,
       T.OFFLINE_NUM,
       T.BACKLINE_NUM,
       T.ZP_WEIGHT,
       T.SUBCONTRACT_NUM,
       T.SUBCONTRACTCOMPLETE_NUM,
       T.SUBCONTRACT_NO,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.STEELCODE,
       T.STEELNAME,
       T.GRADECODE,
       T.GRADENAME,
       T.SPEC_CODE,
       T.SPEC_NAME,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.STD_CODE,
       T.STD_NAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.MATERIAL_NO,
       T.MATERIAL_NAME,
       T.IS_VALID,
       T.STATUS,
       DECODE(T.COL_SHIFT,'0','常白班','1','早班','2','中班','3','夜班')COL_SHIFT,
       DECODE(T.COL_GROUP,'1','甲班','2','乙班','3','丙班','4','丁班')COL_GROUP,
       T.COL_USER,
       T.GROUP_NUM,
       DECODE(T.ZP_FLAG,'0','正常下线','1','组炉批')ZP_FLAG,
       (TO_NUMBER(NVL(T.OFFLINE_NUM,0)) - TO_NUMBER(NVL(T.GROUP_NUM,0)) - TO_NUMBER(NVL(T.BACKLINE_NUM,0))
      -TO_NUMBER(NVL(T.SUBCONTRACT_NUM,0))+TO_NUMBER(NVL(T.SUBCONTRACTCOMPLETE_NUM,0))) GROUP_NUM_COUNT
 FROM STL_LG_OFFLINE T
 WHERE T.JUDGE_STOVE_NO || '&' LIKE '%' || ? || '%'
 AND T.PLINE_CODE = ?
 AND T.STATUS = '0'
 ]]>
</query>
<query id = "FrmLGFinishing.doQueryFurnace" desc = "查询组炉实绩">
<![CDATA[
 SELECT 
       T.FURNACENO,
       T.STOVE_NO,
       T.CCMSTOVENO,
       T.JUDGE_STOVE_NO,
       T.CAST_NO,
       T.HEATCNT,
       T.CCMID,
       T.FLOWNO,
       T.CUTSEQNO,
       T.MATERIAL_NO,
       T.MATERIAL_NAME,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.GRADECODE,
       T.GRADENAME,
       T.BATCH_GROUD_NO,
       T.FLAG_STOVE_NO,
       T.ORDER_SEQ,
       T.ORDER_NO,
       T.DELIVERY_NO,
       T.PRODORDERNO,
       T.STANDARDSCODE,
       T.STANDARDREMAK,
       T.DIAMETER,
       T.LEN_MIN,
       T.LEN_MAX,
       T.FIX_LEN,
       T.ACT_COUNT,
       T.PLINE_CODE,
       T.OLD_MATERIAL_NO,
       T.OLD_MATERIAL_NAME,
       T.OLD_PRODUCCODE,
       T.OLD_PRODUCNAME,
       T.OLD_GRADECODE,
       T.OLD_GRADENAME,
       T.OLD_JUDGE_STOVE_NO,
       T.OLD_DIAMETER,
       T.WEIGHT,
       T.OPERATION_ID,
       T.ACT_FIX_NUM,
       T.OLD_ACT_FIX_NUM
 FROM STL_LG_GROUP T
 WHERE T.JUDGE_STOVE_NO || '&' LIKE '%' || ? || '%'
 AND T.PLINE_CODE = ?
 ]]>
</query>
<query id = "FrmLGFinishing.doQueryFurnaceGroup" desc = "查询组炉详细实绩">
<![CDATA[
 SELECT 
       T.FURNACENO,
       T.STOVE_NO,
       T.CCMSTOVENO,
       T.JUDGE_STOVE_NO,
       T.CAST_NO,
       T.HEATCNT,
       T.CCMID,
       T.FLOWNO,
       T.CUTSEQNO,
       T.MATERIAL_NO,
       T.MATERIAL_NAME,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.GRADECODE,
       T.GRADENAME,
       T.BATCH_GROUD_NO,
       T.FLAG_STOVE_NO,
       T.ORDER_SEQ,
       T.ORDER_NO,
       T.DELIVERY_NO,
       T.PRODORDERNO,
       T.STANDARDSCODE,
       T.STANDARDREMAK,
       T.DIAMETER,
       T.LEN_MIN,
       T.LEN_MAX,
       T.FIX_LEN,
       T.ACT_COUNT,
       T.PLINE_CODE,
       T.OLD_MATERIAL_NO,
       T.OLD_MATERIAL_NAME,
       T.OLD_PRODUCCODE,
       T.OLD_PRODUCNAME,
       T.OLD_GRADECODE,
       T.OLD_GRADENAME,
       T.OLD_JUDGE_STOVE_NO,
       T.OLD_DIAMETER,
       T.WEIGHT,
       T.OPERATION_ID,
       T.ACT_FIX_NUM,
       T.OLD_ACT_FIX_NUM
 FROM STL_LG_GROUP T
 WHERE T.STOVE_NO = ?
 ]]>
</query>
<query id = "FrmLGFinishing.doQueryBack" desc = "查询操作实绩">
<![CDATA[
 SELECT 
       T.STOVE_NO,
       T.JUDGE_STOVE_NO,
       T.OPERATION_TYPE,
       T.ACT_COUNT,
       T.ACT_WEIGHT,
       TO_CHAR(T.COL_TIME, 'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       T.REMARK,
       T.COL_USER,
       T.COL_SHIFT,
       T.COL_GROUP,
       T.OPERATION_ID,
       T.PLINE_CODE,
       T.FURNACENO,
       T.BACK_JUDGE_STOVE_NO
 FROM STL_LG_OFFLINE_DETIA T
 WHERE T.JUDGE_STOVE_NO || '&' LIKE '%' || ? || '%'
 AND T.PLINE_CODE = ?
 ]]>
</query>
<query id = "FrmLGFinishing.doQuerySubcontract" desc = "查询委外实绩">
<![CDATA[
SELECT 
       T.SUBCONTRACT_NO,
       T.STOVE_NO,
       T.JUDGE_STOVE_NO,
       T.PLINE_CODE,
       T.SUBCONTRACTCOMPLETE_NUM,
       T.SUBCONTRACT_NUM,
       TO_CHAR(T.ENTRUSTED_TIME, 'YYYY-MM-DD HH24:MI:SS') ENTRUSTED_TIME,
       T.REMARK,
       T.COL_USER,
       T.COL_SHIFT,
       T.COL_GROUP,
       T.SUBCONTRACT_FLAG,
       T.SUBCONTRACTSCRAP_NUM,
       T.ENTRUSTED_FLAG,
       T.ENTRUSTED_PLINE_CODE,
       T.ENTRUSTED_PLINE_NAME,
       T.ENTRUSTED_REMARK,
       T.SUBCONTRACT_WGT,
       T.SUBCONTRACT_COMPLETE_WGT,
       T.SUBCONTRACT_NO_SEQ,
       T.SUBCONTRACT_TYPE,
       T.SUBCONTRACT_COMPLETE_LEN,
       T.SUBCONTRACT_COMPLETE_CUT
 FROM STL_LG_ENTRUST_BILL T
 WHERE T.JUDGE_STOVE_NO || '&' LIKE '%' || ? || '%'
 AND T.PLINE_CODE = ?
 ]]>
</query>
</queryMap>