From 099c3109f78d79ceb15cb2017c295494daa852c6 Mon Sep 17 00:00:00 2001 From: king Date: Thu, 16 Apr 2026 14:43:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=85=A8=E5=93=81=E7=A7=8D?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=A1=A8=20=20=E6=8E=92=E5=BA=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E8=B0=83=E6=95=B4,=E5=92=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=90=8E=E7=BD=AE=E5=A4=84=E7=90=86=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/report/xtsy/KcqmltjPlugin.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/KcqmltjPlugin.java diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/KcqmltjPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/KcqmltjPlugin.java new file mode 100644 index 0000000..b2eb843 --- /dev/null +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/KcqmltjPlugin.java @@ -0,0 +1,55 @@ + +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 lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.Map; + +/** + * 报表-库存全品种统计表-插件 + */ +@Slf4j +@Component("kcqmltjPlugin") +public class KcqmltjPlugin implements ReportAfterAdvicePlugin { + + @Override + public void execute(EnhanceReportContext enhanceContext) { + List> records = enhanceContext.getResult().getRecords(); + if (Func.isEmpty(records)) { + return; + } + + for(Map record : records){ + if(!record.containsKey("remmoney")){ + record.put("remmoney","-"); + } + if(!record.containsKey("monthsamoney")){ + record.put("monthsamoney","-"); + } + if(!record.containsKey("sksa")){ + record.put("sksa","-"); + } + if(!record.containsKey("thissamoney")){ + record.put("thissamoney","-"); + } + if(!record.containsKey("thisprofit")){ + record.put("thisprofit","-"); + } + if(!record.containsKey("thisprofitrate")){ + record.put("thisprofitrate","-"); + } + if(!record.containsKey("maxage")){ + record.put("maxage","-"); + } + if(!record.containsKey("goodsid")){ + record.put("goodsid","-"); + } + } + + } +}