From f78c25f68b45aa0378cc9222bcf9aaebc4b45d1d Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 26 May 2021 13:59:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=B9=B3=E5=9D=87=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=81=9A=E5=B9=B3=E5=9D=87?= =?UTF-8?q?=E5=80=BC=E4=B8=BAnull=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/GridCorreLationServiceImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index be8016783d..2a71c3e8d3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -327,6 +327,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { result.setAvgValue(new BigDecimal(0)); result.setSampleCount(0); } + + if (result.getAvgValue() == null) { + result.setAvgValue(new BigDecimal(NumConstant.ZERO)); + } //FOR TEST /*BigDecimal result=null; if(IndexCalConstant.S1_C1_G1.equals(gridId)){ @@ -354,6 +358,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { result.setSampleCount(0); result.setAvgValue(new BigDecimal(0)); } + if (result.getAvgValue() == null) { + result.setAvgValue(new BigDecimal(NumConstant.ZERO)); + } //FOR TEST /*BigDecimal result=null; if(IndexCalConstant.S1_C1_G1.equals(gridId)){