<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="直接出库">
	<query id="FrmOutAutomatic.QueryBillC" desc="查询提单从表">
<![CDATA[
SELECT T.STORAGE_NO FROM YDM_ZC_BILL_C T WHERE T.BILL_NO=? GROUP BY T.STORAGE_NO
]]>
	</query>
	<query id="FrmOutAutomatic.getqueryBillM" desc="查询提单主表">
<![CDATA[
SELECT T.BILL_NO,
       T.BILL_STATUS,
       T.LOADVEHICLE_TYPE,
       T.ISPRECLOSE,
       T.PLAN_TRANS_TYPE,
       T.SEND_PLAN_NO,
       SUM(T.PLAN_NUM) PLAN_NUM,
       SUM(T.PLAN_WT) PLAN_WT,
       SUM(T.PLAN_TOTL_LEN) PLAN_TOTL_LEN,
       T.CUSTOMER_NO,
       T.CUSTOMER_NM,
       T.RECEIV_NO,
       T.RECEIV_NM,
       T.STLMT_UNIT_NO,
       T.STLMT_UNIT_NM,
       T.SALE_ORG,
       T.SALE_ORG_DESC,
       T.DELVRY_ADDR,
       T.PRD_CLS,
       MAX(T.SUPPLY_UNIT)SUPPLY_UNIT
  FROM YDM_ZC_BILL_M T
 WHERE T.BILL_NO = ?
   AND T.SEND_PLAN_NO = ?
   AND T.VALIDFLAG='1'
 GROUP BY T.BILL_NO,
          T.BILL_STATUS,
          T.LOADVEHICLE_TYPE,
          T.ISPRECLOSE,
          T.PLAN_TRANS_TYPE,
          T.SEND_PLAN_NO,
          T.CUSTOMER_NO,
          T.CUSTOMER_NM,
          T.RECEIV_NO,
          T.RECEIV_NM,
          T.STLMT_UNIT_NO,
          T.STLMT_UNIT_NM,
          T.SALE_ORG,
          T.SALE_ORG_DESC,
          T.DELVRY_ADDR,T.PRD_CLS
	]]>
	</query>

	<query id="FrmOutAutomatic.getqueryBillM1" desc="查询提单主表">
		<![CDATA[
SELECT 	T.BILL_NO,
	T.ORD_LN_DLY_PK,
	max(t.SALE_ORG) SALE_ORG,
	max(t.SALE_ORG_DESC) SALE_ORG_DESC,
	NVL( SUM( T.PLAN_NUM ), 0 ) PLAN_NUM,
	NVL( SUM( T.PLAN_WT ), 0 ) PLAN_WT,
	NVL( SUM( T.PLAN_TOTL_LEN ), 0 ) PLAN_TOTL_LEN,
	MAX(T.SUPPLY_UNIT)SUPPLY_UNIT
  FROM YDM_ZC_BILL_M T
 WHERE T.BILL_NO = ?
   AND T.VALIDFLAG='1'
 GROUP BY T.BILL_NO,
 T.ORD_LN_DLY_PK
	]]>
	</query>

	<query id="FrmOutAutomatic.updatProOrd" desc="确认回写进程">
		<![CDATA[
UPDATE PROCESS_ORDER_M T
   SET T.OUT_NUM = NVL(TO_NUMBER(T.OUT_NUM), 0) + TO_NUMBER(?),
       T.OUT_WGT = NVL(TO_NUMBER(T.OUT_WGT), 0) + TO_NUMBER(?),
       T.OUT_LEN = NVL(TO_NUMBER(T.OUT_LEN), 0) + TO_NUMBER(?)
 WHERE ORD_LN_DLY_PK = ?
     ]]>
	</query>

	<query id="FrmOutAutomatic.deleteProOrd" desc="确认回写进程">
		<![CDATA[
UPDATE PROCESS_ORDER_M T
   SET T.OUT_NUM = NVL(TO_NUMBER(T.OUT_NUM), 0) - TO_NUMBER(?),
       T.OUT_WGT = NVL(TO_NUMBER(T.OUT_WGT), 0) - TO_NUMBER(?),
       T.OUT_LEN = NVL(TO_NUMBER(T.OUT_LEN), 0) - TO_NUMBER(?)
 WHERE ORD_LN_DLY_PK = ?
     ]]>
	</query>

		<query id="FrmOutAutomatic.QueryAddSendMat" desc="查询提单从表信息">
