-- 修改了公式的取数规则
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566691043179864064;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566691043179864064,1532683517396254720,'number',' ',1566691043179864064,'A','CN-BBXGZ-000000467','比对类型等于汇缴比对时，取值相同【税务组织+税收制度+账簿类型+比对年度】审定比对表计提数，否则取值上年12月计提底稿/当期所得税费用/本年变动合计',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''hjbd'',StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#curyearsdbdsbbid'' and cellnumber=''dqsds_sqlr_bd#jtysbbd_jts'']}''),if({P[preyearendsbbid]}==-1,0,StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#preyearendsbbid'' and cellnumber=''dqsds_sqlr_bd#dqsds_hj'']}'')))');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566698323207798784;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566698323207798784,1532683517396254720,'number',' ',1566698323207798784,'A','CN-BBXGZ-000000468','当比对类型为汇缴比对时，取值相同【税务组织+税收制度+账簿类型+比对年度】审定比对表对应审定数，否则参数1：审定数=计提数  计算公式=计提数 参数2：为空 计算公式=0',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''hjbd'',StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#curyearsdbdsbbid'' and cellnumber=''dqsds_sqlr_bd#jtysbbd_sds'']}''),if({calType}==0,if({P[sdsdyjts]}==false,0,{Q[dqsds_sqlr_bd#jtysbbd_jts]}),{Q[dqsds_sqlr_bd#jtysbbd_sds]}))');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566705301263327232;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566705301263327232,1532683517396254720,'number',' ',1566705301263327232,'A','CN-BBXGZ-000000469','比对类型==审定比对?0:{Q[税前利润（本地）#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_sqlr_bd#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566708923002535936;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566708923002535936,1532683517396254720,'number',' ',1566708923002535936,'A','CN-BBXGZ-000000471','比对类型=审定比对?0:{Q[税前利润（本地）#汇缴数]} - {Q[税前利润（本地）#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_sqlr_bd#jtysbbd_hjs]} - {Q[dqsds_sqlr_bd#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566718471050731520;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566718471050731520,1532683517396254720,'number',' ',1566718471050731520,'A','CN-BBXGZ-000000476','{Q[永久性差异项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_yjxcy_cyxm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566720512225550336;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566720512225550336,1532683517396254720,'number',' ',1566720512225550336,'A','CN-BBXGZ-000000478','比对类型=审定比对?0:{Q[永久性差异项目#汇缴数]} - {Q[永久性差异项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_yjxcy_cyxm#jtysbbd_hjs]} - {Q[dqsds_yjxcy_cyxm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566724245877178368;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566724245877178368,1532683517396254720,'number',' ',1566724245877178368,'A','CN-BBXGZ-000000483','比对类型=审定比对?0:{Q[暂时性差异项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_zsxcy_cyxm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566724676380540928;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566724676380540928,1532683517396254720,'number',' ',1566724676380540928,'A','CN-BBXGZ-000000485','比对类型=审定比对?0:{Q[暂时性差异项目#汇缴数]} - {Q[暂时性差异项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_zsxcy_cyxm#jtysbbd_hjs]} - {Q[dqsds_zsxcy_cyxm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566730013657546752;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566730013657546752,1532683517396254720,'number',' ',1566730013657546752,'A','CN-BBXGZ-000000491','比对类型=审定比对?0:{Q[应纳税所得#汇缴数]} - {Q[应纳税所得#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_ynsds#jtysbbd_hjs]} - {Q[dqsds_ynsds#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566731702770876416;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566731702770876416,1532683517396254720,'number',' ',1566731702770876416,'A','CN-BBXGZ-000000493','比对类型=汇缴比对?取相同【税务组织+税收制度+账簿类型+比对年度】审定比对表中的审计提数:计算公式=上年12月计提底稿/当期所得税费用/本年变动合计',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''hjbd'',StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#curyearsdbdsbbid'' and cellnumber=''dqsds_yqndknbks#jtysbbd_jts'']}''),if({P[preyearendsbbid]}==-1,0,StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#preyearendsbbid'' and cellnumber=''dqsds_yqndknbks#dqsds_hj'']}'')))');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566732844242321408;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566732844242321408,1532683517396254720,'number',' ',1566732844242321408,'A','CN-BBXGZ-000000494','比对类型=汇缴比对?取相同【税务组织+税收制度+账簿类型+比对年度】审定比对表中的审定数:参数1：审定数=计提数 计算公式=计提数 参数2：为空 计算公式=0',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''hjbd'',StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#curyearsdbdsbbid'' and cellnumber=''dqsds_yqndknbks#jtysbbd_sds'']}''),if({calType}==0,if({P[sdsdyjts]}==false,0,{Q[dqsds_yqndknbks#jtysbbd_jts]}),{Q[dqsds_yqndknbks#jtysbbd_sds]}))');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566733379939180544;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566733379939180544,1532683517396254720,'number',' ',1566733379939180544,'A','CN-BBXGZ-000000495','比对类型=审定比对?0:{Q[以前年度可弥补亏损#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_yqndknbks#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566734185027092480;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566734185027092480,1532683517396254720,'number',' ',1566734185027092480,'A','CN-BBXGZ-000000497','比对类型=审定比对?0:{Q[以前年度可弥补亏损#汇缴数]} - {Q[以前年度可弥补亏损#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_yqndknbks#jtysbbd_hjs]} - {Q[dqsds_yqndknbks#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566773444165517312;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566773444165517312,1532683517396254720,'number',' ',1566773444165517312,'A','CN-BBXGZ-000000503','比对类型=审定比对?0:{Q[本年弥补亏损#汇缴数]} - {Q[本年弥补亏损#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_bnmbks#jtysbbd_hjs]} - {Q[dqsds_bnmbks#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566776780121980928;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566776780121980928,1532683517396254720,'number',' ',1566776780121980928,'A','CN-BBXGZ-000000509','比对类型=审定比对?0:{Q[弥补以前年度亏损后所得#汇缴数]} - {Q[弥补以前年度亏损后所得#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_mbyqndkshsd#jtysbbd_hjs]} - {Q[dqsds_mbyqndkshsd#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566779662817140736;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566779662817140736,1532683517396254720,'number',' ',1566779662817140736,'A','CN-BBXGZ-000000515','比对类型=审定比对?0:{Q[应纳所得税额#汇缴数]} - {Q[应纳所得税额#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_ynsdse#jtysbbd_hjs]} - {Q[dqsds_ynsdse#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566783357705363456;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566783357705363456,1532683517396254720,'number',' ',1566783357705363456,'A','CN-BBXGZ-000000519','比对类型=审定比对?0:{Q[境内税额减免项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_jnsejm_xm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566791549692428288;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566791549692428288,1532683517396254720,'number',' ',1566791549692428288,'A','CN-BBXGZ-000000521','比对类型=审定比对?0:{Q[境内税额减免项目#汇缴数]} - {Q[境内税额减免项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_jnsejm_xm#jtysbbd_hjs]} - {Q[dqsds_jnsejm_xm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566903450795922432;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566903450795922432,1532683517396254720,'number',' ',1566903450795922432,'A','CN-BBXGZ-000000527','比对类型=审定比对?0:{Q[应纳税额#汇缴数]} - {Q[应纳税额#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_ynse#jtysbbd_hjs]} - {Q[dqsds_ynse#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566905784808248320;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566905784808248320,1532683517396254720,'number',' ',1566905784808248320,'A','CN-BBXGZ-000000531','比对类型=审定比对?0:{Q[境外税额抵免项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_jwsedm_xm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566906223473726464;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566906223473726464,1532683517396254720,'number',' ',1566906223473726464,'A','CN-BBXGZ-000000533','比对类型=审定比对?0:{Q[境外税额抵免项目#汇缴数]} - {Q[境外税额抵免项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_jwsedm_xm#jtysbbd_hjs]} - {Q[dqsds_jwsedm_xm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1566907625671906304;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1566907625671906304,1532683517396254720,'number',' ',1566907625671906304,'A','CN-BBXGZ-000000539','比对类型=审定比对?0:{Q[实际应纳所得税额#汇缴数]} - {Q[实际应纳所得税额#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_sjynsdse#jtysbbd_hjs]} - {Q[dqsds_sjynsdse#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1567261303326643200;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1567261303326643200,1532683517396254720,'number',' ',1567261303326643200,'A','CN-BBXGZ-000000541','比对类型=汇缴比对?取相同【税务组织+税收制度+账簿类型+比对年度】审定比对表中的计提数:计算公式=上年12月计提底稿/当期所得税费用/本年变动合计',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''hjbd'',StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#curyearsdbdsbbid'' and cellnumber=''dqsds_sqlr_jt#jtysbbd_jts'']}''),if({P[preyearendsbbid]}==-1,0,StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#preyearendsbbid'' and cellnumber=''dqsds_sqlr_jt#dqsds_hj'']}'')))');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1567262063804290048;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1567262063804290048,1532683517396254720,'number',' ',1567262063804290048,'A','CN-BBXGZ-000000542','比对类型=汇缴比对?取相同【税务组织+税收制度+账簿类型+比对年度】审定比对表中的审定数:"参数1：审定数=计提数 计算公式=计提数 参数2：为空 计算公式=0"',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''hjbd'',StringUtil.toNumber(''{M[select value from tpo_declare_detail_tsd where entryid=''#curyearsdbdsbbid'' and cellnumber=''dqsds_sqlr_jt#jtysbbd_sds'']}''),if({calType}==0,if({P[sdsdyjts]}==false,0,{Q[dqsds_sqlr_jt#jtysbbd_jts]}),{Q[dqsds_sqlr_jt#jtysbbd_sds]}))');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1567262377328514048;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1567262377328514048,1532683517396254720,'number',' ',1567262377328514048,'A','CN-BBXGZ-000000543','比对类型=审定比对?0:{Q[税前利润（集团）#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_sqlr_jt#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1567262711278998528;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1567262711278998528,1532683517396254720,'number',' ',1567262711278998528,'A','CN-BBXGZ-000000545','比对类型=审定比对?0:{Q[税前利润（集团）#汇缴数]} - {Q[税前利润（集团）#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_sqlr_jt#jtysbbd_hjs]} - {Q[dqsds_sqlr_jt#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1567265601591071744;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1567265601591071744,1532683517396254720,'number',' ',1567265601591071744,'A','CN-BBXGZ-000000549','比对类型=审定比对?0:{Q[GAAP调整项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_gaaptz_cyxm#jtysbbd_sds]})');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1567266004437193728;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1567266004437193728,1532683517396254720,'number',' ',1567266004437193728,'A','CN-BBXGZ-000000551','比对类型=审定比对?0:{Q[GAAP调整项目#汇缴数]} - {Q[GAAP调整项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'if({P[comparisontype]}==''sdbd'',0,{Q[dqsds_gaaptz_cyxm#jtysbbd_hjs]} - {Q[dqsds_gaaptz_cyxm#jtysbbd_sds]})');



