Browse Source

去掉一条时给50分

dev_shibei_match
jianjun 5 years ago
parent
commit
743df9757b
  1. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java

21
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<CpcScoreEntity> 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<String, List<IndexGroupDetailEntity>> entry : groupIndexDetailsMap.entrySet()) {
String indexCode = entry.getKey();
List<IndexGroupDetailEntity> details = entry.getValue();
calculateScore(formDTO, details, list, minAndMaxMap, indexCode);
}
//遍历指标分组 计算分数
for (Map.Entry<String, List<IndexGroupDetailEntity>> entry : groupIndexDetailsMap.entrySet()) {
String indexCode = entry.getKey();
List<IndexGroupDetailEntity> details = entry.getValue();
calculateScore(formDTO, details, list, minAndMaxMap, indexCode);
}
}
pageNo++;

Loading…
Cancel
Save