综合销售情况表 sql 调整

This commit is contained in:
king
2026-03-26 09:11:37 +08:00
parent 4c05ebcc28
commit f3a7771d2e

View File

@@ -52,8 +52,11 @@ public class zhxsqkPlugin implements ReportAroundAdvicePlugin {
throw new lideeYunJiException("在选择维度时,“货品名称”不能有值!"); throw new lideeYunJiException("在选择维度时,“货品名称”不能有值!");
} }
List<String> groupFieldList = Arrays.asList(params.get("Group by").toString().split(",")); List<String> groupFieldList = Arrays.asList(params.get("Group by").toString().split(","));
if(!groupFieldList.contains("useYear") && !params.containsKey("useYear")){
throw new lideeYunJiException("维度“年” 和 查询条件“年” 不能同时为空!");
}
PageHelper.startPage(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString())); PageHelper.startPage(Integer.parseInt(params.get("pageNo").toString()), Integer.parseInt(params.get("pageSize").toString()));
if((groupFieldList.contains("useMonth") || params.containsKey("useMonth"))){ if(groupFieldList.contains("useMonth") || params.containsKey("useMonth")){
List<NewGrBiSaAggMonthCount> newGrBiSaAggList = newGrBiSaAggMonthCountService.selectNewGrBiSaAggGroupMonthList(params, groupFieldList); List<NewGrBiSaAggMonthCount> newGrBiSaAggList = newGrBiSaAggMonthCountService.selectNewGrBiSaAggGroupMonthList(params, groupFieldList);
PageInfo<NewGrBiSaAggMonthCount> pageInfo = new PageInfo<>(newGrBiSaAggList); PageInfo<NewGrBiSaAggMonthCount> pageInfo = new PageInfo<>(newGrBiSaAggList);
List<Map<String, Object>> list = newGrBiSaAggList.stream().map(BeanUtil::beanToMap).collect(Collectors.toList()); List<Map<String, Object>> list = newGrBiSaAggList.stream().map(BeanUtil::beanToMap).collect(Collectors.toList());