Browse Source

增加权重值

dev_shibei_match
zhangyongzhangyong 5 years ago
parent
commit
7f8b7054cb
  1. 6
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/DeptScoreDTO.java
  2. 4
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/FactIndexGridScoreDTO.java
  3. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/FactIndexCollectServiceImpl.java
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/AgencyScoreDao.xml
  5. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml
  6. 3
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/DeptScoreDao.xml
  7. 5
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml

6
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;
}
/**
* 权重同一组权重总和=1 9.12新增
*/
private BigDecimal weight;
}

4
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;
}

23
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;
}

3
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

3
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

3
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

5
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
</select>
</mapper>
</mapper>

Loading…
Cancel
Save