From e8a0f05f99f33fa05085536541da6bc27e66a644 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期五, 14 四月 2023 14:57:55 +0800
Subject: [PATCH] bug修改
---
ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
index 09e4880..a8800de 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
+++ b/ycl-platform/src/main/java/com/ycl/controller/cockpit/enforcementEvents/EnforcementEventsController.java
@@ -63,7 +63,7 @@
Long count = iViolationsService.count();
typeAndSourceVO.setAll(iViolationsService.count());
List<VideoAndAreaVO> videoAndAreaVOS = iViolationsService.selectType();
- videoAndAreaVOS.stream().forEach(item -> item.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(2, BigDecimal.ROUND_HALF_UP)));
+ videoAndAreaVOS.stream().forEach(item -> item.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(4, BigDecimal.ROUND_HALF_UP)));
typeAndSourceVO.setRecords(videoAndAreaVOS);
return CommonResult.success(typeAndSourceVO);
}
@@ -77,7 +77,7 @@
VideoAndAreaVO videoAndAreaVO = new VideoAndAreaVO();
videoAndAreaVO.setName(item.getName());
videoAndAreaVO.setCount(item.getCount());
- videoAndAreaVO.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(2, BigDecimal.ROUND_HALF_UP));
+ videoAndAreaVO.setRatio(new BigDecimal(item.getCount() * 1.0 / count).setScale(4, BigDecimal.ROUND_HALF_UP));
return videoAndAreaVO;
}).collect(Collectors.toList());
return CommonResult.success(collect);
@@ -94,12 +94,12 @@
EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO();
VideoAndAreaVO al = new VideoAndAreaVO();
al.setName("瑙嗛宸℃煡");
- al.setRatio(new BigDecimal(alCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP));
+ al.setRatio(new BigDecimal(alCount * 1.0 / allCount).setScale(4, BigDecimal.ROUND_HALF_UP));
al.setCount(alCount);
typeVO1s.add(al);
VideoAndAreaVO hand = new VideoAndAreaVO();
hand.setName("缃戞牸宸℃煡");
- hand.setRatio(new BigDecimal(handCount * 1.0 / allCount).setScale(2, BigDecimal.ROUND_HALF_UP));
+ hand.setRatio(new BigDecimal(handCount * 1.0 / allCount).setScale(4, BigDecimal.ROUND_HALF_UP));
hand.setCount(handCount);
typeVO1s.add(hand);
typeVO.setAll(allCount);
--
Gitblit v1.8.0