提交人:陈绍鑫

日期:2025/01/09 17:30
内容:推送共享优化
This commit is contained in:
陈绍鑫 2026-01-20 10:23:16 +08:00
parent 55a09ee1af
commit c4bb80c7b9
2 changed files with 43 additions and 4 deletions

View File

@ -13,10 +13,7 @@ import kd.bos.db.DBRoute;
import kd.bos.entity.NumberFormatProvider; import kd.bos.entity.NumberFormatProvider;
import kd.bos.entity.datamodel.events.PackageDataEvent; import kd.bos.entity.datamodel.events.PackageDataEvent;
import kd.bos.entity.datamodel.events.PropertyChangedArgs; import kd.bos.entity.datamodel.events.PropertyChangedArgs;
import kd.bos.entity.report.AbstractReportColumn; import kd.bos.entity.report.*;
import kd.bos.entity.report.IReportListModel;
import kd.bos.entity.report.ReportColumn;
import kd.bos.entity.report.ReportQueryParam;
import kd.bos.form.ShowType; import kd.bos.form.ShowType;
import kd.bos.form.control.events.FilterContainerInitEvent; import kd.bos.form.control.events.FilterContainerInitEvent;
import kd.bos.form.control.events.ItemClickEvent; import kd.bos.form.control.events.ItemClickEvent;
@ -38,6 +35,7 @@ import kd.bos.report.plugin.AbstractReportFormPlugin;
import kd.bos.report.proxy.ReportListProxy; import kd.bos.report.proxy.ReportListProxy;
import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.QueryServiceHelper; import kd.bos.servicehelper.QueryServiceHelper;
import shkd.sys.sys.plugin.report.domain.FinanceVarietyEnum;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
@ -297,4 +295,36 @@ public class InterestBearingFromListPlugin extends AbstractReportFormPlugin impl
} }
} }
@Override
public void afterCreateColumn(CreateColumnEvent event) {
super.afterCreateColumn(event);
ReportQueryParam queryParam = event.getQueryParam();
FilterInfo filter = queryParam.getFilter();
//动态展示还本付息计划的年份
String shkd_datasel = filter.getString("shkd_datasel");
int shkd_stratyear = filter.getInt("shkd_stratyear");
List<AbstractReportColumn> columns = event.getColumns();
for (AbstractReportColumn column : columns) {
if (column instanceof ReportColumnGroup){
ReportColumnGroup group = (ReportColumnGroup) column;
String groupname = group.getCaption().getLocaleValue_zh_CN();
if ("还本付息计划".equals(groupname)&&"data1".equals(shkd_datasel)){
List<AbstractReportColumn> children = group.getChildren();
for (int i = 0; i < children.size(); i++) {
AbstractReportColumn abstractReportColumn = children.get(i);
String localeValue_zh_cn = abstractReportColumn.getCaption().getLocaleValue_zh_CN();
if (localeValue_zh_cn.length() >= 4) {
String year= String.valueOf(shkd_stratyear+i);
// "2025" 替换前四个字符
String newlocaleValue_zh_cn = year + localeValue_zh_cn.substring(4);
LocaleString l = new LocaleString();
l.put("zh_CN",newlocaleValue_zh_cn);
abstractReportColumn.setCaption(l);
}
}
}
}
}
}
} }

View File

@ -69,6 +69,7 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
FilterItemInfo dybbkmmcFilter = filterInfo.getFilterItem("shkd_dybbkmmc"); //对应报表科目项目 FilterItemInfo dybbkmmcFilter = filterInfo.getFilterItem("shkd_dybbkmmc"); //对应报表科目项目
FilterItemInfo guaranteewayFilter = filterInfo.getFilterItem("shkd_guaranteeway"); //用信方式担保 FilterItemInfo guaranteewayFilter = filterInfo.getFilterItem("shkd_guaranteeway"); //用信方式担保
FilterItemInfo yearFilter = filterInfo.getFilterItem("shkd_year"); //年份 FilterItemInfo yearFilter = filterInfo.getFilterItem("shkd_year"); //年份
FilterItemInfo stratyearFilter = filterInfo.getFilterItem("shkd_stratyear"); //还本付息开始年份
//下拉列表值查询不同类型数据 //下拉列表值查询不同类型数据
String amtUnit = null; //金额单位 yuan/qyuan/wyuan/bwyuan/yyuan String amtUnit = null; //金额单位 yuan/qyuan/wyuan/bwyuan/yyuan
@ -90,6 +91,7 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
String whereDybbkmmc = ""; //对应报表科目项目 String whereDybbkmmc = ""; //对应报表科目项目
String whereGuaranteeway = ""; //用信方式担保 String whereGuaranteeway = ""; //用信方式担保
String year = null; //年份 String year = null; //年份
String stratyear = null; //还本付息开始年份
// 使用过滤条件创建QFilter // 使用过滤条件创建QFilter
if(bizDateFilter != null && bizDateFilter.getValue() != null){ if(bizDateFilter != null && bizDateFilter.getValue() != null){
@ -182,6 +184,13 @@ public class InterestBearingRptListPlugin extends AbstractReportListDataPlugin {
}else{ }else{
year = sdfDateYear.format(new Date()); //日期年份 year = sdfDateYear.format(new Date()); //日期年份
} }
//还本付息开始年份
if(stratyearFilter != null && stratyearFilter.getValue() != null){
stratyear = stratyearFilter.getValue().toString();
}else{
stratyear = sdfDateYear.format(new Date()); //日期年份
}
//报表查询数据返回 //报表查询数据返回
DataSet selData = null; DataSet selData = null;
/** /**