IF NOT EXISTS(SELECT 1 FROM t_cr_coderule WHERE FID = '1GWI7TJ82WRN') INSERT INTO t_cr_coderule(FID,FSPLITSIGN,FCTRLMODE,FEXAMPLE,FAPPMODE,FDISABLEDATE,FMASTERID,FSTATUS,FNUMBER,FRULETYPE,FEXAMPLELENGTH,FCREATETIME,FBIZOBJECTID,FENABLE,FMODIFIERID,FISUPDATERECOVER,FMODIFYTIME,FCREATORID,FDISABLERID,FISADDVIEW) VALUES ('1GWI7TJ82WRN','-','1',' ','2',NULL,'1GWI7TJ82WRN','C','1GWI3H1S4EB4',NULL,' ',{ts'2018-08-08 18:08:08'},'sm_salesagency','1',0,'0',{ts'2018-08-08 18:08:08'},0,NULL,1); 

IF NOT EXISTS(SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '1GWI7TJ82XEY') INSERT INTO t_cr_coderule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1GWI7TJ82WRN','1GWI7TJ82XEY','zh_CN','委托代销清单编码规则'); 
IF NOT EXISTS(SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '1GWI7TJ82XEX') INSERT INTO t_cr_coderule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1GWI7TJ82WRN','1GWI7TJ82XEX','zh_TW','委托代銷清單編碼規則'); 

IF NOT EXISTS(SELECT 1 FROM t_cr_coderuleentry WHERE FENTRYID = '1HD5TCPZDTYH') INSERT INTO t_cr_coderuleentry(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1GWI7TJ82WRN',1,'1',' ','0','1HD5TCPZDTYH',1,'1','1',0,8,'1','WTDXQD',' ','1',' ','0',' '); 

IF NOT EXISTS(SELECT 1 FROM t_cr_coderuleentry WHERE FENTRYID = '1HD5TCPZDTYI') INSERT INTO t_cr_coderuleentry(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1GWI7TJ82WRN',1,'2','-','1','1HD5TCPZDTYI',1,'1',' ',1,8,'1','yyMMdd',' ','1','bizdate','1',' '); 

IF NOT EXISTS(SELECT 1 FROM t_cr_coderuleentry WHERE FENTRYID = '1HD5TCPZDTYJ') INSERT INTO t_cr_coderuleentry(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FSTEP,FCUTSTYLE,FATTUSINGMODE,FSEQ,FLENGTH,FISVISABLE,FFORMAT,FSETTINGVALUE,FADDSTYLE,FVALUEATRIBUTE,FISSPLITSIGN,FADDCHAR) VALUES ('1GWI7TJ82WRN',1,'16','-','0','1HD5TCPZDTYJ',1,'1',' ',2,6,'1',' ',' ','1',' ','1',' '); 
