|
|
@ -84,7 +84,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { |
|
|
|
if (totalEntity == null) { |
|
|
|
totalEntity = ConvertUtils.sourceToTarget(part, CpcScoreEntity.class); |
|
|
|
totalEntity.setIsTotal(NumConstant.ONE_STR); |
|
|
|
totalEntity.setIndexCode(indexGroupDetailEntity.getIndexCode()); |
|
|
|
totalEntity.setIndexCode(IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); |
|
|
|
totalEntity.setScore(new BigDecimal(0)); |
|
|
|
cpcScoreTotalMap.put(userId, totalEntity); |
|
|
|
} |
|
|
@ -102,11 +102,6 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { |
|
|
|
} |
|
|
|
|
|
|
|
private void calculatePartScore(CalculateCommonFormDTO formDTO) { |
|
|
|
Map<String, String> indexCodeFieldReList = indexCodeFieldReService.getIndexCodeFieldReMap(); |
|
|
|
if (CollectionUtils.isEmpty(indexCodeFieldReList)) { |
|
|
|
log.error("cpcIndexCalculate have any indexcodefieldre"); |
|
|
|
throw new RenException("指标code与字段关系记录不存在"); |
|
|
|
} |
|
|
|
//计算最大最小值
|
|
|
|
Map<String, Object> minAndMaxMap = factIndexPartyAblityCpcMonthlyDao.getExtremeValue(formDTO.getCustomerId()); |
|
|
|
if (CollectionUtils.isEmpty(minAndMaxMap)) { |
|
|
@ -186,6 +181,10 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService { |
|
|
|
log.info("计算的结果:{}", result); |
|
|
|
|
|
|
|
//处理结果
|
|
|
|
if (CollectionUtils.isEmpty(result)){ |
|
|
|
log.error("calculateScore calculateScore return empty"); |
|
|
|
return; |
|
|
|
} |
|
|
|
saveCpcScore(formDTO, scoreEntityMap, parentIndexCode, result); |
|
|
|
} |
|
|
|
|
|
|
|