c8d96a53 张雷

fix(module-biz): 修复指挥中心数据统计错误

- 修正了上月数据查询的起止时间
- 调整了同比和环比数据的计算顺序- 优化了代码格式,提高了可读性
1 个父辈 ee8c87bf
...@@ -77,7 +77,7 @@ public class SysCommandCentreController { ...@@ -77,7 +77,7 @@ public class SysCommandCentreController {
77 //本月数据 77 //本月数据
78 String monthCSL = reportItemvService.getSumCSL(departIds, dateVO.getNowMonthStartDate(), dateVO.getNowMonthEndDate()); 78 String monthCSL = reportItemvService.getSumCSL(departIds, dateVO.getNowMonthStartDate(), dateVO.getNowMonthEndDate());
79 //环比 上月数据 79 //环比 上月数据
80 String lastMonthCSL = reportItemvService.getSumCSL(departIds, dateVO.getNowMonthStartDate(), dateVO.getNowMonthEndDate()); 80 String lastMonthCSL = reportItemvService.getSumCSL(departIds, dateVO.getLastMonthStartTime(), dateVO.getLastMonthEndTime());
81 //同比 去年数据 81 //同比 去年数据
82 String lastYearCSL = reportItemvService.getSumCSL(departIds, dateVO.getLastYearMonthStartTime(), dateVO.getLastYearMonthEndTime()); 82 String lastYearCSL = reportItemvService.getSumCSL(departIds, dateVO.getLastYearMonthStartTime(), dateVO.getLastYearMonthEndTime());
83 83
...@@ -85,11 +85,11 @@ public class SysCommandCentreController { ...@@ -85,11 +85,11 @@ public class SysCommandCentreController {
85 long lastMonthDifferDay = DateUtils.differenceDay(dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime()); 85 long lastMonthDifferDay = DateUtils.differenceDay(dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime());
86 long lastYearDifferDay = DateUtils.differenceDay(dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime()); 86 long lastYearDifferDay = DateUtils.differenceDay(dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime());
87 //月对象数据 value, valueTb, valueHb 87 //月对象数据 value, valueTb, valueHb
88 FRportlCommandCenterVO monthDataVO = new FRportlCommandCenterVO("月汇总数据",JSUtils.divide(monthCSL,10000),JSUtils.divide(lastMonthCSL,10000),JSUtils.divide(lastYearCSL,10000)); 88 FRportlCommandCenterVO monthDataVO = new FRportlCommandCenterVO("月汇总数据",JSUtils.divide(monthCSL,10000),JSUtils.divide(lastYearCSL,10000),JSUtils.divide(lastMonthCSL,10000));
89 //日处理对象 89 //日处理对象
90 FRportlCommandCenterVO avgDayDataVO = new FRportlCommandCenterVO("日均处理水量",JSUtils.divide(monthCSL,nowDifferDay*10000),JSUtils.divide(lastMonthCSL,lastMonthDifferDay*10000),JSUtils.divide(lastYearCSL,lastYearDifferDay*10000)); 90 FRportlCommandCenterVO avgDayDataVO = new FRportlCommandCenterVO("日均处理水量",JSUtils.divide(monthCSL,nowDifferDay*10000),JSUtils.divide(lastYearCSL,lastYearDifferDay*10000),JSUtils.divide(lastMonthCSL,lastMonthDifferDay*10000));
91 fReportItemvList.add( monthDataVO); 91 fReportItemvList.add(monthDataVO);
92 fReportItemvList.add( avgDayDataVO ); 92 fReportItemvList.add(avgDayDataVO);
93 93
94 //年数据统计: 94 //年数据统计:
95 String total = factoryInfoService.querySumProScale( JSUtils.quoteEach(departIds,",") ); 95 String total = factoryInfoService.querySumProScale( JSUtils.quoteEach(departIds,",") );
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!