
-- 库存事务 scm库

--增加库存事务分组’委外领料单’ ’工序委外领料单’
delete from t_im_invschemegroup where fid ='988397277544630272';
insert into t_im_invschemegroup (FID, FNUMBER, FPARENTID, FLEVEL, FLONGNUMBER, FISLEAF, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FMASTERID, FNAME, FFULLNAME)
values ('988397277544630272', 'omOut', '0', '1', 'omOut', '1', '1', 'C', '1', {ts'2020-09-25 10:34:02'}, '1',  {ts'2020-09-25 10:34:02'}, '0', null, '988397277544630272', '委外领料单', '委外领料单');

delete from t_im_invschemegroup where fid ='989881456048218112';
insert into t_im_invschemegroup (FID, FNUMBER, FPARENTID, FLEVEL, FLONGNUMBER, FISLEAF, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FMASTERID, FNAME, FFULLNAME)
values ('989881456048218112', 'opmOut', '0', '1', 'opmOut', '1', '1', 'C', '1', {ts'2020-09-25 10:34:02'}, '1', {ts'2020-09-25 10:34:02'}, '0', null, '989881456048218112', '工序委外领料单', '工序委外领料单');


delete from t_im_invschemegroup_l where fpkid ='12D=S0L5127M';
insert into t_im_invschemegroup_l (FPKID, FID, FLOCALEID, FNAME, FFULLNAME)
values ('12D=S0L5127M', '988397277544630272', 'zh_CN', '委外领料单', '委外领料单');

delete from t_im_invschemegroup_l where fpkid ='12D=S0L5127N';
insert into t_im_invschemegroup_l (FPKID, FID, FLOCALEID, FNAME, FFULLNAME)
values ('12D=S0L5127N', '988397277544630272', 'zh_TW', '委外領料單', ' ');

delete from t_im_invschemegroup_l where fpkid ='12KE29SZ2NR5';
insert into t_im_invschemegroup_l (FPKID, FID, FLOCALEID, FNAME, FFULLNAME)
values ('12KE29SZ2NR5', '989881456048218112', 'zh_CN', '工序委外领料单', '工序委外领料单');

delete from t_im_invschemegroup_l where fpkid ='12KE29SZ2NR6';
insert into t_im_invschemegroup_l (FPKID, FID, FLOCALEID, FNAME, FFULLNAME)
values ('12KE29SZ2NR6', '989881456048218112', 'zh_TW', '工序委外領料單', ' ');


--增加库存事务--365,3651,366,367,3671,368-表头
delete from t_im_invschemes where fid ='988405218813331456';
insert into t_im_invschemes (FID, FNUMBER, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FGROUPID, FDISABLERID, FDISABLEDATE, FINVDC, FTRANSCEIVERTYPEID, FINVSTATUSID, FISOUTUPDATE, FOUTINVSTATUSID, FOWNERTYPE, FKEEPERTYPE, FOUTOWNERTYPE, FOUTKEEPERTYPE, FISINUPDATE, FISPRESET, FBILLFORMID, FISNOTUPDATE, FISFORWARDAMOUNT, FNAME, FDESCRIPTION)
values ('988405218813331456', '365', '870257597968570368', '870257597968570368', '1', {ts'2020-09-25 10:34:02'}, {ts'2020-09-25 10:34:02'}, '988405218813331456', '988397277544630272', '0', null, 'A', '687618054456301568', '0', '1', '691928582720825344', ' ', ' ', 'bos_org', 'bos_org', '0', '1', 'im_mdc_omproorder', '0', '1', '委外领料', ' ');

delete from t_im_invschemes where fid ='988407304724715520';
insert into t_im_invschemes (FID, FNUMBER, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FGROUPID, FDISABLERID, FDISABLEDATE, FINVDC, FTRANSCEIVERTYPEID, FINVSTATUSID, FISOUTUPDATE, FOUTINVSTATUSID, FOWNERTYPE, FKEEPERTYPE, FOUTOWNERTYPE, FOUTKEEPERTYPE, FISINUPDATE, FISPRESET, FBILLFORMID, FISNOTUPDATE, FISFORWARDAMOUNT, FNAME, FDESCRIPTION)
values ('988407304724715520', '3651', '870257597968570368', '870257597968570368', '1', {ts'2020-09-25 10:34:02'}, {ts'2020-09-25 10:34:02'}, '988407304724715520', '988397277544630272', '0', null, 'A', '687618334946187264', '0', '1', '691928582720825344', ' ', ' ', 'bos_org', 'bos_org', '0', '1', 'im_mdc_omreturnorder', '0', '1', '委外领料退回', ' ');

