From cd78c492d046f7ea9af7369b7dae33b810a99b6e Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 1 Sep 2020 11:14:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../indexcal/impl/GridCorreLationServiceImpl.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java index 7fa8281f15..c6c160509e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java @@ -1,9 +1,11 @@ package com.epmet.service.indexcal.impl; +import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.constant.DataSourceConstant; import com.epmet.constant.IndexCalConstant; import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao; import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao; @@ -68,6 +70,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { * @description 网格相关,分值计算 * @Date 2020/8/26 10:51 **/ + @DataSource(value = DataSourceConstant.STATS,datasourceNameFromArg = true) @Override public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) { boolean resultFlag = false; @@ -127,7 +130,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexPartyAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-党建能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + logger.warn(String.format("customerId=%s,monthId=%s,没有上传网格相关-党建能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } //总页数,进行批量查询,批量计算 @@ -155,6 +158,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { recordList.forEach(recordMap -> { //遍历所有的指标 indexMap.forEach((key, value) -> { + logger.info("index_code :{}",key); //列名不为空 if (StringUtils.isNotBlank(indexCodeFieldReService.getFieldNameByIndexCode(key))) { //对应的数值 @@ -371,7 +375,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { logger.error("index_code:{} ",index.getIndexCode(),"not find field_name"); continue; } - logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); +// logger.info("index_code:{} ",index.getIndexCode(),"field_id :{} ",fieldName); String minValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MIN); String maxValueKey = fieldName.concat(StrConstant.UNDER_LINE).concat(StrConstant.MAX); minValue = new BigDecimal(String.valueOf(minAndMaxMap.get(minValueKey))); @@ -409,7 +413,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-治理能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + logger.warn(String.format("customerId%s,monthId%s,没有上传网格相关-治理能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } //总页数,进行批量查询,批量计算 @@ -473,7 +477,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { //查询总记录数 int total = factIndexGovrnAblityGridMonthlyDao.selectCount(formDTO); if (NumConstant.ZERO == total) { - logger.info(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据"), formDTO.getCustomerId(), formDTO.getMonthId()); + logger.warn(String.format("customerId:%s,monthId:%s,没有上传网格相关-服务能力-五级指标数据", formDTO.getCustomerId(), formDTO.getMonthId())); return; } //总页数,进行批量查询,批量计算