--流程生产退料单  单据类型新增
--表头
DELETE FROM T_BAS_BILLTYPE WHERE FID = 1930694008388987904;
INSERT INTO T_BAS_BILLTYPE(FID,FISDEFAULT,FDEFPRINTTEMPLATE,FCONTROLPRINTCOUNT,FMASTERID,FSTATUS,FMAXPRINTCOUNT,FBILLFORMID,FBILLINITSETTING,FNUMBER,FCREATETIME,FLAYOUTSOLUTION,FMODIFIERID,FENABLE,FMODIFYTIME,FPRINTAFTERAUDIT,FCREATORID) VALUES (1930694008388987904,'0',' ','0',1930694008388987904,'C',1,'im_mdc_mftreturnorder',' ','im_mdc_propmftreturnorder_BT_S',{ts'2024-04-17  00:00:00'},'414RD9XFBHH+',1770243028569566208,'1',{ts'2024-04-17  00:00:00'},'1',1770243028569566208); 
--流程生产退料申请单  单据类型新增
--表头
DELETE FROM T_BAS_BILLTYPE WHERE FID = 1930609010055070720;
INSERT INTO T_BAS_BILLTYPE(FID,FISDEFAULT,FDEFPRINTTEMPLATE,FCONTROLPRINTCOUNT,FMASTERID,FSTATUS,FMAXPRINTCOUNT,FBILLFORMID,FBILLINITSETTING,FNUMBER,FCREATETIME,FLAYOUTSOLUTION,FMODIFIERID,FENABLE,FMODIFYTIME,FPRINTAFTERAUDIT,FCREATORID) VALUES (1930609010055070720,'0',' ','0',1930609010055070720,'C',1,'im_mdc_mftreturnapplybill',' ','im_mdc_propmftreappbill_BT_S',{ts'2024-04-17  00:00:00'},'414BFDLB6UI9',1770243028569566208,'1',{ts'2024-04-17  00:00:00'},'1',1770243028569566208); 

--申请分录
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287360;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287360,'0','0','1','0','1','1','0','0','project',0,'0','0','project',1,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287361;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287361,'0','0','1','1','1','1','0','0','tracknumber',0,'0','1','tracknumber',2,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287362;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287362,'0','0','1','0','1','1','0','0','tracknumber',0,'0','0','basedatafield10',3,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287363;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287363,'0','0','1','0','1','1','0','0','tracknumber',0,'0','0','basedatafield12',4,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287364;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287364,'0','0','1','1','1','1','0','0','isrework',0,'0','1','isrework',5,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287365;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'1','0',1930718727318287365,'0','1','1','1','1','1','1','1','productiondomain',0,'1','1','productiondomain',6,'E',' ','1'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287366;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287366,'0','0','1','0','1','1','0','0','configuredcode',0,'0','0','configuredcode',7,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287367;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287367,'0','0','1','0','1','1','0','0','isrework',0,'0','0','checkboxfield2',8,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287368;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287368,'0','0','1','0','1','1','0','0','configuredcode',0,'0','0','basedatafield11',9,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930718727318287369;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930694008388987904,'0','0',1930718727318287369,'0','0','1','1','1','1','0','0','processseq',0,'0','1','processseq',10,' ',' ','0'); 


--分录
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930631747553216512;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930609010055070720,'0','0',1930631747553216512,'0','0','1','1','1','1','0','0','rework',0,'0','1','rework',1,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930631747553216513;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930609010055070720,'0','0',1930631747553216513,'0','0','1','0','1','1','0','0','tracknumber',0,'0','0','tracknumber',2,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930631747553216514;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930609010055070720,'0','0',1930631747553216514,'0','0','1','0','1','1','0','0','configuredcode',0,'0','0','configuredcode',3,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930631747553216515;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930609010055070720,'0','0',1930631747553216515,'0','0','1','0','1','1','0','0','project',0,'0','0','project',4,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930631747553216516;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930609010055070720,'0','0',1930631747553216516,'0','0','1','0','1','1','0','0','supplier',0,'0','0','supplier',5,' ',' ','0'); 
DELETE FROM T_BAS_BILLTYPEFLDCTL WHERE FENTRYID = 1930631747553216517;
INSERT INTO T_BAS_BILLTYPEFLDCTL(FID,FVVIEW,FISDELETED,FENTRYID,FSYSMUSTINPUT,FMUSTINPUT,FSUBMITENABLED,FEDITENABLED,FAUDITENABLED,FVINIT,FVSUBMIT,FVNEW,FENTITYFIELDKEY,FFIELDELEMENTTYPE,FVEDIT,FENABLED,FFIELDKEY,FSEQ,FDEFAULTVALUE,FDEFAULTFUNCPARAM,FVAUDIT) VALUES (1930609010055070720,'0','0',1930631747553216517,'0','0','1','1','1','1','0','0','processseq',0,'0','1','processseq',6,' ',' ','0'); 


--多语言
DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '414C+UD7E3/Q';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1930609010055070720,'414C+UD7E3/Q','zh_CN',' ','流程生产退料申请单'); 
DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '414C+UD7E3/R';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1930609010055070720,'414C+UD7E3/R','zh_TW',' ','流程生產退料申請單'); 

DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '414RW7=J6OKC';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1930694008388987904,'414RW7=J6OKC','zh_TW','流程生產領料退回','流程生產退料單'); 
DELETE FROM T_BAS_BILLTYPE_L WHERE FPKID = '414RW7=J6OKD';
INSERT INTO T_BAS_BILLTYPE_L(FID,FPKID,FLOCALEID,FDESCRIPTION,FNAME) VALUES (1930694008388987904,'414RW7=J6OKD','zh_CN','流程生产领料退回','流程生产退料单'); 

--业务参数
DELETE FROM t_bas_billtypeparameter WHERE FFORMID = 'im_mdc_mftreturnorder' and FBILLTYPEID = 1930694008388987904;
INSERT INTO t_bas_billtypeparameter(FFORMID,FBILLTYPEID,FDATA) VALUES ('im_mdc_mftreturnorder',1930694008388987904,'{"_Type_":"bd_billtypeparameter","entryentity":[{"_Type_":"entryentity","biztypenumber":{"number":"3201","masterid":688864102566811648,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L99XNVAMJF","name":"普通领料退回","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04L99XNVAMJG","name":"普通領料退回","description":"","localeid":"zh_TW"}],"ispreset":true,"name":{"zh_TW":"普通領料退回","zh_CN":"普通领料退回"},"id":688864102566811648},"ispreset":true,"biztypenumber_id":688864102566811648,"id":0,"isdefault":true,"seq":1}]}'); 


DELETE FROM t_bas_billtypeparameter WHERE FFORMID = 'im_mdc_mftreturnapplybill' and FBILLTYPEID = 1930609010055070720;
INSERT INTO t_bas_billtypeparameter(FFORMID,FBILLTYPEID,FDATA) VALUES ('im_mdc_mftreturnapplybill',1930609010055070720,' '); 
