From 858dd912c536ae25dbc6bd2346f54783167c59ed Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Tue, 17 Oct 2023 11:16:26 +0800 Subject: [PATCH] =?UTF-8?q?debug=20=E9=A9=BE=E9=A9=B6=E8=88=B1=E7=AE=97?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java index 837011b..8cb0ccc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java @@ -188,7 +188,7 @@ public class CockpitStatsHandler { return cocks.stream().map(c -> { CockpitStatsVO.SafetyInput safetyInput = new CockpitStatsVO.SafetyInput(); safetyInput.setYear(c.getYear()); - safetyInput.setRate(Objects.nonNull(c.getMonitorDeclaredAmount()) ? + safetyInput.setRate(Objects.nonNull(c.getMonitorDeclaredAmount()) && c.getMonitorDeclaredAmount().compareTo(BigDecimal.ZERO) > 0 ? c.getMonitorSafetyInputAmount().divide(c.getMonitorDeclaredAmount(),2, RoundingMode.CEILING): BigDecimal.ZERO); return safetyInput; }).collect(Collectors.toList());