-- 新增领料出库的编码规则 2019-10-21
-- t_cr_coderule
IF NOT EXISTS (SELECT 1 FROM t_cr_coderule WHERE fid = '0A37M=UOG786') 
insert into t_cr_coderule (FID, FNUMBER, FRULETYPE, FBIZOBJECTID, FSPLITSIGN, FCTRLMODE, FAPPMODE, FEXAMPLE, FEXAMPLELENGTH, FENABLE, FSTATUS, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FDISABLERID, FDISABLEDATE, FMASTERID, FISUPDATERECOVER)
values ('0A37M=UOG786', ' ', null, 'im_materialreqoutbill', '-', '1', '2', ' ', ' ', '1', 'C', 1, {ts'2019-08-22 18:08:00'}, 1, {ts'2019-08-22 18:08:00'}, null, null, '0A37M=UOG786', '0');

-- t_cr_coderule_l
IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '0A37M=UOEYE8') 
insert into t_cr_coderule_l (FPKID, FID, FLOCALEID, FNAME) values ('0A37M=UOEYE8', '0A37M=UOG786', 'zh_CN', '领料出库单编码规则');

IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '0A37M=UOEYE7') 
insert into t_cr_coderule_l (FPKID, FID, FLOCALEID, FNAME) values ('0A37M=UOEYE7', '0A37M=UOG786', 'zh_TW', '領料出庫單編碼規則');

-- t_cr_coderuleentry
IF NOT EXISTS (SELECT 1 FROM t_cr_coderuleentry WHERE FENTRYID = '0A38K8B922ME') 
insert into t_cr_coderuleentry (FENTRYID, FID, FSEQ, FATTRIBUTETYPE, FATTUSINGMODE, FVALUEATRIBUTE, FFORMAT, FSETTINGVALUE, FLENGTH, FINITIAL, FSTEP, FADDCHAR, FISSPLITSIGN, FADDSTYLE, FCUTSTYLE, FISSORTITEM, FSPLITSIGN, FISVISABLE)
values ('0A38K8B922ME', '0A37M=UOG786', 0, '1', ' ', ' ', 'LLCK', ' ', 8, 1, 1, ' ', '0', '1', '1', '0', ' ', '1');

IF NOT EXISTS (SELECT 1 FROM t_cr_coderuleentry WHERE FENTRYID = '0A38K8B922MF') 
insert into t_cr_coderuleentry (FENTRYID, FID, FSEQ, FATTRIBUTETYPE, FATTUSINGMODE, FVALUEATRIBUTE, FFORMAT, FSETTINGVALUE, FLENGTH, FINITIAL, FSTEP, FADDCHAR, FISSPLITSIGN, FADDSTYLE, FCUTSTYLE, FISSORTITEM, FSPLITSIGN, FISVISABLE)
values ('0A38K8B922MF', '0A37M=UOG786', 1, '2', '1', 'biztime', 'yyMMdd', ' ', 8, 1, 1, ' ', '1', '1', '1', '1', '-', '1');

IF NOT EXISTS (SELECT 1 FROM t_cr_coderuleentry WHERE FENTRYID = '0A38K8B922MG') 
insert into t_cr_coderuleentry (FENTRYID, FID, FSEQ, FATTRIBUTETYPE, FATTUSINGMODE, FVALUEATRIBUTE, FFORMAT, FSETTINGVALUE, FLENGTH, FINITIAL, FSTEP, FADDCHAR, FISSPLITSIGN, FADDSTYLE, FCUTSTYLE, FISSORTITEM, FSPLITSIGN, FISVISABLE)
values ('0A38K8B922MG', '0A37M=UOG786', 2, '16', '1', ' ', ' ', ' ', 6, 1, 1, ' ', '1', '1', '1', '0', '-', '1');
