Bläddra i källkod

保留两位小数

yq 4 år sedan
förälder
incheckning
dced6d77a9

+ 2 - 2
mhfire-service/src/main/java/com/bizmatics/mhfire/service/impl/FireStatisticsServiceImpl.java

@@ -58,9 +58,9 @@ public class FireStatisticsServiceImpl implements FireStatisticsService {
             thisYearList.add(fireStatisticsMapper.selectCount(firstDayOfMonth, lastDayOfMonth, address,fireType,null));
             //月平均值
             Integer monthCount = fireStatisticsMapper.selectCountByRangeDate(startMax, endMax, address, fireType,i+1);
-            monthList.add(Arith.div(monthCount, distanceOfTwoDate));
+            monthList.add(Arith.div(monthCount, distanceOfTwoDate,2));
             Integer yearCount = fireStatisticsMapper.selectCountByRangeDate(null, null,address, fireType,i+1);
-            yearList.add(Arith.div(yearCount, distanceOfTwoDateYear));
+            yearList.add(Arith.div(yearCount, distanceOfTwoDateYear,2));
         }
         list.add(thisYearList);
         list.add(monthList);