From 743df9757b07aa5f78e304c10e0d5abd95796f8f Mon Sep 17 00:00:00 2001 From: jianjun Date: Wed, 9 Sep 2020 15:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=80=E6=9D=A1=E6=97=B6?= =?UTF-8?q?=E7=BB=9950=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CpcIndexCalculateServiceImpl.java | 21 +++++-------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java index 666736310c..0bc398ce91 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java @@ -162,22 +162,11 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { do { list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); if (!CollectionUtils.isEmpty(list)) { - //如果是第一页且仅有一条数据 则直接给50分 - if (pageNo == NumConstant.ONE && list.size() == NumConstant.ONE) { - List insertList = new ArrayList<>(); - for (String indexCode : groupIndexDetailsMap.keySet()) { - insertList.add(handleOneGridScene(formDTO, indexCode, list.get(0))); - } - if (CollectionUtils.isEmpty(insertList)) { - deleteAndInsertBatch(formDTO, insertList, null); - } - } else { - //遍历指标分组 计算分数 - for (Map.Entry> entry : groupIndexDetailsMap.entrySet()) { - String indexCode = entry.getKey(); - List details = entry.getValue(); - calculateScore(formDTO, details, list, minAndMaxMap, indexCode); - } + //遍历指标分组 计算分数 + for (Map.Entry> entry : groupIndexDetailsMap.entrySet()) { + String indexCode = entry.getKey(); + List details = entry.getValue(); + calculateScore(formDTO, details, list, minAndMaxMap, indexCode); } } pageNo++;