Browse Source

街道相关优化

dev_shibei_match
zxc 5 years ago
parent
commit
b2249ac8fd
  1. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityAvgResultDTO.java
  2. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridAvgResultDTO.java
  3. 28
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java
  4. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java
  5. 38
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  6. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  7. 40
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml
  8. 40
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityServiceAvgResultDTO.java → epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/SubCommunityAvgResultDTO.java

@ -10,7 +10,7 @@ import java.math.BigDecimal;
* @DateTime 2020/9/2 6:01 下午
*/
@Data
public class SubCommunityServiceAvgResultDTO implements Serializable {
public class SubCommunityAvgResultDTO implements Serializable {
private static final long serialVersionUID = 7681907923515081626L;

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridPartyAvgResultDTO.java → epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/result/SubGridAvgResultDTO.java

@ -10,7 +10,7 @@ import java.math.BigDecimal;
* @DateTime 2020/8/28 3:15 下午
*/
@Data
public class SubGridPartyAvgResultDTO implements Serializable {
public class SubGridAvgResultDTO implements Serializable {
private static final long serialVersionUID = 1592381327492545907L;

28
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexCommunityScoreDao.java

@ -20,11 +20,8 @@ package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.indexcal.SubCommunityGovernAvgResultDTO;
import com.epmet.dto.indexcal.SubCommunityPartyAvgResultDTO;
import com.epmet.dto.indexcal.SubCommunityServiceAvgResultDTO;
import com.epmet.dto.indexcal.SubCommunityAvgResultDTO;
import com.epmet.dto.screen.FactIndexCommunityScoreDTO;
import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO;
import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO;
import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO;
import com.epmet.entity.evaluationindex.screen.FactIndexCommunityScoreEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -67,32 +64,13 @@ public interface FactIndexCommunityScoreDao extends BaseDao<FactIndexCommunitySc
*/
List<FactIndexCommunityScoreDTO> selectCommunityInfo(@Param("customerId") String customerId,@Param("monthId")String monthId);
/**
* @Description 下属所有社区的党建能力平均值
* @param customerId
* @param monthId
* @author zxc
* @date 2020/8/28 3:20 下午
*/
List<SubCommunityPartyAvgResultDTO> selectSubCommPartyAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId);
/**
* @Description 街道下属所有社区治理能力汇总平均值
* @param customerId
* @param monthId
* @author zxc
* @date 2020/8/31 9:19 上午
*/
List<SubCommunityGovernAvgResultDTO> selectSubCommGovernAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId);
/**
* @Description 街道下级所有社区服务能力得分平均值
* @Description 街道下级所有社区得分平均值
* @param customerId
* @param monthId
* @author zxc
* @date 2020/8/31 1:51 下午
*/
List<SubCommunityServiceAvgResultDTO> selectSubCommServiceAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId,@Param("indexCode")String indexCode);
List<SubCommunityAvgResultDTO> selectSubCommAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode);
}

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/FactIndexGridScoreDao.java

@ -19,7 +19,7 @@ package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO;
import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO;
import com.epmet.dto.screen.result.SubGridAvgResultDTO;
import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO;
import com.epmet.entity.evaluationindex.screen.FactIndexGridScoreEntity;
import org.apache.ibatis.annotations.Mapper;
@ -43,24 +43,5 @@ public interface FactIndexGridScoreDao extends BaseDao<FactIndexGridScoreEntity>
* @author zxc
* @date 2020/8/28 3:20 下午
*/
List<SubGridPartyAvgResultDTO> selectSubGridAvgScore(@Param("customerId")String customerId,@Param("monthId")String monthId,@Param("indexCode")String indexCode);
/**
* @Description 社区下属所有网格治理能力汇总平均值
* @param customerId
* @param monthId
* @author zxc
* @date 2020/8/31 9:19 上午
*/
List<SubGridGovernAvgResultDTO> selectSubGridGovernAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId);
/**
* @Description 社区下级所有网格服务能力得分平均值
* @param customerId
* @param monthId
* @author zxc
* @date 2020/8/31 1:51 下午
*/
List<SubGridServiceAvgResultDTO> selectSubGridServiceAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId);
List<SubGridAvgResultDTO> selectSubGridAvgScore(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("indexCode")String indexCode);
}

