From d839a0ec1e84105b4e3f8ac54a5be1a05b36e14c Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 31 Jul 2024 09:09:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BB=9F=E8=AE=A1=E4=B8=A2=E5=A4=B1=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 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 63450d1..8ecc34d 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,7 @@ 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.UP); + BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),2, RoundingMode.HALF_UP).setScale(2,RoundingMode.HALF_UP); voteChartVo.setFinishRate(divide.doubleValue()); } return voteChartVo;