<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="排产补量">
	<query id="FrmProdSchProcAmoun.queryDbk" desc="查询镦拔扩排产">
		<![CDATA[
	SELECT 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.WEIGTH_S,
       T.NUM_S,
       T.GX_PRO_SEQ,
       T.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,
       DECODE(T.EXE_STATUS,'0','计划','1','生产中','2','已生产','3','关闭A') EXE_STATUS,
       DECODE(T.IS_REPAIR_PLN,'1','是','/') IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.LENGTHDISC,
       T.AIMOUTDIAMETER,
       T.AIMWALLTHICK,
       T.AIMLENGTH,
       T.OUTDIAMETER_IN,
       T.WALLTHICK_IN,
       T.LENGTH_IN,
       T.LEN_CUTHEAD,
       T.LEN_CUTEND,
       T.LENGTHMAX_IN,
       T.LENGTHMIN_IN,
       T.IN_WEIGHT_S,
       T.IN_NUM_S,
       T.ADD_WT_IN,
       T.ADD_NUM_IN,
       T.MATCH_WT_IN,
       T.MATCH_NUM_IN,
       DECODE(T.ISENDGX,'1','是','/') ISENDGX,
       DECODE(T.IF_MONITOR_DBK,'1','是','/') IF_MONITOR_DBK,
       T.PRDCR_NO,
       T.MONITOR_POINT,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.BATCHED_WT,
       T.BATCHED_NUM,
       T.FINISHWEIGHT,
       T.FINISHNUM,
       DECODE(T.IS_PLAN_OK, '1', '是', '/') IS_PLAN_OK,
       T.ZY_BATCH_ID,
       T.GRADECODE,
       T.GRADENAME,
       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.REAL_BATCH_WT,
       T.REAL_BATCH_NUM,
       DECODE(T.IF_STOVE_ISSUED, '1', '是', '/') IF_STOVE_ISSUED,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       DECODE(T.IS_ONLOAD_LINE, '1', '是', '/') IS_ONLOAD_LINE,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.MSC,
       T.INDEX_SEQ,
       T.BOM,
       T.WHOLE_BACKLOG_DESC,
      DECODE( T.IF_CRAFT_LOCKED, '1', '是', '/') IF_CRAFT_LOCKED ,
       NVL(T.WEIGTH_S_MIN,0) WEIGTH_S_MIN,
       T.PRIORITY,
       T.PRIORITY_MEMO,
       T.VALIDFLAG,
       T.DECISION,T.FINAL_USER_DESC,T.PASS_CODE,T.PASS_NAME
  FROM PLN_ORDER_DBK_S T
 WHERE 1 = 1
		]]>
	</query>
	<query id="FrmProdSchProcAmoun.queryRcl" desc="查询热处理排产">
		<![CDATA[
	 SELECT 
       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.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.GX_PRO_SEQ,
       T.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,
       T.BATCHED_WT,
       T.BATCHED_NUM,
       T.FINISHWEIGHT,
       T.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,
        DECODE(T.IF_STOVE_ISSUED,'1','是','/') IF_STOVE_ISSUED,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       DECODE(T.IS_ONLOAD_LINE,'1','是','/') IS_ONLOAD_LINE,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.MSC,
       T.INDEX_SEQ,
       T.BOM,
       T.WHOLE_BACKLOG_DESC,
      DECODE( T.IF_CRAFT_LOCKED,'1','是','/') IF_CRAFT_LOCKED,
       NVL(T.WEIGTH_S_MIN,0) WEIGTH_S_MIN,
       T.PRIORITY,
       T.PRIORITY_MEMO,
       T.VALIDFLAG,
       T.DECISION,T.PRDCR_ADVC_DAY,T.GROUP_RCL,
      (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) 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) 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) 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) FINISHNUM
 FROM PLN_ORDER_RCL_S T
 WHERE 1=1

		]]>
	</query>
	<query id="FrmProdSchProcAmoun.queryJgx" desc="查询加工线排产">
		<![CDATA[
	 SELECT 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.WEIGTH_S,
       T.NUM_S,
       T.GX_PRO_SEQ,
       T.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,
       DECODE(T.EXE_STATUS,
              '0',
              '计划',
              '1',
              '生产中',
              '2',
              '已生产',
              '3',
              '关闭A') EXE_STATUS,
       DECODE(T.IS_REPAIR_PLN, '1', '是', '/') IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       T.STEELCODE,
       T.STEELNAME,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.LENGTHMAX,
       T.LENGTHMIN,
       T.LENGTHDISC,
       T.AIMWALLTHICK,
       T.AIMLENGTH,
       T.SHRT_LEN_RATO,
       T.SHORTEST,
       T.LONG_LEN_RATO,
       T.LONGEST,
       T.SHRT_STOVE,
       T.AVG_LEN_MIN,
       T.DIFRNC_LEN_MAX,
       T.SIGL_LEN,
       T.ENDLEN_SPECSTD,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.LENGTHMAX_IN,
       T.LENGTHMIN_IN,
       T.LENGTH_IN,
       T.OUTNUM_CUT,
       T.IN_WEIGHT_S,
       T.IN_NUM_S,
       T.ADD_WT_IN,
       T.ADD_NUM_IN,
       T.MATCH_WT_IN,
       T.MATCH_NUM_IN,
       DECODE(T.IF_MONITOR_JGX, '1', '是', '/') IF_MONITOR_JGX,
       T.PRDCR_NO,
       T.MONITOR_POINT,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.BATCHED_WT,
       T.BATCHED_NUM,
       T.FINISHWEIGHT,
       T.FINISHNUM,
       DECODE(T.IS_PLAN_OK, '1', '是', '/') IS_PLAN_OK,
       T.ZY_BATCH_ID,
       T.PRO_MONTH,
       T.PREVIOUS_GX,
       T.PREV_GXPLAN_ID,
       T.IF_EXPORT,
       T.FINAL_USER_DESC,
       T.PROCESS_DESC_C_ZG,
       T.GROUP_ROLL_NAME,
       TO_CHAR(T.BEGIN_TIME_ZG, 'YYYY-MM-DD HH24:MI:SS') BEGIN_TIME_ZG,
       T.PRDCR_ADVC_DAY,
       T.WHOLE_BACKLOG_DESC,
       T.PRIORITY,
       T.PRIORITY_MEMO,
       TO_CHAR(T.DELVRY_EDATE, 'YYYY-MM-DD HH24:MI:SS') DELVRY_EDATE,
       T.STATION_NM,
       T.OUTLINE_SITE_250,
       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,
       DECODE(T.IF_STOVE_ISSUED, '1', '是', '/') IF_STOVE_ISSUED,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       DECODE(T.IS_ONLOAD_LINE, '1', '是', '/') IS_ONLOAD_LINE,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.MSC,
       T.INDEX_SEQ,
       T.BOM,
       DECODE(T.IF_CRAFT_LOCKED, '1', '是', '/') IF_CRAFT_LOCKED,
       T.VALIDFLAG,
       T.DECISION,
       T.GROUP_JGX,
       T.PROGY_MEMO
  FROM PLN_ORDER_JGX_S T
 WHERE 1 = 1
		]]>
	</query>
	<query id="FrmProdSchProcAmoun.queryAddPlnDbkStrat" desc="查询镦拔扩合同状态">
		<![CDATA[
	 SELECT 
       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,
       T.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.WEIGTH_S,
       T.NUM_S,
       T.GX_PRO_SEQ,
       T.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,
       T.EXE_STATUS,
       T.IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.LENGTHDISC,
       T.AIMOUTDIAMETER,
       T.AIMWALLTHICK,
       T.AIMLENGTH,
       T.OUTDIAMETER_IN,
       T.WALLTHICK_IN,
       T.LENGTH_IN,
       T.LEN_CUTHEAD,
       T.LEN_CUTEND,
       T.LENGTHMAX_IN,
       T.LENGTHMIN_IN,
       T.IN_WEIGHT_S,
       T.IN_NUM_S,
       T.ADD_WT_IN,
       T.ADD_NUM_IN,
       T.MATCH_WT_IN,
       T.MATCH_NUM_IN,
       T.ISENDGX,
       T.IF_MONITOR_DBK,
       T.PRDCR_NO,
       T.MONITOR_POINT,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.BATCHED_WT,
       T.BATCHED_NUM,
       T.FINISHWEIGHT,
       T.FINISHNUM,
       T.IS_PLAN_OK,
       T.ZY_BATCH_ID,
       T.GRADECODE,
       T.GRADENAME,
       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.REAL_BATCH_WT,
       T.REAL_BATCH_NUM,
       T.IF_STOVE_ISSUED,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       T.IS_ONLOAD_LINE,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.MSC,
       T.INDEX_SEQ,
       T.BOM,
       T.WHOLE_BACKLOG_DESC,
       T.IF_CRAFT_LOCKED,
       T.WEIGTH_S_MIN,
       T.PRIORITY,
       T.PRIORITY_MEMO,
       T.VALIDFLAG,
       T.DECISION,
       T.FINAL_USER_DESC,
       T.PASS_CODE,
       T.PASS_NAME
 FROM PLN_ORDER_DBK_S T
 WHERE T.PRO_PLAN_ID = ? AND T.GX_PLAN_NO = ?
		]]>
	</query>
	<query id="FrmProdSchProcAmoun.queryAddPlnRclStrat" desc="查询热处理合同状态">
		<![CDATA[
	 SELECT 
       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,
       T.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,
       T.IF_MONITOR_RCL,
       T.PRDCR_NO,
       T.MONITOR_POINT,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.GX_PRO_SEQ,
       T.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,
       T.BATCHED_WT,
       T.BATCHED_NUM,
       T.FINISHWEIGHT,
       T.FINISHNUM,
       T.EXE_STATUS,
       T.IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       T.ZY_BATCH_ID,
       T.ADD_WT_IN,
       T.ADD_NUM_IN,
       T.ISENDGX,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC,
       T.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.IF_STOVE_ISSUED,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       T.IS_ONLOAD_LINE,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.MSC,
       T.INDEX_SEQ,
       T.BOM,
       T.WHOLE_BACKLOG_DESC,
       T.IF_CRAFT_LOCKED,
       T.WEIGTH_S_MIN,
       T.PRIORITY,
       T.PRIORITY_MEMO,
       T.VALIDFLAG,
       T.DECISION,
       T.PRDCR_ADVC_DAY,
       T.GROUP_RCL,
       T.PROGY_MEMO
 FROM PLN_ORDER_RCL_S T
 WHERE T.PRO_PLAN_ID = ? AND T.GX_PLAN_NO = ?
		]]>
	</query>
	<query id="FrmProdSchProcAmoun.queryAddPlnJgxStrat" desc="查询加工线合同状态">
		<![CDATA[
	SELECT 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,
       T.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.WEIGTH_S,
       T.NUM_S,
       T.GX_PRO_SEQ,
       T.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,
       T.EXE_STATUS,
       T.IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       T.STEELCODE,
       T.STEELNAME,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.LENGTHMAX,
       T.LENGTHMIN,
       T.LENGTHDISC,
       T.AIMWALLTHICK,
       T.AIMLENGTH,
       T.SHRT_LEN_RATO,
       T.SHORTEST,
       T.LONG_LEN_RATO,
       T.LONGEST,
       T.SHRT_STOVE,
       T.AVG_LEN_MIN,
       T.DIFRNC_LEN_MAX,
       T.SIGL_LEN,
       T.ENDLEN_SPECSTD,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.LENGTHMAX_IN,
       T.LENGTHMIN_IN,
       T.LENGTH_IN,
       T.OUTNUM_CUT,
       T.IN_WEIGHT_S,
       T.IN_NUM_S,
       T.ADD_WT_IN,
       T.ADD_NUM_IN,
       T.MATCH_WT_IN,
       T.MATCH_NUM_IN,
       T.IF_MONITOR_JGX,
       T.PRDCR_NO,
       T.MONITOR_POINT,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.BATCHED_WT,
       T.BATCHED_NUM,
       T.FINISHWEIGHT,
       T.FINISHNUM,
       T.IS_PLAN_OK,
       T.ZY_BATCH_ID,
       T.PRO_MONTH,
       T.PREVIOUS_GX,
       T.PREV_GXPLAN_ID,
       T.IF_EXPORT,
       T.FINAL_USER_DESC,
       T.PROCESS_DESC_C_ZG,
       T.GROUP_ROLL_NAME,
       TO_CHAR(T.BEGIN_TIME_ZG, 'YYYY-MM-DD HH24:MI:SS') BEGIN_TIME_ZG,
       T.PRDCR_ADVC_DAY,
       T.WHOLE_BACKLOG_DESC,
       T.PRIORITY,
       T.PRIORITY_MEMO,
       TO_CHAR(T.DELVRY_EDATE, 'YYYY-MM-DD HH24:MI:SS') DELVRY_EDATE,
       T.STATION_NM,
       T.OUTLINE_SITE_250,
       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.IF_STOVE_ISSUED,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       T.IS_ONLOAD_LINE,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.MSC,
       T.INDEX_SEQ,
       T.BOM,
       T.IF_CRAFT_LOCKED,
       T.VALIDFLAG,
       T.DECISION,
       T.GROUP_JGX,
       T.PROGY_MEMO
  FROM PLN_ORDER_JGX_S T
 WHERE T.PRO_PLAN_ID = ?
   AND T.GX_PLAN_NO = ?
		]]>
	</query>
	<query id="FrmProdSchProcAmoun.queryAddPlnDbkAmount" desc="新增镦拔扩">
		<![CDATA[
		INSERT INTO PLN_ORDER_DBK_S
  (PRO_ORDER_NO,
   PRO_PLAN_ID,
   GX_PLAN_NO,
   PLAN_GROUP_ID,
   ORDER_SOURCE,
   ORD_LN_DLY_PK,
   PLN_DIVIDE_ID,
   ORDER_NO,
   ORDER_SEQ,
   DELIVERY_NO,
   REQ_BL_ID,
   PLINE_CODE,
   PLINE_NAME,
   INWL_ID,
   INWL_DESC,
   OUTWL_ID,
   OUTWL_DESC,
   WEIGTH_S,
   NUM_S,
   GX_PRO_SEQ,
   PLAN_USETIME,
   PLAN_TIME_B,
   PLAN_TIME_E,
   EXE_STATUS,
   IS_REPAIR_PLN,
   OUTDIAMETER,
   WALLTHICK,
   LENGTHDISC,
   AIMOUTDIAMETER,
   AIMWALLTHICK,
   AIMLENGTH,
   OUTDIAMETER_IN,
   WALLTHICK_IN,
   LENGTH_IN,
   LEN_CUTHEAD,
   LEN_CUTEND,
   LENGTHMAX_IN,
   LENGTHMIN_IN,
   IN_WEIGHT_S,
   IN_NUM_S,
   ADD_WT_IN,
   ADD_NUM_IN,
   MATCH_WT_IN,
   MATCH_NUM_IN,
   ISENDGX,
   IF_MONITOR_DBK,
   PRDCR_NO,
   MONITOR_POINT,
   CIC,
   PIC,
   SIC,
   DIC,
   WIC,
   GIC,
   CRAFT_FILE_NO,
   CRAFT_FILE_MAN,
   CRAFT_SEQ,
   STATION_ROAD,
   IS_PLAN_OK,
   ZY_BATCH_ID,
   GRADECODE,
   GRADENAME,
   PRO_MONTH,
   PREVIOUS_GX,
   PREV_GXPLAN_ID,
   IF_EXPORT,
   CREATE_TIME,
   MEMO,
   VERSION_NO,
   PROCESSING_COST,
   TOTAL_COST,
   IF_STOVE_ISSUED,
   IS_ONLOAD_LINE,
   PROCESS_CODE_C,
   PROCESS_DESC_C,
   MSC,
   INDEX_SEQ,
   BOM,
   WHOLE_BACKLOG_DESC,
   IF_CRAFT_LOCKED,
   WEIGTH_S_MIN,
   PRIORITY,
   PRIORITY_MEMO,
   VALIDFLAG,
   DECISION,FINAL_USER_DESC,PASS_CODE,PASS_NAME)
VALUES
  ('#PRO_ORDER_NO#',
   '#PRO_PLAN_ID#',
   '#GX_PLAN_NO#',
   '#PLAN_GROUP_ID#',
   '#ORDER_SOURCE#',
   '#ORD_LN_DLY_PK#',
   '#PLN_DIVIDE_ID#',
   '#ORDER_NO#',
   '#ORDER_SEQ#',
   '#DELIVERY_NO#',
   '#REQ_BL_ID#',
   '#PLINE_CODE#',
   '#PLINE_NAME#',
   '#INWL_ID#',
   '#INWL_DESC#',
   '#OUTWL_ID#',
   '#OUTWL_DESC#',
   '#WEIGTH_S#',
   '#NUM_S#',
   '#GX_PRO_SEQ#',
   '#PLAN_USETIME#',
   TO_DATE('#PLAN_TIME_B#', 'YYYY-MM-DD HH24:MI:SS'),
   TO_DATE('#PLAN_TIME_E#', 'YYYY-MM-DD HH24:MI:SS'),
   '0',
   '0',
   '#OUTDIAMETER#',
   '#WALLTHICK#',
   '#LENGTHDISC#',
   '#AIMOUTDIAMETER#',
   '#AIMWALLTHICK#',
   '#AIMLENGTH#',
   '#OUTDIAMETER_IN#',
   '#WALLTHICK_IN#',
   '#LENGTH_IN#',
   '#LEN_CUTHEAD#',
   '#LEN_CUTEND#',
   '#LENGTHMAX_IN#',
   '#LENGTHMIN_IN#',
   '#IN_WEIGHT_S#',
   '#IN_NUM_S#',
   '#ADD_WT_IN#',
   '#ADD_NUM_IN#',
   '#MATCH_WT_IN#',
   '#MATCH_NUM_IN#',
   '#ISENDGX#',
   '#IF_MONITOR_DBK#',
   '#PRDCR_NO#',
   '#MONITOR_POINT#',
   '#CIC#',
   '#PIC#',
   '#SIC#',
   '#DIC#',
   '#WIC#',
   '#GIC#',
   '#CRAFT_FILE_NO#',
   '#CRAFT_FILE_MAN#',
   '#CRAFT_SEQ#',
   '#STATION_ROAD#',
   '0',
   '#ZY_BATCH_ID#',
   '#GRADECODE#',
   '#GRADENAME#',
   '#PRO_MONTH#',
   '#PREVIOUS_GX#',
   '#PREV_GXPLAN_ID#',
   '#IF_EXPORT#',
   TO_DATE('#CREATE_TIME#', 'YYYY-MM-DD HH24:MI:SS'),
   '#MEMO#',
   '#VERSION_NO#',
   '#PROCESSING_COST#',
   '#TOTAL_COST#',
   '0',
   '0',
   '#PROCESS_CODE_C#',
   '#PROCESS_DESC_C#',
   '#MSC#',
   '#INDEX_SEQ#',
   '#BOM#',
   '#WHOLE_BACKLOG_DESC#',
   '0',
   '#WEIGTH_S_MIN#',
   '#PRIORITY#',
   '#PRIORITY_MEMO#',
   '1',
   '#DECISION#','#FINAL_USER_DESC#','#PASS_CODE#','#PASS_NAME#')
		]]>
	</query>
		<query id="FrmProdSchProcAmoun.queryAddPlnRclAmount" desc="新增热处理">
		<![CDATA[
		INSERT INTO PLN_ORDER_RCL_S
  (PRO_ORDER_NO,
   PRO_PLAN_ID,
   GX_PLAN_NO,
   PLAN_GROUP_ID,
   ORDER_SOURCE,
   ORD_LN_DLY_PK,
   PLN_DIVIDE_ID,
   ORDER_NO,
   ORDER_SEQ,
   DELIVERY_NO,
   REQ_BL_ID,
   PLINE_CODE,
   PLINE_NAME,
   INWL_ID,
   INWL_DESC,
   OUTWL_ID,
   OUTWL_DESC,
   GRADECODE,
   GRADENAME,
   OUTDIAMETER,
   WALLTHICK,
   LENGTHDISC,
   LENGTHMAX_IN,
   LENGTHMIN_IN,
   LENGTH_IN,
   AIMLENGTH,
   IN_WEIGHT_S,
   IN_NUM_S,
   WEIGTH_S,
   NUM_S,
   MATCH_WT_IN,
   MATCH_NUM_IN,
   IF_MONITOR_RCL,
   PRDCR_NO,
   MONITOR_POINT,
   CRAFT_FILE_NO,
   CRAFT_FILE_MAN,
   CRAFT_SEQ,
   STATION_ROAD,
   GX_PRO_SEQ,
   PLAN_USETIME,
   PLAN_TIME_B,
   PLAN_TIME_E,
   EXE_STATUS,
   IS_REPAIR_PLN,
   ZY_BATCH_ID,
   ADD_WT_IN,
   ADD_NUM_IN,
   ISENDGX,
   CIC,
   PIC,
   SIC,
   DIC,
   WIC,
   GIC,
   IS_PLAN_OK,
   STEELCODE,
   STEELNAME,
   PRO_MONTH,
   PREVIOUS_GX,
   PREV_GXPLAN_ID,
   IF_EXPORT,
   CREATE_TIME,
   MEMO,
   VERSION_NO,
   PROCESSING_COST,
   TOTAL_COST,
   IF_STOVE_ISSUED,
   IS_ONLOAD_LINE,
   PROCESS_CODE_C,
   PROCESS_DESC_C,
   MSC,
   INDEX_SEQ,
   BOM,
   WHOLE_BACKLOG_DESC,
   IF_CRAFT_LOCKED,
   WEIGTH_S_MIN,
   PRIORITY,
   PRIORITY_MEMO,
   VALIDFLAG,
   DECISION,
   PRDCR_ADVC_DAY,
   GROUP_RCL,
   PROGY_MEMO)
VALUES
  ('#PRO_ORDER_NO#',
   '#PRO_PLAN_ID#',
   '#GX_PLAN_NO#',
   '#PLAN_GROUP_ID#',
   '#ORDER_SOURCE#',
   '#ORD_LN_DLY_PK#',
   '#PLN_DIVIDE_ID#',
   '#ORDER_NO#',
   '#ORDER_SEQ#',
   '#DELIVERY_NO#',
   '#REQ_BL_ID#',
   '#PLINE_CODE#',
   '#PLINE_NAME#',
   '#INWL_ID#',
   '#INWL_DESC#',
   '#OUTWL_ID#',
   '#OUTWL_DESC#',
   '#GRADECODE#',
   '#GRADENAME#',
   '#OUTDIAMETER#',
   '#WALLTHICK#',
   '#LENGTHDISC#',
   '#LENGTHMAX_IN#',
   '#LENGTHMIN_IN#',
   '#LENGTH_IN#',
   '#AIMLENGTH#',
   '#IN_WEIGHT_S#',
   '#IN_NUM_S#',
   '#WEIGTH_S#',
   '#NUM_S#',
   '#MATCH_WT_IN#',
   '#MATCH_NUM_IN#',
   '#IF_MONITOR_RCL#',
   '#PRDCR_NO#',
   '#MONITOR_POINT#',
   '#CRAFT_FILE_NO#',
   '#CRAFT_FILE_MAN#',
   '#CRAFT_SEQ#',
   '#STATION_ROAD#',
   '#GX_PRO_SEQ#',
   '#PLAN_USETIME#',
   TO_DATE('#PLAN_TIME_B#', 'YYYY-MM-DD HH24:MI:SS'),
   TO_DATE('#PLAN_TIME_E#', 'YYYY-MM-DD HH24:MI:SS'),
   '0',
   '0',
   '#ZY_BATCH_ID#',
   '#ADD_WT_IN#',
   '#ADD_NUM_IN#',
   '#ISENDGX#',
   '#CIC#',
   '#PIC#',
   '#SIC#',
   '#DIC#',
   '#WIC#',
   '#GIC#',
   '0',
   '#STEELCODE#',
   '#STEELNAME#',
   '#PRO_MONTH#',
   '#PREVIOUS_GX#',
   '#PREV_GXPLAN_ID#',
   '#IF_EXPORT#',
   TO_DATE('#CREATE_TIME#', 'YYYY-MM-DD HH24:MI:SS'),
   '#MEMO#',
   '#VERSION_NO#',
   '#PROCESSING_COST#',
   '#TOTAL_COST#',
   '0',
   '0',
   '#PROCESS_CODE_C#',
   '#PROCESS_DESC_C#',
   '#MSC#',
   '#INDEX_SEQ#',
   '#BOM#',
   '#WHOLE_BACKLOG_DESC#',
   '0',
   '#WEIGTH_S_MIN#',
   '#PRIORITY#',
   '#PRIORITY_MEMO#',
   '1',
   '#DECISION#',
   '#PRDCR_ADVC_DAY#',
   '#GROUP_RCL#',
   '#PROGY_MEMO#')
		]]>
	</query>
		<query id="FrmProdSchProcAmoun.queryAddPlnJgxAmount" desc="新增加工线">
		<![CDATA[
		INSERT INTO PLN_ORDER_JGX_S
  (PRO_ORDER_NO,
   PRO_PLAN_ID,
   GX_PLAN_NO,
   PLAN_GROUP_ID,
   ORDER_SOURCE,
   ORD_LN_DLY_PK,
   PLN_DIVIDE_ID,
   ORDER_NO,
   ORDER_SEQ,
   DELIVERY_NO,
   REQ_BL_ID,
   PLINE_CODE,
   PLINE_NAME,
   INWL_ID,
   INWL_DESC,
   OUTWL_ID,
   OUTWL_DESC,
   WEIGTH_S,
   NUM_S,
   GX_PRO_SEQ,
   PLAN_USETIME,
   PLAN_TIME_B,
   PLAN_TIME_E,
   EXE_STATUS,
   IS_REPAIR_PLN,
   STEELCODE,
   STEELNAME,
   OUTDIAMETER,
   WALLTHICK,
   LENGTHMAX,
   LENGTHMIN,
   LENGTHDISC,
   AIMWALLTHICK,
   AIMLENGTH,
   SHRT_LEN_RATO,
   SHORTEST,
   LONG_LEN_RATO,
   LONGEST,
   SHRT_STOVE,
   AVG_LEN_MIN,
   DIFRNC_LEN_MAX,
   SIGL_LEN,
   ENDLEN_SPECSTD,
   MODEL_CODE,
   MODEL_DESC,
   LENGTHMAX_IN,
   LENGTHMIN_IN,
   LENGTH_IN,
   OUTNUM_CUT,
   IN_WEIGHT_S,
   IN_NUM_S,
   ADD_WT_IN,
   ADD_NUM_IN,
   MATCH_WT_IN,
   MATCH_NUM_IN,
   IF_MONITOR_JGX,
   PRDCR_NO,
   MONITOR_POINT,
   CIC,
   PIC,
   SIC,
   DIC,
   WIC,
   GIC,
   CRAFT_FILE_NO,
   CRAFT_FILE_MAN,
   CRAFT_SEQ,
   STATION_ROAD,
   IS_PLAN_OK,
   ZY_BATCH_ID,
   PRO_MONTH,
   PREVIOUS_GX,
   PREV_GXPLAN_ID,
   IF_EXPORT,
   FINAL_USER_DESC,
   PROCESS_DESC_C_ZG,
   GROUP_ROLL_NAME,
   BEGIN_TIME_ZG,
   PRDCR_ADVC_DAY,
   WHOLE_BACKLOG_DESC,
   PRIORITY,
   PRIORITY_MEMO,
   DELVRY_EDATE,
   STATION_NM,
   OUTLINE_SITE_250,
   CREATE_TIME,
   MEMO,
   VERSION_NO,
   PROCESSING_COST,
   TOTAL_COST,
   IF_STOVE_ISSUED,
   IS_ONLOAD_LINE,
   PROCESS_CODE_C,
   PROCESS_DESC_C,
   MSC,
   INDEX_SEQ,
   BOM,
   IF_CRAFT_LOCKED,
   VALIDFLAG,
   DECISION,
   GROUP_JGX,
   PROGY_MEMO)
VALUES
  ('#PRO_ORDER_NO#',
   '#PRO_PLAN_ID#',
   '#GX_PLAN_NO#',
   '#PLAN_GROUP_ID#',
   '#ORDER_SOURCE#',
   '#ORD_LN_DLY_PK#',
   '#PLN_DIVIDE_ID#',
   '#ORDER_NO#',
   '#ORDER_SEQ#',
   '#DELIVERY_NO#',
   '#REQ_BL_ID#',
   '#PLINE_CODE#',
   '#PLINE_NAME#',
   '#INWL_ID#',
   '#INWL_DESC#',
   '#OUTWL_ID#',
   '#OUTWL_DESC#',
   '#WEIGTH_S#',
   '#NUM_S#',
   '#GX_PRO_SEQ#',
   '#PLAN_USETIME#',
   TO_DATE('#PLAN_TIME_B#', 'YYYY-MM-DD HH24:MI:SS'),
   TO_DATE('#PLAN_TIME_E#', 'YYYY-MM-DD HH24:MI:SS'),
   '0',
   '0',
   '#STEELCODE#',
   '#STEELNAME#',
   '#OUTDIAMETER#',
   '#WALLTHICK#',
   '#LENGTHMAX#',
   '#LENGTHMIN#',
   '#LENGTHDISC#',
   '#AIMWALLTHICK#',
   '#AIMLENGTH#',
   '#SHRT_LEN_RATO#',
   '#SHORTEST#',
   '#LONG_LEN_RATO#',
   '#LONGEST#',
   '#SHRT_STOVE#',
   '#AVG_LEN_MIN#',
   '#DIFRNC_LEN_MAX#',
   '#SIGL_LEN#',
   '#ENDLEN_SPECSTD#',
   '#MODEL_CODE#',
   '#MODEL_DESC#',
   '#LENGTHMAX_IN#',
   '#LENGTHMIN_IN#',
   '#LENGTH_IN#',
   '#OUTNUM_CUT#',
   '#IN_WEIGHT_S#',
   '#IN_NUM_S#',
   '#ADD_WT_IN#',
   '#ADD_NUM_IN#',
   '#MATCH_WT_IN#',
   '#MATCH_NUM_IN#',
   '#IF_MONITOR_JGX#',
   '#PRDCR_NO#',
   '#MONITOR_POINT#',
   '#CIC#',
   '#PIC#',
   '#SIC#',
   '#DIC#',
   '#WIC#',
   '#GIC#',
   '#CRAFT_FILE_NO#',
   '#CRAFT_FILE_MAN#',
   '#CRAFT_SEQ#',
   '#STATION_ROAD#',
   '0',
   '#ZY_BATCH_ID#',
   '#PRO_MONTH#',
   '#PREVIOUS_GX#',
   '#PREV_GXPLAN_ID#',
   '#IF_EXPORT#',
   '#FINAL_USER_DESC#',
   '#PROCESS_DESC_C_ZG#',
   '#GROUP_ROLL_NAME#',
   TO_DATE('#BEGIN_TIME_ZG#', 'YYYY-MM-DD HH24:MI:SS'),
   '#PRDCR_ADVC_DAY#',
   '#WHOLE_BACKLOG_DESC#',
   '#PRIORITY#',
   '#PRIORITY_MEMO#',
   TO_DATE('#DELVRY_EDATE#', 'YYYY-MM-DD HH24:MI:SS'),
   '#STATION_NM#',
   '#OUTLINE_SITE_250#',
   TO_DATE('#CREATE_TIME#', 'YYYY-MM-DD HH24:MI:SS'),
   '#MEMO#',
   '#VERSION_NO#',
   '#PROCESSING_COST#',
   '#TOTAL_COST#',
   '0',
   '0',
   '#PROCESS_CODE_C#',
   '#PROCESS_DESC_C#',
   '#MSC#',
   '#INDEX_SEQ#',
   '#BOM#',
   '0',
   '1',
   '#DECISION#',
   '#GROUP_JGX#',
   '#PROGY_MEMO#')
		]]>
	</query>
