-- 单据类型 sys库
DELETE FROM T_BAS_BILLTYPE WHERE FID = 767134553327588352;
insert into T_BAS_BILLTYPE (FID, FNUMBER, FBILLFORMID, FISDEFAULT, FBILLCODERULEID, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FCONTROLPRINTCOUNT, FMAXPRINTCOUNT, FPRINTAFTERAUDIT, FDOCUMENTSTATUS, FDEFPRINTTEMPLATE, FISSYSPRESET, FLAYOUTSOLUTION, FDEFWNREPORTTEMPLATE, FSTATUS, FENABLE, FMASTERID, FPARASETTINGXML, FBILLINITSETTING)
values (767134553327588352, 'im_mdc_mftproorder_BT_S', 'im_mdc_mftproorder', '1', ' ', 1, {ts '2019-10-28 11:07:47'}, 1, {ts '2019-10-28 11:07:47'}, '0', 1, '1', '0', ' ', '1', '0VYB/Y9V4LVH', null, 'C', '1', 767134553327588352, null, ' ');


DELETE FROM T_BAS_BILLTYPE WHERE FID = 767308634408491008;
insert into T_BAS_BILLTYPE (FID, FNUMBER, FBILLFORMID, FISDEFAULT, FBILLCODERULEID, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FCONTROLPRINTCOUNT, FMAXPRINTCOUNT, FPRINTAFTERAUDIT, FDOCUMENTSTATUS, FDEFPRINTTEMPLATE, FISSYSPRESET, FLAYOUTSOLUTION, FDEFWNREPORTTEMPLATE, FSTATUS, FENABLE, FMASTERID, FPARASETTINGXML, FBILLINITSETTING)
values (767308634408491008, 'im_mdc_mftfeedorder_BT_R', 'im_mdc_mftfeedorder', '1', ' ', 1, {ts '2019-10-28 11:07:47'}, 1, {ts '2019-10-28 11:07:47'}, '0', 1, '1', '0', ' ', '1', '0WIW5270B02W', null, 'C', '1', 767308634408491008, null, ' ');

DELETE FROM T_BAS_BILLTYPE WHERE FID = 767306684862616576;
insert into T_BAS_BILLTYPE (FID, FNUMBER, FBILLFORMID, FISDEFAULT, FBILLCODERULEID, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FCONTROLPRINTCOUNT, FMAXPRINTCOUNT, FPRINTAFTERAUDIT, FDOCUMENTSTATUS, FDEFPRINTTEMPLATE, FISSYSPRESET, FLAYOUTSOLUTION, FDEFWNREPORTTEMPLATE, FSTATUS, FENABLE, FMASTERID, FPARASETTINGXML, FBILLINITSETTING)
values (767306684862616576, 'im_mdc_mftreturnorder_BT_S_R', 'im_mdc_mftreturnorder', '1', ' ', 1, {ts '2019-10-28 11:07:47'}, 1, {ts '2019-10-28 11:07:47'}, '0', 1, '1', '0', ' ', '1', '0WIW186V8206', null, 'C', '1', 767306684862616576, null, ' ');

DELETE FROM T_BAS_BILLTYPE_l WHERE FID = 767134553327588352; 
insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0D78SBPQJ8GL', '767134553327588352', 'zh_CN', '生产领料单', '生产领料单');

insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0D78SBPQJ8GM', '767134553327588352', 'zh_TW', '生產領料單', '生產領料單');

DELETE FROM T_BAS_BILLTYPE_l WHERE FID = 767306684862616576; 
insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0D81YO5OI1NW', '767306684862616576', 'zh_CN', '生产退料单', '生产领料退回');

insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0D81YO5OI1NX', '767306684862616576', 'zh_TW', '生產退料單', '生產領料退回');

DELETE FROM T_BAS_BILLTYPE_l WHERE FID = 767308634408491008; 
insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0D82=W7NW2BA', '767308634408491008', 'zh_TW', '生產補料單', '生產補料單');

insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0D82=W7NW2BB', '767308634408491008', 'zh_CN', '生产补料单', '生产补料单');

DELETE FROM T_BAS_BILLTYPEPARAMETER WHERE FBILLTYPEID = 767134553327588352;
insert into T_BAS_BILLTYPEPARAMETER (FFORMID, FBILLTYPEID, FDATA)
values ('im_mdc_mftproorder', 767134553327588352, '{"biztype":{"number":"320","masterid":688863581240093696,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L963HQBPS=","name":"普通领料","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04L963HQBPSA","name":"普通領料","description":"","localeid":"zh_TW"}],"name":{"zh_TW":"普通領料","zh_CN":"普通领料"},"id":688863581240093696},"_Type_":"im_billtypeparameter","biztype_id":688863581240093696}');

DELETE FROM T_BAS_BILLTYPEPARAMETER WHERE FBILLTYPEID = 767308634408491008;
insert into T_BAS_BILLTYPEPARAMETER (FFORMID, FBILLTYPEID, FDATA)
values ('im_mdc_mftfeedorder', 767308634408491008, '{"biztype":{"number":"320","masterid":688863581240093696,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L963HQBPS=","name":"普通领料","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04L963HQBPSA","name":"普通領料","description":"","localeid":"zh_TW"}],"name":{"zh_TW":"普通領料","zh_CN":"普通领料"},"id":688863581240093696},"_Type_":"im_billtypeparameter","biztype_id":688863581240093696}');

DELETE FROM T_BAS_BILLTYPEPARAMETER WHERE FBILLTYPEID = 767306684862616576;
insert into T_BAS_BILLTYPEPARAMETER (FFORMID, FBILLTYPEID, FDATA)
values ('im_mdc_mftreturnorder', 767306684862616576, '{"biztype":{"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"}],"name":{"zh_TW":"普通領料退回","zh_CN":"普通领料退回"},"id":688864102566811648},"_Type_":"im_billtypeparameter","biztype_id":688864102566811648}');

--增加完工入库单、完工退库单的单据类型，单据类型分别关联生产入库和生产入库退回的业务类型
DELETE FROM T_BAS_BILLTYPE WHERE FID = 920040553033394176;
insert into T_BAS_BILLTYPE (FID, FNUMBER, FBILLFORMID, FISDEFAULT, FBILLCODERULEID, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FCONTROLPRINTCOUNT, FMAXPRINTCOUNT, FPRINTAFTERAUDIT, FDOCUMENTSTATUS, FDEFPRINTTEMPLATE, FISSYSPRESET, FLAYOUTSOLUTION, FDEFWNREPORTTEMPLATE, FSTATUS, FENABLE, FMASTERID, FPARASETTINGXML, FBILLINITSETTING)
values (920040553033394176, 'im_mdc_mftmanuinbill_BT_S', 'im_mdc_mftmanuinbill', '1', ' ', 1, {ts '2020-06-23 11:07:47'}, 1, {ts '2020-06-23 11:07:47'}, '0', 1, '1', '0', ' ', '1', '0VR3EBVIECSV', null, 'C', '1', 920040553033394176, null, ' ');

DELETE FROM T_BAS_BILLTYPE WHERE FID = 920039909711047680;
insert into T_BAS_BILLTYPE (FID, FNUMBER, FBILLFORMID, FISDEFAULT, FBILLCODERULEID, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FCONTROLPRINTCOUNT, FMAXPRINTCOUNT, FPRINTAFTERAUDIT, FDOCUMENTSTATUS, FDEFPRINTTEMPLATE, FISSYSPRESET, FLAYOUTSOLUTION, FDEFWNREPORTTEMPLATE, FSTATUS, FENABLE, FMASTERID, FPARASETTINGXML, FBILLINITSETTING)
values (920039909711047680, 'im_mdc_mftreturnbill_BT_S', 'im_mdc_mftreturnbill', '1', ' ', 1, {ts '2020-06-23 11:07:47'}, 1, {ts '2020-06-23 11:07:47'}, '0', 1, '1', '0', ' ', '1', '0WJ9JPR+9QZR', null, 'C', '1', 920039909711047680, null, ' ');

-- 增加完工入库、退库单据类型多语言
DELETE FROM T_BAS_BILLTYPE_l WHERE FID = 920040553033394176;
insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0W+TLRJ9TR5Y', '920040553033394176', 'zh_CN', '完工入库单', '完工入库单'); 
insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0W+TLRJ9TR5Z', '920040553033394176', 'zh_TW', '完工入庫單', '完工入庫單');

DELETE FROM T_BAS_BILLTYPE_l WHERE FID = 920039909711047680;
insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0W+TH1T+JNCW', '920039909711047680', 'zh_CN', '完工退库单', '完工退库单'); 
insert into T_BAS_BILLTYPE_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('0W+TH1T+JNCX', '920039909711047680', 'zh_TW', '完工退庫單', '完工退庫單');

DELETE FROM T_BAS_BILLTYPEPARAMETER WHERE FBILLTYPEID = 920039909711047680;
insert into T_BAS_BILLTYPEPARAMETER (FFORMID, FBILLTYPEID, FDATA)
values ('im_mdc_mftreturnbill', 920039909711047680, '{"biztype":{"number":"3301","masterid":688865107706702848,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L9G8AAIGMQ","name":"生产入库退回","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04L9G8AAIGMR","name":"生產入庫退回","description":"","localeid":"zh_TW"}],"name":{"zh_TW":"生產入庫退回","zh_CN":"生产入库退回"},"id":688865107706702848},"_Type_":"im_billtypeparameter","biztype_id":688865107706702848}');

DELETE FROM T_BAS_BILLTYPEPARAMETER WHERE FBILLTYPEID = 920040553033394176;
insert into T_BAS_BILLTYPEPARAMETER (FFORMID, FBILLTYPEID, FDATA)
values ('im_mdc_mftmanuinbill', 920040553033394176, '{"biztype":{"number":"330","masterid":688864881516276736,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L9EL0EVJKJ","name":"生产入库","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04L9EL0EVJKK","name":"生產入庫","description":"","localeid":"zh_TW"}],"name":{"zh_TW":"生產入庫","zh_CN":"生产入库"},"id":688864881516276736},"_Type_":"im_billtypeparameter","biztype_id":688864881516276736}');