delete from t_im_invschemes where fid ='989622526302930944';
insert into t_im_invschemes (FID, FNUMBER, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FGROUPID, FDISABLERID, FDISABLEDATE, FINVDC, FTRANSCEIVERTYPEID, FINVSTATUSID, FISOUTUPDATE, FOUTINVSTATUSID, FOWNERTYPE, FKEEPERTYPE, FOUTOWNERTYPE, FOUTKEEPERTYPE, FISINUPDATE, FISPRESET, FBILLFORMID, FISNOTUPDATE, FISFORWARDAMOUNT, FNAME, FDESCRIPTION)
values ('989622526302930944', '366', '870257597968570368', '870257597968570368', '1', {ts'2020-09-25 10:34:02'}, {ts'2020-09-25 10:34:02'}, '989622526302930944', '988397277544630272', '0', null, 'A', '687618054456301568', '0', '1', '691928582720825344', ' ', ' ', 'bos_org', 'bos_org', '0', '1', 'im_mdc_omfeedorder', '0', '1', '委外补料', ' ');

delete from t_im_invschemes where fid ='989884843242299392';
insert into t_im_invschemes (FID, FNUMBER, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FGROUPID, FDISABLERID, FDISABLEDATE, FINVDC, FTRANSCEIVERTYPEID, FINVSTATUSID, FISOUTUPDATE, FOUTINVSTATUSID, FOWNERTYPE, FKEEPERTYPE, FOUTOWNERTYPE, FOUTKEEPERTYPE, FISINUPDATE, FISPRESET, FBILLFORMID, FISNOTUPDATE, FISFORWARDAMOUNT, FNAME, FDESCRIPTION)
values ('989884843242299392', '3671', '13466739', '870257597968570368', '1', {ts'2020-09-25 10:34:02'}, {ts'2020-09-25 10:34:02'}, '989884843242299392', '989881456048218112', '0', null, 'A', '687618334946187264', '0', '1', '691928582720825344', ' ', ' ', 'bos_org', 'bos_org', '0', '1', 'im_mdc_opmreturnorder', '0', '1', '工序委外领料退回', ' ');

delete from t_im_invschemes where fid ='989886179463691264';
insert into t_im_invschemes (FID, FNUMBER, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FGROUPID, FDISABLERID, FDISABLEDATE, FINVDC, FTRANSCEIVERTYPEID, FINVSTATUSID, FISOUTUPDATE, FOUTINVSTATUSID, FOWNERTYPE, FKEEPERTYPE, FOUTOWNERTYPE, FOUTKEEPERTYPE, FISINUPDATE, FISPRESET, FBILLFORMID, FISNOTUPDATE, FISFORWARDAMOUNT, FNAME, FDESCRIPTION)
values ('989886179463691264', '368', '13466739', '870257597968570368', '1', {ts'2020-09-25 10:34:02'}, {ts'2020-09-25 10:34:02'}, '989886179463691264', '989881456048218112', '0', null, 'A', '687618054456301568', '0', '1', '691928582720825344', ' ', ' ', 'bos_org', 'bos_org', '0', '1', 'im_mdc_opmfeedorder', '0', '1', '工序委外领料补料', ' ');

delete from t_im_invschemes where fid ='989883233619442688';
insert into t_im_invschemes (FID, FNUMBER, FCREATORID, FMODIFIERID, FENABLE, FCREATETIME, FMODIFYTIME, FMASTERID, FGROUPID, FDISABLERID, FDISABLEDATE, FINVDC, FTRANSCEIVERTYPEID, FINVSTATUSID, FISOUTUPDATE, FOUTINVSTATUSID, FOWNERTYPE, FKEEPERTYPE, FOUTOWNERTYPE, FOUTKEEPERTYPE, FISINUPDATE, FISPRESET, FBILLFORMID, FISNOTUPDATE, FISFORWARDAMOUNT, FNAME, FDESCRIPTION)
values ('989883233619442688', '367', '13466739', '870257597968570368', '1', {ts'2020-09-25 10:34:02'}, {ts'2020-09-25 10:34:02'}, '989883233619442688', '989881456048218112', '0', null, 'A', '687618054456301568', '0', '1', '691928582720825344', ' ', ' ', 'bos_org', 'bos_org', '0', '1', 'im_mdc_opmproorder', '0', '1', '工序委外领料', ' ');

