-- 新增形态转换单的编码规则 2019-09-27
-- t_cr_coderule
IF NOT EXISTS (SELECT 1 FROM t_cr_coderule WHERE fid = '08MHOUOEE2NL') 
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 ('08MHOUOEE2NL', ' ', null, 'im_adjustbill', '-', '1', '2', ' ', ' ', '1', 'C', 1, {ts'2019-09-27 10:08:00'}, 1, {ts'2019-09-27 10:08:00'}, null, null, '08MHOUOEE2NL', '0');

-- t_cr_coderule_l
IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '08MHOUP91HN8') 
insert into t_cr_coderule_l (FPKID, FID, FLOCALEID, FNAME) values ('08MHOUP91HN8', '08MHOUOEE2NL', 'zh_CN', '形态转换单编码规则');

IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '08MHOUP91HN7') 
insert into t_cr_coderule_l (FPKID, FID, FLOCALEID, FNAME) values ('08MHOUP91HN7', '08MHOUOEE2NL', 'zh_TW', '形態轉換單編碼規則');

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

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

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