|
@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
|
|
import com.epmet.commons.tools.enums.KongCunCustomerEnvEnum; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
@ -349,7 +350,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ |
|
|
} else { |
|
|
} else { |
|
|
// 治理能力的六个五级指标
|
|
|
// 治理能力的六个五级指标
|
|
|
List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityNew(customerId, monthId,IndexCalConstant.STREET_LEVEL,quarterId,yearId); |
|
|
List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityNew(customerId, monthId,IndexCalConstant.STREET_LEVEL,quarterId,yearId); |
|
|
log.info("streetGovernAbilityCalculate: {}",JSON.toJSONString(communityGovernAbility)); |
|
|
|
|
|
if (CollectionUtils.isEmpty(communityGovernAbility)){ |
|
|
if (CollectionUtils.isEmpty(communityGovernAbility)){ |
|
|
log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); |
|
|
log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); |
|
|
}else{ |
|
|
}else{ |
|
@ -386,7 +386,6 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ |
|
|
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); |
|
|
s.setSampleCount(sampleCount == null ? NumConstant.ZERO : sampleCount); |
|
|
}); |
|
|
}); |
|
|
insertDetail(result); |
|
|
insertDetail(result); |
|
|
log.info("streetGovernAbilityCalculate: result{}",JSON.toJSONString(result)); |
|
|
|
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -662,7 +661,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.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); |
|
|
List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); |
|
|
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); |
|
@ -741,7 +740,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.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); |
|
|
List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); |
|
|
List<SubCommunityAvgResultDTO> subGridGovernAvg = disposeSubAvg(dispose,form); |
|
|
List<SubCommunityAvgResultDTO> subGridGovernAvg = disposeSubAvg(dispose,form); |
|
|
if (CollectionUtils.isEmpty(subGridGovernAvg)){ |
|
|
if (CollectionUtils.isEmpty(subGridGovernAvg)){ |
|
|
log.warn("查询街道下属所有社区治理能力汇总为空"); |
|
|
log.warn("查询街道下属所有社区治理能力汇总为空"); |
|
@ -819,7 +818,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.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); |
|
|
List<SubCommunityAvgResultDTO> dispose = communityScoreDao.selectSubCommAvgScoreExistSubNotSelfNew(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode(),quarterId,yearId); |
|
|
List<SubCommunityAvgResultDTO> subCommServiceAvg = disposeSubAvg(dispose,form); |
|
|
List<SubCommunityAvgResultDTO> subCommServiceAvg = disposeSubAvg(dispose,form); |
|
|
if (CollectionUtils.isEmpty(subCommServiceAvg)) { |
|
|
if (CollectionUtils.isEmpty(subCommServiceAvg)) { |
|
|
log.warn("查询街道下属社区服务能力得分平均值为空"); |
|
|
log.warn("查询街道下属社区服务能力得分平均值为空"); |
|
@ -961,7 +960,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ |
|
|
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.selectCommunityGovernAbilityExistsSubNotSelfNew(formDTO.getMonthId(),formDTO.getCustomerAreaCode(), ScreenConstant.STREET,quarterId,yearId); |
|
|
List<Map<String, Object>> kongCunGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); |
|
|
List<Map<String, Object>> kongCunGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode(), KongCunCustomerEnvEnum.getCurrentEnv().getCustomerId()); |
|
|
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")); |
|
@ -982,7 +981,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ |
|
|
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.selectActivityCountMapExistsSub(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); |
|
|
List<Map<String, Object>> ActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); |
|
|
List<Map<String, Object>> kongCunActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode()); |
|
|
List<Map<String, Object>> kongCunActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapIsKongCun(formDTO.getMonthId(),formDTO.getCustomerAreaCode(),KongCunCustomerEnvEnum.getCurrentEnv().getCustomerId()); |
|
|
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")); |
|
|