Browse Source

Merge branch 'dev_screen_data' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_screen_data

dev_shibei_match
wxz 5 years ago
parent
commit
d13bf9c484
  1. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  2. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java

@ -120,7 +120,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
IndexCodeEnum.QU_ZHI_BU_MEN.getCode(),
IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexGroupDetailEntityList)) {
log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【区直部门:治理能力】下级指标权重信息不存在");
}
// log.info(JSON.toJSONString(indexGroupDetailEntityList));
@ -169,14 +169,16 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
List<IndexGroupDetailEntity> indexList = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.QU_ZHI_BU_MEN.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateDeptTotalScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateDeptTotalScore customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【区直部门】下级指标权重信息不存在");
}
//查询总记录数
List<DeotScore> deptScoreDTOList = deptScoreDao.selectList(formDTO);
if(CollectionUtils.isEmpty(deptScoreDTOList)){
log.error("calculateDeptTotalScore deptScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
throw new RenException("客户一级指标分值记录不存在");
log.warn("calculateDeptTotalScore deptScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
// throw new RenException("客户一级指标分值记录不存在");
log.warn(String.format("customerId=%s,monthId=%s,fact_index_dept_score have not any fact record", formDTO.getCustomerId(), formDTO.getMonthId()));
return;
}
Map<String, IndexGroupDetailEntity> indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity()));
List<DeptScoreEntity> deotScoreEntityList = new ArrayList<>();
@ -339,7 +341,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
//获取指标对应的列名
String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode());
if (StringUtils.isBlank(fieldName)) {
log.error("index_code:{} not find field_name", index.getIndexCode());
log.warn("index_code:{} not find field_name", index.getIndexCode());
continue;
}
String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN);

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java

@ -106,7 +106,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridDangJian customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关:党建能力】指标权重信息不存在");
}
//查询总记录数
@ -121,7 +121,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryPartyAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(minAndMaxMap)) {
log.error("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
log.warn("calculateGridDangJian queryPartyAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
//指标集合
@ -463,7 +463,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//获取指标对应的列名
String fieldName = indexCodeFieldReService.getFieldNameByIndexCode(index.getIndexCode());
if (StringUtils.isBlank(fieldName)) {
log.error("index_code:{} not find field_name",index.getIndexCode());
log.warn("index_code:{} not find field_name",index.getIndexCode());
continue;
}
// log.info("index_code2:{} ,field_name:{}",index.getIndexCode(),fieldName);
@ -509,7 +509,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridZhiLi customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关:治理能力】指标权重信息不存在");
}
//查询总记录数
@ -524,7 +524,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryGovrnAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(minAndMaxMap)) {
log.error("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
log.warn("calculateGridZhiLi queryGovrnAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
//指标集合
@ -582,7 +582,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode(),
IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridFuWu customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关:服务能力】指标权重信息不存在");
}
//查询总记录数
@ -597,7 +597,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
//每一组指标的最大值,key:code_MIN/MAX
Map<String, Object> minAndMaxMap = queryServiceAblityGridMinAndMax(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(minAndMaxMap)) {
log.error("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
log.warn("calculateGridFuWu queryServiceAblityGridMinAndMax customerId:{} monthId:{} have not any fact record", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
//指标集合
@ -623,7 +623,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
SampleValue<BigDecimal> currentGridIndexValue = new SampleValue((String) recordMap.get(IndexCalConstant.GRID_ID), new BigDecimal(sampleValueStr));
value.getIndexValueVOs().add(currentGridIndexValue);
} else {
log.error("index_code:" + key + " not find field_name");
log.warn("index_code:" + key + " not find field_name");
}
});
});
@ -649,14 +649,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
List<IndexGroupDetailEntity> indexList = indexGroupDetailService.getDetailListByParentCode(formDTO.getCustomerId(),
IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode());
if (CollectionUtils.isEmpty(indexList)) {
log.warn("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
log.error("calculateGridTotal customerId:{} have not any indexGroupDetail", formDTO.getCustomerId());
throw new RenException("客户【网格相关】指标权重信息不存在");
}
//查询总记录数
List<GridScoreDTO> gridScoreDTOList = gridScoreDao.selectList(formDTO);
if(CollectionUtils.isEmpty(gridScoreDTOList)){
log.error("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
throw new RenException("客户一级指标分值记录不存在");
log.warn("calculateGridTotal gridScoreDao.selectList return empty,customerId:{},monthId:{}", formDTO.getCustomerId(), formDTO.getMonthId());
// throw new RenException("客户一级指标分值记录不存在");
return;
}
Map<String, IndexGroupDetailEntity> indexMap = indexList.stream().collect(Collectors.toMap(IndexGroupDetailEntity::getIndexCode, Function.identity()));
List<GridScoreEntity> gridScoreEntityList = new ArrayList<>();

Loading…
Cancel
Save