Browse Source

只有一个网格的事实记录时无需赋值50

master
yinzuomei 5 years ago
parent
commit
58834d9246
  1. 22
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java

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

@ -136,11 +136,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
if (NumConstant.ZERO == total) { if (NumConstant.ZERO == total) {
log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); log.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId()));
return; return;
} else if (NumConstant.ONE == total) { }
//只有一个网格的事实记录时无需处理以下代码注释
/*else if (NumConstant.ONE == total) {
//只有一个网格时 //只有一个网格时
log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_party_ablity_grid_monthly record",IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId()));
this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode()); this.handleOneGridScene(formDTO,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
} }*/
//总页数,进行批量查询,批量计算 //总页数,进行批量查询,批量计算
int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE);
log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); log.info(String.format("共%s条数据,分%s次计算", total, totalPage));
@ -199,7 +201,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
* @description 只有一条事实记录时分值默认赋50 * @description 只有一条事实记录时分值默认赋50
* @Date 2020/9/2 14:35 * @Date 2020/9/2 14:35
**/ **/
private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) { /*private void handleOneGridScene(CalculateCommonFormDTO formDTO, String indexCode) {
List<HashMap<String, BigDecimal>> resultMapList = new ArrayList<>(); List<HashMap<String, BigDecimal>> resultMapList = new ArrayList<>();
HashMap<String, BigDecimal> resultMap = new HashMap<>(); HashMap<String, BigDecimal> resultMap = new HashMap<>();
String gridId =null; String gridId =null;
@ -215,7 +217,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
// 保存中间表 // 保存中间表
saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR); saveGridCorreLationResult(formDTO, resultMapList, indexCode, NumConstant.ZERO_STR);
} }
*/
/** /**
* @param calculateCommonFormDTO * @param calculateCommonFormDTO
* @return java.util.Map<java.lang.String, java.math.BigDecimal> * @return java.util.Map<java.lang.String, java.math.BigDecimal>
@ -479,11 +481,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
if (NumConstant.ZERO == total) { if (NumConstant.ZERO == total) {
log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); log.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId()));
return; return;
}else if (NumConstant.ONE == total) { }
//只有一个网格的事实记录时无需处理以下代码注释
/*else if (NumConstant.ONE == total) {
//只有一个网格时 //只有一个网格时
log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_govrn_ablity_grid_monthly record",IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId()));
this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); this.handleOneGridScene(formDTO,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
} }*/
//总页数,进行批量查询,批量计算 //总页数,进行批量查询,批量计算
int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE);
log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); log.info(String.format("共%s条数据,分%s次计算", total, totalPage));
@ -546,11 +550,13 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
if (NumConstant.ZERO == total) { if (NumConstant.ZERO == total) {
log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); log.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId()));
return; return;
}else if (NumConstant.ONE == total) { }
//只有一个网格的事实记录时无需处理以下代码注释
/*else if (NumConstant.ONE == total) {
//只有一个网格时 //只有一个网格时
log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId())); log.warn(String.format("indexCode:%s,customerId:%s,monthId:%s,only one fact_index_service_ablity_grid_monthly record",IndexCodeEnum.FU_WU_NENG_LI.getCode(),formDTO.getCustomerId(),formDTO.getMonthId()));
this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode()); this.handleOneGridScene(formDTO,IndexCodeEnum.FU_WU_NENG_LI.getCode());
} }*/
//总页数,进行批量查询,批量计算 //总页数,进行批量查询,批量计算
int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE); int totalPage = (int) Math.ceil((double) total / IndexCalConstant.PAGE_SIZE);
log.info(String.format("共%s条数据,分%s次计算", total, totalPage)); log.info(String.format("共%s条数据,分%s次计算", total, totalPage));

Loading…
Cancel
Save