From 9f88c25baf8b4074056eb44823f52ef514fa5c5f Mon Sep 17 00:00:00 2001 From: king Date: Sat, 14 Mar 2026 09:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E9=94=80=E5=94=AE=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E7=BB=8F=E8=90=A5=E6=8C=87=E6=A0=87=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E6=83=85=E5=86=B5-=E6=B7=BB=E5=8A=A0=E5=90=8E?= =?UTF-8?q?=E7=BC=80=E8=BF=87=E6=BB=A4=20=E7=BB=8F=E8=90=A5=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E5=AE=8C=E6=88=90=E6=83=85=E5=86=B5=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?-=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/report/xtsy/jyzbwcqkPlugin.java | 54 +++++++++++++++++++ .../framework/entity/GrBiFsBusinessReal.java | 18 +++++-- 2 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/jyzbwcqkPlugin.java diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/jyzbwcqkPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/jyzbwcqkPlugin.java new file mode 100644 index 0000000..b71099c --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/jyzbwcqkPlugin.java @@ -0,0 +1,54 @@ + +package com.lideeyunji.core.framework.enhance.example.report.xtsy; + +import com.lideeyunji.core.framework.config.aspect.enhancereport.model.EnhanceReportContext; +import com.lideeyunji.core.framework.config.aspect.enhancereport.plugin.ReportAfterAdvicePlugin; +import com.lideeyunji.core.framework.utils.Func; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +/** + * 报表-系统首页-单表 + */ +@Component("jyzbwcqkPlugin") +public class jyzbwcqkPlugin implements ReportAfterAdvicePlugin { + + @Override + public void execute(EnhanceReportContext enhanceContext) { + List> records = enhanceContext.getResult().getRecords(); + if (Func.isEmpty(records)) { + return; + } + if (!enhanceContext.getParam().getParams().containsKey("useyear")){ + return; + } + String useyear = enhanceContext.getParam().getParams().get("useyear").toString(); + LocalDateTime now = LocalDateTime.now(); + String currentYear = Integer.toString(now.getYear()); + int currentMonth = now.getMonthValue(); + if (!useyear.equals(currentYear)) { + return; + } + Set monthSet = IntStream.rangeClosed(currentMonth + 1, 12) + .mapToObj(i -> "monthreal" + i) + .collect(Collectors.toSet()); + Set yearSet = IntStream.rangeClosed(currentMonth + 1, 12) + .mapToObj(i -> "yearreal" + i) + .collect(Collectors.toSet()); + for(Map record : records){ + for (String key : monthSet){ + record.remove( key); + } + for (String key : yearSet){ + record.remove( key); + } + } + + } +} diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/GrBiFsBusinessReal.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/GrBiFsBusinessReal.java index 6c4bab7..52d1701 100644 --- a/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/GrBiFsBusinessReal.java +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/entity/GrBiFsBusinessReal.java @@ -4,10 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.lideeyunji.tool.framework.yunji.model.global.BaseEntity; import lombok.Data; -import lombok.EqualsAndHashCode; -import com.lideeyunji.tool.framework.yunji.model.global.BaseTenantEntity; import java.io.Serializable; @@ -40,18 +37,33 @@ public class GrBiFsBusinessReal implements Serializable { @TableField(value = "ITEMORDER") private String itemOrder; + /** + * 月度完成情况 + */ @TableField(value = "MONTH_REAL") private String monthReal; + /** + * 年度完成情况 + */ @TableField(value = "YEAR_REAL") private String yearReal; + /** + * 月度差标情况(万) + */ @TableField(value = "MONTH_DIFF") private String monthDiff; + /** + * 全年指标(万) + */ @TableField(value = "YEAR_PLAN") private String yearPlan; + /** + * 年度达成率 + */ @TableField(value = "YEAR_RATE") private String yearRate;