-- 更新分组类型字段为
UPDATE t_ar_accrualaging SET fgrouptype = ',0,', fisdefault = '1' where fgrouptype = ' ';

-- 应收账龄分组预置一个默认的账龄分组
-- 应收表头
DELETE FROM t_ar_accrualaging WHERE FID = 1513190301324293120;
INSERT INTO t_ar_accrualaging(FID,FCREATORID,FSOURCEDATAID,FMODIFYTIME,FNAME,FBITINDEX,FISDEFAULT,FCTRLSTRATEGY,FCREATETIME,FNUMBER,FSTATUS,FORGID,FISPRESET,FMODIFIERID,FENABLE,FSOURCEBITINDEX,FGROUPTYPE,FCREATEORGID,FMASTERID) VALUES (1513190301324293120,1,0,{ts'2018-03-03  00:00:00'},'预置账龄分组',0,'1','5',{ts'2018-03-03  00:00:00'},'001','C',100000,'1',1,'1',0,',1,',100000,1513190301324293120);

-- 应收分录
DELETE FROM t_ar_accrualagingentry WHERE FENTRYID = 1513190301341070336;
INSERT INTO t_ar_accrualagingentry(FID,FSECTION,FISDAYMORE,FENTRYID,FSEQ,FSTARTDAY,FENDDAY) VALUES (1513190301324293120,'0-30天','0',1513190301341070336,1,0,30);
DELETE FROM t_ar_accrualagingentry WHERE FENTRYID = 1513190301341070337;
INSERT INTO t_ar_accrualagingentry(FID,FSECTION,FISDAYMORE,FENTRYID,FSEQ,FSTARTDAY,FENDDAY) VALUES (1513190301324293120,'31-60天','0',1513190301341070337,2,31,60);
DELETE FROM t_ar_accrualagingentry WHERE FENTRYID = 1513190301341070338;
INSERT INTO t_ar_accrualagingentry(FID,FSECTION,FISDAYMORE,FENTRYID,FSEQ,FSTARTDAY,FENDDAY) VALUES (1513190301324293120,'61-90天','0',1513190301341070338,3,61,90);
DELETE FROM t_ar_accrualagingentry WHERE FENTRYID = 1513190301341070339;
INSERT INTO t_ar_accrualagingentry(FID,FSECTION,FISDAYMORE,FENTRYID,FSEQ,FSTARTDAY,FENDDAY) VALUES (1513190301324293120,'91天以上','1',1513190301341070339,4,91,0);

-- 应收多语言
DELETE FROM t_ar_accrualaging_L WHERE FPKID = '2QVJ2UJR7WRN';
INSERT INTO t_ar_accrualaging_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1513190301324293120,'2QVJ2UJR7WRN','zh_CN','预置账龄分组');
DELETE FROM t_ar_accrualaging_L WHERE FPKID = '2QVJ2UJR7WRO';
INSERT INTO t_ar_accrualaging_L(FID,FPKID,FLOCALEID,FNAME) VALUES (1513190301324293120,'2QVJ2UJR7WRO','zh_TW','預置賬齡分組');
