--PMM 库存调整编码规则
IF NOT EXISTS (SELECT 1 FROM T_CR_CodeRuleEntry WHERE FENTRYID = '1CVXK/TCWLNZ')
INSERT INTO T_CR_CodeRuleEntry(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FCUTSTYLE,FSTEP,FATTUSINGMODE,FSEQ,FISVISABLE,FLENGTH,FFORMAT,FSETTINGVALUE,FADDSTYLE,FISSPLITSIGN,FVALUEATRIBUTE,FADDCHAR) VALUES ('1CVXK/RT8JD8',1,'1',' ','0','1CVXK/TCWLNZ','1',1,'1',0,'1',8,'CKC',' ','1','0',' ',' '); 

IF NOT EXISTS (SELECT 1 FROM T_CR_CodeRuleEntry WHERE FENTRYID = '1CVXK/TCWLO+')
INSERT INTO T_CR_CodeRuleEntry(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FCUTSTYLE,FSTEP,FATTUSINGMODE,FSEQ,FISVISABLE,FLENGTH,FFORMAT,FSETTINGVALUE,FADDSTYLE,FISSPLITSIGN,FVALUEATRIBUTE,FADDCHAR) VALUES ('1CVXK/RT8JD8',1,'2','-','0','1CVXK/TCWLO+','1',1,' ',1,'1',8,'yyyyMMdd',' ','1','1','createtime',' '); 

DELETE FROM T_CR_CodeRuleEntry WHERE FENTRYID = '1CVXK/TCWLO/';
INSERT INTO T_CR_CodeRuleEntry(FID,FINITIAL,FATTRIBUTETYPE,FSPLITSIGN,FISSORTITEM,FENTRYID,FCUTSTYLE,FSTEP,FATTUSINGMODE,FSEQ,FISVISABLE,FLENGTH,FFORMAT,FSETTINGVALUE,FADDSTYLE,FISSPLITSIGN,FVALUEATRIBUTE,FADDCHAR) VALUES ('1CVXK/RT8JD8',1,'16','-','0','1CVXK/TCWLO/','1',1,' ',2,'1',4,' ',' ','1','1',' ',' '); 

IF NOT EXISTS (SELECT 1 FROM T_CR_CodeRule WHERE FID = '1CVXK/RT8JD8')
INSERT INTO T_CR_CodeRule(FEXAMPLE,FAPPMODE,FISADDVIEW,FISAPPCONDITION,FMASTERID,FISUNIQUE,FISMODIFIABLE,FCREATETIME,FBIZOBJECTID,FISUPDATERECOVER,FENABLE,FISAPPORG,FISSERIALNUMBER,FISCHECKCODE,FID,FCTRLMODE,FSPLITSIGN,FISLOG,FSTATUS,FNUMBER,FEXAMPLELENGTH,FISFAST,FMODIFIERID,FISNONBREAK,FMODIFYTIME,FCREATORID) VALUES (' ','2','1','0','1CVXK/RT8JD8','0','0',{ts'2021-02-01  15:15:33'},'pmm_instock','0','1','0','1','0','1CVXK/RT8JD8','1','-','0','C','1CVXEX26TVOP',' ','0',0,'0',{ts'2021-02-01  15:15:33'},0); 

IF NOT EXISTS (SELECT 1 FROM T_CR_CodeRule_l WHERE FPKID = '1CVXK/RWS231')
INSERT INTO T_CR_CodeRule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1CVXK/RT8JD8','1CVXK/RWS231','zh_CN','库存调整'); 