diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java index f61ab58957..8c0ee008be 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java @@ -120,4 +120,8 @@ public class DeptScoreDTO implements Serializable { */ private Date updatedTime; -} \ No newline at end of file + /** + * 权重(同一组权重总和=1) 9.12新增 + */ + private BigDecimal weight; +} diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java index d5be2db6e9..ed068f9a75 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java @@ -119,4 +119,8 @@ public class FactIndexGridScoreDTO implements Serializable { */ private Date updatedTime; + /** + * 权重(同一组权重总和=1) 9.12新增 + */ + private BigDecimal weight; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java index 1a879bd3a8..2f5c6cc136 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java @@ -276,6 +276,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyDTO.setPartyDevAblity(zero); monthlyDTO.setServiceAblity(zero); monthlyDTO.setGovernAblity(zero); + // 9.12 增加权重 + monthlyDTO.setPartyDevWeight(zero); + monthlyDTO.setServiceAblityWeight(zero); + monthlyDTO.setGovernAblityWeight(zero); // 补充表中其他字段 monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.GRID, gridScoreDTOS.get(i).getGridId(), gridScoreDTOS.get(i).getParentAgencyId(), gridScoreDTOS.get(i).getGridName(), monthlyDTO); @@ -315,6 +319,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } else { // 赋实际值 党建能力、治理能力、服务能力 monthlyFormDTO = this.setValueAbilityMonthlyFor(gridScore.getValue().get(i).getIndexCode(), + gridScore.getValue().get(i).getWeight(), gridScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -397,6 +402,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyDTO.setPartyDevAblity(zero); monthlyDTO.setServiceAblity(zero); monthlyDTO.setGovernAblity(zero); + // 9.12 增加权重 + monthlyDTO.setPartyDevWeight(zero); + monthlyDTO.setServiceAblityWeight(zero); + monthlyDTO.setGovernAblityWeight(zero); // 补充表中其他字段 monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.AGENCY, communityScoreDTOS.get(i).getAgencyId(), communityScoreDTOS.get(i).getPid(), communityScoreDTOS.get(i).getAgencyName(), monthlyDTO); @@ -435,6 +444,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } else { // 赋值 党建能力、治理能力、服务能力 monthlyFormDTO = this.setValueAbilityMonthlyFor(communityScore.getValue().get(i).getIndexCode(), + communityScore.getValue().get(i).getWeight(), communityScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -517,6 +527,10 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyDTO.setPartyDevAblity(zero); monthlyDTO.setServiceAblity(zero); monthlyDTO.setGovernAblity(zero); + // 9.12 增加权重 + monthlyDTO.setPartyDevWeight(zero); + monthlyDTO.setServiceAblityWeight(zero); + monthlyDTO.setGovernAblityWeight(zero); // 补充表中其他字段 monthlyDTO = this.supplementIndexDataMonthlyTable(monthId, OrgTypeConstant.DEPARTMENT, deptScoreDTOS.get(i).getDeptId(), deptScoreDTOS.get(i).getParentAgencyId(), deptScoreDTOS.get(i).getDeptName(), monthlyDTO); @@ -549,6 +563,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { monthlyFormDTO.setIndexTotal(deptScore.getValue().get(i).getScore()); // 赋值 治理能力 monthlyFormDTO = this.setValueAbilityMonthlyFor(deptScore.getValue().get(i).getIndexCode(), + deptScore.getValue().get(i).getWeight(), deptScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -633,6 +648,7 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { } else { // 赋值 党建能力、治理能力、服务能力 monthlyFormDTO = this.setValueAbilityMonthlyFor(agencyScore.getValue().get(i).getIndexCode(), + agencyScore.getValue().get(i).getWeight(), agencyScore.getValue().get(i).getScore(), monthlyFormDTO); } @@ -686,23 +702,28 @@ public class FactIndexCollectServiceImpl implements FactIndexCollectService { /** * 赋实际值 党建能力、治理能力、服务能力 * @param IndexCode 组织类别 + * @param weight 权重(同一组权重总和=1) * @param Score 分数 * @param monthlyFormDTO 待保存的数据 * @return com.epmet.dto.screencoll.form.IndexDataMonthlyFormDTO * @Author zhangyong * @Date 09:26 2020-09-04 **/ - private IndexDataMonthlyFormDTO setValueAbilityMonthlyFor(String IndexCode, BigDecimal Score, IndexDataMonthlyFormDTO monthlyFormDTO){ + private IndexDataMonthlyFormDTO setValueAbilityMonthlyFor(String IndexCode, BigDecimal weight, BigDecimal Score, IndexDataMonthlyFormDTO monthlyFormDTO){ // 赋实际值 if (IndexCodeEnum.DANG_JIAN_NENG_LI.getCode().equals(IndexCode)){ // 党建能力 monthlyFormDTO.setPartyDevAblity(Score); + // 9.12 增加权重 + monthlyFormDTO.setPartyDevWeight(weight); } else if (IndexCodeEnum.ZHI_LI_NENG_LI.getCode().equals(IndexCode)){ // 治理能力 monthlyFormDTO.setGovernAblity(Score); + monthlyFormDTO.setGovernAblityWeight(weight); } else if (IndexCodeEnum.FU_WU_NENG_LI.getCode().equals(IndexCode)){ // 服务能力 monthlyFormDTO.setServiceAblity(Score); + monthlyFormDTO.setServiceAblityWeight(weight); } return monthlyFormDTO; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml index 234461164f..65922677e5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml @@ -55,7 +55,8 @@ MONTH_ID monthId, IS_TOTAL isTotal, SCORE score, - INDEX_CODE indexCode + INDEX_CODE indexCode, + WEIGHT weight FROM fact_index_agency_score WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml index f3ed82b614..aca5ce3669 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml @@ -98,7 +98,8 @@ MONTH_ID monthId, IS_TOTAL isTotal, SCORE score, - INDEX_CODE indexCode + INDEX_CODE indexCode, + WEIGHT weight FROM fact_index_community_score WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml index e02f5a0348..b70d136989 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml @@ -11,7 +11,8 @@ MONTH_ID monthId, IS_TOTAL isTotal, SCORE score, - INDEX_CODE indexCode + INDEX_CODE indexCode, + WEIGHT weight FROM fact_index_dept_score WHERE diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml index 0fb34c3f8d..499f3349f4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml @@ -154,7 +154,8 @@ MONTH_ID monthId, IS_TOTAL isTotal, SCORE score, - INDEX_CODE indexCode + INDEX_CODE indexCode, + WEIGHT weight FROM fact_index_grid_score WHERE @@ -177,4 +178,4 @@ ORDER BY GRID_ID - \ No newline at end of file +