/*==============================================================*/
/* 需求计划计算    创建人：pengfei_he	  创建时间:20200522 */
/*==============================================================*/

IF NOT EXISTS (SELECT 1 FROM t_cr_coderule WHERE fid = '0UGX1WTLSOZ8') 
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 ('0UGX1WTLSOZ8', ' ', null, 'mds_rplancal', '-', '1', '2', ' ', ' ', '1', 'C', '870245092475036672', {ts'2020-05-22 16:32:40'}, '870245092475036672', {ts'2020-05-22 16:32:40'}, null, null, '0UGX1WTLSOZ8', '0');

IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '0UGX1WTPCBGM')
insert into t_cr_coderule_l (FPKID, FID, FLOCALEID, FNAME)
values ('0UGX1WTPCBGM', '0UGX1WTLSOZ8', 'zh_CN', '需求计划计算编码规则');

IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '0UGX1WTPCBGL')
insert into t_cr_coderule_l (FPKID, FID, FLOCALEID, FNAME)
values ('0UGX1WTPCBGL', '0UGX1WTLSOZ8', 'zh_TW', '需求計劃計算編碼規則');

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

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