<![CDATA[
SELECT mat.LOADVEHICLE_SQE,T.ORDER_NO,
       T.ORDER_SEQ,
       T.MAT_NO,
       T.LOT_NO,
       T.JUDGE_STOVE_NO,
       T.BATCH_NO,
       T.GROUP_NO,
       T.STOVE_NO,
       T.MATERIAL_NO,
       T.MATERIAL_NAME,
       T.PRODUCCODE,
       T.PRODUCNAME,
       T.STD_CODE,
       T.STD_NAME,
       T.GRADECODE,
       T.GRADENAME,
       T.STEELCODE,
       T.STEELNAME,
       T.STD_STYLE,
       T.STD_STYLE_DESC,
       T.SPEC_CODE,
       T.SPEC_NAME,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.ACT_DIMATER,
       T.ACT_HEIGHT,
       T.ACT_LEN,
       T.ACT_LEN_MIN,
       T.ACT_LEN_MAX,
       T.ACT_COUNT,
       T.ACT_WEIGHT,
       T.ACT_THEORY_WEIGHT,
       T.JUDGE_RESULT_CODE,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.PRO_BC,
       T.PRO_BZ,
       T.RPO_TIME,
       T.STORAGE_NO,
       T.LOCATION_NO,
       T.DELIVERY_NO,
       T.ORD_PK,
       T.ORD_LN_PK,
       T.ORD_LN_DLY_PK,
       T.VSTEL,
       T.VSTEL_DESC,
       M1.PORT_NO,
       M1.PORT_DESC,
       M1.CREDIT_NO,
       T.PRT_FLAG,
       T.SEND_NUM,
       T.FINISHPRO_MOLD,
       T.IN_MOLD,
       T.IN_TYPE
  FROM (SELECT M.ORD_LN_DLY_PK,
               M.BILL_NO,
               M.PORT_NO,
               M.PORT_DESC,
               M.CREDIT_NO
          FROM YDM_ZC_BILL_M M
         GROUP BY M.PORT_NO,
                  M.PORT_DESC,
                  M.CREDIT_NO,
                  M.ORD_LN_DLY_PK,
                  M.BILL_NO) M1,
       YDM_ZC_BILL_C T
       left join YDM_ZC_LOADVEHICLE_MAT mat on t.BILL_NO  = mat.BILL_NO and t.MAT_NO = mat.MAT_NO
 WHERE M1.BILL_NO = T.BILL_NO
   AND M1.ORD_LN_DLY_PK = T.ORD_LN_DLY_PK
   AND T.BILL_NO = ?
   AND T.VALIDFLAG = '1'
 ORDER BY T.MAT_NO ASC
]]>
	</query>
	<query id="FrmOutAutomatic.updateBillC" desc="修改提单材料表装车状态">
	<![CDATA[
UPDATE YDM_ZC_BILL_C SET LOADVEHICLE_FLAG='1' ,EDIT_FLAG='1'
  WHERE BILL_NO=?
	]]>
	</query>
	<query id="FrmOutAutomatic.updateBillM" desc="修改提单主表状态">
	<![CDATA[
UPDATE YDM_ZC_BILL_M
   SET ACT_NUM      = TO_NUMBER(NVL(ACT_NUM, '0')) + TO_NUMBER(?),
       ACT_WT       = TO_NUMBER(NVL(ACT_WT, '0')) + TO_NUMBER(?),
       ACT_TOTL_LEN = TO_NUMBER(NVL(ACT_TOTL_LEN, '0')) + TO_NUMBER(?),
       ZOUT_FLAG    = '1',
       BILL_STATUS  = '3'
 WHERE BILL_NO = ?
   AND ORD_LN_DLY_PK = ?
	]]>
	</query>
	<query id="FrmOutAutomatic.updateBillM1" desc="修改提单主表状态">
	<![CDATA[
UPDATE YDM_ZC_BILL_M
   SET ACT_NUM      = '',
       ACT_WT       ='',
       ACT_TOTL_LEN = '',
       ZOUT_FLAG    = '0',
       BILL_STATUS  = '1'
 WHERE BILL_NO = ?
	]]>
	</query>
		<query id="FrmOutAutomatic.updateBillC1" desc="修改提单材料表装车状态">
	<![CDATA[
UPDATE YDM_ZC_BILL_C SET LOADVEHICLE_FLAG='0' ,EDIT_FLAG='0'
  WHERE BILL_NO=?
	]]>
	</query>
		<query id="FrmOutAutomatic.QueryStorageNo" desc="查询仓库是否虚拟库">
	<![CDATA[
SELECT S.DUMMY_FLAG,S.STORAGE_NO FROM YDM_BS_STORAGE S WHERE S.STORAGE_NO=? AND S.VALIDFLAG='1'
	]]>
	</query>
		<!-- <query id="FrmOutAutomatic.deleteButtress" desc="删除位置表">
	<![CDATA[
DELETE YDM_ZC_BUTTRESS C
 WHERE C.MAT_NO IN ((SELECT T.MAT_NO
                      FROM YDM_ZC_BILL_C T
                     WHERE T.BILL_NO = ?  
                       AND T.MAT_NO = C.MAT_NO))
	]]>
	</query>
	-->
	<query id="FrmOutAutomatic.deleteOut" desc="删除出库表销售出库对应记录">
	<![CDATA[
DELETE YDM_ZC_OUTLIST C
 WHERE C.OUTSTOCK_TYPE_CODE = '800805'
   AND C.MAT_NO IN ((SELECT T.MAT_NO
                    FROM YDM_ZC_BILL_C T
                   WHERE T.BILL_NO = ? 
                     AND T.MAT_NO=C.MAT_NO))
	]]>
	</query>
	<!--
	<query id="FrmOutAutomatic.updateMatNo" desc="修改材料表材料状态">
	<![CDATA[
UPDATE MAT_ZC_M C SET C.MAT_STATUS='80150303' WHERE C.MAT_NO IN ((SELECT T.MAT_NO
                    FROM YDM_ZC_BILL_C T
                   WHERE T.BILL_NO = ? 
                     AND T.MAT_NO=C.MAT_NO))
	]]>
	</query>
	<query id="FrmOutAutomatic.updateMatNo1" desc="修改材料表材料状态">
	<![CDATA[
UPDATE MAT_ZC_M C SET C.MAT_STATUS='80150302' WHERE C.MAT_NO IN ((SELECT T.MAT_NO
                    FROM YDM_ZC_BILL_C T
                   WHERE T.BILL_NO = ? 
                     AND T.MAT_NO=C.MAT_NO))
	]]>
	</query>
	-->
	<query id="FrmOutAutomatic.AddMatZcBackup" desc="新增材料表MAT_ZC_BACKUP">
	<![CDATA[  
DECLARE 
BEGIN
 INSERT INTO MAT_ZC_BACKUP (MAT_NO, PRODUCT_FLAG, MAT_STATUS, 
LOT_NO, STOVE_NO, JUDGE_STOVE_NO, BATCH_NO, BATCH_GROUD_NO, MAT_SQE_NO, 
SAMPLE_FLAG, CUTTING_FLAG, ORIGIN_MAT_NO, MATERIAL_NO, MATERIAL_NAME, 
INPUT_MATERIAL_NAME, INPUT_MATERIAL_NO, INPUT_ORIGIN_CODE, PRODUCCODE, 
PRODUCNAME, STEELCODE, STEELNAME, GRADECODE, GRADENAME, SPEC_CODE, SPEC_NAME, 
MODEL_CODE, MODEL_DESC, STD_CODE, STD_NAME, STD_STYLE, STD_STYLE_DESC, 
PRO_ORDER_NO, PRO_ORDER_NO1, PRO_ORDER_ID, PRO_ORDER_ID1, ORDER_NO, ORDER_SEQ, 
ORDER_SEQ_NO, CRAF_NO, PROCESS_CDOE, PROCESS_DESC, NEXT_PROCESS_CDOE, 
NEXT_PROCESS_DESC, PLINE_CODE, PLINE_NAME, MAT_ORIGIN_CODE, MAT_ORIGIN_NAME, 
DIMATER, HEIGHT, LEN_NO, LEN_DESC, LEN_UNIT, LEN_MIN, LEN_MAX, TARG_DIMATER, 
TARG_HEIGHT, TARG_LEN_MIN, TARG_LEN_MAX, ACT_DIMATER, ACT_HEIGHT, ACT_LEN, 
ACT_LEN_MIN, ACT_LEN_MAX, ACT_COUNT, ACT_WEIGHT, ACT_THEORY_WEIGHT, 
MEASURE_FLAG, BELONG_CODE, BELONG_NAME, PACK_FLAG, PACK_TYPE_CODE, 
PACK_TYPE_NAME, PACK_NO, PACK_TIME, PACK_MAT_WT, MAT_GROSS_WT, MAT_GOWHERE_CODE, 
MAT_GOWHERE_NAME, COOL_HOT_FLAG, MAT_RETURN_FLAG, HEAT_TREAT_NO, POST_FLAG, 
LOCK_FLAG, MNG_LOCK_RSN_CODE, MNG_LOCK_TIME, MNG_LOCK_MAKER, MNG_LOCK_REMARK, 
LOCK_RSN_CODE, LOCK_TIME, LOCK_MAKER, LOCK_REMARK, UNLOCK_TIME, UNLOCK_MAKER, 
UNLOCK_REMARK, OLD_ORDER_NO, OLD_ORDER_SEQ, OLD_ORDER_SEQ_NO, OLD_MATERIAL_NO, 
OLD_MATERIAL_NAME, REMAIN_RSN_CODE, REMAIN_JUGDE_TIME, REMAIN_JUGDE_MAKER, 
REMAIN_JUGDE_CODE, REMAIN_REMARK, JUGDE_APPLY_FLAG, JUGDE_APPLY_CODE, 
JUGDE_APPLY_TIME, JUGDE_SCAN_TIME, FACE_RESULT_CODE, FACE_RESULT_TIME, 
FACE_MAKER, SPEC_RESULT_CODE, SPEC_RESULT_TIME, SPEC_MAKER, CHEM_RESULT_CODE, 
CHEM_RESULT_TIME, CHEM_MAKER, PHY_RESULT_CODE, PHY_RESULT_TIME, PHY_MAKER, 
DETECT_REPORT_NO, DETECT_RESULT_CODE, WPRESSURE_REPORT_NO, 
WPRESSURE_RESULT_CODE, JUDGE_RESULT_CODE, JUDGE_RESULT, JUDGE_RESULT_TIME, 
JUDGE_MAKER, BUG_NO, BUG_DEAL, REPAIR_FLAG, REPAIR_REMARK, SAMPLING_FLAG, 
SAMPLING_TYPE, SAMPLING_NO, CHECKOUT_NO, CHEM_STCHECK_NO, CHEM_PROCHECK_NO, 
SH_CHECK_NO, COME_PROC_FLAG, CONFM_FLAG, INSTOCK_FLAG, INSTOCK_TIME, 
OUTSTOCK_TIME, PRO_BC, PRO_BZ, RPO_TIME, BAR_CODE, BEGINNING_FLAG, MEMO, 
CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, REQ_BL_ID, IF_BATCHED_JG, 
COUPCUT_BATCH_ID, ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, OLD_ORD_PK, OLD_ORD_LN_PK, 
OLD_ORD_LN_DLY_PK, BAL_YEAR_MONTH, JUDGE_STD_NAME, JUDGE_STD_CODE, JUDGE_GRADE, 
PIPMEMO, TEST, SOURE_CODE, SOURE_NAME, PONDER_NO, PONDER_GROSS_WT, MEMO1, 
JUDGE_ID, MNG_LOCK_FLAG, LOCK_ID, PRO_NO, LOCK_LIKU, PLN_GRADECODE, 
PLN_GRADENAME, PLN_STEELCODE, PLN_STEELNAME, QCM_STAUS, OUTSTOCK_DOC, 
HEAT_PLAN_NO, ZG_STOVE_SQE, GX_PLAN_NO, ZG_MAT_NO, FINISHPRO_MOLD, IN_MOLD, IN_TYPE,
TARGET, PROCESS_STATUS, JUGDE_CONVICTED, GX_PLAN_NO1, FIXTYPE_CODE, 
QUALITY_GROUP_ZG, FLAG_STOVE_NO_ZG, ZG_PHY_RESULT_PATH, ZG_FACE_RESULT_PATH, 
ZG_SPEC_RESULT_PATH, VRP_HEAT_PLAN_NO, VRP_LOT_NO, VRP_SAMPLE_FLAG, 
VRP_PRO_ORDER_NO, VRP_PRO_ORDER_NO1, VRP_PRO_ORDER_ID, VRP_PRO_ORDER_ID1, 
VRP_ACT_DIMATER, VRP_ACT_HEIGHT, VRP_JUGDE_APPLY_FLAG, VRP_JUGDE_APPLY_CODE, 
VRP_JUGDE_APPLY_TIME, VRP_FACE_RESULT_CODE, VRP_FACE_RESULT_TIME, 
VRP_FACE_MAKER, VRP_FACE_RESULT_PATH, VRP_SPEC_RESULT_CODE, 
VRP_SPEC_RESULT_TIME, VRP_SPEC_MAKER, VRP_SPEC_RESULT_PATH, VRP_PHY_RESULT_CODE, 
VRP_PHY_RESULT_TIME, VRP_PHY_MAKER, VRP_PHY_RESULT_PATH, VRP_JUDGE_RESULT_CODE, 
VRP_JUDGE_RESULT_TIME, VRP_JUDGE_MAKER, VRP_GX_PLAN_NO, VRP_GX_PLAN_NO1, 
VPR_JUGDE_CONVICTED, VPR_QUALITY_GROUP_ZG, VPR_FLAG_STOVE_NO_ZG, 
HTT_HEAT_PLAN_NO, HTT_LOT_NO, HTT_SAMPLE_FLAG, HTT_PRO_ORDER_NO, 
HTT_PRO_ORDER_NO1, HTT_PRO_ORDER_ID, HTT_PRO_ORDER_ID1, HTT_GX_PLAN_NO, 
HTT_GX_PLAN_NO1, HTT_JUGDE_APPLY_FLAG, HTT_JUGDE_APPLY_CODE, 
HTT_JUGDE_APPLY_TIME, HTT_FACE_RESULT_CODE, HTT_FACE_RESULT_TIME, 
HTT_FACE_MAKER, HTT_FACE_RESULT_PATH, HTT_SPEC_RESULT_CODE, 
HTT_SPEC_RESULT_TIME, HTT_SPEC_MAKER, HTT_SPEC_RESULT_PATH, HTT_PHY_RESULT_CODE, 
HTT_PHY_RESULT_TIME, HTT_PHY_MAKER, HTT_PHY_RESULT_PATH, HTT_JUDGE_RESULT_CODE, 
HTT_JUDGE_RESULT_TIME, HTT_JUDGE_MAKER, HTT_JUGDE_CONVICTED, 
HTT_QUALITY_GROUP_ZG, HTT_FLAG_STOVE_NO_ZG, PRC_LOT_NO, PRC_SAMPLE_FLAG, 
PRC_PRO_ORDER_NO, PRC_PRO_ORDER_NO1, PRC_PRO_ORDER_ID, PRC_PRO_ORDER_ID1, 
PRC_GX_PLAN_NO, PRC_GX_PLAN_NO1, PRC_JUGDE_APPLY_FLAG, PRC_JUGDE_APPLY_CODE, 
PRC_JUGDE_APPLY_TIME, PRC_FACE_RESULT_CODE, PRC_FACE_RESULT_TIME, 
PRC_FACE_MAKER, PRC_FACE_RESULT_PATH, PRC_SPEC_RESULT_CODE, 
PRC_SPEC_RESULT_TIME, PRC_SPEC_MAKER, PRC_SPEC_RESULT_PATH, PRC_PHY_RESULT_CODE, 
PRC_PHY_RESULT_TIME, PRC_PHY_MAKER, PRC_PHY_RESULT_PATH, PRC_JUDGE_RESULT_CODE, 
PRC_JUDGE_RESULT_TIME, PRC_JUDGE_MAKER, PRC_JUGDE_CONVICTED, 
PRC_QUALITY_GROUP_ZG, PRC_FLAG_STOVE_NO_ZG, PRC_HEAT_PLAN_NO, 
VRP_JUDGE_STD_NAME, VRP_JUDGE_STD_CODE, HTT_JUDGE_STD_NAME, HTT_JUDGE_STD_CODE, 
PRC_JUDGE_STD_NAME, PRC_JUDGE_STD_CODE, VRP_CRAF_NO, HTT_CRAF_NO, PRC_CRAF_NO, 
VRP_CHEM_RESULT_CODE, VRP_CHEM_RESULT_TIME, VRP_CHEM_MAKER, 
HTT_CHEM_RESULT_CODE, HTT_CHEM_RESULT_TIME, HTT_CHEM_MAKER, 
PRC_CHEM_RESULT_CODE, PRC_CHEM_RESULT_TIME, PRC_CHEM_MAKER, DETECT_REPORT_NO1, 
DETECT_RESULT_CODE1, TESTING_GRADE, TESTING_TYPE, TESTING_GRADE1, TESTING_TYPE1, 
ZG_PLINE_CODE, ZG_PLINE_NAME, VRP_PLINE_CODE, VRP_PLINE_NAME, HTT_PLINE_CODE, 
HTT_PLINE_NAME, PRC_PLINE_CODE, PRC_PLINE_NAME,VRP_QCM_STAUS,HTT_QCM_STAUS,PRC_QCM_STAUS,ZG_MEMO,ZBS_FLAG,ZBS_ID,MEASURING_SEQ,JG_ZBS_ID,
SUPPLY_UNIT_CODE,SUPPLY_UNIT,IS_DEALER)
 SELECT MAT_NO, PRODUCT_FLAG, 
'80150303', LOT_NO, STOVE_NO, JUDGE_STOVE_NO, BATCH_NO, BATCH_GROUD_NO, 
MAT_SQE_NO, SAMPLE_FLAG, CUTTING_FLAG, ORIGIN_MAT_NO, MATERIAL_NO, 
MATERIAL_NAME, INPUT_MATERIAL_NAME, INPUT_MATERIAL_NO, INPUT_ORIGIN_CODE, 
PRODUCCODE, PRODUCNAME, STEELCODE, STEELNAME, GRADECODE, GRADENAME, SPEC_CODE, 
SPEC_NAME, MODEL_CODE, MODEL_DESC, STD_CODE, STD_NAME, STD_STYLE, 
STD_STYLE_DESC, PRO_ORDER_NO, PRO_ORDER_NO1, PRO_ORDER_ID, PRO_ORDER_ID1, 
ORDER_NO, ORDER_SEQ, ORDER_SEQ_NO, CRAF_NO, PROCESS_CDOE, PROCESS_DESC, 
NEXT_PROCESS_CDOE, NEXT_PROCESS_DESC, PLINE_CODE, PLINE_NAME, MAT_ORIGIN_CODE, 
MAT_ORIGIN_NAME, DIMATER, HEIGHT, LEN_NO, LEN_DESC, LEN_UNIT, LEN_MIN, LEN_MAX, 
TARG_DIMATER, TARG_HEIGHT, TARG_LEN_MIN, TARG_LEN_MAX, ACT_DIMATER, ACT_HEIGHT, 
ACT_LEN, ACT_LEN_MIN, ACT_LEN_MAX, ACT_COUNT, ACT_WEIGHT, ACT_THEORY_WEIGHT, 
MEASURE_FLAG, BELONG_CODE, BELONG_NAME, PACK_FLAG, PACK_TYPE_CODE, 
PACK_TYPE_NAME, PACK_NO, PACK_TIME, PACK_MAT_WT, MAT_GROSS_WT, MAT_GOWHERE_CODE, 
MAT_GOWHERE_NAME, COOL_HOT_FLAG, MAT_RETURN_FLAG, HEAT_TREAT_NO, POST_FLAG, 
LOCK_FLAG, MNG_LOCK_RSN_CODE, MNG_LOCK_TIME, MNG_LOCK_MAKER, MNG_LOCK_REMARK, 
LOCK_RSN_CODE, LOCK_TIME, LOCK_MAKER, LOCK_REMARK, UNLOCK_TIME, UNLOCK_MAKER, 
UNLOCK_REMARK, OLD_ORDER_NO, OLD_ORDER_SEQ, OLD_ORDER_SEQ_NO, OLD_MATERIAL_NO, 
OLD_MATERIAL_NAME, REMAIN_RSN_CODE, REMAIN_JUGDE_TIME, REMAIN_JUGDE_MAKER, 
REMAIN_JUGDE_CODE, REMAIN_REMARK, JUGDE_APPLY_FLAG, JUGDE_APPLY_CODE, 
JUGDE_APPLY_TIME, JUGDE_SCAN_TIME, FACE_RESULT_CODE, FACE_RESULT_TIME, 
FACE_MAKER, SPEC_RESULT_CODE, SPEC_RESULT_TIME, SPEC_MAKER, CHEM_RESULT_CODE, 
CHEM_RESULT_TIME, CHEM_MAKER, PHY_RESULT_CODE, PHY_RESULT_TIME, PHY_MAKER, 
DETECT_REPORT_NO, DETECT_RESULT_CODE, WPRESSURE_REPORT_NO, 
WPRESSURE_RESULT_CODE, JUDGE_RESULT_CODE, JUDGE_RESULT, JUDGE_RESULT_TIME, 
JUDGE_MAKER, BUG_NO, BUG_DEAL, REPAIR_FLAG, REPAIR_REMARK, SAMPLING_FLAG, 
SAMPLING_TYPE, SAMPLING_NO, CHECKOUT_NO, CHEM_STCHECK_NO, CHEM_PROCHECK_NO, 
SH_CHECK_NO, COME_PROC_FLAG, CONFM_FLAG, INSTOCK_FLAG, INSTOCK_TIME, 
OUTSTOCK_TIME, PRO_BC, PRO_BZ, RPO_TIME, BAR_CODE, BEGINNING_FLAG, MEMO, 
CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, REQ_BL_ID, IF_BATCHED_JG, 
COUPCUT_BATCH_ID, ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, OLD_ORD_PK, OLD_ORD_LN_PK, 
OLD_ORD_LN_DLY_PK, BAL_YEAR_MONTH, JUDGE_STD_NAME, JUDGE_STD_CODE, JUDGE_GRADE, 
PIPMEMO, TEST, SOURE_CODE, SOURE_NAME, PONDER_NO, PONDER_GROSS_WT, MEMO1, JUDGE_ID, 
MNG_LOCK_FLAG, LOCK_ID, PRO_NO, LOCK_LIKU, PLN_GRADECODE, PLN_GRADENAME, 
PLN_STEELCODE, PLN_STEELNAME, QCM_STAUS, OUTSTOCK_DOC, HEAT_PLAN_NO, 
ZG_STOVE_SQE, GX_PLAN_NO, ZG_MAT_NO, FINISHPRO_MOLD, IN_MOLD, IN_TYPE,TARGET,
PROCESS_STATUS, JUGDE_CONVICTED, GX_PLAN_NO1, FIXTYPE_CODE, QUALITY_GROUP_ZG, 
FLAG_STOVE_NO_ZG, ZG_PHY_RESULT_PATH, ZG_FACE_RESULT_PATH, ZG_SPEC_RESULT_PATH, 
VRP_HEAT_PLAN_NO, VRP_LOT_NO, VRP_SAMPLE_FLAG, VRP_PRO_ORDER_NO, 
VRP_PRO_ORDER_NO1, VRP_PRO_ORDER_ID, VRP_PRO_ORDER_ID1, VRP_ACT_DIMATER, 
VRP_ACT_HEIGHT, VRP_JUGDE_APPLY_FLAG, VRP_JUGDE_APPLY_CODE, 
VRP_JUGDE_APPLY_TIME, VRP_FACE_RESULT_CODE, VRP_FACE_RESULT_TIME, 
VRP_FACE_MAKER, VRP_FACE_RESULT_PATH, VRP_SPEC_RESULT_CODE, 
VRP_SPEC_RESULT_TIME, VRP_SPEC_MAKER, VRP_SPEC_RESULT_PATH, VRP_PHY_RESULT_CODE, 
VRP_PHY_RESULT_TIME, VRP_PHY_MAKER, VRP_PHY_RESULT_PATH, VRP_JUDGE_RESULT_CODE, 
VRP_JUDGE_RESULT_TIME, VRP_JUDGE_MAKER, VRP_GX_PLAN_NO, VRP_GX_PLAN_NO1, 
VPR_JUGDE_CONVICTED, VPR_QUALITY_GROUP_ZG, VPR_FLAG_STOVE_NO_ZG, 
HTT_HEAT_PLAN_NO, HTT_LOT_NO, HTT_SAMPLE_FLAG, HTT_PRO_ORDER_NO, 
HTT_PRO_ORDER_NO1, HTT_PRO_ORDER_ID, HTT_PRO_ORDER_ID1, HTT_GX_PLAN_NO, 
HTT_GX_PLAN_NO1, HTT_JUGDE_APPLY_FLAG, HTT_JUGDE_APPLY_CODE, 
HTT_JUGDE_APPLY_TIME, HTT_FACE_RESULT_CODE, HTT_FACE_RESULT_TIME, 
HTT_FACE_MAKER, HTT_FACE_RESULT_PATH, HTT_SPEC_RESULT_CODE, 
HTT_SPEC_RESULT_TIME, HTT_SPEC_MAKER, HTT_SPEC_RESULT_PATH, HTT_PHY_RESULT_CODE, 
HTT_PHY_RESULT_TIME, HTT_PHY_MAKER, HTT_PHY_RESULT_PATH, HTT_JUDGE_RESULT_CODE, 
HTT_JUDGE_RESULT_TIME, HTT_JUDGE_MAKER, HTT_JUGDE_CONVICTED, 
HTT_QUALITY_GROUP_ZG, HTT_FLAG_STOVE_NO_ZG, PRC_LOT_NO, PRC_SAMPLE_FLAG, 
PRC_PRO_ORDER_NO, PRC_PRO_ORDER_NO1, PRC_PRO_ORDER_ID, PRC_PRO_ORDER_ID1, 
PRC_GX_PLAN_NO, PRC_GX_PLAN_NO1, PRC_JUGDE_APPLY_FLAG, PRC_JUGDE_APPLY_CODE, 
PRC_JUGDE_APPLY_TIME, PRC_FACE_RESULT_CODE, PRC_FACE_RESULT_TIME, 
PRC_FACE_MAKER, PRC_FACE_RESULT_PATH, PRC_SPEC_RESULT_CODE, 
PRC_SPEC_RESULT_TIME, PRC_SPEC_MAKER, PRC_SPEC_RESULT_PATH, PRC_PHY_RESULT_CODE, 
PRC_PHY_RESULT_TIME, PRC_PHY_MAKER, PRC_PHY_RESULT_PATH, PRC_JUDGE_RESULT_CODE, 
PRC_JUDGE_RESULT_TIME, PRC_JUDGE_MAKER, PRC_JUGDE_CONVICTED, 
PRC_QUALITY_GROUP_ZG, PRC_FLAG_STOVE_NO_ZG, PRC_HEAT_PLAN_NO, 
VRP_JUDGE_STD_NAME, VRP_JUDGE_STD_CODE, HTT_JUDGE_STD_NAME, HTT_JUDGE_STD_CODE, 
PRC_JUDGE_STD_NAME, PRC_JUDGE_STD_CODE, VRP_CRAF_NO, HTT_CRAF_NO, PRC_CRAF_NO, 
VRP_CHEM_RESULT_CODE, VRP_CHEM_RESULT_TIME, VRP_CHEM_MAKER, 
HTT_CHEM_RESULT_CODE, HTT_CHEM_RESULT_TIME, HTT_CHEM_MAKER, 
PRC_CHEM_RESULT_CODE, PRC_CHEM_RESULT_TIME, PRC_CHEM_MAKER, DETECT_REPORT_NO1, 
DETECT_RESULT_CODE1, TESTING_GRADE, TESTING_TYPE, TESTING_GRADE1, TESTING_TYPE1, 
ZG_PLINE_CODE, ZG_PLINE_NAME, VRP_PLINE_CODE, VRP_PLINE_NAME, HTT_PLINE_CODE, 
HTT_PLINE_NAME, PRC_PLINE_CODE, PRC_PLINE_NAME,VRP_QCM_STAUS,HTT_QCM_STAUS,PRC_QCM_STAUS,ZG_MEMO,
ZBS_FLAG,ZBS_ID,MEASURING_SEQ,JG_ZBS_ID,
SUPPLY_UNIT_CODE,SUPPLY_UNIT,IS_DEALER
 FROM MAT_ZC_M WHERE MAT_NO = ?; 
DELETE YDM_ZC_BUTTRESS WHERE MAT_NO = ?;
DELETE MAT_ZC_M WHERE MAT_NO = ?;
DELETE MAT_ZC_M_XS WHERE MAT_NO = ?;
 END;
 ]]>
	</query>
	<query id="FrmOutAutomatic.AddMatNoZc" desc="新增材料表（删除材料表MAT_ZC_BACKUP）">
	<![CDATA[  
DECLARE 
BEGIN
 INSERT INTO MAT_ZC_M (MAT_NO, PRODUCT_FLAG, MAT_STATUS, 
LOT_NO, STOVE_NO, JUDGE_STOVE_NO, BATCH_NO, BATCH_GROUD_NO, MAT_SQE_NO, 
SAMPLE_FLAG, CUTTING_FLAG, ORIGIN_MAT_NO, MATERIAL_NO, MATERIAL_NAME, 
INPUT_MATERIAL_NAME, INPUT_MATERIAL_NO, INPUT_ORIGIN_CODE, PRODUCCODE, 
PRODUCNAME, STEELCODE, STEELNAME, GRADECODE, GRADENAME, SPEC_CODE, SPEC_NAME, 
MODEL_CODE, MODEL_DESC, STD_CODE, STD_NAME, STD_STYLE, STD_STYLE_DESC, 
PRO_ORDER_NO, PRO_ORDER_NO1, PRO_ORDER_ID, PRO_ORDER_ID1, ORDER_NO, ORDER_SEQ, 
ORDER_SEQ_NO, CRAF_NO, PROCESS_CDOE, PROCESS_DESC, NEXT_PROCESS_CDOE, 
NEXT_PROCESS_DESC, PLINE_CODE, PLINE_NAME, MAT_ORIGIN_CODE, MAT_ORIGIN_NAME, 
DIMATER, HEIGHT, LEN_NO, LEN_DESC, LEN_UNIT, LEN_MIN, LEN_MAX, TARG_DIMATER, 
TARG_HEIGHT, TARG_LEN_MIN, TARG_LEN_MAX, ACT_DIMATER, ACT_HEIGHT, ACT_LEN, 
ACT_LEN_MIN, ACT_LEN_MAX, ACT_COUNT, ACT_WEIGHT, ACT_THEORY_WEIGHT, 
MEASURE_FLAG, BELONG_CODE, BELONG_NAME, PACK_FLAG, PACK_TYPE_CODE, 
PACK_TYPE_NAME, PACK_NO, PACK_TIME, PACK_MAT_WT, MAT_GROSS_WT, MAT_GOWHERE_CODE, 
MAT_GOWHERE_NAME, COOL_HOT_FLAG, MAT_RETURN_FLAG, HEAT_TREAT_NO, POST_FLAG, 
LOCK_FLAG, MNG_LOCK_RSN_CODE, MNG_LOCK_TIME, MNG_LOCK_MAKER, MNG_LOCK_REMARK, 
LOCK_RSN_CODE, LOCK_TIME, LOCK_MAKER, LOCK_REMARK, UNLOCK_TIME, UNLOCK_MAKER, 
UNLOCK_REMARK, OLD_ORDER_NO, OLD_ORDER_SEQ, OLD_ORDER_SEQ_NO, OLD_MATERIAL_NO, 
OLD_MATERIAL_NAME, REMAIN_RSN_CODE, REMAIN_JUGDE_TIME, REMAIN_JUGDE_MAKER, 
REMAIN_JUGDE_CODE, REMAIN_REMARK, JUGDE_APPLY_FLAG, JUGDE_APPLY_CODE, 
JUGDE_APPLY_TIME, JUGDE_SCAN_TIME, FACE_RESULT_CODE, FACE_RESULT_TIME, 
FACE_MAKER, SPEC_RESULT_CODE, SPEC_RESULT_TIME, SPEC_MAKER, CHEM_RESULT_CODE, 
CHEM_RESULT_TIME, CHEM_MAKER, PHY_RESULT_CODE, PHY_RESULT_TIME, PHY_MAKER, 
DETECT_REPORT_NO, DETECT_RESULT_CODE, WPRESSURE_REPORT_NO, 
WPRESSURE_RESULT_CODE, JUDGE_RESULT_CODE, JUDGE_RESULT, JUDGE_RESULT_TIME, 
JUDGE_MAKER, BUG_NO, BUG_DEAL, REPAIR_FLAG, REPAIR_REMARK, SAMPLING_FLAG, 
SAMPLING_TYPE, SAMPLING_NO, CHECKOUT_NO, CHEM_STCHECK_NO, CHEM_PROCHECK_NO, 
SH_CHECK_NO, COME_PROC_FLAG, CONFM_FLAG, INSTOCK_FLAG, INSTOCK_TIME, 
OUTSTOCK_TIME, PRO_BC, PRO_BZ, RPO_TIME, BAR_CODE, BEGINNING_FLAG, MEMO, 
CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, REQ_BL_ID, IF_BATCHED_JG, 
COUPCUT_BATCH_ID, ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, OLD_ORD_PK, OLD_ORD_LN_PK, 
OLD_ORD_LN_DLY_PK, BAL_YEAR_MONTH, JUDGE_STD_NAME, JUDGE_STD_CODE, JUDGE_GRADE, 
PIPMEMO, TEST, SOURE_CODE, SOURE_NAME, PONDER_NO, PONDER_GROSS_WT, MEMO1, 
JUDGE_ID, MNG_LOCK_FLAG, LOCK_ID, PRO_NO, LOCK_LIKU, PLN_GRADECODE, 
PLN_GRADENAME, PLN_STEELCODE, PLN_STEELNAME, QCM_STAUS, OUTSTOCK_DOC, 
HEAT_PLAN_NO, ZG_STOVE_SQE, GX_PLAN_NO, ZG_MAT_NO, FINISHPRO_MOLD, IN_MOLD, 
TARGET, PROCESS_STATUS, JUGDE_CONVICTED, GX_PLAN_NO1, FIXTYPE_CODE, 
QUALITY_GROUP_ZG, FLAG_STOVE_NO_ZG, ZG_PHY_RESULT_PATH, ZG_FACE_RESULT_PATH, 
ZG_SPEC_RESULT_PATH, VRP_HEAT_PLAN_NO, VRP_LOT_NO, VRP_SAMPLE_FLAG, 
VRP_PRO_ORDER_NO, VRP_PRO_ORDER_NO1, VRP_PRO_ORDER_ID, VRP_PRO_ORDER_ID1, 
VRP_ACT_DIMATER, VRP_ACT_HEIGHT, VRP_JUGDE_APPLY_FLAG, VRP_JUGDE_APPLY_CODE, 
VRP_JUGDE_APPLY_TIME, VRP_FACE_RESULT_CODE, VRP_FACE_RESULT_TIME, 
VRP_FACE_MAKER, VRP_FACE_RESULT_PATH, VRP_SPEC_RESULT_CODE, 
VRP_SPEC_RESULT_TIME, VRP_SPEC_MAKER, VRP_SPEC_RESULT_PATH, VRP_PHY_RESULT_CODE, 
VRP_PHY_RESULT_TIME, VRP_PHY_MAKER, VRP_PHY_RESULT_PATH, VRP_JUDGE_RESULT_CODE, 
VRP_JUDGE_RESULT_TIME, VRP_JUDGE_MAKER, VRP_GX_PLAN_NO, VRP_GX_PLAN_NO1, 
VPR_JUGDE_CONVICTED, VPR_QUALITY_GROUP_ZG, VPR_FLAG_STOVE_NO_ZG, 
HTT_HEAT_PLAN_NO, HTT_LOT_NO, HTT_SAMPLE_FLAG, HTT_PRO_ORDER_NO, 
HTT_PRO_ORDER_NO1, HTT_PRO_ORDER_ID, HTT_PRO_ORDER_ID1, HTT_GX_PLAN_NO, 
HTT_GX_PLAN_NO1, HTT_JUGDE_APPLY_FLAG, HTT_JUGDE_APPLY_CODE, 
HTT_JUGDE_APPLY_TIME, HTT_FACE_RESULT_CODE, HTT_FACE_RESULT_TIME, 
HTT_FACE_MAKER, HTT_FACE_RESULT_PATH, HTT_SPEC_RESULT_CODE, 
HTT_SPEC_RESULT_TIME, HTT_SPEC_MAKER, HTT_SPEC_RESULT_PATH, HTT_PHY_RESULT_CODE, 
HTT_PHY_RESULT_TIME, HTT_PHY_MAKER, HTT_PHY_RESULT_PATH, HTT_JUDGE_RESULT_CODE, 
HTT_JUDGE_RESULT_TIME, HTT_JUDGE_MAKER, HTT_JUGDE_CONVICTED, 
HTT_QUALITY_GROUP_ZG, HTT_FLAG_STOVE_NO_ZG, PRC_LOT_NO, PRC_SAMPLE_FLAG, 
PRC_PRO_ORDER_NO, PRC_PRO_ORDER_NO1, PRC_PRO_ORDER_ID, PRC_PRO_ORDER_ID1, 
PRC_GX_PLAN_NO, PRC_GX_PLAN_NO1, PRC_JUGDE_APPLY_FLAG, PRC_JUGDE_APPLY_CODE, 
PRC_JUGDE_APPLY_TIME, PRC_FACE_RESULT_CODE, PRC_FACE_RESULT_TIME, 
PRC_FACE_MAKER, PRC_FACE_RESULT_PATH, PRC_SPEC_RESULT_CODE, 
PRC_SPEC_RESULT_TIME, PRC_SPEC_MAKER, PRC_SPEC_RESULT_PATH, PRC_PHY_RESULT_CODE, 
PRC_PHY_RESULT_TIME, PRC_PHY_MAKER, PRC_PHY_RESULT_PATH, PRC_JUDGE_RESULT_CODE, 
PRC_JUDGE_RESULT_TIME, PRC_JUDGE_MAKER, PRC_JUGDE_CONVICTED, 
PRC_QUALITY_GROUP_ZG, PRC_FLAG_STOVE_NO_ZG, PRC_HEAT_PLAN_NO, 
VRP_JUDGE_STD_NAME, VRP_JUDGE_STD_CODE, HTT_JUDGE_STD_NAME, HTT_JUDGE_STD_CODE, 
PRC_JUDGE_STD_NAME, PRC_JUDGE_STD_CODE, VRP_CRAF_NO, HTT_CRAF_NO, PRC_CRAF_NO, 
VRP_CHEM_RESULT_CODE, VRP_CHEM_RESULT_TIME, VRP_CHEM_MAKER, 
HTT_CHEM_RESULT_CODE, HTT_CHEM_RESULT_TIME, HTT_CHEM_MAKER, 
PRC_CHEM_RESULT_CODE, PRC_CHEM_RESULT_TIME, PRC_CHEM_MAKER, DETECT_REPORT_NO1, 
DETECT_RESULT_CODE1, TESTING_GRADE, TESTING_TYPE, TESTING_GRADE1, TESTING_TYPE1, 
ZG_PLINE_CODE, ZG_PLINE_NAME, VRP_PLINE_CODE, VRP_PLINE_NAME, HTT_PLINE_CODE, 
HTT_PLINE_NAME, PRC_PLINE_CODE, PRC_PLINE_NAME,VRP_QCM_STAUS,HTT_QCM_STAUS,PRC_QCM_STAUS,ZG_MEMO,ZBS_FLAG,ZBS_ID,MEASURING_SEQ,JG_ZBS_ID,
SUPPLY_UNIT_CODE,SUPPLY_UNIT,IS_DEALER) 
SELECT MAT_NO, PRODUCT_FLAG, 
'80150302', LOT_NO, STOVE_NO, JUDGE_STOVE_NO, BATCH_NO, BATCH_GROUD_NO, 
MAT_SQE_NO, SAMPLE_FLAG, CUTTING_FLAG, ORIGIN_MAT_NO, MATERIAL_NO, 
MATERIAL_NAME, INPUT_MATERIAL_NAME, INPUT_MATERIAL_NO, INPUT_ORIGIN_CODE, 
PRODUCCODE, PRODUCNAME, STEELCODE, STEELNAME, GRADECODE, GRADENAME, SPEC_CODE, 
SPEC_NAME, MODEL_CODE, MODEL_DESC, STD_CODE, STD_NAME, STD_STYLE, 
STD_STYLE_DESC, PRO_ORDER_NO, PRO_ORDER_NO1, PRO_ORDER_ID, PRO_ORDER_ID1, 
ORDER_NO, ORDER_SEQ, ORDER_SEQ_NO, CRAF_NO, PROCESS_CDOE, PROCESS_DESC, 
NEXT_PROCESS_CDOE, NEXT_PROCESS_DESC, PLINE_CODE, PLINE_NAME, MAT_ORIGIN_CODE, 
MAT_ORIGIN_NAME, DIMATER, HEIGHT, LEN_NO, LEN_DESC, LEN_UNIT, LEN_MIN, LEN_MAX, 
TARG_DIMATER, TARG_HEIGHT, TARG_LEN_MIN, TARG_LEN_MAX, ACT_DIMATER, ACT_HEIGHT, 
ACT_LEN, ACT_LEN_MIN, ACT_LEN_MAX, ACT_COUNT, ACT_WEIGHT, ACT_THEORY_WEIGHT, 
MEASURE_FLAG, BELONG_CODE, BELONG_NAME, PACK_FLAG, PACK_TYPE_CODE, 
PACK_TYPE_NAME, PACK_NO, PACK_TIME, PACK_MAT_WT, MAT_GROSS_WT, MAT_GOWHERE_CODE, 
MAT_GOWHERE_NAME, COOL_HOT_FLAG, MAT_RETURN_FLAG, HEAT_TREAT_NO, POST_FLAG, 
LOCK_FLAG, MNG_LOCK_RSN_CODE, MNG_LOCK_TIME, MNG_LOCK_MAKER, MNG_LOCK_REMARK, 
LOCK_RSN_CODE, LOCK_TIME, LOCK_MAKER, LOCK_REMARK, UNLOCK_TIME, UNLOCK_MAKER, 
UNLOCK_REMARK, OLD_ORDER_NO, OLD_ORDER_SEQ, OLD_ORDER_SEQ_NO, OLD_MATERIAL_NO, 
OLD_MATERIAL_NAME, REMAIN_RSN_CODE, REMAIN_JUGDE_TIME, REMAIN_JUGDE_MAKER, 
REMAIN_JUGDE_CODE, REMAIN_REMARK, JUGDE_APPLY_FLAG, JUGDE_APPLY_CODE, 
JUGDE_APPLY_TIME, JUGDE_SCAN_TIME, FACE_RESULT_CODE, FACE_RESULT_TIME, 
FACE_MAKER, SPEC_RESULT_CODE, SPEC_RESULT_TIME, SPEC_MAKER, CHEM_RESULT_CODE, 
CHEM_RESULT_TIME, CHEM_MAKER, PHY_RESULT_CODE, PHY_RESULT_TIME, PHY_MAKER, 
DETECT_REPORT_NO, DETECT_RESULT_CODE, WPRESSURE_REPORT_NO, 
WPRESSURE_RESULT_CODE, JUDGE_RESULT_CODE, JUDGE_RESULT, JUDGE_RESULT_TIME, 
JUDGE_MAKER, BUG_NO, BUG_DEAL, REPAIR_FLAG, REPAIR_REMARK, SAMPLING_FLAG, 
SAMPLING_TYPE, SAMPLING_NO, CHECKOUT_NO, CHEM_STCHECK_NO, CHEM_PROCHECK_NO, 
SH_CHECK_NO, COME_PROC_FLAG, CONFM_FLAG, INSTOCK_FLAG, INSTOCK_TIME, 
OUTSTOCK_TIME, PRO_BC, PRO_BZ, RPO_TIME, BAR_CODE, BEGINNING_FLAG, MEMO, 
CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, REQ_BL_ID, IF_BATCHED_JG, 
COUPCUT_BATCH_ID, ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, OLD_ORD_PK, OLD_ORD_LN_PK, 
OLD_ORD_LN_DLY_PK, BAL_YEAR_MONTH, JUDGE_STD_NAME, JUDGE_STD_CODE, JUDGE_GRADE, 
PIPMEMO, TEST, SOURE_CODE, SOURE_NAME, PONDER_NO, PONDER_GROSS_WT, MEMO1, JUDGE_ID, 
MNG_LOCK_FLAG, LOCK_ID, PRO_NO, LOCK_LIKU, PLN_GRADECODE, PLN_GRADENAME, 
PLN_STEELCODE, PLN_STEELNAME, QCM_STAUS, OUTSTOCK_DOC, HEAT_PLAN_NO, 
ZG_STOVE_SQE, GX_PLAN_NO, ZG_MAT_NO, FINISHPRO_MOLD, IN_MOLD, TARGET, 
PROCESS_STATUS, JUGDE_CONVICTED, GX_PLAN_NO1, FIXTYPE_CODE, QUALITY_GROUP_ZG, 
FLAG_STOVE_NO_ZG, ZG_PHY_RESULT_PATH, ZG_FACE_RESULT_PATH, ZG_SPEC_RESULT_PATH, 
VRP_HEAT_PLAN_NO, VRP_LOT_NO, VRP_SAMPLE_FLAG, VRP_PRO_ORDER_NO, 
VRP_PRO_ORDER_NO1, VRP_PRO_ORDER_ID, VRP_PRO_ORDER_ID1, VRP_ACT_DIMATER, 
VRP_ACT_HEIGHT, VRP_JUGDE_APPLY_FLAG, VRP_JUGDE_APPLY_CODE, 
VRP_JUGDE_APPLY_TIME, VRP_FACE_RESULT_CODE, VRP_FACE_RESULT_TIME, 
VRP_FACE_MAKER, VRP_FACE_RESULT_PATH, VRP_SPEC_RESULT_CODE, 
VRP_SPEC_RESULT_TIME, VRP_SPEC_MAKER, VRP_SPEC_RESULT_PATH, VRP_PHY_RESULT_CODE, 
VRP_PHY_RESULT_TIME, VRP_PHY_MAKER, VRP_PHY_RESULT_PATH, VRP_JUDGE_RESULT_CODE, 
VRP_JUDGE_RESULT_TIME, VRP_JUDGE_MAKER, VRP_GX_PLAN_NO, VRP_GX_PLAN_NO1, 
VPR_JUGDE_CONVICTED, VPR_QUALITY_GROUP_ZG, VPR_FLAG_STOVE_NO_ZG, 
HTT_HEAT_PLAN_NO, HTT_LOT_NO, HTT_SAMPLE_FLAG, HTT_PRO_ORDER_NO, 
HTT_PRO_ORDER_NO1, HTT_PRO_ORDER_ID, HTT_PRO_ORDER_ID1, HTT_GX_PLAN_NO, 
HTT_GX_PLAN_NO1, HTT_JUGDE_APPLY_FLAG, HTT_JUGDE_APPLY_CODE, 
HTT_JUGDE_APPLY_TIME, HTT_FACE_RESULT_CODE, HTT_FACE_RESULT_TIME, 
HTT_FACE_MAKER, HTT_FACE_RESULT_PATH, HTT_SPEC_RESULT_CODE, 
HTT_SPEC_RESULT_TIME, HTT_SPEC_MAKER, HTT_SPEC_RESULT_PATH, HTT_PHY_RESULT_CODE, 
HTT_PHY_RESULT_TIME, HTT_PHY_MAKER, HTT_PHY_RESULT_PATH, HTT_JUDGE_RESULT_CODE, 
HTT_JUDGE_RESULT_TIME, HTT_JUDGE_MAKER, HTT_JUGDE_CONVICTED, 
HTT_QUALITY_GROUP_ZG, HTT_FLAG_STOVE_NO_ZG, PRC_LOT_NO, PRC_SAMPLE_FLAG, 
PRC_PRO_ORDER_NO, PRC_PRO_ORDER_NO1, PRC_PRO_ORDER_ID, PRC_PRO_ORDER_ID1, 
PRC_GX_PLAN_NO, PRC_GX_PLAN_NO1, PRC_JUGDE_APPLY_FLAG, PRC_JUGDE_APPLY_CODE, 
PRC_JUGDE_APPLY_TIME, PRC_FACE_RESULT_CODE, PRC_FACE_RESULT_TIME, 
PRC_FACE_MAKER, PRC_FACE_RESULT_PATH, PRC_SPEC_RESULT_CODE, 
PRC_SPEC_RESULT_TIME, PRC_SPEC_MAKER, PRC_SPEC_RESULT_PATH, PRC_PHY_RESULT_CODE, 
PRC_PHY_RESULT_TIME, PRC_PHY_MAKER, PRC_PHY_RESULT_PATH, PRC_JUDGE_RESULT_CODE, 
PRC_JUDGE_RESULT_TIME, PRC_JUDGE_MAKER, PRC_JUGDE_CONVICTED, 
PRC_QUALITY_GROUP_ZG, PRC_FLAG_STOVE_NO_ZG, PRC_HEAT_PLAN_NO, 
VRP_JUDGE_STD_NAME, VRP_JUDGE_STD_CODE, HTT_JUDGE_STD_NAME, HTT_JUDGE_STD_CODE, 
PRC_JUDGE_STD_NAME, PRC_JUDGE_STD_CODE, VRP_CRAF_NO, HTT_CRAF_NO, PRC_CRAF_NO, 
VRP_CHEM_RESULT_CODE, VRP_CHEM_RESULT_TIME, VRP_CHEM_MAKER, 
HTT_CHEM_RESULT_CODE, HTT_CHEM_RESULT_TIME, HTT_CHEM_MAKER, 
PRC_CHEM_RESULT_CODE, PRC_CHEM_RESULT_TIME, PRC_CHEM_MAKER, DETECT_REPORT_NO1, 
DETECT_RESULT_CODE1, TESTING_GRADE, TESTING_TYPE, TESTING_GRADE1, TESTING_TYPE1, 
ZG_PLINE_CODE, ZG_PLINE_NAME, VRP_PLINE_CODE, VRP_PLINE_NAME, HTT_PLINE_CODE, 
HTT_PLINE_NAME, PRC_PLINE_CODE, PRC_PLINE_NAME,VRP_QCM_STAUS,HTT_QCM_STAUS,PRC_QCM_STAUS,ZG_MEMO,ZBS_FLAG,ZBS_ID,MEASURING_SEQ,JG_ZBS_ID,
SUPPLY_UNIT_CODE,SUPPLY_UNIT,IS_DEALER
 FROM MAT_ZC_BACKUP WHERE MAT_NO = ?; 
 
 INSERT INTO MAT_ZC_M_XS (MAT_NO, PRODUCT_FLAG, MAT_STATUS, 
LOT_NO, STOVE_NO, JUDGE_STOVE_NO, BATCH_NO, BATCH_GROUD_NO, MAT_SQE_NO, 
SAMPLE_FLAG, CUTTING_FLAG, ORIGIN_MAT_NO, MATERIAL_NO, MATERIAL_NAME, 
INPUT_MATERIAL_NAME, INPUT_MATERIAL_NO, INPUT_ORIGIN_CODE, PRODUCCODE, 
PRODUCNAME, STEELCODE, STEELNAME, GRADECODE, GRADENAME, SPEC_CODE, SPEC_NAME, 
MODEL_CODE, MODEL_DESC, STD_CODE, STD_NAME, STD_STYLE, STD_STYLE_DESC, 
PRO_ORDER_NO, PRO_ORDER_NO1, PRO_ORDER_ID, PRO_ORDER_ID1, ORDER_NO, ORDER_SEQ, 
ORDER_SEQ_NO, CRAF_NO, PROCESS_CDOE, PROCESS_DESC, NEXT_PROCESS_CDOE, 
NEXT_PROCESS_DESC, PLINE_CODE, PLINE_NAME, MAT_ORIGIN_CODE, MAT_ORIGIN_NAME, 
DIMATER, HEIGHT, LEN_NO, LEN_DESC, LEN_UNIT, LEN_MIN, LEN_MAX, TARG_DIMATER, 
TARG_HEIGHT, TARG_LEN_MIN, TARG_LEN_MAX, ACT_DIMATER, ACT_HEIGHT, ACT_LEN, 
ACT_LEN_MIN, ACT_LEN_MAX, ACT_COUNT, ACT_WEIGHT, ACT_THEORY_WEIGHT, 
MEASURE_FLAG, BELONG_CODE, BELONG_NAME, PACK_FLAG, PACK_TYPE_CODE, 
PACK_TYPE_NAME, PACK_NO, PACK_TIME, PACK_MAT_WT, MAT_GROSS_WT, MAT_GOWHERE_CODE, 
MAT_GOWHERE_NAME, COOL_HOT_FLAG, MAT_RETURN_FLAG, HEAT_TREAT_NO, POST_FLAG, 
LOCK_FLAG, MNG_LOCK_RSN_CODE, MNG_LOCK_TIME, MNG_LOCK_MAKER, MNG_LOCK_REMARK, 
LOCK_RSN_CODE, LOCK_TIME, LOCK_MAKER, LOCK_REMARK, UNLOCK_TIME, UNLOCK_MAKER, 
UNLOCK_REMARK, OLD_ORDER_NO, OLD_ORDER_SEQ, OLD_ORDER_SEQ_NO, OLD_MATERIAL_NO, 
OLD_MATERIAL_NAME, REMAIN_RSN_CODE, REMAIN_JUGDE_TIME, REMAIN_JUGDE_MAKER, 
REMAIN_JUGDE_CODE, REMAIN_REMARK, JUGDE_APPLY_FLAG, JUGDE_APPLY_CODE, 
JUGDE_APPLY_TIME, JUGDE_SCAN_TIME, FACE_RESULT_CODE, FACE_RESULT_TIME, 
FACE_MAKER, SPEC_RESULT_CODE, SPEC_RESULT_TIME, SPEC_MAKER, CHEM_RESULT_CODE, 
CHEM_RESULT_TIME, CHEM_MAKER, PHY_RESULT_CODE, PHY_RESULT_TIME, PHY_MAKER, 
DETECT_REPORT_NO, DETECT_RESULT_CODE, WPRESSURE_REPORT_NO, 
WPRESSURE_RESULT_CODE, JUDGE_RESULT_CODE, JUDGE_RESULT, JUDGE_RESULT_TIME, 
JUDGE_MAKER, BUG_NO, BUG_DEAL, REPAIR_FLAG, REPAIR_REMARK, SAMPLING_FLAG, 
SAMPLING_TYPE, SAMPLING_NO, CHECKOUT_NO, CHEM_STCHECK_NO, CHEM_PROCHECK_NO, 
SH_CHECK_NO, COME_PROC_FLAG, CONFM_FLAG, INSTOCK_FLAG, INSTOCK_TIME, 
OUTSTOCK_TIME, PRO_BC, PRO_BZ, RPO_TIME, BAR_CODE, BEGINNING_FLAG, MEMO, 
CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, REQ_BL_ID, IF_BATCHED_JG, 
COUPCUT_BATCH_ID, ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, OLD_ORD_PK, OLD_ORD_LN_PK, 
OLD_ORD_LN_DLY_PK, BAL_YEAR_MONTH, JUDGE_STD_NAME, JUDGE_STD_CODE, JUDGE_GRADE, 
PIPMEMO, TEST, SOURE_CODE, SOURE_NAME, PONDER_NO, PONDER_GROSS_WT, MEMO1, 
JUDGE_ID, MNG_LOCK_FLAG, LOCK_ID, PRO_NO, LOCK_LIKU, PLN_GRADECODE, 
PLN_GRADENAME, PLN_STEELCODE, PLN_STEELNAME, QCM_STAUS, OUTSTOCK_DOC, 
HEAT_PLAN_NO, ZG_STOVE_SQE, GX_PLAN_NO, ZG_MAT_NO, FINISHPRO_MOLD, IN_MOLD, 
TARGET, PROCESS_STATUS, JUGDE_CONVICTED, GX_PLAN_NO1, FIXTYPE_CODE, 
QUALITY_GROUP_ZG, FLAG_STOVE_NO_ZG, ZG_PHY_RESULT_PATH, ZG_FACE_RESULT_PATH, 
ZG_SPEC_RESULT_PATH, VRP_HEAT_PLAN_NO, VRP_LOT_NO, VRP_SAMPLE_FLAG, 
VRP_PRO_ORDER_NO, VRP_PRO_ORDER_NO1, VRP_PRO_ORDER_ID, VRP_PRO_ORDER_ID1, 
VRP_ACT_DIMATER, VRP_ACT_HEIGHT, VRP_JUGDE_APPLY_FLAG, VRP_JUGDE_APPLY_CODE, 
VRP_JUGDE_APPLY_TIME, VRP_FACE_RESULT_CODE, VRP_FACE_RESULT_TIME, 
VRP_FACE_MAKER, VRP_FACE_RESULT_PATH, VRP_SPEC_RESULT_CODE, 
VRP_SPEC_RESULT_TIME, VRP_SPEC_MAKER, VRP_SPEC_RESULT_PATH, VRP_PHY_RESULT_CODE, 
VRP_PHY_RESULT_TIME, VRP_PHY_MAKER, VRP_PHY_RESULT_PATH, VRP_JUDGE_RESULT_CODE, 
VRP_JUDGE_RESULT_TIME, VRP_JUDGE_MAKER, VRP_GX_PLAN_NO, VRP_GX_PLAN_NO1, 
VPR_JUGDE_CONVICTED, VPR_QUALITY_GROUP_ZG, VPR_FLAG_STOVE_NO_ZG, 
HTT_HEAT_PLAN_NO, HTT_LOT_NO, HTT_SAMPLE_FLAG, HTT_PRO_ORDER_NO, 
HTT_PRO_ORDER_NO1, HTT_PRO_ORDER_ID, HTT_PRO_ORDER_ID1, HTT_GX_PLAN_NO, 
HTT_GX_PLAN_NO1, HTT_JUGDE_APPLY_FLAG, HTT_JUGDE_APPLY_CODE, 
HTT_JUGDE_APPLY_TIME, HTT_FACE_RESULT_CODE, HTT_FACE_RESULT_TIME, 
HTT_FACE_MAKER, HTT_FACE_RESULT_PATH, HTT_SPEC_RESULT_CODE, 
HTT_SPEC_RESULT_TIME, HTT_SPEC_MAKER, HTT_SPEC_RESULT_PATH, HTT_PHY_RESULT_CODE, 
HTT_PHY_RESULT_TIME, HTT_PHY_MAKER, HTT_PHY_RESULT_PATH, HTT_JUDGE_RESULT_CODE, 
HTT_JUDGE_RESULT_TIME, HTT_JUDGE_MAKER, HTT_JUGDE_CONVICTED, 
HTT_QUALITY_GROUP_ZG, HTT_FLAG_STOVE_NO_ZG, PRC_LOT_NO, PRC_SAMPLE_FLAG, 
PRC_PRO_ORDER_NO, PRC_PRO_ORDER_NO1, PRC_PRO_ORDER_ID, PRC_PRO_ORDER_ID1, 
PRC_GX_PLAN_NO, PRC_GX_PLAN_NO1, PRC_JUGDE_APPLY_FLAG, PRC_JUGDE_APPLY_CODE, 
PRC_JUGDE_APPLY_TIME, PRC_FACE_RESULT_CODE, PRC_FACE_RESULT_TIME, 
PRC_FACE_MAKER, PRC_FACE_RESULT_PATH, PRC_SPEC_RESULT_CODE, 
PRC_SPEC_RESULT_TIME, PRC_SPEC_MAKER, PRC_SPEC_RESULT_PATH, PRC_PHY_RESULT_CODE, 
PRC_PHY_RESULT_TIME, PRC_PHY_MAKER, PRC_PHY_RESULT_PATH, PRC_JUDGE_RESULT_CODE, 
PRC_JUDGE_RESULT_TIME, PRC_JUDGE_MAKER, PRC_JUGDE_CONVICTED, 
PRC_QUALITY_GROUP_ZG, PRC_FLAG_STOVE_NO_ZG, PRC_HEAT_PLAN_NO, 
VRP_JUDGE_STD_NAME, VRP_JUDGE_STD_CODE, HTT_JUDGE_STD_NAME, HTT_JUDGE_STD_CODE, 
PRC_JUDGE_STD_NAME, PRC_JUDGE_STD_CODE, VRP_CRAF_NO, HTT_CRAF_NO, PRC_CRAF_NO, 
VRP_CHEM_RESULT_CODE, VRP_CHEM_RESULT_TIME, VRP_CHEM_MAKER, 
HTT_CHEM_RESULT_CODE, HTT_CHEM_RESULT_TIME, HTT_CHEM_MAKER, 
PRC_CHEM_RESULT_CODE, PRC_CHEM_RESULT_TIME, PRC_CHEM_MAKER, DETECT_REPORT_NO1, 
DETECT_RESULT_CODE1, TESTING_GRADE, TESTING_TYPE, TESTING_GRADE1, TESTING_TYPE1, 
ZG_PLINE_CODE, ZG_PLINE_NAME, VRP_PLINE_CODE, VRP_PLINE_NAME, HTT_PLINE_CODE, 
HTT_PLINE_NAME, PRC_PLINE_CODE, PRC_PLINE_NAME,VRP_QCM_STAUS,HTT_QCM_STAUS,PRC_QCM_STAUS,ZG_MEMO,ZBS_FLAG,ZBS_ID,MEASURING_SEQ,JG_ZBS_ID,
SUPPLY_UNIT_CODE,SUPPLY_UNIT,IS_DEALER) 
SELECT MAT_NO, PRODUCT_FLAG, 
'80150302', LOT_NO, STOVE_NO, JUDGE_STOVE_NO, BATCH_NO, BATCH_GROUD_NO, 
MAT_SQE_NO, SAMPLE_FLAG, CUTTING_FLAG, ORIGIN_MAT_NO, MATERIAL_NO, 
MATERIAL_NAME, INPUT_MATERIAL_NAME, INPUT_MATERIAL_NO, INPUT_ORIGIN_CODE, 
PRODUCCODE, PRODUCNAME, STEELCODE, STEELNAME, GRADECODE, GRADENAME, SPEC_CODE, 
SPEC_NAME, MODEL_CODE, MODEL_DESC, STD_CODE, STD_NAME, STD_STYLE, 
STD_STYLE_DESC, PRO_ORDER_NO, PRO_ORDER_NO1, PRO_ORDER_ID, PRO_ORDER_ID1, 
ORDER_NO, ORDER_SEQ, ORDER_SEQ_NO, CRAF_NO, PROCESS_CDOE, PROCESS_DESC, 
NEXT_PROCESS_CDOE, NEXT_PROCESS_DESC, PLINE_CODE, PLINE_NAME, MAT_ORIGIN_CODE, 
MAT_ORIGIN_NAME, DIMATER, HEIGHT, LEN_NO, LEN_DESC, LEN_UNIT, LEN_MIN, LEN_MAX, 
TARG_DIMATER, TARG_HEIGHT, TARG_LEN_MIN, TARG_LEN_MAX, ACT_DIMATER, ACT_HEIGHT, 
ACT_LEN, ACT_LEN_MIN, ACT_LEN_MAX, ACT_COUNT, ACT_WEIGHT, ACT_THEORY_WEIGHT, 
MEASURE_FLAG, BELONG_CODE, BELONG_NAME, PACK_FLAG, PACK_TYPE_CODE, 
PACK_TYPE_NAME, PACK_NO, PACK_TIME, PACK_MAT_WT, MAT_GROSS_WT, MAT_GOWHERE_CODE, 
MAT_GOWHERE_NAME, COOL_HOT_FLAG, MAT_RETURN_FLAG, HEAT_TREAT_NO, POST_FLAG, 
LOCK_FLAG, MNG_LOCK_RSN_CODE, MNG_LOCK_TIME, MNG_LOCK_MAKER, MNG_LOCK_REMARK, 
LOCK_RSN_CODE, LOCK_TIME, LOCK_MAKER, LOCK_REMARK, UNLOCK_TIME, UNLOCK_MAKER, 
UNLOCK_REMARK, OLD_ORDER_NO, OLD_ORDER_SEQ, OLD_ORDER_SEQ_NO, OLD_MATERIAL_NO, 
OLD_MATERIAL_NAME, REMAIN_RSN_CODE, REMAIN_JUGDE_TIME, REMAIN_JUGDE_MAKER, 
REMAIN_JUGDE_CODE, REMAIN_REMARK, JUGDE_APPLY_FLAG, JUGDE_APPLY_CODE, 
JUGDE_APPLY_TIME, JUGDE_SCAN_TIME, FACE_RESULT_CODE, FACE_RESULT_TIME, 
FACE_MAKER, SPEC_RESULT_CODE, SPEC_RESULT_TIME, SPEC_MAKER, CHEM_RESULT_CODE, 
CHEM_RESULT_TIME, CHEM_MAKER, PHY_RESULT_CODE, PHY_RESULT_TIME, PHY_MAKER, 
DETECT_REPORT_NO, DETECT_RESULT_CODE, WPRESSURE_REPORT_NO, 
WPRESSURE_RESULT_CODE, JUDGE_RESULT_CODE, JUDGE_RESULT, JUDGE_RESULT_TIME, 
JUDGE_MAKER, BUG_NO, BUG_DEAL, REPAIR_FLAG, REPAIR_REMARK, SAMPLING_FLAG, 
SAMPLING_TYPE, SAMPLING_NO, CHECKOUT_NO, CHEM_STCHECK_NO, CHEM_PROCHECK_NO, 
SH_CHECK_NO, COME_PROC_FLAG, CONFM_FLAG, INSTOCK_FLAG, INSTOCK_TIME, 
OUTSTOCK_TIME, PRO_BC, PRO_BZ, RPO_TIME, BAR_CODE, BEGINNING_FLAG, MEMO, 
CREATE_NAME, CREATE_TIME, UPDATE_NAME, UPDATE_TIME, REQ_BL_ID, IF_BATCHED_JG, 
COUPCUT_BATCH_ID, ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, OLD_ORD_PK, OLD_ORD_LN_PK, 
OLD_ORD_LN_DLY_PK, BAL_YEAR_MONTH, JUDGE_STD_NAME, JUDGE_STD_CODE, JUDGE_GRADE, 
PIPMEMO, TEST, SOURE_CODE, SOURE_NAME, PONDER_NO, PONDER_GROSS_WT, MEMO1, JUDGE_ID, 
MNG_LOCK_FLAG, LOCK_ID, PRO_NO, LOCK_LIKU, PLN_GRADECODE, PLN_GRADENAME, 
PLN_STEELCODE, PLN_STEELNAME, QCM_STAUS, OUTSTOCK_DOC, HEAT_PLAN_NO, 
ZG_STOVE_SQE, GX_PLAN_NO, ZG_MAT_NO, FINISHPRO_MOLD, IN_MOLD, TARGET, 
PROCESS_STATUS, JUGDE_CONVICTED, GX_PLAN_NO1, FIXTYPE_CODE, QUALITY_GROUP_ZG, 
FLAG_STOVE_NO_ZG, ZG_PHY_RESULT_PATH, ZG_FACE_RESULT_PATH, ZG_SPEC_RESULT_PATH, 
VRP_HEAT_PLAN_NO, VRP_LOT_NO, VRP_SAMPLE_FLAG, VRP_PRO_ORDER_NO, 
VRP_PRO_ORDER_NO1, VRP_PRO_ORDER_ID, VRP_PRO_ORDER_ID1, VRP_ACT_DIMATER, 
VRP_ACT_HEIGHT, VRP_JUGDE_APPLY_FLAG, VRP_JUGDE_APPLY_CODE, 
VRP_JUGDE_APPLY_TIME, VRP_FACE_RESULT_CODE, VRP_FACE_RESULT_TIME, 
VRP_FACE_MAKER, VRP_FACE_RESULT_PATH, VRP_SPEC_RESULT_CODE, 
VRP_SPEC_RESULT_TIME, VRP_SPEC_MAKER, VRP_SPEC_RESULT_PATH, VRP_PHY_RESULT_CODE, 
VRP_PHY_RESULT_TIME, VRP_PHY_MAKER, VRP_PHY_RESULT_PATH, VRP_JUDGE_RESULT_CODE, 
VRP_JUDGE_RESULT_TIME, VRP_JUDGE_MAKER, VRP_GX_PLAN_NO, VRP_GX_PLAN_NO1, 
VPR_JUGDE_CONVICTED, VPR_QUALITY_GROUP_ZG, VPR_FLAG_STOVE_NO_ZG, 
HTT_HEAT_PLAN_NO, HTT_LOT_NO, HTT_SAMPLE_FLAG, HTT_PRO_ORDER_NO, 
HTT_PRO_ORDER_NO1, HTT_PRO_ORDER_ID, HTT_PRO_ORDER_ID1, HTT_GX_PLAN_NO, 
HTT_GX_PLAN_NO1, HTT_JUGDE_APPLY_FLAG, HTT_JUGDE_APPLY_CODE, 
HTT_JUGDE_APPLY_TIME, HTT_FACE_RESULT_CODE, HTT_FACE_RESULT_TIME, 
HTT_FACE_MAKER, HTT_FACE_RESULT_PATH, HTT_SPEC_RESULT_CODE, 
HTT_SPEC_RESULT_TIME, HTT_SPEC_MAKER, HTT_SPEC_RESULT_PATH, HTT_PHY_RESULT_CODE, 
HTT_PHY_RESULT_TIME, HTT_PHY_MAKER, HTT_PHY_RESULT_PATH, HTT_JUDGE_RESULT_CODE, 
HTT_JUDGE_RESULT_TIME, HTT_JUDGE_MAKER, HTT_JUGDE_CONVICTED, 
HTT_QUALITY_GROUP_ZG, HTT_FLAG_STOVE_NO_ZG, PRC_LOT_NO, PRC_SAMPLE_FLAG, 
PRC_PRO_ORDER_NO, PRC_PRO_ORDER_NO1, PRC_PRO_ORDER_ID, PRC_PRO_ORDER_ID1, 
PRC_GX_PLAN_NO, PRC_GX_PLAN_NO1, PRC_JUGDE_APPLY_FLAG, PRC_JUGDE_APPLY_CODE, 
PRC_JUGDE_APPLY_TIME, PRC_FACE_RESULT_CODE, PRC_FACE_RESULT_TIME, 
PRC_FACE_MAKER, PRC_FACE_RESULT_PATH, PRC_SPEC_RESULT_CODE, 
PRC_SPEC_RESULT_TIME, PRC_SPEC_MAKER, PRC_SPEC_RESULT_PATH, PRC_PHY_RESULT_CODE, 
PRC_PHY_RESULT_TIME, PRC_PHY_MAKER, PRC_PHY_RESULT_PATH, PRC_JUDGE_RESULT_CODE, 
PRC_JUDGE_RESULT_TIME, PRC_JUDGE_MAKER, PRC_JUGDE_CONVICTED, 
PRC_QUALITY_GROUP_ZG, PRC_FLAG_STOVE_NO_ZG, PRC_HEAT_PLAN_NO, 
VRP_JUDGE_STD_NAME, VRP_JUDGE_STD_CODE, HTT_JUDGE_STD_NAME, HTT_JUDGE_STD_CODE, 
PRC_JUDGE_STD_NAME, PRC_JUDGE_STD_CODE, VRP_CRAF_NO, HTT_CRAF_NO, PRC_CRAF_NO, 
VRP_CHEM_RESULT_CODE, VRP_CHEM_RESULT_TIME, VRP_CHEM_MAKER, 
HTT_CHEM_RESULT_CODE, HTT_CHEM_RESULT_TIME, HTT_CHEM_MAKER, 
PRC_CHEM_RESULT_CODE, PRC_CHEM_RESULT_TIME, PRC_CHEM_MAKER, DETECT_REPORT_NO1, 
DETECT_RESULT_CODE1, TESTING_GRADE, TESTING_TYPE, TESTING_GRADE1, TESTING_TYPE1, 
ZG_PLINE_CODE, ZG_PLINE_NAME, VRP_PLINE_CODE, VRP_PLINE_NAME, HTT_PLINE_CODE, 
HTT_PLINE_NAME, PRC_PLINE_CODE, PRC_PLINE_NAME,VRP_QCM_STAUS,HTT_QCM_STAUS,PRC_QCM_STAUS,ZG_MEMO,ZBS_FLAG,ZBS_ID,MEASURING_SEQ,JG_ZBS_ID,
SUPPLY_UNIT_CODE,SUPPLY_UNIT,IS_DEALER
 FROM MAT_ZC_BACKUP WHERE MAT_NO = ?; 
 
DELETE MAT_ZC_BACKUP WHERE MAT_NO = ?;
 END;
 ]]>
	</query>
	<query id="FrmOutAutomatic.QueryBillMNo" desc="判断可撤销直接出库提单">
	<![CDATA[
SELECT T.BILL_STATUS,
       T.BILL_TICKET_STATUS,
       T.OUTSTOCK_TICKET_STATUS,
       T.TRANSMNY_TICKET_STATUS,
       T.ZOUT_FLAG
  FROM YDM_ZC_BILL_M T
  WHERE T.BILL_NO=?
 GROUP BY T.BILL_STATUS,
          T.BILL_TICKET_STATUS,
          T.OUTSTOCK_TICKET_STATUS,
          T.TRANSMNY_TICKET_STATUS,
          T.ZOUT_FLAG
	]]>
	</query>
	<query id = "FrmOutAutomatic.selectYearMoth" desc = "查询期初中是否存在">
 SELECT COUNT(1) ACOUNT
   FROM YDM_ZC_INITIAL T
  WHERE (T.BAL_YEAR_MONTH ,T.SUPPLY_UNIT_CODE) in
        ( SELECT TO_CHAR(ADD_MONTHS(TO_DATE(MIN(L.BAL_YEAR_MONTH), 'YYYY-MM'), 1),
               'YYYYMM') BAL_YEAR_MONTH,M.SUPPLY_UNIT
  FROM YDM_ZC_LOADVEHICLE_MAT L LEFT JOIN YDM_ZC_BILL_M M ON M.BILL_NO = L.BILL_NO
          WHERE L.BILL_NO= ? GROUP BY M.SUPPLY_UNIT)
	</query>
</queryMap>