delete from t_im_invschemes_l where fid in('988405218813331456','988407304724715520','989622526302930944','989884843242299392','989886179463691264','989883233619442688');
insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12DB8XF7CQXZ', '988405218813331456', 'zh_CN', '委外领料', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12DB8XF7CQY+', '988405218813331456', 'zh_TW', '委外領料', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12DBN384827M', '988407304724715520', 'zh_CN', '委外领料退回', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12DBN384827N', '988407304724715520', 'zh_TW', '委外領料退回', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12J5PDYD7/=O', '989622526302930944', 'zh_CN', '委外补料', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12J5PDYD7/=P', '989622526302930944', 'zh_TW', '委外補料', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12KEE5XLV/MY', '989883233619442688', 'zh_CN', '工序委外领料', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12KEE5XLV/MZ', '989883233619442688', 'zh_TW', '工序委外領料', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12KEPXBS8LDB', '989884843242299392', 'zh_CN', '工序委外领料退回', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12KEPXBS8LDC', '989884843242299392', 'zh_TW', '工序委外領料退回', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12KEZN2P0AS3', '989886179463691264', 'zh_CN', '工序委外领料补料', ' ');

insert into t_im_invschemes_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION)
values ('12KEZN2P0AS4', '989886179463691264', 'zh_TW', '工序委外領料補料', ' ');

--出库库存类型出库更新单据体
delete from T_IM_OUTINVTYPEENTRY where fid in('988405218813331456','988407304724715520','989622526302930944','989884843242299392','989886179463691264','989883233619442688');
insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('988405218813331456', '988405218846885888', '1', '1', '688884005529250816');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('988405218813331456', '988405218846885889', '2', '0', '688884099724930048');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('988407304724715520', '988407304733104128', '1', '1', '688884005529250816');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('988407304724715520', '988407304733104129', '2', '0', '688884099724930048');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989622526302930944', '989622526462314496', '1', '1', '688884005529250816');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989622526302930944', '989622526462314497', '2', '0', '688884099724930048');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989883233619442688', '989883233636219904', '1', '1', '688884005529250816');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989883233619442688', '989883233636219905', '2', '0', '688884099724930048');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989884843242299392', '989884843250688000', '1', '1', '688884005529250816');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989884843242299392', '989884843250688001', '2', '0', '688884099724930048');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989886179463691264', '989886179472079872', '1', '1', '688884005529250816');

insert into T_IM_OUTINVTYPEENTRY (FID, FENTRYID, FSEQ, FISDEFAULT, FOUTINVTYPEID)
values ('989886179463691264', '989886179472079873', '2', '0', '688884099724930048');



--关联业务类型
delete from t_im_biztypeentry where fid in('988405218813331456','988407304724715520','989622526302930944','989884843242299392','989886179463691264','989883233619442688');
insert into t_im_biztypeentry (FID, FENTRYID, FSEQ, FBIZTYPEID, FALLOWMANUALADD)
values ('988405218813331456', '988405218847004674', '1', '966651870204521472', '1');

insert into t_im_biztypeentry (FID, FENTRYID, FSEQ, FBIZTYPEID, FALLOWMANUALADD)
values ('988407304724715520', '988407304732985346', '1', '990500657985463296', '1');

insert into t_im_biztypeentry (FID, FENTRYID, FSEQ, FBIZTYPEID, FALLOWMANUALADD)
values ('989622526302930944', '989622705684924416', '1', '966651870204521472', '1');

insert into t_im_biztypeentry (FID, FENTRYID, FSEQ, FBIZTYPEID, FALLOWMANUALADD)
values ('989883233619442688', '989883233636196354', '1', '989851541752212480', '1');

insert into t_im_biztypeentry (FID, FENTRYID, FSEQ, FBIZTYPEID, FALLOWMANUALADD)
values ('989884843242299392', '989884843250711554', '1', '989852229525793792', '1');

insert into t_im_biztypeentry (FID, FENTRYID, FSEQ, FBIZTYPEID, FALLOWMANUALADD)
values ('989886179463691264', '989886179472056320', '1', '989851541752212480', '1');