38
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java

@ -14,9 +14,7 @@ import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao;
import com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao;
import com.epmet.dto.screen.FactIndexCommunityScoreDTO;
import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO;
import com.epmet.dto.screen.result.SubGridGovernAvgResultDTO;
import com.epmet.dto.screen.result.SubGridPartyAvgResultDTO;
import com.epmet.dto.screen.result.SubGridServiceAvgResultDTO;
import com.epmet.dto.screen.result.SubGridAvgResultDTO;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity;
import com.epmet.eum.IndexCodeEnum;
import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService;
@ -84,7 +82,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
//下属所有网格的党建能力平均值
detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.XIA_SHU_SUO_YOU_WGDDJNLPJZ.getCode().equals(detail.getIndexCode())) {
List<SubGridPartyAvgResultDTO> subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
List<SubGridAvgResultDTO> subGridPartyAvgScore = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(subGridPartyAvgScore)) {
log.error("查询下属所有网格的党建能力平均值集合为空");
return;
@ -95,10 +93,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}else if (subGridPartyAvgScore.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList()));
Integer indexEnd = NumConstant.TEN;
List<List<SubGridPartyAvgResultDTO>> partition = ListUtils.partition(subGridPartyAvgScore, indexEnd);
partition.forEach(publish -> {
List<List<SubGridAvgResultDTO>> subPartyAvgList = ListUtils.partition(subGridPartyAvgScore, indexEnd);
subPartyAvgList.forEach( party -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
publish.forEach(c -> {
party.forEach(c -> {
pid.put(c.getAgencyId(),c.getParentId());
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s);
@ -110,8 +108,8 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}
} else {
// 社区名义发文数量
List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL);
if (CollectionUtils.isEmpty(mapList)) {
List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMap(customerId, monthId,IndexCalConstant.COMMUNITY_LEVEL);
if (CollectionUtils.isEmpty(publishArticleCountList)) {
log.error("查询社区名义发文数量集合为空");
return;
}
@ -119,15 +117,15 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
if (StringUtils.isEmpty(fieldNameByIndexCode)) {
log.error("指标Code未查询出对应字段 【" + detail.getIndexCode() + "】");
return;
}else if (mapList.size() == NumConstant.ONE){
pid.put(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),mapList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
sizeOne(mapList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid);
}else if (publishArticleCountList.size() == NumConstant.ONE){
pid.put(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.PARENT_ID).toString());
sizeOne(publishArticleCountList.get(NumConstant.ZERO).get(IndexCalConstant.AGENCY_ID).toString(),customerId,monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),pid);
return;
}else if (mapList.size() > NumConstant.ONE) {
List<BigDecimal> decimalList = mapList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
}else if (publishArticleCountList.size() > NumConstant.ONE) {
List<BigDecimal> decimalList = publishArticleCountList.stream().map(m -> new BigDecimal(m.get(fieldNameByIndexCode).toString())).collect(Collectors.toList());
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(decimalList);
List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(mapList, 10);
publishArticleList.forEach(publish -> {
List<List<Map<String, Object>>> publishArticleList = ListUtils.partition(publishArticleCountList, 10);
publishArticleList.forEach( publish -> {
ScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();
publish.forEach(c -> {
@ -166,14 +164,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
Map<String,String> pid = new HashMap<>();
detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.SHE_QU_XIA_SHU_SYWGZLNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubGridPartyAvgResultDTO> subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
List<SubGridAvgResultDTO> subGridGovernAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (subGridGovernAvg.size() == NumConstant.ONE) {
pid.put(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),subGridGovernAvg.get(NumConstant.ZERO).getParentId());
sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid);
return;
} else if (subGridGovernAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubGridPartyAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, 10);
List<List<SubGridAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, 10);
governAvg.forEach(avg -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
avg.forEach(c -> {
@ -245,14 +243,14 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode();
if (IndexCodeEnum.SHE_QU_XIA_JI_SYWGFWNLDFPJZ.getCode().equals(indexCode)) {
List<SubGridPartyAvgResultDTO> subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode());
List<SubGridAvgResultDTO> subGridServiceAvg = factIndexGridScoreDao.selectSubGridAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (subGridServiceAvg.size() == NumConstant.ONE) {
pid.put(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId(),subGridServiceAvg.get(NumConstant.ZERO).getParentId());
sizeOne(subGridServiceAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid);
return;
} else if (subGridServiceAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubGridPartyAvgResultDTO>> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10);
List<List<SubGridAvgResultDTO>> serviceAvgList = ListUtils.partition(subGridServiceAvg, 10);
serviceAvgList.forEach(serviceAvg -> {
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

@ -13,7 +13,7 @@ import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyDao
import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityOrgMonthlyDao;
import com.epmet.dao.evaluationindex.screen.FactIndexCommunityScoreDao;
import com.epmet.dto.indexcal.AgencyScoreDTO;
import com.epmet.dto.indexcal.SubCommunityServiceAvgResultDTO;
import com.epmet.dto.indexcal.SubCommunityAvgResultDTO;
import com.epmet.dto.screen.result.MaxAndMinBigDecimalResultDTO;
import com.epmet.entity.evaluationindex.screen.IndexGroupDetailEntity;
import com.epmet.eum.IndexCodeEnum;
@ -110,7 +110,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
//下属所有社区的党建能力平均值
detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubCommunityServiceAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommServiceAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
List<SubCommunityAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode());
if (CollectionUtils.isEmpty(subCommPartyAvgScore)) {
log.error("查询下属所有社区的党建能力平均值集合为空");
return;
@ -121,7 +121,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
}else if (subCommPartyAvgScore.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommPartyAvgScore.stream().map(o -> o.getScore()).collect(Collectors.toList()));
Integer indexEnd = NumConstant.TEN;
List<List<SubCommunityServiceAvgResultDTO>> partition = ListUtils.partition(subCommPartyAvgScore, indexEnd);
List<List<SubCommunityAvgResultDTO>> partition = ListUtils.partition(subCommPartyAvgScore, indexEnd);
partition.forEach(publish -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
publish.forEach(c -> {
@ -191,14 +191,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
Map<String,String> pid = new HashMap<>();
detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) {
List<SubCommunityServiceAvgResultDTO> subGridGovernAvg = communityScoreDao.selectSubCommServiceAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
List<SubCommunityAvgResultDTO> subGridGovernAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
if (subGridGovernAvg.size() == NumConstant.ONE) {
pid.put(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),subGridGovernAvg.get(NumConstant.ZERO).getParentId());
sizeOne(subGridGovernAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),pid);
return;
} else if (subGridGovernAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subGridGovernAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubCommunityServiceAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, 10);
List<List<SubCommunityAvgResultDTO>> governAvg = ListUtils.partition(subGridGovernAvg, 10);
governAvg.forEach(avg -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
avg.forEach(c -> {
@ -272,14 +272,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode();
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) {
List<SubCommunityServiceAvgResultDTO> subCommServiceAvg = communityScoreDao.selectSubCommServiceAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode());
List<SubCommunityAvgResultDTO> subCommServiceAvg = communityScoreDao.selectSubCommAvgScore(customerId, monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode());
if (subCommServiceAvg.size() == NumConstant.ONE) {
pid.put(subCommServiceAvg.get(NumConstant.ZERO).getAgencyId(),subCommServiceAvg.get(NumConstant.ZERO).getParentId());
sizeOne(subCommServiceAvg.get(NumConstant.ZERO).getAgencyId(),customerId,monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),pid);
return;
} else if (subCommServiceAvg.size() > NumConstant.ONE) {
MaxAndMinBigDecimalResultDTO maxAndMinBigDecimal = this.getMaxAndMinBigDecimal(subCommServiceAvg.stream().map(o -> o.getScore()).collect(Collectors.toList()));
List<List<SubCommunityServiceAvgResultDTO>> serviceAvgList = ListUtils.partition(subCommServiceAvg, 10);
List<List<SubCommunityAvgResultDTO>> serviceAvgList = ListUtils.partition(subCommServiceAvg, 10);
serviceAvgList.forEach(serviceAvg -> {
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.POSITIVE);
List<SampleValue> index1SampleValues = new ArrayList<>();

40
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexCommunityScoreDao.xml

@ -62,46 +62,8 @@
AND INDEX_CODE != "shequxiangguan"
</select>
<!-- 下属所有社区的党建能力平均值 -->
<select id="selectSubCommPartyAvgScore" resultType="com.epmet.dto.indexcal.SubCommunityPartyAvgResultDTO">
SELECT
agency_id,
month_id,
quarter_id,
year_id,
AVG( score ) AS score,
customer_id
FROM
fact_index_community_score
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND month_id = #{monthId}
AND index_code = 'dangjiannengli'
GROUP BY agency_id
</select>
<!-- 街道下属所有社区治理能力汇总平均值 -->
<select id="selectSubCommGovernAvgScore" resultType="com.epmet.dto.indexcal.SubCommunityGovernAvgResultDTO">
SELECT
agency_id,
month_id,
quarter_id,
year_id,
AVG( score ) AS score,
customer_id
FROM
fact_index_community_score
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND month_id = #{monthId}
AND index_code = 'zhilinengli'
GROUP BY agency_id
</select>
<!-- 街道下级所有社区服务能力得分平均值 -->
<select id="selectSubCommServiceAvgScore" resultType="com.epmet.dto.indexcal.SubCommunityServiceAvgResultDTO">
<select id="selectSubCommAvgScore" resultType="com.epmet.dto.indexcal.SubCommunityAvgResultDTO">
SELECT
fics.agency_id,
fics.month_id,

40
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/FactIndexGridScoreDao.xml

@ -4,7 +4,7 @@
<mapper namespace="com.epmet.dao.evaluationindex.screen.FactIndexGridScoreDao">
<!-- 下属所有网格的平均值 -->
<select id="selectSubGridAvgScore" resultType="com.epmet.dto.screen.result.SubGridPartyAvgResultDTO">
<select id="selectSubGridAvgScore" resultType="com.epmet.dto.screen.result.SubGridAvgResultDTO">
SELECT
figc.agency_id AS agencyId,
figc.month_id as monthId,
@ -24,42 +24,4 @@
AND figc.index_code = #{indexCode}
GROUP BY figc.agency_id
</select>
<!-- 社区下属所有网格治理能力汇总平均值 -->
<select id="selectSubGridGovernAvgScore" resultType="com.epmet.dto.screen.result.SubGridGovernAvgResultDTO">
SELECT
agency_id,
month_id,
quarter_id,
year_id,
AVG( score ) AS score,
customer_id
FROM
fact_index_grid_score
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND month_id = #{monthId}
AND index_code = 'zhilinengli'
GROUP BY agency_id
</select>
<!-- 社区下级所有网格服务能力得分平均值 -->
<select id="selectSubGridServiceAvgScore" resultType="com.epmet.dto.screen.result.SubGridServiceAvgResultDTO">
SELECT
agency_id,
month_id,
quarter_id,
year_id,
AVG( score ) AS score,
customer_id
FROM
fact_index_grid_score
WHERE
del_flag = '0'
AND customer_id = #{customerId}
AND month_id = #{monthId}
AND index_code = 'fuwunengli'
GROUP BY agency_id
</select>
</mapper>
Loading…
Cancel
Save