From f8dc2ca2496a5c4b8b5ccb64bfc643b4108009e1 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 3 Jan 2024 19:26:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B7=A1=E6=A3=80=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java | 2 +- .../com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java index adbf9b0..4b96c6a 100644 --- a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java @@ -37,6 +37,6 @@ public class VoteChartVo { @ExcelIgnore private List finishIds; @ApiModelProperty(value = "完成率") - @ExcelProperty(value = "完成率", index = 3) + @ExcelProperty(value = "完成率", index = 4) private Double finishRate; } 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 455e33f..064ce83 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 @@ -1166,8 +1166,8 @@ public class TaskServiceImpl extends BaseServiceImpl imp if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){ voteChartVo.setFinishRate(0.00d); }else { - BigDecimal divide = new BigDecimal(list.size()).divide(new BigDecimal(list.size()),2,BigDecimal.ROUND_UP); - voteChartVo.setFinishRate( divide.doubleValue()); + BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),2,BigDecimal.ROUND_UP); + voteChartVo.setFinishRate(divide.doubleValue()); } return voteChartVo; }