<query id="FrmProdSchProcAmoun.queryBaseMaterialGPl" desc="查询加工投入产出-产线能力">
		<![CDATA[
SELECT OUT_MATERIAL_NO,
       PLINE_CODE,
       PLINE_NAME,
       NVL(HR_CAPCTY, 0) HR_CAPCTY,
       NVL(PRD_RATE, 0) PRD_RATE,
       NVL(WASTE_RATE, 0) WASTE_RATE
  FROM SLM_BASE_MATERIAL_K_PL T
 WHERE T.IN_MATERIAL_NO = ?
   AND T.OUT_MATERIAL_NO = ?
   AND T.PLINE_CODE = ?
 ORDER BY T.HR_CAPCTY DESC, T.PLINE_CODE ASC

		]]>
	</query>

	<query id="FrmProdSchProcAmoun.queryBaseMaterialFPl" desc="查询热处理投入产出-产线能力">
		<![CDATA[
			SELECT IN_MATERIAL_NO,
			       OUT_MATERIAL_NO,
			       PLINE_CODE,
			       PLINE_NAME,
			       NVL(HR_CAPCTY, 0) HR_CAPCTY,
                   NVL(PRD_RATE, 0) PRD_RATE,
			       DISABLE_FL,
			       NVL(WASTE_RATE, 0) WASTE_RATE
			  FROM SLM_BASE_MATERIAL_F_PL T
			 WHERE T.IN_MATERIAL_NO = ?
			   AND T.OUT_MATERIAL_NO = ?
			   AND T.PLINE_CODE=?
			 ORDER BY T.PLINE_LEVEL ASC, T.PRD_RATE DESC
		]]>
	</query>

	<query id="FrmProdSchProcAmoun.queryBaseMaterialEPl" desc="查询镦拔扩投入产出-产线能力">
		<![CDATA[
			SELECT IN_MATERIAL_NO,
			       OUT_MATERIAL_NO,
			       PLINE_CODE,
			       PLINE_NAME,
			       NVL(HR_CAPCTY, 0) HR_CAPCTY,
                   NVL(PRD_RATE, 0) PRD_RATE,
			       DISABLE_FL,
			       CROP_HEAD,
			       CROP_END,
			       NVL(WASTE_RATE, 0) WASTE_RATE,
			       AUDIT_FLAG, 
			       UPSETTING_LENGTH
			  FROM SLM_BASE_MATERIAL_E_PL T
			 WHERE T.IN_MATERIAL_NO = ?
			   AND T.OUT_MATERIAL_NO = ?
			   AND T.PLINE_CODE =?
			 ORDER BY T.PLINE_LEVEL ASC, T.PRD_RATE DESC,T.PLINE_CODE ASC
		]]>
	</query>
	<query id="FrmProdSchProcAmoun.queryJg" desc="查询接箍排产">
		<![CDATA[
	SELECT T.PRO_PLAN_ID,
       T.JG_GROUP_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.GX_PRO_SEQ,
       T.CODE_JG,
       T.SPEC_JG_DESC,
       T.CODE_JG_BL,
       T.STEELCODE,
       T.STEELNAME,
       T.GRADECODE,
       T.GRADENAME,
       T.BL_WL_ID,
       T.BL_WL_DESC,
       T.MIN_D,
       T.MIN_H,
       T.AIMLENGTH_BL,
       T.AIM_CUT_LEN,
       T.LENGTH_MIN,
       T.LENGTH_MAX,
       T.TAPER,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.DEMAND_DETECTION,
       T.DEMAND_BONDERIZING,
       (SELECT T1.BASENAME
          FROM COM_BASE_INFO T1
         WHERE T1.BASECODE = T.DEMAND_COPPER) DEMAND_COPPER,
       T.DEMAND_BLAST,
       T.GROUP_NUM_S,
       T.SINGLE_CUT_NUN,
       T.GROUP_BL_NUM_S,
       T.GROUP_BL_WT_S,
       DECODE(T.IS_PLAN_OK, '1', '是', '/') IS_PLAN_OK,
       T.MATCHNUM_JG,
       T.PRO_MONTH,
       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,
       
       T.MATCHWT_BL,
       T.MATCHNUM_BL,
       (SELECT SUM(M.PLAN_BL_NUM)
          FROM PLN_ZY_JG_M M
         WHERE M.PRO_PLAN_ID = T.PRO_PLAN_ID
           AND M.GX_PLAN_NO = T.GX_PLAN_NO) BATCHED_NUM,
       (SELECT SUM(M.PLAN_BL_WT)
          FROM PLN_ZY_JG_M M
         WHERE M.PRO_PLAN_ID = T.PRO_PLAN_ID
           AND M.GX_PLAN_NO = T.GX_PLAN_NO) BATCHED_WT,
       (SELECT SUM(M.PLAN_JG_NUM)
          FROM PLN_ZY_JG_M M
         WHERE M.PRO_PLAN_ID = T.PRO_PLAN_ID
           AND M.GX_PLAN_NO = T.GX_PLAN_NO) BATCHED_NUM_OUT,
       (SELECT SUM(C.USE_BL_WT)
          FROM PLN_ZY_JG_C C, PLN_ZY_JG_M M
         WHERE C.HEAT_PLAN_NO = M.HEAT_PLAN_NO
           AND M.PRO_PLAN_ID = T.PRO_PLAN_ID
           AND M.GX_PLAN_NO = T.GX_PLAN_NO) REAL_BATCHED_WT,
       (SELECT SUM(C.USE_BL_NUM)
          FROM PLN_ZY_JG_C C, PLN_ZY_JG_M M
         WHERE C.HEAT_PLAN_NO = M.HEAT_PLAN_NO
           AND M.PRO_PLAN_ID = T.PRO_PLAN_ID
           AND M.GX_PLAN_NO = T.GX_PLAN_NO) REAL_BATCHED_NUM,
       (SELECT SUM(C.OUT_JG_NUM)
          FROM PLN_ZY_JG_C C, PLN_ZY_JG_M M
         WHERE C.HEAT_PLAN_NO = M.HEAT_PLAN_NO
           AND M.PRO_PLAN_ID = T.PRO_PLAN_ID
           AND M.GX_PLAN_NO = T.GX_PLAN_NO) PRODUCED_NUM,
       DECODE(T.EXE_STATUS,
              '0',
              '计划',
              '1',
              '生产中',
              '2',
              '已生产',
              '3',
              '关闭A',
              '') EXE_STATUS,
       DECODE(T.IS_REPAIR_PLN, '1', '是', '/') IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       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.PROCESSING_COST,
       T.TOTAL_COST,
       DECODE(T.IF_MONITOR_JG, '1', '是', '/') IF_MONITOR_JG,
       T.PRDCR_NO,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       DECODE(T.IS_STOVE_ISSUED, '1', '是', '/') IS_STOVE_ISSUED,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       T.ORD_LN_DLY_PK,
       T.PLN_DIVIDE_ID,
       T.SPEC_JG,
       T.GROUP_WT_S,
       T.REQ_BL_ID,
       T.OUTWL_ID,
       T.OUTWL_DESC,
       T.MONITOR_POINT,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.VERSION_NO,
       (SELECT CD.CRAFT_PATH
          FROM CRAFT_ORD_DESIGN CD
         WHERE CD.ORD_LN_PK = T.CODE_JG_BL
           AND CD.CRAFT_SEQ = T.CRAFT_SEQ) CRAFT_PATH,
       T.STD_CODE,
       T.STD_NAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.PRODUCCODE_JG,
       T.PRODUCCODE_JG_DESC,
       (SELECT T1.BASENAME
          FROM COM_BASE_INFO T1
         WHERE T1.BASECODE = T.STYLE_JG) STYLE_JG,
       T.CODE_BL_ALL,
       T.ORDER_SOURCE,T.DECISION,T.IF_MONITOR_BL
  FROM PLN_GX_JG_PROP_S T
 WHERE 1 = 1
		]]>
	</query>