-- 要删除的模板关联取数规则
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1566714868445233152;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1566723446895820800;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1566782279492059136;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1566905471669900288;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1567248881727984640;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1567250018803389440;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1567257551177782272;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1567259035441714176;
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1567265119220945920;


-- 新增取数规则 + 模板关联取数规则
DELETE FROM t_tpo_rule_fetch WHERE FID = 1773987399421194240;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1773987399421194240,1532683517396254720,'number',' ',1773987399421194240,'A','CN-BBXGZ-000139834','{P[永久性差异项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'{P[dqsds_yjxcy_cyxm#jtysbbd_sds]}');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1773991297682951168;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1773991297682951168,1532683517396254720,'number',' ',1773991297682951168,'A','CN-BBXGZ-000139835','{P[暂时性差异项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'{P[dqsds_zsxcy_cyxm#jtysbbd_sds]}');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1774012110733635584;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1774012110733635584,1532683517396254720,'number',' ',1774012110733635584,'A','CN-BBXGZ-000139836','{P[境内税额减免项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'{P[dqsds_jnsejm_xm#jtysbbd_sds]}');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1774018011272236032;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1774018011272236032,1532683517396254720,'number',' ',1774018011272236032,'A','CN-BBXGZ-000139837','{P[境外税额抵免项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'{P[dqsds_jwsedm_xm#jtysbbd_sds]}');
DELETE FROM t_tpo_rule_fetch WHERE FID = 1774034215546309632;
INSERT INTO t_tpo_rule_fetch(FID,FMODELID,FDATATYPE,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCREATORID,FFORMULA) VALUES (1774034215546309632,1532683517396254720,'number',' ',1774034215546309632,'A','CN-BBXGZ-000139838','{P[GAAP调整项目#审定数]}',{ts'2023-09-14  00:00:00'},1737581019143598080,'1',{ts'2023-09-14  00:00:00'},'BBXGZ',1737581019143598080,'{P[dqsds_gaaptz_cyxm#jtysbbd_sds]}');

DELETE FROM t_tpo_rule_fetch_l WHERE FPKID = '3JX+XUDVGIXZ';
INSERT INTO t_tpo_rule_fetch_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1773987399421194240,'3JX+XUDVGIXZ','zh_CN','{P[永久性差异项目#审定数]}');
DELETE FROM t_tpo_rule_fetch_l WHERE FPKID = '3JX/N898HPOR';
INSERT INTO t_tpo_rule_fetch_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1773991297682951168,'3JX/N898HPOR','zh_CN','{P[暂时性差异项目#审定数]}');
DELETE FROM t_tpo_rule_fetch_l WHERE FPKID = '3JX3IX5M8DKB';
INSERT INTO t_tpo_rule_fetch_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1774012110733635584,'3JX3IX5M8DKB','zh_CN','{P[境内税额减免项目#审定数]}');
DELETE FROM t_tpo_rule_fetch_l WHERE FPKID = '3JX4MX1B51XS';
INSERT INTO t_tpo_rule_fetch_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1774018011272236032,'3JX4MX1B51XS','zh_CN','{P[境外税额抵免项目#审定数]}');
DELETE FROM t_tpo_rule_fetch_l WHERE FPKID = '3JX7O+6AZDHN';
INSERT INTO t_tpo_rule_fetch_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1774034215546309632,'3JX7O+6AZDHN','zh_CN','{P[GAAP调整项目#审定数]}');

DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1773987555088714752;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1773987555088714752,1532683517396254720,{ts'2023-09-14  00:00:00'},1565354948513056788,1773987399421194240,1560025098721903616,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1773992724325003264;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1773992724325003264,1532683517396254720,{ts'2023-09-14  00:00:00'},1565354948513056778,1773991297682951168,1560025098721903616,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1774012855289704448;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1774012855289704448,1532683517396254720,{ts'2023-09-14  00:00:00'},1565357858345011201,1774012110733635584,1560025098721903616,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1774018679953345536;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1774018679953345536,1532683517396254720,{ts'2023-09-14  00:00:00'},1565357858345011222,1774018011272236032,1560025098721903616,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1774063800832712704;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1774063800832712704,1532683517396254720,{ts'2023-09-14  00:00:00'},1565357858345011201,1774012110733635584,1560023403006739456,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1774064827279564800;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1774064827279564800,1532683517396254720,{ts'2023-09-14  00:00:00'},1565357858345011222,1774018011272236032,1560023403006739456,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1774034900518095872;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1774034900518095872,1532683517396254720,{ts'2023-09-14  00:00:00'},1566917193080656898,1774034215546309632,1560023403006739456,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1774039244231368704;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1774039244231368704,1532683517396254720,{ts'2023-09-14  00:00:00'},1565354948513056788,1773987399421194240,1560023403006739456,1737581019143598080);
DELETE FROM t_tpo_template_rule_fetch WHERE FID = 1774041255542743040;
INSERT INTO t_tpo_template_rule_fetch(FID,FMODELID,FCREATETIME,FREPORTITEMID,FFORMULAID,FTEMPLATEID,FCREATORID) VALUES (1774041255542743040,1532683517396254720,{ts'2023-09-14  00:00:00'},1565354948513056778,1773991297682951168,1560023403006739456,1737581019143598080);

