From 74f119bfdf2c39bf60972a86a0f97f9cbb42c9c7 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 7 Aug 2024 14:09:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=E5=B7=A1=E6=A3=80=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=BB=9F=E8=AE=A1=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D?= =?UTF-8?q?=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java index 8ecc34d..3ee36ca 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java @@ -1192,7 +1192,8 @@ public class TaskServiceImpl extends ServiceImpl impleme if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){ voteChartVo.setFinishRate(0.00d); }else { - BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),2, RoundingMode.HALF_UP).setScale(2,RoundingMode.HALF_UP); + BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),4, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)).setScale(2,RoundingMode.HALF_UP); voteChartVo.setFinishRate(divide.doubleValue()); } return voteChartVo;