From 2ef29cee27c73c1e8a081fbc044883e33a8cc21c Mon Sep 17 00:00:00 2001 From: king Date: Tue, 21 Apr 2026 14:14:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1-=E7=BB=BC?= =?UTF-8?q?=E5=90=88=E9=94=80=E5=94=AE=E6=83=85=E5=86=B5=E8=A1=A8-?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86=E5=AD=97=E6=AE=B5=E7=9A=84?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/report/xtsy/ZhxsqkPlugin.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/ZhxsqkPlugin.java b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/ZhxsqkPlugin.java index ed5bdd1..c40c7f5 100644 --- a/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/ZhxsqkPlugin.java +++ b/lidee-core/src/main/java/com/lideeyunji/core/framework/enhance/example/report/xtsy/ZhxsqkPlugin.java @@ -52,6 +52,10 @@ public class ZhxsqkPlugin implements ReportAroundAdvicePlugin { if (params.containsKey("goodsName")) { throw new lideeYunJiException("在选择维度时,“产品名称”不能有值!"); } + if(params.containsKey("column") && !groupFieldList.contains(params.get("column").toString())){ + params.remove("column"); + params.remove("order"); + } Page page = PageHelper.startPage(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString())); if(!groupFieldList.contains("useMonth") && !groupFieldList.contains("useYear")){ setMonthOrderBy(params, page); @@ -104,6 +108,15 @@ public class ZhxsqkPlugin implements ReportAroundAdvicePlugin { if ("thisYearSaMoneyGrowth".equals(params.get("column"))) { orderBy = "CAST(TRIM(REGEXP_SUBSTR(this_year_sa_money_growth, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString(); } + if("stdGoodsName".equals(params.get("column"))){ + orderBy = "std_goods_name " + params.get("order").toString(); + } + if("customName".equals(params.get("column"))){ + orderBy = "custom_name " + params.get("order").toString(); + } + if("salerName".equals(params.get("column"))){ + orderBy = "saler_name " + params.get("order").toString(); + } page.setUnsafeOrderBy(orderBy); } List newGrBiSaAggList = newGrBiSaAggYearCountService.selectNewGrBiSaAggGroupYearList(params, groupFieldList); @@ -155,6 +168,15 @@ public class ZhxsqkPlugin implements ReportAroundAdvicePlugin { if ("lastMonthSaMoney_yoy".equals(params.get("column"))) { orderBy = "CAST(TRIM(REGEXP_SUBSTR(lastMonthSaMoney_yoy, '-?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)')) AS DECIMAL(10,2)) " + params.get("order").toString(); } + if("stdGoodsName".equals(params.get("column"))){ + orderBy = "std_goods_name " + params.get("order").toString(); + } + if("customName".equals(params.get("column"))){ + orderBy = "custom_name " + params.get("order").toString(); + } + if("salerName".equals(params.get("column"))){ + orderBy = "saler_name " + params.get("order").toString(); + } page.setUnsafeOrderBy(orderBy); } }