-- 新增列维
DELETE FROM t_tpo_col_member WHERE FID = 1771758379476221952;
INSERT INTO t_tpo_col_member(FID,FDATATYPE,FDIMENSION,FMASTERID,FSTATUS,FPARENTID,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FISLEAF,FMINLENGTH,FMODEL,FREMARK,FMODIFYTIME,FMAXLENGTH,FFORMAT,FLEVEL,FSYSPRESET,FCREATORID,FLONGNUMBER) VALUES (1771758379476221952,'string',1477594945425507328,1771758379476221952,'C',1489132751239206912,'comparisontype','比对类型',{ts'2023-09-11  00:00:00'},1737581019143598080,'1','1',0,1532683517396254720,' ',{ts'2023-09-11  00:00:00'},0,' ',2,'0',1737581019143598080,'nsrxx.comparisontype');
DELETE FROM t_tpo_col_member_l WHERE FPKID = '3JMAF/3ADSYN';
INSERT INTO t_tpo_col_member_l(FID,FPKID,FLOCALEID,FREMARK,FFULLNAME,FNAME) VALUES (1771758379476221952,'3JMAF/3ADSYN','zh_CN',' ','底稿体系纳税人信息.比对类型','比对类型');
DELETE FROM t_tpo_col_member_l WHERE FPKID = '3JMAF/3ADSYO';
INSERT INTO t_tpo_col_member_l(FID,FPKID,FLOCALEID,FREMARK,FFULLNAME,FNAME) VALUES (1771758379476221952,'3JMAF/3ADSYO','zh_TW',' ',' ','比對類型');