<query id="FrmProdSchProcAmoun.queryAddPlnJgStrat" desc="查询接箍排产状态">
		<![CDATA[
		 SELECT 
       T.PRO_PLAN_ID,
       T.JG_GROUP_ID,
       T.GX_PLAN_NO,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.GX_PRO_SEQ,
       T.CODE_JG,
       T.SPEC_JG_DESC,
       T.CODE_JG_BL,
       T.STEELCODE,
       T.STEELNAME,
       T.GRADECODE,
       T.GRADENAME,
       T.BL_WL_ID,
       T.BL_WL_DESC,
       T.MIN_D,
       T.MIN_H,
       T.AIMLENGTH_BL,
       T.AIM_CUT_LEN,
       T.LENGTH_MIN,
       T.LENGTH_MAX,
       T.TAPER,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.DEMAND_DETECTION,
       T.DEMAND_BONDERIZING,
       T.DEMAND_COPPER,
       T.DEMAND_BLAST,
       T.GROUP_NUM_S,
       NVL(T.SINGLE_CUT_NUN,0) SINGLE_CUT_NUN,
       T.GROUP_BL_NUM_S,
       T.GROUP_BL_WT_S,
       T.IS_PLAN_OK,
       T.MATCHNUM_JG,
       T.PRO_MONTH,
       T.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,
       T.MATCHWT_BL,
       T.MATCHNUM_BL,
       T.BATCHED_WT,
       T.BATCHED_NUM,
       T.BATCHED_NUM_OUT,
       T.REAL_BATCHED_WT,
       T.REAL_BATCHED_NUM,
       T.PRODUCED_NUM,
       T.EXE_STATUS,
       T.IS_REPAIR_PLN,
       T.REPAIR_TYPE,
       T.IS_STOVE_ISSUED,
       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.PROCESSING_COST,
       T.TOTAL_COST,
       T.IF_MONITOR_JG,
       T.PRDCR_NO,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       TO_CHAR(T.STOVE_ISSUED_TIME, 'YYYY-MM-DD HH24:MI:SS') STOVE_ISSUED_TIME,
       T.STOVE_ISSUED_MAN,
       T.ORD_LN_DLY_PK,
       T.PLN_DIVIDE_ID,
       T.SPEC_JG,
       T.GROUP_WT_S,
       T.REQ_BL_ID,
       T.OUTWL_ID,
       T.OUTWL_DESC,
       T.MONITOR_POINT,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       T.CRAFT_SEQ,
       T.STATION_ROAD,
       T.VERSION_NO,
       T.STYLE_JG,
       T.STD_CODE,
       T.STD_NAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.PRODUCCODE_JG,
       T.PRODUCCODE_JG_DESC,
       T.CODE_BL_ALL,
       T.MEMO,
       T.ORDER_SOURCE,T.DECISION,T.IF_MONITOR_BL
 FROM PLN_GX_JG_PROP_S T
 WHERE T.PRO_PLAN_ID = ?
AND T.GX_PLAN_NO = ?
			]]>
	</query>
</queryMap>