From dbfece7422e3ed4c1b314463df848d7e33a09f99 Mon Sep 17 00:00:00 2001
From: fengjin <1435304038@qq.com>
Date: 星期三, 07 十二月 2022 14:02:12 +0800
Subject: [PATCH] Merge branch 'huacheng_test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng_test
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
index 637855c..cec6ea6 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -1104,7 +1104,7 @@
if (0!=all){
BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum());
BigDecimal allDecimal = new BigDecimal(all);
- BigDecimal percent = countNum.divide(allDecimal,2, BigDecimal.ROUND_HALF_DOWN);
+ BigDecimal percent = countNum.divide(allDecimal,4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100));
statisticsPhotoVO.setPercent(percent);
}
}
@@ -1129,7 +1129,7 @@
if (0L!=sum) {
BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum());
BigDecimal sumDecimal = new BigDecimal(sum);
- BigDecimal percent = countNum.divide(sumDecimal, 2, BigDecimal.ROUND_HALF_DOWN);
+ BigDecimal percent = countNum.divide(sumDecimal, 4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100));
statisticsPhotoVO.setPercent(percent);
}
}
@@ -1161,14 +1161,17 @@
}
chartMap.put(month,map1);
}
- Map<String, List<StatisticsPhotoVO>> stringListMap = statisticsPhotoVOS1.stream().collect(Collectors.groupingBy(StatisticsPhotoVO::getCountName));
+ Map<String, List<StatisticsPhotoVO>> stringListMap = statisticsPhotoVOS1
+ .stream()
+ .sorted(Comparator.comparing(StatisticsPhotoVO::getStatisticsDate))
+ .collect(Collectors.groupingBy(StatisticsPhotoVO::getCountName));
Map<String,Object> retMap = new HashMap<>();
retMap.put("statisticsPhotoVOS",statisticsPhotoVOS);
retMap.put("monthMap",stringListMap);
- return R.ok();
+ return R.ok(retMap);
}
}
--
Gitblit v1.7.1