Browse Source

street

dev_shibei_match
zxc 4 years ago
parent
commit
dcfbacee77
  1. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java
  2. 16
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  3. 22
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java

@ -97,6 +97,7 @@ public interface CommunityScoreDao extends BaseDao<FactIndexCommunityScoreEntity
* @author zxc * @author zxc
* @date 2021/1/15 下午3:19 * @date 2021/1/15 下午3:19
*/ */
List<SubCommunityAvgResultDTO> selectSubCommAvgScoreExistSubNotSelf(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode);
List<SubCommunityAvgResultDTO> selectSubCommAvgScoreExistSubNotSelfNew(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode, List<SubCommunityAvgResultDTO> selectSubCommAvgScoreExistSubNotSelfNew(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode,
@Param("quarterId")String quarterId,@Param("yearId")String yearId); @Param("quarterId")String quarterId,@Param("yearId")String yearId);

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

@ -623,7 +623,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
//下属所有社区的党建能力平均值 //下属所有社区的党建能力平均值
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQDJNLHZPJZ.getCode().equals(detail.getIndexCode())) {
List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode());
List<SubCommunityAvgResultDTO> subCommPartyAvgScore = disposeSubAvg(dispose, form); List<SubCommunityAvgResultDTO> subCommPartyAvgScore = disposeSubAvg(dispose, form);
if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { if (CollectionUtils.isEmpty(subCommPartyAvgScore)) {
log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL);
@ -646,7 +646,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} }
} else { } else {
// 街道名义发文数量 // 街道名义发文数量
List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubStreetNew(monthId,form.getCustomerAreaCode(),quarterId,yearId); List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubStreet(monthId,form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(mapList)) { if (CollectionUtils.isEmpty(mapList)) {
log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL); log.warn(IndexCalConstant.STREET_PUBLISH_ARTICLE_LIST_NULL);
} else { } else {
@ -702,7 +702,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
Map<String, String> pid = new HashMap<>(); Map<String, String> pid = new HashMap<>();
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SYSQZLNLHZ.getCode().equals(detail.getIndexCode())) {
List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode());
List<SubCommunityAvgResultDTO> subGridGovernAvg = disposeSubAvg(dispose,form); List<SubCommunityAvgResultDTO> subGridGovernAvg = disposeSubAvg(dispose,form);
if (CollectionUtils.isEmpty(subGridGovernAvg)){ if (CollectionUtils.isEmpty(subGridGovernAvg)){
log.warn("查询街道下属所有社区治理能力汇总为空"); log.warn("查询街道下属所有社区治理能力汇总为空");
@ -780,7 +780,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
detailListByParentCode.forEach(detail -> { detailListByParentCode.forEach(detail -> {
String indexCode = detail.getIndexCode(); String indexCode = detail.getIndexCode();
if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) { if (IndexCodeEnum.JIE_DAO_XIA_SHU_SQFWNLDFPYZ.getCode().equals(indexCode)) {
List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode());
List<SubCommunityAvgResultDTO> subCommServiceAvg = disposeSubAvg(dispose,form); List<SubCommunityAvgResultDTO> subCommServiceAvg = disposeSubAvg(dispose,form);
if (CollectionUtils.isEmpty(subCommServiceAvg)) { if (CollectionUtils.isEmpty(subCommServiceAvg)) {
log.warn("查询街道下属社区服务能力得分平均值为空"); log.warn("查询街道下属社区服务能力得分平均值为空");
@ -921,8 +921,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String quarterId = DateUtils.getQuarterId(formDTO.getMonthId());
String yearId = DateUtils.getYearId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId());
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result = new ArrayList<>();
List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelfNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(), ScreenConstant.STREET,quarterId,yearId); List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(formDTO.getMonthId(),formDTO.getCustomerAreaCode(), ScreenConstant.STREET);
List<Map<String, Object>> kongCunGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityIsKongCunNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(),quarterId,yearId); List<Map<String, Object>> kongCunGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode());
if (!CollectionUtils.isEmpty(kongCunGovernAbility)){ if (!CollectionUtils.isEmpty(kongCunGovernAbility)){
kongCunGovernAbility.forEach(k -> { kongCunGovernAbility.forEach(k -> {
k.put("AGENCY_ID",k.get("PARENT_ID")); k.put("AGENCY_ID",k.get("PARENT_ID"));
@ -942,8 +942,8 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
String quarterId = DateUtils.getQuarterId(formDTO.getMonthId()); String quarterId = DateUtils.getQuarterId(formDTO.getMonthId());
String yearId = DateUtils.getYearId(formDTO.getMonthId()); String yearId = DateUtils.getYearId(formDTO.getMonthId());
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result = new ArrayList<>();
List<Map<String, Object>> ActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(),quarterId,yearId); List<Map<String, Object>> ActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(formDTO.getMonthId(),formDTO.getCustomerAreaCode());
List<Map<String, Object>> kongCunActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapIsKongCunNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(),quarterId,yearId); List<Map<String, Object>> kongCunActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode());
if (!CollectionUtils.isEmpty(kongCunActivityCountList)){ if (!CollectionUtils.isEmpty(kongCunActivityCountList)){
kongCunActivityCountList.forEach(k -> { kongCunActivityCountList.forEach(k -> {
k.put("AGENCY_ID",k.get("PARENT_ID")); k.put("AGENCY_ID",k.get("PARENT_ID"));

22
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml

@ -167,4 +167,26 @@
AND sca.PARENT_AREA_CODE = #{areaCode} AND sca.PARENT_AREA_CODE = #{areaCode}
GROUP BY agencyId GROUP BY agencyId
</select> </select>
<select id="selectSubCommAvgScoreExistSubNotSelf"
resultType="com.epmet.dto.indexcal.SubCommunityAvgResultDTO">
SELECT
fics.PARENT_AGENCY_ID AS agencyId,
fics.month_id,
fics.quarter_id,
fics.year_id,
ROUND(AVG( fics.score ),6) AS score,
fics.customer_id,
sca.pid AS parentId
FROM
fact_index_community_score fics
LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fics.AGENCY_ID
WHERE
fics.del_flag = '0'
AND sca.DEL_FLAG = 0
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sca.`LEVEL` = 'community'
AND fics.month_id = #{monthId}
AND fics.index_code = #{indexCode}
GROUP BY parentId
</select>
</mapper> </mapper>

Loading…
Cancel
Save