带息债务统计报表修改

This commit is contained in:
root 2025-11-30 14:21:06 +08:00
parent 456d3e43d1
commit 08da4a3a6d
2 changed files with 497 additions and 22 deletions

View File

@ -28,6 +28,7 @@ import kd.bos.orm.query.QFilter;
import kd.bos.report.ReportList;
import kd.bos.report.ReportShowParameter;
import kd.bos.report.events.CreateColumnEvent;
import kd.bos.report.events.SummaryEvent;
import kd.bos.report.filter.ReportFilter;
import kd.bos.report.plugin.AbstractReportFormPlugin;
import kd.bos.report.proxy.ReportListProxy;
@ -65,14 +66,18 @@ public class InterestBearingFromListPlugin extends AbstractReportFormPlugin impl
if(e.getChangeSet()[0].getNewValue().equals("datagp8")){
//数据汇总 不显示其他日期 只显示日期字段
this.getView().setVisible(true,"shkd_bizdate");
this.getView().setVisible(false,"shkd_startintdatecase","shkd_startintdateend","shkd_expiredatecase","shkd_expiredateend","shkd_datetype"
this.getView().setVisible(false,"shkd_year","shkd_startintdatecase","shkd_startintdateend","shkd_expiredatecase","shkd_expiredateend","shkd_datetype"
,"shkd_ejcompany","shkd_rzzt","shkd_zqrzh","shkd_rzpz","shkd_finproduct","shkd_mulcombofield","shkd_mulcombofield1","shkd_dybbkmmc","shkd_guaranteeway");
}else if(e.getChangeSet()[0].getNewValue().equals("data1")){
this.getView().setVisible(false,"shkd_bizdate");
this.getView().setVisible(true,"shkd_year","shkd_startintdatecase","shkd_startintdateend","shkd_expiredatecase","shkd_expiredateend","shkd_datetype"
,"shkd_ejcompany","shkd_rzzt","shkd_zqrzh","shkd_rzpz","shkd_finproduct","shkd_mulcombofield","shkd_mulcombofield1","shkd_dybbkmmc","shkd_guaranteeway");
}else{
this.getView().setVisible(false,"shkd_bizdate");
this.getView().setVisible(false,"shkd_year","shkd_bizdate");
this.getView().setVisible(true,"shkd_startintdatecase","shkd_startintdateend","shkd_expiredatecase","shkd_expiredateend","shkd_datetype"
,"shkd_ejcompany","shkd_rzzt","shkd_zqrzh","shkd_rzpz","shkd_finproduct","shkd_mulcombofield","shkd_mulcombofield1","shkd_dybbkmmc","shkd_guaranteeway");
}
ReportFilter filter = this.getView().getControl("reportfilterap");//调用页面的自动查询
ReportFilter filter = this.getView().getControl("reportfilterap");//调用页面的自动查询
filter.search();
}
}
@ -231,4 +236,23 @@ public class InterestBearingFromListPlugin extends AbstractReportFormPlugin impl
}
}
}
@Override
public void setFloatButtomData(List<SummaryEvent> summaryEvents) {
Object dataSel = this.getModel().getValue("shkd_datasel"); //数据查询维度
if(dataSel == null || dataSel.toString().equals("data1")){
for(SummaryEvent event : summaryEvents){
if(event.getColumnName().equals("drawamount") || event.getColumnName().contains("selyear")){
BigDecimal sumAmt = ((BigDecimal)event.getSrcSummaryValue()).setScale(2,RoundingMode.HALF_UP);
event.setFormatSummaryValue(sumAmt);
break;
}
if(event.getColumnName().equals("zhrzcb") || event.getColumnName().equals("zhrzqx")){
BigDecimal decimal = ((BigDecimal)event.getSrcSummaryValue()).setScale(6,RoundingMode.HALF_UP);
event.setFormatSummaryValue(decimal);
break;
}
}
}
}
}

View File

