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); } }