|
@ -89,6 +89,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { |
|
|
cpcScoreTotalMap.put(userId, totalEntity); |
|
|
cpcScoreTotalMap.put(userId, totalEntity); |
|
|
} |
|
|
} |
|
|
BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); |
|
|
BigDecimal total = part.getScore().multiply(indexGroupDetailEntity.getWeight()); |
|
|
|
|
|
log.warn("userId:{},分数:{},权重:{},total:{}", userId, part.getScore(), indexGroupDetailEntity.getWeight(), total); |
|
|
totalEntity.setScore(totalEntity.getScore().add(total)); |
|
|
totalEntity.setScore(totalEntity.getScore().add(total)); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
@ -147,7 +148,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { |
|
|
do { |
|
|
do { |
|
|
list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); |
|
|
list = factIndexPartyAblityCpcMonthlyDao.getCountByMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), (pageNo - 1) * pageSize, pageSize); |
|
|
if (!CollectionUtils.isEmpty(list)) { |
|
|
if (!CollectionUtils.isEmpty(list)) { |
|
|
|
|
|
|
|
|
//遍历指标分组 计算分数
|
|
|
//遍历指标分组 计算分数
|
|
|
List<Map<String, Object>> finalList = list; |
|
|
List<Map<String, Object>> finalList = list; |
|
|
groupIndexDetailsMap.forEach((parentIndexCode, details) -> { |
|
|
groupIndexDetailsMap.forEach((parentIndexCode, details) -> { |
|
@ -196,6 +196,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { |
|
|
} |
|
|
} |
|
|
log.warn("计算的参数:{}", indexMap); |
|
|
log.warn("计算的参数:{}", indexMap); |
|
|
HashMap<String, BigDecimal> result = calculate(indexMap); |
|
|
HashMap<String, BigDecimal> result = calculate(indexMap); |
|
|
|
|
|
log.warn("计算的结果:{}", result); |
|
|
|
|
|
|
|
|
//处理结果
|
|
|
//处理结果
|
|
|
saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); |
|
|
saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); |
|
|