diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java index d76a03aec6..84119c0594 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java @@ -17,16 +17,23 @@ package com.epmet.service.evaluationindex.indexcal.impl; -import com.epmet.commons.dynamic.datasource.annotation.DataSource; +import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.constant.DataSourceConstant; +import com.epmet.commons.tools.exception.RenException; import com.epmet.dao.evaluationindex.indexcal.DeptScoreDao; import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityDeptMonthlyDao; import com.epmet.dto.indexcal.CalculateCommonFormDTO; import com.epmet.entity.indexcal.DeptScoreEntity; +import com.epmet.entity.screen.IndexGroupDetailEntity; +import com.epmet.eum.IndexCodeEnum; import com.epmet.service.evaluationindex.indexcal.DeptScoreService; +import com.epmet.service.evaluationindex.screen.IndexGroupDetailService; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; /** @@ -35,10 +42,11 @@ import org.springframework.stereotype.Service; * @author generator generator@elink-cn.com * @since v1.0.0 2020-09-02 */ +@Slf4j @Service -@DataSource(DataSourceConstant.EVALUATION_INDEX) public class DeptScoreServiceImpl extends BaseServiceImpl implements DeptScoreService { - + @Autowired + private IndexGroupDetailService getDetailListByParentCode; @Autowired private FactIndexGovrnAblityDeptMonthlyDao factIndexGovrnAblityDeptMonthlyDao; @@ -52,11 +60,14 @@ public class DeptScoreServiceImpl extends BaseServiceImpl parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), IndexCodeEnum.DANG_YUAN_XIANG_GUAN.getCode()); + List parentIndexDetails = getDetailListByParentCode.getDetailListByParentCode(formDTO.getCustomerId(), + IndexCodeEnum.QU_ZHI_BU_MEN.getCode(), + IndexCodeEnum.ZHI_LI_NENG_LI.getCode()); if (CollectionUtils.isEmpty(parentIndexDetails)) { - log.warn("cpcIndexCalculate customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); - throw new RenException("客户【党员相关】指标权重信息不存在"); - }*/ + log.warn("calculateDeptCorreLation customerId:{} have not any indexGroupDetail", formDTO.getCustomerId()); + throw new RenException("客户【区直部门:治理能力】指标权重信息不存在"); + } + log.info(JSON.toJSONString(parentIndexDetails)); return null; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index 97a58ca152..82f2d0f1da 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -78,7 +78,6 @@ 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;