-- 新增报表项
DELETE FROM t_tpo_report_item WHERE FID = 1771759244199100416;
INSERT INTO t_tpo_report_item(FID,FMODELID,FMASTERID,FSTATUS,FNUMBER,FNAME,FLONGNAME,FCREATETIME,FROWID,FMODIFIERID,FENABLE,FMODIFYTIME,FFCOLUMNID,FCREATORID) VALUES (1771759244199100416,1532683517396254720,0,'C','tpo_declare_main_tsd#comparisontype','底稿体系公共行维成员#比对类型','底稿体系公共行维成员.底稿体系公共行维成员#底稿体系纳税人信息.比对类型',{ts'2023-09-11  00:00:00'},1549194510142420992,1737581019143598080,'1',{ts'2023-09-11  00:00:00'},1771758379476221952,1737581019143598080);
DELETE FROM t_tpo_report_item_l WHERE FPKID = '3JMAL=RYQN58';
INSERT INTO t_tpo_report_item_l(FID,FPKID,FLOCALEID,FNAME,FLONGNAME) VALUES (1771759244199100416,'3JMAL=RYQN58','zh_CN','底稿体系公共行维成员#比对类型','底稿体系公共行维成员.底稿体系公共行维成员#底稿体系纳税人信息.比对类型');

-- 新增模板报表关联项
DELETE FROM t_tpo_temp_rep_relation WHERE FENTRYID = 1771759244652085248;
INSERT INTO t_tpo_temp_rep_relation(FID,FREPORTITEMID,FENTRYID,FSEQ,FROWCOL) VALUES (1560025098721903616,1771759244199100416,1771759244652085248,130,'tpo_declare_main_tsd#comparisontype');
DELETE FROM t_tpo_temp_rep_relation WHERE FENTRYID = 1773849987747399680;
INSERT INTO t_tpo_temp_rep_relation(FID,FREPORTITEMID,FENTRYID,FSEQ,FROWCOL) VALUES (1560023403006739456,1771759244199100416,1773849987747399680,152,'tpo_declare_main_tsd#comparisontype');

-- 新增样式规则
DELETE FROM t_tpo_rule_style WHERE FID = 1771761549547962368;
INSERT INTO t_tpo_rule_style(FID,FMODELID,FDESCRIPTION,FMASTERID,FSTATUS,FNUMBER,FNAME,FCREATETIME,FMODIFIERID,FENABLE,FMODIFYTIME,FFITTYPE,FCELLTYPE,FFORMULA,FCREATORID) VALUES (1771761549547962368,1532683517396254720,'比对类型下拉列表',1771761549547962368,'A','CN-TYXGZ-000000021','比对类型下拉列表',{ts'2023-09-11  00:00:00'},1737581019143598080,'1',{ts'2023-09-11  00:00:00'},'TYXGZ','2','[{"val":"sdbd","text":"审定比对"},{"val":"hjbd","text":"汇缴比对"},{"val":"sdhjbd","text":"审定汇缴比对"}]',1737581019143598080);
DELETE FROM t_tpo_rule_style_l WHERE FPKID = '3JMB02Z=QXEP';
INSERT INTO t_tpo_rule_style_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1771761549547962368,'3JMB02Z=QXEP','zh_CN','比对类型下拉列表');

-- 新增模板样式规则关联
DELETE FROM t_tpo_template_rule_style WHERE FID = 1771762042068304896;
INSERT INTO t_tpo_template_rule_style(FID,FMODELID,FCREATETIME,FREPORTITEMID,FTEMPLATEID,FCREATORID,FSTYLEID) VALUES (1771762042068304896,1532683517396254720,{ts'2023-09-11  00:00:00'},1771759244199100416,1560025098721903616,1737581019143598080,1771761549547962368);
DELETE FROM t_tpo_template_rule_style WHERE FID = 1773850657359520768;
INSERT INTO t_tpo_template_rule_style(FID,FMODELID,FCREATETIME,FREPORTITEMID,FTEMPLATEID,FCREATORID,FSTYLEID) VALUES (1773850657359520768,1532683517396254720,{ts'2023-09-14  00:00:00'},1771759244199100416,1560023403006739456,1737581019143598080,1771761549547962368);
