jinpengyong
2021-12-30 1f46b7a18e34656baf965fa6627130ef59d14156
screen-api/src/main/java/com/moral/api/service/impl/ProfessionServiceImpl.java
@@ -281,15 +281,15 @@
                    allDeviceSum = Double.parseDouble(o.toString());
                }
                List<HistoryMonthly> preofessionDeviceHistoryMonthlyList = professionDataMap.get(resultTime);
                List<HistoryMonthly> professionDeviceHistoryMonthlyList = professionDataMap.get(resultTime);
                //贡献率
                String contributionRate = null;
                Double professionAvg = null;
                if (!ObjectUtils.isEmpty(preofessionDeviceHistoryMonthlyList)) {
                if (!ObjectUtils.isEmpty(professionDeviceHistoryMonthlyList)) {
                    //该行业均值计算
                    professionAvg = historyMonthlyService.calculatedValue(preofessionDeviceHistoryMonthlyList, sensorCode, "avg");
                    professionAvg = historyMonthlyService.calculatedValue(professionDeviceHistoryMonthlyList, sensorCode, "avg");
                    //该行业累加值计算
                    Double professionSum = historyMonthlyService.calculatedValue(preofessionDeviceHistoryMonthlyList, sensorCode, "sum");
                    Double professionSum = historyMonthlyService.calculatedValue(professionDeviceHistoryMonthlyList, sensorCode, "sum");
                    //行业贡献率计算
                    NumberFormat numberFormat = NumberFormat.getInstance();
                    numberFormat.setMaximumFractionDigits(2);