From 1057149b7b822f3867cb3eec8642e614cf269eea Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 25 Mar 2020 17:05:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20echarts=20partner=E4=B8=BAfalse=E5=8A=A01?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/dataAnalysis/core/DataAnalysisServiceImpl.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2963cc568..d87fed4ea 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.14 + 1.4.15 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/dataAnalysis/core/DataAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/dataAnalysis/core/DataAnalysisServiceImpl.java index bb30e94cf..23cc25d9c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dataAnalysis/core/DataAnalysisServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dataAnalysis/core/DataAnalysisServiceImpl.java @@ -6,6 +6,7 @@ import au.com.royalpay.payment.tools.utils.PageListUtils; import com.alibaba.fastjson.JSONObject; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageList; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateUtils; import org.springframework.stereotype.Service; @@ -76,6 +77,10 @@ public class DataAnalysisServiceImpl implements DataAnalysisService { BigDecimal totalClients = new BigDecimal(clientAnalysisMapper.countValidClientsAll(industry)); for (JSONObject detail : data) { BigDecimal industryClients = detail.getBigDecimal("industry_trans_clients"); + if (!StringUtils.equalsIgnoreCase("0", industry)) { + industryClients = industryClients.subtract(new BigDecimal(1)); + detail.put("industry_trans_clients", industryClients.setScale(0, RoundingMode.DOWN)); + } detail.put("total_client", totalClients.setScale(0, RoundingMode.DOWN)); detail.put("in_total_pcent", industryClients.divide(totalClients, 4, RoundingMode.HALF_UP).multiply(new BigDecimal(100))); }