定时任务-综合销售情况表-添加部分字段的排序
This commit is contained in:
@@ -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<Object> 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<NewGrBiSaAggYearCount> 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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user