--haifeng_mao 周滚动基础资料控制视图
DELETE FROM T_BD_DefaultCtrlStrategy WHERE FID = 1122443671724512256;
INSERT INTO T_BD_DefaultCtrlStrategy(FID,FDISABLERID,FCTRLVIEW,FDEFAULTMANAGESTRATEGY,FDATATYPE,FDISABLEDATE,FMASTERID,FSTATUS,FAPPSYSTEMID,FNUMBER,FDEFAULTCTRLSTRATEGY,FBASEDATAID,FCREATETIME,FENABLE,FMODIFIERID,FPLUGIN,FMODIFYTIME,FCREATORID,FISSYSTEM)
 VALUES (1122443671724512256,0,914427355726916608,'1','2',NULL,1122443671724512256,'C','0MBB4=9D3YI9',' ','5','mds_weekroll',{ts'2018-08-08 18:08:08'},'1',1,' ',{ts'2018-08-08 18:08:08'},1,'1'); 
 
--haifeng_mao 周滚动编码规则
IF NOT EXISTS (SELECT 1 FROM t_cr_coderule WHERE FID = '1HVKTX42T/A2')
INSERT INTO t_cr_coderule(FID,FDISABLERID,FSPLITSIGN,FCTRLMODE,FEXAMPLE,FAPPMODE,FDISABLEDATE,FMASTERID,FSTATUS,FNUMBER,FRULETYPE,FEXAMPLELENGTH,FCREATETIME,FBIZOBJECTID,FENABLE,FMODIFIERID,FISUPDATERECOVER,FMODIFYTIME,FCREATORID,FISADDVIEW) 
VALUES ('1HVKTX42T/A2',NULL,'-','1',' ','2',NULL,'1HVKTX42T/A2','C','1HVKIJGUY3BM',NULL,' ',{ts'2018-08-08  18:08:08'},'mds_weekroll','1',1,'0',{ts'2018-08-08  18:08:08'},1,'1'); 

IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '1HVKTX42UPZG')
INSERT INTO t_cr_coderule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1HVKTX42T/A2','1HVKTX42UPZG','zh_CN','周滚动设置'); 
IF NOT EXISTS (SELECT 1 FROM t_cr_coderule_l WHERE FPKID = '1HVKTX42UPZH')
INSERT INTO t_cr_coderule_l(FID,FPKID,FLOCALEID,FNAME) VALUES ('1HVKTX42T/A2','1HVKTX42UPZH','zh_TW','周滾動設置'); 
 
IF NOT EXISTS (SELECT 1 FROM t_cr_coderuleentry WHERE FID = '1HVKTX42T/A2') 
INSERT INTO t_cr_coderuleentry (FENTRYID, FID, FSEQ, FATTRIBUTETYPE, FATTUSINGMODE, FVALUEATRIBUTE, FFORMAT, FSETTINGVALUE, FLENGTH, FINITIAL, FSTEP, FADDCHAR, FISSPLITSIGN, FADDSTYLE, FCUTSTYLE, FISSORTITEM, FSPLITSIGN, FISVISABLE) 
SELECT '1HVKTX501587', '1HVKTX42T/A2', 0, '1', ' ', ' ', 'ZGDSZ', ' ', 8, 1, 1, ' ', '0', '1', '1', '0', ' ', '1' UNION
SELECT '1HVKTX501588', '1HVKTX42T/A2', 1, '9', '1', ' ', 'yyyyMMdd', ' ', 8, 1, 1, ' ', '1', '1', '1', '1', '-', '1' UNION
SELECT '1HVKTX501589', '1HVKTX42T/A2', 2, '16', '1', ' ', ' ', ' ', 6, 1, 1, ' ', '1', '1', '1', '0', '-', '1' ;