@ -36,6 +36,7 @@ import java.util.*;
*/
public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
public static final SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd");
public static final SimpleDateFormat sdfDateYear = new SimpleDateFormat("yyyy");
private static final Log logger = LogFactory.getLog(InterestBearingRptListPlugin.class);
/**
@ -67,6 +68,7 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
FilterItemInfo blxmFilter = filterInfo.getFilterItem("shkd_blxm"); //表列项目
FilterItemInfo dybbkmmcFilter = filterInfo.getFilterItem("shkd_dybbkmmc"); //对应报表科目项目
FilterItemInfo guaranteewayFilter = filterInfo.getFilterItem("shkd_guaranteeway"); //用信方式担保
FilterItemInfo yearFilter = filterInfo.getFilterItem("shkd_year"); //年份
//下拉列表值查询不同类型数据
String amtUnit = null; //金额单位 yuan/qyuan/wyuan/bwyuan/yyuan
@ -87,6 +89,7 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
String whereBlxm = ""; //表列项目
String whereDybbkmmc = ""; //对应报表科目项目
String whereGuaranteeway = ""; //用信方式担保
String year = null; //年份
// 使用过滤条件创建QFilter
if(bizDateFilter != null && bizDateFilter.getValue() != null){
@ -147,7 +150,7 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
if(finproductFilter != null && finproductFilter.getValue() != null){
DynamicObjectCollection rzpzmxColl = (DynamicObjectCollection) finproductFilter.getValue();
for(int i = 0;i<rzpzmxColl.size();i++){
whereFinproduct += ",'"+rzpzmxColl.get(i).getString("id")+"'";
whereFinproduct += ",'"+rzpzmxColl.get(i).getString("id")+"'";
}
}
//融资渠道
@ -170,6 +173,12 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
String guaranteewayStr = guaranteewayFilter.getValue().toString();
whereGuaranteeway += "'"+(guaranteewayStr.substring(1,guaranteewayStr.length()-1)).replace(",","','")+"'";
}
//年份
if(yearFilter != null && yearFilter.getValue() != null){
year = yearFilter.getValue().toString();
}else{
year = sdfDateYear.format(new Date()); //日期年份
}
//报表查询数据返回
DataSet selData = null;
/**
@ -178,7 +187,7 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
if(dataSel != null && dataSel.equals("datagp8")){
selData = selDataRows1(amtUnit, bizDate);
}else{
selData = selDataRows(amtUnit, dateType, dataSel, startDateCase, startDateEnd, expireDateCase, expireDateEnd,whereEjCom,whereRzzt,whereZqrzh,whereRzpz,whereFinproduct,whereRzqd,whereBlxm,whereDybbkmmc,whereGuaranteeway);
selData = selDataRows(amtUnit, dateType, dataSel, startDateCase, startDateEnd, expireDateCase, expireDateEnd,whereEjCom,whereRzzt,whereZqrzh,whereRzpz,whereFinproduct,whereRzqd,whereBlxm,whereDybbkmmc,whereGuaranteeway,year);
}
return selData;
}
@ -249,7 +258,7 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
" \tWHEN (t1.fk_shkd_blxm == '01') THEN '权益融资'\n" +
" \tWHEN (t1.fk_shkd_blxm == '02') THEN '债务融资'\n" +
" \tELSE ' '\n" +
" END shkd_blxm,ISNULL(t4.fname,'无') shkd_rzpzmx,sum(t1.fnotrepayamount) sumamt\n" +
" END shkd_blxm,ISNULL(t4.fname,'无') shkd_rzpzmx,sum(t1.fnotrepayamount) sumamt\n" +
" FROM t_cfm_loanbill t1 \n" +
" INNER JOIN t_cfm_loanbill_e t2 ON t1.fid = t2.FID \n" +
" LEFT JOIN t_cfm_financingvarieties t4 ON t1.ffinproductid = t4.fid\n" +
@ -365,7 +374,42 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
* @return
*/
private DataSet selDataRows(String amtUnit, String dateType, String dataSel, String startDateCase, String startDateEnd, String expireDateCase, String expireDateEnd,
String whereEjCom,String whereRzzt,String whereZqrzh,String whereRzpz,String whereFinproduct,String whereRzqd,String whereBlxm,String whereDybbkmmc,String whereGuaranteeway) {
String whereEjCom,String whereRzzt,String whereZqrzh,String whereRzpz,String whereFinproduct,String whereRzqd,String whereBlxm,String whereDybbkmmc,String whereGuaranteeway,
String year) {
//年初未还金额
String selYearNcAmt = "(SELECT sum(sum(isnull(s1.fnotrepayamount,0))) yearwhamt\n" +
"FROM t_cfm_loanbill s1 \n" +
"INNER JOIN t_cfm_loanbill_e s2 ON s1.fid = s2.FID \n" +
"WHERE (s2.floantype = 'loan' OR s2.floantype = 'sl' OR s2.floantype = 'bond') \n" +
"AND (s1.fdrawtype = 'drawed' OR s1.fdrawtype = 'partpayment') \n" +
// "AND t1.FBILLNO = s1.FBILLNO \n" +
"GROUP BY to_char(s2.fstartintdate,'yyyy') having to_char(s2.fstartintdate,'yyyy') < '"+year+"')";
//年度新增金额
String selYearAddAmt = "(SELECT sum(isnull(s1.fdrawamount,0))\n" +
"FROM t_cfm_loanbill s1 \n" +
"INNER JOIN t_cfm_loanbill_e s2 ON s1.fid = s2.FID \n" +
"WHERE (s2.floantype = 'loan' OR s2.floantype = 'sl' OR s2.floantype = 'bond') \n" +
"AND (s1.fdrawtype = 'drawed' OR s1.fdrawtype = 'partpayment') \n" +
// "AND t1.FBILLNO = s1.FBILLNO \n" +
"GROUP BY to_char(s2.fstartintdate,'yyyy')having to_char(s2.fstartintdate,'yyyy') = '"+year+"')";
//年度已还金额
String selYearYhkAmt = "(SELECT sum(isnull(s5.frepayamount,0)) sumamt\n" +
"FROM t_cfm_loanbill s1 \n" +
"INNER JOIN t_cfm_loanbill_e s2 ON s1.fid = s2.FID \n" +
"inner JOIN t_cfm_repaymentbill_loans s5 ON s1.fid = s5.floanbillid\n" +
"inner JOIN t_cfm_repaymentbill s6 ON s5.fid = s6.fid\n" +
"WHERE (s2.floantype = 'loan' OR s2.floantype = 'sl' OR s2.floantype = 'bond') \n" +
"AND (s1.fdrawtype = 'drawed' OR s1.fdrawtype = 'partpayment') \n" +
// "AND t1.FBILLNO = s1.FBILLNO \n" +
"GROUP BY to_char(s6.fbizdate,'yyyy') having to_char(s6.fbizdate,'yyyy') = '"+year+"')";
//年末未还金额
String selYearNmAmt = "(SELECT sum(sum(isnull(s1.fnotrepayamount,0)))\n" +
"FROM t_cfm_loanbill s1 \n" +
"INNER JOIN t_cfm_loanbill_e s2 ON s1.fid = s2.FID \n" +
"WHERE (s2.floantype = 'loan' OR s2.floantype = 'sl' OR s2.floantype = 'bond') \n" +
"AND (s1.fdrawtype = 'drawed' OR s1.fdrawtype = 'partpayment') \n" +
// "AND t1.FBILLNO = s1.FBILLNO \n" +
"GROUP BY to_char(s2.fstartintdate,'yyyy') having to_char(s2.fstartintdate,'yyyy') > '"+year+"')";
DataSet selData = null;
//业务单元数据集
DataSet orgDataSet = QueryServiceHelper.queryDataSet(this.getClass().getSimpleName(),"bos_org","id,number as orgnumber,name as orgname", null, null);
@ -411,18 +455,148 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
//计算元
if(amtUnit == null || amtUnit.equals("yuan")){
//
sql +=" "+selYearNcAmt+" selyearncamt,\n" ; //年初未还金额
sql +=" "+selYearAddAmt+" selyearaddamt,\n" ;//年度新增金额
sql +=" "+selYearYhkAmt+" selyearyhkamt,\n" ;//年度已还金额
sql +=" "+selYearNmAmt+" selyearnmamt,\n" ;//年末未还金额
sql +=" "+selBjAmt(" = '2025'")+" selbj2025,\n" ;//2025债务本金
sql +=" "+selLxAmt(" = '2025'")+" sellx2025,\n" ;//2025债务利息
sql +=" "+selBjAmt(" = '2026'")+" selbj2026,\n" ;//2026债务本金
sql +=" "+selLxAmt(" = '2026'")+" sellx2026,\n" ;//2026债务利息
sql +=" "+selBjAmt(" = '2027'")+" selbj2027,\n" ;//2027债务本金
sql +=" "+selLxAmt(" = '2027'")+" sellx2027,\n" ;//2027债务利息
sql +=" "+selBjAmt(" = '2028'")+" selbj2028,\n" ;//2028债务本金
sql +=" "+selLxAmt(" = '2028'")+" sellx2028,\n" ;//2028债务利息
sql +=" "+selBjAmt(" = '2029'")+" selbj2029,\n" ;//2029债务本金
sql +=" "+selLxAmt(" = '2029'")+" sellx2029,\n" ;//2029债务利息
sql +=" "+selBjAmt(" = '2030'")+" selbj2030,\n" ;//2030债务本金
sql +=" "+selLxAmt(" = '2030'")+" sellx2030,\n" ;//2030债务利息
sql +=" "+selBjAmt(" = '2031'")+" selbj2031,\n" ;//2031债务本金
sql +=" "+selLxAmt(" = '2031'")+" sellx2031,\n" ;//2031债务利息
sql +=" "+selBjAmt(" = '2032'")+" selbj2032,\n" ;//2032债务本金
sql +=" "+selLxAmt(" = '2032'")+" sellx2032,\n" ;//2032债务利息
sql +=" "+selBjAmt(" = '2033'")+" selbj2033,\n" ;//2033债务本金
sql +=" "+selLxAmt(" = '2033'")+" sellx2033,\n" ;//2033债务利息
sql +=" "+selBjAmt(" = '2034'")+" selbj2034,\n" ;//2034债务本金
sql +=" "+selLxAmt(" = '2034'")+" sellx2034,\n" ;//2034债务利息
sql +=" "+selBjAmt(" >= '2035'")+" selbj2035,\n" ;//2035年之后债务本金
sql +=" "+selLxAmt(" >= '2035'")+" sellx2035,\n" ;//2035年之后债务利息
sql +=" isnull(t1.fdrawamount,0) drawamount,\n" ;
}else if(amtUnit.equals("qyuan")){
//千元
sql +=" "+selYearNcAmt+"/1000 selyearncamt,\n" ; //年初未还金额
sql +=" "+selYearAddAmt+"/1000 selyearaddamt,\n" ;//年度新增金额
sql +=" "+selYearYhkAmt+"/1000 selyearyhkamt,\n" ;//年度已还金额
sql +=" "+selYearNmAmt+"/1000 selyearnmamt,\n" ;//年末未还金额
sql +=" "+selBjAmt(" = '2025'")+"/1000 selbj2025,\n" ;//2025债务本金
sql +=" "+selLxAmt(" = '2025'")+"/1000 sellx2025,\n" ;//2025债务利息
sql +=" "+selBjAmt(" = '2026'")+"/1000 selbj2026,\n" ;//2026债务本金
sql +=" "+selLxAmt(" = '2026'")+"/1000 sellx2026,\n" ;//2026债务利息
sql +=" "+selBjAmt(" = '2027'")+"/1000 selbj2027,\n" ;//2027债务本金
sql +=" "+selLxAmt(" = '2027'")+"/1000 sellx2027,\n" ;//2027债务利息
sql +=" "+selBjAmt(" = '2028'")+"/1000 selbj2028,\n" ;//2028债务本金
sql +=" "+selLxAmt(" = '2028'")+"/1000 sellx2028,\n" ;//2028债务利息
sql +=" "+selBjAmt(" = '2029'")+"/1000 selbj2029,\n" ;//2029债务本金
sql +=" "+selLxAmt(" = '2029'")+"/1000 sellx2029,\n" ;//2029债务利息
sql +=" "+selBjAmt(" = '2030'")+"/1000 selbj2030,\n" ;//2030债务本金
sql +=" "+selLxAmt(" = '2030'")+"/1000 sellx2030,\n" ;//2030债务利息
sql +=" "+selBjAmt(" = '2031'")+"/1000 selbj2031,\n" ;//2031债务本金
sql +=" "+selLxAmt(" = '2031'")+"/1000 sellx2031,\n" ;//2031债务利息
sql +=" "+selBjAmt(" = '2032'")+"/1000 selbj2032,\n" ;//2032债务本金
sql +=" "+selLxAmt(" = '2032'")+"/1000 sellx2032,\n" ;//2032债务利息
sql +=" "+selBjAmt(" = '2033'")+"/1000 selbj2033,\n" ;//2033债务本金
sql +=" "+selLxAmt(" = '2033'")+"/1000 sellx2033,\n" ;//2033债务利息
sql +=" "+selBjAmt(" = '2034'")+"/1000 selbj2034,\n" ;//2034债务本金
sql +=" "+selLxAmt(" = '2034'")+"/1000 sellx2034,\n" ;//2034债务利息
sql +=" "+selBjAmt(" >= '2035'")+"/1000 selbj2035,\n" ;//2035年之后债务本金
sql +=" "+selLxAmt(" >= '2035'")+"/1000 sellx2035,\n" ;//2035年之后债务利息
sql +=" isnull(t1.fdrawamount,0)/1000 drawamount,\n" ;
}else if(amtUnit.equals("wyuan")){
//万元
sql +=" "+selYearNcAmt+"/10000 selyearncamt,\n" ; //年初未还金额
sql +=" "+selYearAddAmt+"/10000 selyearaddamt,\n" ;//年度新增金额
sql +=" "+selYearYhkAmt+"/10000 selyearyhkamt,\n" ;//年度已还金额
sql +=" "+selYearNmAmt+"/10000 selyearnmamt,\n" ;//年末未还金额
sql +=" "+selBjAmt(" = '2025'")+"/10000 selbj2025,\n" ;//2025债务本金
sql +=" "+selLxAmt(" = '2025'")+"/10000 sellx2025,\n" ;//2025债务利息
sql +=" "+selBjAmt(" = '2026'")+"/10000 selbj2026,\n" ;//2026债务本金
sql +=" "+selLxAmt(" = '2026'")+"/10000 sellx2026,\n" ;//2026债务利息
sql +=" "+selBjAmt(" = '2027'")+"/10000 selbj2027,\n" ;//2027债务本金
sql +=" "+selLxAmt(" = '2027'")+"/10000 sellx2027,\n" ;//2027债务利息
sql +=" "+selBjAmt(" = '2028'")+"/10000 selbj2028,\n" ;//2028债务本金
sql +=" "+selLxAmt(" = '2028'")+"/10000 sellx2028,\n" ;//2028债务利息
sql +=" "+selBjAmt(" = '2029'")+"/10000 selbj2029,\n" ;//2029债务本金
sql +=" "+selLxAmt(" = '2029'")+"/10000 sellx2029,\n" ;//2029债务利息
sql +=" "+selBjAmt(" = '2030'")+"/10000 selbj2030,\n" ;//2030债务本金
sql +=" "+selLxAmt(" = '2030'")+"/10000 sellx2030,\n" ;//2030债务利息
sql +=" "+selBjAmt(" = '2031'")+"/10000 selbj2031,\n" ;//2031债务本金
sql +=" "+selLxAmt(" = '2031'")+"/10000 sellx2031,\n" ;//2031债务利息
sql +=" "+selBjAmt(" = '2032'")+"/10000 selbj2032,\n" ;//2032债务本金
sql +=" "+selLxAmt(" = '2032'")+"/10000 sellx2032,\n" ;//2032债务利息
sql +=" "+selBjAmt(" = '2033'")+"/10000 selbj2033,\n" ;//2033债务本金
sql +=" "+selLxAmt(" = '2033'")+"/10000 sellx2033,\n" ;//2033债务利息
sql +=" "+selBjAmt(" = '2034'")+"/10000 selbj2034,\n" ;//2034债务本金
sql +=" "+selLxAmt(" = '2034'")+"/10000 sellx2034,\n" ;//2034债务利息
sql +=" "+selBjAmt(" >= '2035'")+"/10000 selbj2035,\n" ;//2035年之后债务本金
sql +=" "+selLxAmt(" >= '2035'")+"/10000 sellx2035,\n" ;//2035年之后债务利息
sql +=" isnull(t1.fdrawamount,0)/10000 drawamount,\n" ;
}else if(amtUnit.equals("bwyuan")){
//百万元
sql +=" "+selYearNcAmt+"/1000000 selyearncamt,\n" ; //年初未还金额
sql +=" "+selYearAddAmt+"/1000000 selyearaddamt,\n" ;//年度新增金额
sql +=" "+selYearYhkAmt+"/1000000 selyearyhkamt,\n" ;//年度已还金额
sql +=" "+selYearNmAmt+"/1000000 selyearnmamt,\n" ;//年末未还金额
sql +=" "+selBjAmt(" = '2025'")+"/1000000 selbj2025,\n" ;//2025债务本金
sql +=" "+selLxAmt(" = '2025'")+"/1000000 sellx2025,\n" ;//2025债务利息
sql +=" "+selBjAmt(" = '2026'")+"/1000000 selbj2026,\n" ;//2026债务本金
sql +=" "+selLxAmt(" = '2026'")+"/1000000 sellx2026,\n" ;//2026债务利息
sql +=" "+selBjAmt(" = '2027'")+"/1000000 selbj2027,\n" ;//2027债务本金
sql +=" "+selLxAmt(" = '2027'")+"/1000000 sellx2027,\n" ;//2027债务利息
sql +=" "+selBjAmt(" = '2028'")+"/1000000 selbj2028,\n" ;//2028债务本金
sql +=" "+selLxAmt(" = '2028'")+"/1000000 sellx2028,\n" ;//2028债务利息
sql +=" "+selBjAmt(" = '2029'")+"/1000000 selbj2029,\n" ;//2029债务本金
sql +=" "+selLxAmt(" = '2029'")+"/1000000 sellx2029,\n" ;//2029债务利息
sql +=" "+selBjAmt(" = '2030'")+"/1000000 selbj2030,\n" ;//2030债务本金
sql +=" "+selLxAmt(" = '2030'")+"/1000000 sellx2030,\n" ;//2030债务利息
sql +=" "+selBjAmt(" = '2031'")+"/1000000 selbj2031,\n" ;//2031债务本金
sql +=" "+selLxAmt(" = '2031'")+"/1000000 sellx2031,\n" ;//2031债务利息
sql +=" "+selBjAmt(" = '2032'")+"/1000000 selbj2032,\n" ;//2032债务本金
sql +=" "+selLxAmt(" = '2032'")+"/1000000 sellx2032,\n" ;//2032债务利息
sql +=" "+selBjAmt(" = '2033'")+"/1000000 selbj2033,\n" ;//2033债务本金
sql +=" "+selLxAmt(" = '2033'")+"/1000000 sellx2033,\n" ;//2033债务利息
sql +=" "+selBjAmt(" = '2034'")+"/1000000 selbj2034,\n" ;//2034债务本金
sql +=" "+selLxAmt(" = '2034'")+"/1000000 sellx2034,\n" ;//2034债务利息
sql +=" "+selBjAmt(" >= '2035'")+"/1000000 selbj2035,\n" ;//2035年之后债务本金
sql +=" "+selLxAmt(" >= '2035'")+"/1000000 sellx2035,\n" ;//2035年之后债务利息
sql +=" isnull(t1.fdrawamount,0)/1000000 drawamount,\n" ;
}else if(amtUnit.equals("yyuan")){
//亿元
sql +=" "+selYearNcAmt+"/100000000 selyearncamt,\n" ; //年初未还金额
sql +=" "+selYearAddAmt+"/100000000 selyearaddamt,\n" ;//年度新增金额
sql +=" "+selYearYhkAmt+"/100000000 selyearyhkamt,\n" ;//年度已还金额
sql +=" "+selYearNmAmt+"/100000000 selyearnmamt,\n" ;//年末未还金额
sql +=" "+selBjAmt(" = '2025'")+"/100000000 selbj2025,\n" ;//2025债务本金
sql +=" "+selLxAmt(" = '2025'")+"/100000000 sellx2025,\n" ;//2025债务利息
sql +=" "+selBjAmt(" = '2026'")+"/100000000 selbj2026,\n" ;//2026债务本金
sql +=" "+selLxAmt(" = '2026'")+"/100000000 sellx2026,\n" ;//2026债务利息
sql +=" "+selBjAmt(" = '2027'")+"/100000000 selbj2027,\n" ;//2027债务本金
sql +=" "+selLxAmt(" = '2027'")+"/100000000 sellx2027,\n" ;//2027债务利息
sql +=" "+selBjAmt(" = '2028'")+"/100000000 selbj2028,\n" ;//2028债务本金
sql +=" "+selLxAmt(" = '2028'")+"/100000000 sellx2028,\n" ;//2028债务利息
sql +=" "+selBjAmt(" = '2029'")+"/100000000 selbj2029,\n" ;//2029债务本金
sql +=" "+selLxAmt(" = '2029'")+"/100000000 sellx2029,\n" ;//2029债务利息
sql +=" "+selBjAmt(" = '2030'")+"/100000000 selbj2030,\n" ;//2030债务本金
sql +=" "+selLxAmt(" = '2030'")+"/100000000 sellx2030,\n" ;//2030债务利息
sql +=" "+selBjAmt(" = '2031'")+"/100000000 selbj2031,\n" ;//2031债务本金
sql +=" "+selLxAmt(" = '2031'")+"/100000000 sellx2031,\n" ;//2031债务利息
sql +=" "+selBjAmt(" = '2032'")+"/100000000 selbj2032,\n" ;//2032债务本金
sql +=" "+selLxAmt(" = '2032'")+"/100000000 sellx2032,\n" ;//2032债务利息
sql +=" "+selBjAmt(" = '2033'")+"/100000000 selbj2033,\n" ;//2033债务本金
sql +=" "+selLxAmt(" = '2033'")+"/100000000 sellx2033,\n" ;//2033债务利息
sql +=" "+selBjAmt(" = '2034'")+"/100000000 selbj2034,\n" ;//2034债务本金
sql +=" "+selLxAmt(" = '2034'")+"/100000000 sellx2034,\n" ;//2034债务利息
sql +=" "+selBjAmt(" >= '2035'")+"/100000000 selbj2035,\n" ;//2035年之后债务本金
sql +=" "+selLxAmt(" >= '2035'")+"/100000000 sellx2035,\n" ;//2035年之后债务利息
sql +=" isnull(t1.fdrawamount,0)/100000000 drawamount,\n" ;
}
sql +=" 0.01 sumamt,\n" ;
@ -535,11 +709,17 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
DataSet dataRes = DB.queryDataSet(this.getClass().getSimpleName(), DBRoute.of("fi"), selSql);//财务云
JoinDataSet join1 = dataRes.join(orgDataSet, JoinType.LEFT);//连接二级组织
DataSet dataRes1 = join1.on("shkd_ejgs","id").select(new String[]{"shkd_billno","orgname shkd_ejgs","orgid","shkd_zqrzh","textcreditor","shkd_rzpz1","shkd_rzpzmx",
"shkd_rzqd","shkd_blxm","shkd_dybbkmmc","term","xcday","xcdate","startintdate","expiredate","drawamount","sumamt","sumzhrzcb","sumzhrzqx","zhrzcb","zhrzqx","SubStr(guaranteeway, 1, LEN(guaranteeway)-2) guaranteeway",
"dbwkm","dbwname","lilv","remark"}).finish();
"shkd_rzqd","shkd_blxm","shkd_dybbkmmc","term","xcday","xcdate","startintdate","expiredate","selyearncamt+selyearaddamt-selyearyhkamt selyearncamt",
"selyearaddamt","selyearyhkamt","selyearnmamt","drawamount","sumamt","sumzhrzcb","sumzhrzqx","zhrzcb","zhrzqx","SubStr(guaranteeway, 1, LEN(guaranteeway)-2) guaranteeway",
"dbwkm","dbwname","lilv","remark",
"selbj2025","sellx2025","selbj2026","sellx2026","selbj2027","sellx2027","selbj2028","sellx2028","selbj2029","sellx2029","selbj2030","sellx2030",
"selbj2031","sellx2031","selbj2032","sellx2032","selbj2033","sellx2033","selbj2034","sellx2034","selbj2035","sellx2035"}).finish();
JoinDataSet join2 = dataRes1.join(orgDataSet, JoinType.LEFT);//连接融资主体
DataSet dataRes2 = join2.on("orgid","id").select(new String[]{"shkd_billno","shkd_ejgs","orgname orgid","shkd_zqrzh","textcreditor","shkd_rzpz1","shkd_rzpzmx","shkd_rzqd",
"shkd_blxm","shkd_dybbkmmc","term","xcday","xcdate","startintdate","expiredate","drawamount","sumamt","sumzhrzcb","sumzhrzqx","zhrzcb","zhrzqx","guaranteeway","dbwkm","dbwname","lilv","remark"}).finish();
"shkd_blxm","shkd_dybbkmmc","term","xcday","xcdate","startintdate","expiredate","drawamount","selyearncamt",
"selyearaddamt","selyearyhkamt","selyearnmamt","sumamt","sumzhrzcb","sumzhrzqx","zhrzcb","zhrzqx","guaranteeway","dbwkm","dbwname","lilv","remark",
"selbj2025","sellx2025","selbj2026","sellx2026","selbj2027","sellx2027","selbj2028","sellx2028","selbj2029","sellx2029","selbj2030","sellx2030",
"selbj2031","sellx2031","selbj2032","sellx2032","selbj2033","sellx2033","selbj2034","sellx2034","selbj2035","sellx2035"}).finish();
//根据结果集重新计算两个日期相差的格式
DynamicObjectCollection srcCollection = ORM.create().toPlainDynamicObjectCollection(dataRes2.copy());
BigDecimal sumCb = BigDecimal.ZERO; //综合融资成本
@ -663,6 +843,36 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
return selData;
}
/**
* 根据年份查询本金
* @return
*/
public String selBjAmt(String wheYear) {
String sql = "(SELECT sum(isnull(t3.fexdrawamount,0))\n" +
"FROM t_cfm_loanbill t1 \n" +
"INNER JOIN t_cfm_loanbill_e t2 ON t1.fid = t2.FID \n" +
"LEFT JOIN t_cfm_loanbill_rp_entry t3 ON t1.fid = t3.fid\n" +
"WHERE (t2.floantype = 'loan' OR t2.floantype = 'sl' OR t2.floantype = 'bond') \n" +
"AND (t1.fdrawtype = 'drawed' OR t1.fdrawtype = 'partpayment') \n" +
"and to_char(t3.fexrepaymentdate,'yyyy') "+wheYear+")";
return sql;
}
/**
* 根据年份查询利息
* @return
*/
public String selLxAmt(String wheYear) {
String sql = "(SELECT sum(isnull(t3.finterestcalamount,0))\n" +
"FROM t_cfm_loanbill t1 \n" +
"INNER JOIN t_cfm_loanbill_e t2 ON t1.fid = t2.FID \n" +
"LEFT JOIN t_cfm_loanbill_ic_entry t3 ON t1.fid = t3.fid\n" +
"WHERE (t2.floantype = 'loan' OR t2.floantype = 'sl' OR t2.floantype = 'bond') \n" +
"AND (t1.fdrawtype = 'drawed' OR t1.fdrawtype = 'partpayment') \n" +
"and to_char(t3.finteresdate,'yyyy') "+wheYear+")";
return sql;
}
/**
* 查询结果实体转换数据结果集
* @param finalTemp
@ -709,11 +919,13 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
// dataTypes.add(bigDecimalType);
// } else if (field.contains("gdebtcurrency")) {
// dataTypes.add(anyType);
// } else if (field.equals("shkd_gdebtorg") || field.contains("gsrcbillid")) {
// dataTypes.add(longType);
// } else {
dataTypes.add(stringType);
// }
// } else
if (field.equals("drawamount") || field.equals("zhrzcb") || field.equals("zhrzqx")
|| field.contains("selyear") || field.contains("sellx") || field.contains("selbj")) {
dataTypes.add(bigDecimalType);
} else {
dataTypes.add(stringType);
}
}
logger.info("dataTypes数据类型{}", dataTypes);
@ -782,24 +994,255 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
}
columns.add(createReportColumn("startintdate", "text", "借款时间"));
columns.add(createReportColumn("expiredate", "text", "到期时间"));
//年本金利息相关字段
ReportColumnGroup bjlxEfg = new ReportColumnGroup();
bjlxEfg.setCaption(new LocaleString("还本付息计划"));
bjlxEfg.setFieldKey("yearbjlxamt");
DecimalReportColumn bj2025 = new DecimalReportColumn();
DecimalReportColumn lx2025 = new DecimalReportColumn();
DecimalReportColumn bj2026 = new DecimalReportColumn();
DecimalReportColumn lx2026 = new DecimalReportColumn();
DecimalReportColumn bj2027 = new DecimalReportColumn();
DecimalReportColumn lx2027 = new DecimalReportColumn();
DecimalReportColumn bj2028 = new DecimalReportColumn();
DecimalReportColumn lx2028 = new DecimalReportColumn();
DecimalReportColumn bj2029 = new DecimalReportColumn();
DecimalReportColumn lx2029 = new DecimalReportColumn();
DecimalReportColumn bj2030 = new DecimalReportColumn();
DecimalReportColumn lx2030 = new DecimalReportColumn();
DecimalReportColumn bj2031 = new DecimalReportColumn();
DecimalReportColumn lx2031 = new DecimalReportColumn();
DecimalReportColumn bj2032 = new DecimalReportColumn();
DecimalReportColumn lx2032 = new DecimalReportColumn();
DecimalReportColumn bj2033 = new DecimalReportColumn();
DecimalReportColumn lx2033 = new DecimalReportColumn();
DecimalReportColumn bj2034 = new DecimalReportColumn();
DecimalReportColumn lx2034 = new DecimalReportColumn();
DecimalReportColumn bj2035 = new DecimalReportColumn();
DecimalReportColumn lx2035 = new DecimalReportColumn();
//年条件金额相关字段
ReportColumnGroup yearAmtEfg = new ReportColumnGroup();
yearAmtEfg.setCaption(new LocaleString("债务余额(对外债务、不含权益工具)"));
yearAmtEfg.setFieldKey("yearamt");
DecimalReportColumn ncAmt = new DecimalReportColumn();
DecimalReportColumn yaddAmt = new DecimalReportColumn();
DecimalReportColumn yhkAmt = new DecimalReportColumn();
DecimalReportColumn nmAmt = new DecimalReportColumn();
//金额
DecimalReportColumn amt = new DecimalReportColumn();
if(amtUnit == null || amtUnit.equals("yuan")){
//
columns.add(createReportColumn("drawamount", "amount", "金额(元)"));
ncAmt = createDecReportColumn("selyearncamt", "amount", "年初余额(元)");
yaddAmt = createDecReportColumn("selyearaddamt", "amount", "本年新增(元)");
yhkAmt = createDecReportColumn("selyearyhkamt", "amount", "本年减少(元)");
nmAmt = createDecReportColumn("selyearnmamt", "amount", "年末余额(元)");
bj2025 = createDecReportColumn("selbj2025", "amount", "2025债务本金");
lx2025 = createDecReportColumn("sellx2025", "amount", "2025债务利息");
bj2026 = createDecReportColumn("selbj2026", "amount", "2026债务本金");
lx2026 = createDecReportColumn("sellx2026", "amount", "2026债务利息");
bj2027 = createDecReportColumn("selbj2027", "amount", "2027债务本金");
lx2027 = createDecReportColumn("sellx2027", "amount", "2027债务利息");
bj2028 = createDecReportColumn("selbj2028", "amount", "2028债务本金");
lx2028 = createDecReportColumn("sellx2028", "amount", "2028债务利息");
bj2029 = createDecReportColumn("selbj2029", "amount", "2029债务本金");
lx2029 = createDecReportColumn("sellx2029", "amount", "2029债务利息");
bj2030 = createDecReportColumn("selbj2030", "amount", "2030债务本金");
lx2030 = createDecReportColumn("sellx2030", "amount", "2030债务利息");
bj2031 = createDecReportColumn("selbj2031", "amount", "2031债务本金");
lx2031 = createDecReportColumn("sellx2031", "amount", "2031债务利息");
bj2032 = createDecReportColumn("selbj2032", "amount", "2032债务本金");
lx2032 = createDecReportColumn("sellx2032", "amount", "2032债务利息");
bj2033 = createDecReportColumn("selbj2033", "amount", "2033债务本金");
lx2033 = createDecReportColumn("sellx2033", "amount", "2033债务利息");
bj2034 = createDecReportColumn("selbj2034", "amount", "2034债务本金");
lx2034 = createDecReportColumn("sellx2034", "amount", "2034债务利息");
bj2035 = createDecReportColumn("selbj2035", "amount", "2035债务本金");
lx2035 = createDecReportColumn("sellx2035", "amount", "2035债务利息");
amt = createDecReportColumn("drawamount", "amount", "金额(元)");
}else if(amtUnit.equals("qyuan")){
//千元
columns.add(createReportColumn("drawamount", "amount", "金额(千元)"));
ncAmt = createDecReportColumn("selyearncamt", "amount", "年初余额(千元)");
yaddAmt = createDecReportColumn("selyearaddamt", "amount", "本年新增(千元)");
yhkAmt = createDecReportColumn("selyearyhkamt", "amount", "本年减少(千元)");
nmAmt = createDecReportColumn("selyearnmamt", "amount", "年末余额(千元)");
bj2025 = createDecReportColumn("selbj2025", "amount", "2025债务本金千元");
lx2025 = createDecReportColumn("sellx2025", "amount", "2025债务利息千元");
bj2026 = createDecReportColumn("selbj2026", "amount", "2026债务本金千元");
lx2026 = createDecReportColumn("sellx2026", "amount", "2026债务利息千元");
bj2027 = createDecReportColumn("selbj2027", "amount", "2027债务本金千元");
lx2027 = createDecReportColumn("sellx2027", "amount", "2027债务利息千元");
bj2028 = createDecReportColumn("selbj2028", "amount", "2028债务本金千元");
lx2028 = createDecReportColumn("sellx2028", "amount", "2028债务利息千元");
bj2029 = createDecReportColumn("selbj2029", "amount", "2029债务本金千元");
lx2029 = createDecReportColumn("sellx2029", "amount", "2029债务利息千元");
bj2030 = createDecReportColumn("selbj2030", "amount", "2030债务本金千元");
lx2030 = createDecReportColumn("sellx2030", "amount", "2030债务利息千元");
bj2031 = createDecReportColumn("selbj2031", "amount", "2031债务本金千元");
lx2031 = createDecReportColumn("sellx2031", "amount", "2031债务利息千元");
bj2032 = createDecReportColumn("selbj2032", "amount", "2032债务本金千元");
lx2032 = createDecReportColumn("sellx2032", "amount", "2032债务利息千元");
bj2033 = createDecReportColumn("selbj2033", "amount", "2033债务本金千元");
lx2033 = createDecReportColumn("sellx2033", "amount", "2033债务利息千元");
bj2034 = createDecReportColumn("selbj2034", "amount", "2034债务本金千元");
lx2034 = createDecReportColumn("sellx2034", "amount", "2034债务利息千元");
bj2035 = createDecReportColumn("selbj2035", "amount", "2035债务本金千元");
lx2035 = createDecReportColumn("sellx2035", "amount", "2035债务利息千元");
amt = createDecReportColumn("drawamount", "amount", "金额(千元)");
}else if(amtUnit.equals("wyuan")){
//万元
columns.add(createReportColumn("drawamount", "amount", "金额(万元)"));
ncAmt = createDecReportColumn("selyearncamt", "amount", "年初余额(万元)");
yaddAmt = createDecReportColumn("selyearaddamt", "amount", "本年新增(万元)");
yhkAmt = createDecReportColumn("selyearyhkamt", "amount", "本年减少(万元)");
nmAmt = createDecReportColumn("selyearnmamt", "amount", "年末余额(万元)");
bj2025 = createDecReportColumn("selbj2025", "amount", "2025债务本金万元");
lx2025 = createDecReportColumn("sellx2025", "amount", "2025债务利息万元");
bj2026 = createDecReportColumn("selbj2026", "amount", "2026债务本金万元");
lx2026 = createDecReportColumn("sellx2026", "amount", "2026债务利息万元");
bj2027 = createDecReportColumn("selbj2027", "amount", "2027债务本金万元");
lx2027 = createDecReportColumn("sellx2027", "amount", "2027债务利息万元");
bj2028 = createDecReportColumn("selbj2028", "amount", "2028债务本金万元");
lx2028 = createDecReportColumn("sellx2028", "amount", "2028债务利息万元");
bj2029 = createDecReportColumn("selbj2029", "amount", "2029债务本金万元");
lx2029 = createDecReportColumn("sellx2029", "amount", "2029债务利息万元");
bj2030 = createDecReportColumn("selbj2030", "amount", "2030债务本金万元");
lx2030 = createDecReportColumn("sellx2030", "amount", "2030债务利息万元");
bj2031 = createDecReportColumn("selbj2031", "amount", "2031债务本金万元");
lx2031 = createDecReportColumn("sellx2031", "amount", "2031债务利息万元");
bj2032 = createDecReportColumn("selbj2032", "amount", "2032债务本金万元");
lx2032 = createDecReportColumn("sellx2032", "amount", "2032债务利息万元");
bj2033 = createDecReportColumn("selbj2033", "amount", "2033债务本金万元");
lx2033 = createDecReportColumn("sellx2033", "amount", "2033债务利息万元");
bj2034 = createDecReportColumn("selbj2034", "amount", "2034债务本金万元");
lx2034 = createDecReportColumn("sellx2034", "amount", "2034债务利息万元");
bj2035 = createDecReportColumn("selbj2035", "amount", "2035债务本金万元");
lx2035 = createDecReportColumn("sellx2035", "amount", "2035债务利息万元");
amt = createDecReportColumn("drawamount", "amount", "金额(万元)");
}else if(amtUnit.equals("bwyuan")){
//百万元
columns.add(createReportColumn("drawamount", "amount", "金额(百元)"));
ncAmt = createDecReportColumn("selyearncamt", "amount", "年初余额(百万元)");
yaddAmt = createDecReportColumn("selyearaddamt", "amount", "本年新增(百万元)");
yhkAmt = createDecReportColumn("selyearyhkamt", "amount", "本年减少(百万元)");
nmAmt = createDecReportColumn("selyearnmamt", "amount", "年末余额(百万元)");
bj2025 = createDecReportColumn("selbj2025", "amount", "2025债务本金百万元");
lx2025 = createDecReportColumn("sellx2025", "amount", "2025债务利息百万元");
bj2026 = createDecReportColumn("selbj2026", "amount", "2026债务本金百万元");
lx2026 = createDecReportColumn("sellx2026", "amount", "2026债务利息百万元");
bj2027 = createDecReportColumn("selbj2027", "amount", "2027债务本金百万元");
lx2027 = createDecReportColumn("sellx2027", "amount", "2027债务利息百万元");
bj2028 = createDecReportColumn("selbj2028", "amount", "2028债务本金百万元");
lx2028 = createDecReportColumn("sellx2028", "amount", "2028债务利息百万元");
bj2029 = createDecReportColumn("selbj2029", "amount", "2029债务本金百万元");
lx2029 = createDecReportColumn("sellx2029", "amount", "2029债务利息百万元");
bj2030 = createDecReportColumn("selbj2030", "amount", "2030债务本金百万元");
lx2030 = createDecReportColumn("sellx2030", "amount", "2030债务利息百万元");
bj2031 = createDecReportColumn("selbj2031", "amount", "2031债务本金百万元");
lx2031 = createDecReportColumn("sellx2031", "amount", "2031债务利息百万元");
bj2032 = createDecReportColumn("selbj2032", "amount", "2032债务本金百万元");
lx2032 = createDecReportColumn("sellx2032", "amount", "2032债务利息百万元");
bj2033 = createDecReportColumn("selbj2033", "amount", "2033债务本金百万元");
lx2033 = createDecReportColumn("sellx2033", "amount", "2033债务利息百万元");
bj2034 = createDecReportColumn("selbj2034", "amount", "2034债务本金百万元");
lx2034 = createDecReportColumn("sellx2034", "amount", "2034债务利息百万元");
bj2035 = createDecReportColumn("selbj2035", "amount", "2035债务本金百万元");
lx2035 = createDecReportColumn("sellx2035", "amount", "2035债务利息百万元");
amt = createDecReportColumn("drawamount", "amount", "金额(百万元)");
}else if(amtUnit.equals("yyuan")){
//亿元
columns.add(createReportColumn("drawamount", "amount", "金额(亿元)"));
ncAmt = createDecReportColumn("selyearncamt", "amount", "年初余额(亿元)");
yaddAmt = createDecReportColumn("selyearaddamt", "amount", "本年新增(亿元)");
yhkAmt = createDecReportColumn("selyearyhkamt", "amount", "本年减少(亿元)");
nmAmt = createDecReportColumn("selyearnmamt", "amount", "年末余额(亿元)");
bj2025 = createDecReportColumn("selbj2025", "amount", "2025债务本金亿元");
lx2025 = createDecReportColumn("sellx2025", "amount", "2025债务利息亿元");
bj2026 = createDecReportColumn("selbj2026", "amount", "2026债务本金亿元");
lx2026 = createDecReportColumn("sellx2026", "amount", "2026债务利息亿元");
bj2027 = createDecReportColumn("selbj2027", "amount", "2027债务本金亿元");
lx2027 = createDecReportColumn("sellx2027", "amount", "2027债务利息亿元");
bj2028 = createDecReportColumn("selbj2028", "amount", "2028债务本金亿元");
lx2028 = createDecReportColumn("sellx2028", "amount", "2028债务利息亿元");
bj2029 = createDecReportColumn("selbj2029", "amount", "2029债务本金亿元");
lx2029 = createDecReportColumn("sellx2029", "amount", "2029债务利息亿元");
bj2030 = createDecReportColumn("selbj2030", "amount", "2030债务本金亿元");
lx2030 = createDecReportColumn("sellx2030", "amount", "2030债务利息亿元");
bj2031 = createDecReportColumn("selbj2031", "amount", "2031债务本金亿元");
lx2031 = createDecReportColumn("sellx2031", "amount", "2031债务利息亿元");
bj2032 = createDecReportColumn("selbj2032", "amount", "2032债务本金亿元");
lx2032 = createDecReportColumn("sellx2032", "amount", "2032债务利息亿元");
bj2033 = createDecReportColumn("selbj2033", "amount", "2033债务本金亿元");
lx2033 = createDecReportColumn("sellx2033", "amount", "2033债务利息亿元");
bj2034 = createDecReportColumn("selbj2034", "amount", "2034债务本金亿元");
lx2034 = createDecReportColumn("sellx2034", "amount", "2034债务利息亿元");
bj2035 = createDecReportColumn("selbj2035", "amount", "2035债务本金亿元");
lx2035 = createDecReportColumn("sellx2035", "amount", "2035债务利息亿元");
amt = createDecReportColumn("drawamount", "amount", "金额(亿元)");
}
columns.add(createReportColumn("zhrzcb", "text", "综合融资成本"));
columns.add(createReportColumn("zhrzqx", "text", "综合融资期限"));
//添加年相关四个金额且合计
ncAmt.setSummary(1);
yaddAmt.setSummary(1);
yhkAmt.setSummary(1);
nmAmt.setSummary(1);
yearAmtEfg.getChildren().add(ncAmt);//添加下级分组
yearAmtEfg.getChildren().add(yaddAmt);//添加下级分组
yearAmtEfg.getChildren().add(yhkAmt);//添加下级分组
yearAmtEfg.getChildren().add(nmAmt);//添加下级分组
columns.add(yearAmtEfg);
//添加本金利息相关四个金额且合计
bj2025.setSummary(1);
lx2025.setSummary(1);
bj2026.setSummary(1);
lx2026.setSummary(1);
bj2027.setSummary(1);
lx2027.setSummary(1);
bj2028.setSummary(1);
lx2028.setSummary(1);
bj2029.setSummary(1);
lx2029.setSummary(1);
bj2030.setSummary(1);
lx2030.setSummary(1);
bj2031.setSummary(1);
lx2031.setSummary(1);
bj2032.setSummary(1);
lx2032.setSummary(1);
bj2033.setSummary(1);
lx2033.setSummary(1);
bj2034.setSummary(1);
lx2034.setSummary(1);
bj2035.setSummary(1);
lx2035.setSummary(1);
bjlxEfg.getChildren().add(bj2025);//添加下级分组
bjlxEfg.getChildren().add(lx2025);//添加下级分组
bjlxEfg.getChildren().add(bj2026);//添加下级分组
bjlxEfg.getChildren().add(lx2026);//添加下级分组
bjlxEfg.getChildren().add(bj2027);//添加下级分组
bjlxEfg.getChildren().add(lx2027);//添加下级分组
bjlxEfg.getChildren().add(bj2028);//添加下级分组
bjlxEfg.getChildren().add(lx2028);//添加下级分组
bjlxEfg.getChildren().add(bj2029);//添加下级分组
bjlxEfg.getChildren().add(lx2029);//添加下级分组
bjlxEfg.getChildren().add(bj2030);//添加下级分组
bjlxEfg.getChildren().add(lx2030);//添加下级分组
bjlxEfg.getChildren().add(bj2031);//添加下级分组
bjlxEfg.getChildren().add(lx2031);//添加下级分组
bjlxEfg.getChildren().add(bj2032);//添加下级分组
bjlxEfg.getChildren().add(lx2032);//添加下级分组
bjlxEfg.getChildren().add(bj2033);//添加下级分组
bjlxEfg.getChildren().add(lx2033);//添加下级分组
bjlxEfg.getChildren().add(bj2034);//添加下级分组
bjlxEfg.getChildren().add(lx2034);//添加下级分组
bjlxEfg.getChildren().add(bj2035);//添加下级分组
bjlxEfg.getChildren().add(lx2035);//添加下级分组
columns.add(bjlxEfg);
//添加金额行且合计
amt.setSummary(1);
columns.add(amt);
DecimalReportColumn zhrzcb = createDecReportColumn("zhrzcb", "decimal", "综合融资成本");
DecimalReportColumn zhrzqx = createDecReportColumn("zhrzqx", "decimal", "综合融资期限");
zhrzcb.setScale(6);
zhrzcb.setScale(6);
zhrzcb.setSummary(1);
zhrzqx.setSummary(1);
columns.add(zhrzcb);
columns.add(zhrzqx);
columns.add(createReportColumn("guaranteeway", "text", "用信方式"));
columns.add(createReportColumn("dbwkm", "text", "担保物科目"));
columns.add(createReportColumn("dbwname", "text", "担保物名称"));
@ -932,4 +1375,12 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
return column;
}
public DecimalReportColumn createDecReportColumn(String fieldKey, String fieldType, String caption) {
DecimalReportColumn column = new DecimalReportColumn();
column.setFieldKey(fieldKey);
column.setFieldType(fieldType);
column.setCaption(new LocaleString(caption));
return column;
}
}