diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java index ef79775673..051af134ba 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResult.java @@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; /** * @Author zxc @@ -22,4 +23,20 @@ public class MonthBarchartResult implements Serializable { private Double governAbility; private Double indexTotal; + + //新增返回权重 + /** + * 服务能力指数 权重 + */ + private BigDecimal serviceAblityWeight; + + /** + * 党建能力指数权重 + */ + private BigDecimal partyDevWeight; + + /** + * 治理能力分数,权重 + */ + private BigDecimal governAblityWeight; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java index ad21904ba2..8a8da975f1 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthBarchartResultDTO.java @@ -3,6 +3,7 @@ package com.epmet.evaluationindex.screen.dto.result; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.List; /** @@ -38,4 +39,20 @@ public class MonthBarchartResultDTO implements Serializable { * 总指数集合 */ private List totalIndexData; + + //新增返回权重 + /** + * 服务能力指数 权重 + */ + private List serviceAblityWeightData; + + /** + * 党建能力指数权重 + */ + private List partyDevWeightData; + + /** + * 治理能力分数,权重 + */ + private List governAblityWeightData; } diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthScoreListResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthScoreListResultDTO.java index 19fad59717..91cfa81af7 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthScoreListResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/MonthScoreListResultDTO.java @@ -55,6 +55,14 @@ public class MonthScoreListResultDTO implements Serializable { */ @JsonIgnore private String indexCode; + /** + * 自身指标权重 + */ + private Double selfWeight; + /** + * 下级指标权重 + */ + private Double subWeight; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 4ff84d3ab6..30afda20ef 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -106,6 +106,11 @@ public class IndexServiceImpl implements IndexService { List partyDevAbilityData = new ArrayList<>(); List governAbilityData = new ArrayList<>(); List totalIndexData = new ArrayList<>(); + + //添加返回权重 + List serviceAblityWeightData = new ArrayList<>(); + List partyDevWeightData = new ArrayList<>(); + List governAblityWeightData = new ArrayList<>(); // 1. x轴 result.setXAxis(partyMemberLeadServiceImpl.getXPro()); // 2. 查询近一年的指数值【包括本月】 @@ -116,11 +121,19 @@ public class IndexServiceImpl implements IndexService { partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO); governAbilityData.add(NumConstant.ZERO_DOT_ZERO); totalIndexData.add(NumConstant.ZERO_DOT_ZERO); + //添加返回权重 + serviceAblityWeightData.add(BigDecimal.ZERO); + partyDevWeightData.add(BigDecimal.ZERO); + governAblityWeightData.add(BigDecimal.ZERO); } result.setServiceAbilityData(serviceAbilityData); result.setPartyDevAbilityData(partyDevAbilityData); result.setGovernAbilityData(governAbilityData); result.setTotalIndexData(totalIndexData); + //添加返回权重 + result.setServiceAblityWeightData(serviceAblityWeightData); + result.setPartyDevWeightData(partyDevWeightData); + result.setGovernAblityWeightData(governAblityWeightData); return result; } // 处理小数四舍五入 @@ -129,6 +142,10 @@ public class IndexServiceImpl implements IndexService { barchart.setGovernAbility(getRound(barchart.getGovernAbility())); barchart.setServiceAbility(getRound(barchart.getServiceAbility())); barchart.setIndexTotal(getRound(barchart.getPartyDevAbility() + barchart.getGovernAbility() + barchart.getServiceAbility())); + //四舍五入,保留小数点后两位 + barchart.setServiceAblityWeight(barchart.getServiceAblityWeight().setScale(NumConstant.TWO,BigDecimal.ROUND_HALF_UP)); + barchart.setPartyDevWeight(barchart.getPartyDevWeight().setScale(NumConstant.TWO,BigDecimal.ROUND_HALF_UP)); + barchart.setGovernAblityWeight(barchart.getGovernAblityWeight().setScale(NumConstant.TWO,BigDecimal.ROUND_HALF_UP)); }); List collect = monthBarchartResults.stream().sorted(Comparator.comparing(MonthBarchartResult::getMonthId)).collect(Collectors.toList()); //升序 当前月份在队尾 @@ -153,6 +170,10 @@ public class IndexServiceImpl implements IndexService { partyDevAbilityData.add(NumConstant.ZERO_DOT_ZERO); governAbilityData.add(NumConstant.ZERO_DOT_ZERO); totalIndexData.add(NumConstant.ZERO_DOT_ZERO); + //权重默认0 + serviceAblityWeightData.add(BigDecimal.ZERO); + partyDevWeightData.add(BigDecimal.ZERO); + governAblityWeightData.add(BigDecimal.ZERO); //保持cursor不变 }else{ MonthBarchartResult data = collect.get(cursor); @@ -161,6 +182,10 @@ public class IndexServiceImpl implements IndexService { partyDevAbilityData.add(null == data.getPartyDevAbility() ? NumConstant.ZERO_DOT_ZERO : data.getPartyDevAbility()); governAbilityData.add(null == data.getGovernAbility() ? NumConstant.ZERO_DOT_ZERO : data.getGovernAbility()); totalIndexData.add(null == data.getIndexTotal() ? NumConstant.ZERO_DOT_ZERO : data.getIndexTotal()); + //添加权重 + serviceAblityWeightData.add(null==data.getServiceAblityWeight()?BigDecimal.ZERO:data.getServiceAblityWeight()); + partyDevWeightData.add(null==data.getPartyDevWeight()?BigDecimal.ZERO:data.getPartyDevWeight()); + governAblityWeightData.add(null==data.getGovernAblityWeight()?BigDecimal.ZERO:data.getGovernAblityWeight()); //统计日期一致后移动游标 cursor++; } @@ -177,6 +202,10 @@ public class IndexServiceImpl implements IndexService { result.setPartyDevAbilityData(partyDevAbilityData); result.setGovernAbilityData(governAbilityData); result.setTotalIndexData(totalIndexData); + //添加返回权重 + result.setServiceAblityWeightData(serviceAblityWeightData); + result.setPartyDevWeightData(partyDevWeightData); + result.setGovernAblityWeightData(governAblityWeightData); return result; } diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml index 6eb14469a2..3fce81dc73 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml @@ -55,7 +55,9 @@ fact.WEIGHT AS "indexTotalSupWeight", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", - fact.index_code AS "indexCode" + fact.index_code AS "indexCode", + self.SELF_WEIGHT AS "selfWeight", + self.SUB_WEIGHT AS "subWeight" FROM fact_index_agency_score fact INNER JOIN fact_index_agency_self_sub_score self ON fact.agency_id = self.agency_id diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml index ca682e107b..c48ba651ac 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml @@ -55,7 +55,9 @@ fact.WEIGHT AS "indexTotalSupWeight", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", - fact.index_code AS "indexCode" + fact.index_code AS "indexCode", + self.SELF_WEIGHT AS "selfWeight", + self.SUB_WEIGHT AS "subWeight" FROM fact_index_community_score fact INNER JOIN fact_index_community_self_sub_score self ON fact.agency_id = self.agency_id diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml index 708a5fbf1f..a731e9c1db 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml @@ -56,7 +56,9 @@ fact.WEIGHT AS "indexTotalSupWeight", ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", - fact.index_code AS "indexCode" + fact.index_code AS "indexCode", + self.SELF_WEIGHT AS "selfWeight", + self.SUB_WEIGHT AS "subWeight" FROM fact_index_grid_score fact INNER JOIN fact_index_grid_self_sub_score self ON fact.grid_id = self.grid_id diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 55dd281ff5..8011535fdb 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -33,7 +33,10 @@ month_id AS monthId, service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, - govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility + govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, + SERVICE_ABLITY_WEIGHT as serviceAblityWeight, + PARTY_DEV_WEIGHT as partyDevWeight, + GOVERN_ABLITY_WEIGHT as governAblityWeight FROM screen_index_data_monthly WHERE diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java index a7649e03a2..01f9ee8cf8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExtUserInfoResultDTO.java @@ -75,6 +75,22 @@ public class ExtUserInfoResultDTO implements Serializable { * */ private String gridName = ""; + /** + * 手机号(注册手机号) + */ + private String mobile = ""; + + /** + * 用户微信openId + * */ + private String wxOpenId = ""; + + /** + * 性别(1男2女0未知) + */ + private String gender = ""; + + /** * 用户角色列表 * */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java index 7a961e6fd9..2072097574 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBaseInfoServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.dto.form.ResiVolunteerAuthenticateFormDTO; import com.epmet.dto.form.UserRoleFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.UserBaseInfoEntity; +import com.epmet.entity.UserWechatEntity; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.redis.UserBaseInfoRedis; import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; @@ -341,11 +342,22 @@ public class UserBaseInfoServiceImpl extends BaseServiceImpl list = userWechatDao.selectByUserId(param.getUserId()); + if (list.size() > NumConstant.ZERO) { + result.setWxOpenId(StringUtils.isNotBlank(list.get(NumConstant.ZERO).getWxOpenId()) ? list.get(NumConstant.ZERO).getWxOpenId() : ""); + } + result.setGender(StringUtils.isNotBlank(userMsg.getGender()) ? userMsg.getGender() : ""); + //end }else{ logger.error("com.epmet.service.impl.UserBaseInfoServiceImpl.extUserInfo,查询不到用户信息,用户Id:{}",param.getUserId()); return result;