diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java index 0cdc0e82ef..819abb75c6 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/constant/IndexCalConstant.java @@ -19,7 +19,7 @@ public interface IndexCalConstant { /** * 分批计算,一次计算 10条 */ - Integer PAGE_SIZE = 800; + Integer PAGE_SIZE = 900; String GRID_ID="GRID_ID"; 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 de744b8553..387c85433b 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 @@ -85,9 +85,9 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { Map preLastCpcScoreTotalMap = new HashMap<>(); //当前最后一条记录 - CpcScoreEntity currentLastCpcScore = null; + //CpcScoreEntity currentLastCpcScore = null; //当前第一条记录 - CpcScoreEntity currentFirstCpcScore = null; + //CpcScoreEntity currentFirstCpcScore = null; do { //获取数据 list = cpcScoreDao.getPartScore(formDTO.getCustomerId(), formDTO.getMonthId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode(), (pageNo - NumConstant.ONE) * pageSize, pageSize); @@ -96,14 +96,14 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { log.warn("calculateTotalScore cpcScoreDao.getPartScore return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId()); } else { //获取最后一条 - currentLastCpcScore = list.get(list.size() - 1); + //currentLastCpcScore = list.get(list.size() - 1); //获取第一条 - currentFirstCpcScore = list.get(0); - if (preLastCpcScoreTotalMap.containsKey(currentFirstCpcScore.getUserId())) { + //currentFirstCpcScore = list.get(0); + /*if (preLastCpcScoreTotalMap.containsKey(currentFirstCpcScore.getUserId())) { cpcScoreTotalMap.putAll(preLastCpcScoreTotalMap); preLastCpcScoreTotalMap.clear(); preLastCpcScoreTotalMap.put(currentLastCpcScore.getUserId(), null); - } + }*/ Map> userGroupMap = list.stream().collect(Collectors.groupingBy(CpcScoreEntity::getUserId)); userGroupMap.forEach((userId, partScoreList) -> { CpcScoreEntity totalEntity = null; @@ -120,12 +120,12 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { totalEntity.setScore(new BigDecimal(NumConstant.ZERO)); totalEntity.setAllParentIndexCode(NumConstant.ZERO_STR); totalEntity.setWeight(new BigDecimal(NumConstant.ONE_NEG)); + cpcScoreTotalMap.put(userId, totalEntity); - if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) { + /* if (preLastCpcScoreTotalMap.containsKey(part.getUserId())) { preLastCpcScoreTotalMap.put(part.getUserId(), part); } else { - cpcScoreTotalMap.put(userId, totalEntity); - } + }*/ } //自建群活跃度——议题转项目率 有阈值 >60%按60%算 BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight());