Browse Source

Merge remote-tracking branch 'origin/dev_pyscreen' into dev_temp

dev_shibei_match
yinzuomei 5 years ago
parent
commit
6c3c6e61cb
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
  2. 12
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java
  3. 7
      epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml
  4. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java
  5. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcal/CommunityScoreDao.java
  6. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java
  7. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java
  8. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java
  9. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  10. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java
  11. 21
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/CommunityScoreDao.xml
  12. 1
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml
  13. 23
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml
  14. 36
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml
  15. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java

@ -26,6 +26,7 @@ public interface NumConstant {
int TEN = 10; int TEN = 10;
int ELEVEN = 11; int ELEVEN = 11;
int TWELVE = 12; int TWELVE = 12;
int THIRTEEN = 13;
int SEVENTEEN = 17; int SEVENTEEN = 17;
int FIFTEEN = 15; int FIFTEEN = 15;
int FOURTEEN=14; int FOURTEEN=14;

12
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/plugins/impl/ScreenWorkRecordOrgDailyServiceImpl.java

@ -143,6 +143,8 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
if(StringUtils.isBlank(dateId)){ if(StringUtils.isBlank(dateId)){
log.warn("selectLatestDateId dateId is null customerIds" + JSON.toJSONString(customerIds)); log.warn("selectLatestDateId dateId is null customerIds" + JSON.toJSONString(customerIds));
} }
log.info("=============dateId:"+dateId);
dateId= com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(NumConstant.ONE);
WorkRecordRankResultDTO returnDto = new WorkRecordRankResultDTO(); WorkRecordRankResultDTO returnDto = new WorkRecordRankResultDTO();
AgencyInfoDTO agencyInfoDTO = agencyService.getAgencyInfoDTO(formDTO.getAreaCode(), formDTO.getAgencyId()); AgencyInfoDTO agencyInfoDTO = agencyService.getAgencyInfoDTO(formDTO.getAreaCode(), formDTO.getAgencyId());
// log.info("agencyInfoDTO: "+JSON.toJSONString(agencyInfoDTO)); // log.info("agencyInfoDTO: "+JSON.toJSONString(agencyInfoDTO));
@ -210,8 +212,8 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
//3-1.查询当前组织及所有下级过去12个月份某项数据所有资源的统计数据 //3-1.查询当前组织及所有下级过去12个月份某项数据所有资源的统计数据
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM"); DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM");
LocalDate today = LocalDate.now(); LocalDate today = LocalDate.now();
formDTO.setStartMonth(today.minusMonths(NumConstant.TWELVE).format(fmt)); formDTO.setStartMonth(today.minusMonths(NumConstant.THIRTEEN).format(fmt));
formDTO.setEndMonth(today.minusMonths(NumConstant.ZERO).format(fmt)); formDTO.setEndMonth(today.minusMonths(NumConstant.ONE).format(fmt));
List<WorkRecordTrendResultDTO.SeriesResultDTO> list = screenWorkRecordOrgMonthlyDao.selectMonthList(formDTO); List<WorkRecordTrendResultDTO.SeriesResultDTO> list = screenWorkRecordOrgMonthlyDao.selectMonthList(formDTO);
//3-2.遍历封装数据并返回 //3-2.遍历封装数据并返回
@ -299,4 +301,10 @@ public class ScreenWorkRecordOrgDailyServiceImpl extends BaseServiceImpl<ScreenW
return resultDTO; return resultDTO;
} }
public static void main(String[] args) {
LocalDate today = LocalDate.now();
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyyMM");
System.out.println(today.minusMonths(NumConstant.THIRTEEN).format(fmt));
System.out.println(today.minusMonths(NumConstant.ONE).format(fmt));
}
} }

7
epmet-module/data-report/data-report-server/src/main/resources/mapper/plugins/ScreenWorkRecordOrgMonthlyDao.xml

@ -6,7 +6,7 @@
<select id="selectMonthList" resultType="com.epmet.plugins.result.WorkRecordTrendResultDTO$SeriesResultDTO"> <select id="selectMonthList" resultType="com.epmet.plugins.result.WorkRecordTrendResultDTO$SeriesResultDTO">
SELECT SELECT
sw.MONTH_ID AS monthId, sw.MONTH_ID AS monthId,
(select resource_label from screen_customer_work_record_dict where resource_code = sw.type_code and customer_id = #{customerId})`name` (select resource_label from screen_customer_work_record_dict where resource_code = sw.meeting_code and customer_id = #{customerId})`name`
<if test="type != null and type.trim() != ''"> <if test="type != null and type.trim() != ''">
<if test="type == 'organize' "> <if test="type == 'organize' ">
,SUM(sw.organize_total) as `value` ,SUM(sw.organize_total) as `value`
@ -24,13 +24,12 @@
WHERE WHERE
sw.del_flag = '0' sw.del_flag = '0'
AND sca.del_flag = '0' AND sca.del_flag = '0'
AND sw.customer_id = #{customerId}
AND sca.area_code LIKE CONCAT('%',(select area_code from screen_customer_agency where agency_id = #{agencyId}),'%') AND sca.area_code LIKE CONCAT('%',(select area_code from screen_customer_agency where agency_id = #{agencyId}),'%')
AND sw.month_id > #{startMonth} AND sw.month_id &gt;= #{startMonth}
AND sw.month_id <![CDATA[ <= ]]> #{endMonth} AND sw.month_id <![CDATA[ <= ]]> #{endMonth}
AND wrd.data_type = #{dataType} AND wrd.data_type = #{dataType}
GROUP BY GROUP BY
sw.month_id,sw.type_code sw.month_id,sw.meeting_code
ORDER BY ORDER BY
sw.month_id ASC sw.month_id ASC
</select> </select>

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/plugins/WorkRecordColController.java

@ -49,6 +49,7 @@ public class WorkRecordColController {
log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data)); log.error("com.epmet.controller.plugins.WorkRecordColController.resourceDict,param:{}", JSON.toJSONString(data));
throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); throw new ValidateException("客户Id、上传数据列表、日期Id不可为空");
} }
// log.info("【工作日志】客户资源字典信息上传"+JSON.toJSONString(data,true));
dictService.collect(customerId,data); dictService.collect(customerId,data);
return new Result(); return new Result();
} }
@ -68,6 +69,7 @@ public class WorkRecordColController {
log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrg,param:{}", JSON.toJSONString(data)); log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrg,param:{}", JSON.toJSONString(data));
throw new ValidateException("客户Id、上传数据列表、月份Id不可为空"); throw new ValidateException("客户Id、上传数据列表、月份Id不可为空");
} }
// log.info("【工作日志】组织按月统计"+JSON.toJSONString(data,true));
screenWorkRecordOrgMonthlyService.collect(customerId,data); screenWorkRecordOrgMonthlyService.collect(customerId,data);
return new Result(); return new Result();
} }
@ -87,6 +89,7 @@ public class WorkRecordColController {
log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrgDaily,param:{}", JSON.toJSONString(data)); log.error("com.epmet.controller.plugins.WorkRecordColController.collectOrgDaily,param:{}", JSON.toJSONString(data));
throw new ValidateException("客户Id、上传数据列表、日期Id不可为空"); throw new ValidateException("客户Id、上传数据列表、日期Id不可为空");
} }
// log.info("【工作日志】组织按日统计 累计值"+JSON.toJSONString(data,true));
screenWorkRecordOrgDailyService.collectOrgDaily(customerId,data); screenWorkRecordOrgDailyService.collectOrgDaily(customerId,data);
return new Result(); return new Result();
} }

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
* @date 2021/1/15 下午3:19 * @date 2021/1/15 下午3:19
*/ */
List<SubCommunityAvgResultDTO> selectSubCommAvgScoreExistSub(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode); List<SubCommunityAvgResultDTO> selectSubCommAvgScoreExistSub(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode);
List<SubCommunityAvgResultDTO> selectSubCommAvgScoreExistSubNotSelf(@Param("monthId")String monthId, @Param("indexCode")String indexCode,@Param("areaCode")String areaCode);
/** /**
* 根据入参查询 查询社区id * 根据入参查询 查询社区id

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.java

@ -75,6 +75,7 @@ public interface FactIndexGovrnAblityOrgMonthlyDao extends BaseDao<FactIndexGovr
* @date 2021/1/15 下午1:27 * @date 2021/1/15 下午1:27
*/ */
List<Map<String,Object>> selectCommunityGovernAbilityExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); List<Map<String,Object>> selectCommunityGovernAbilityExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode);
List<Map<String,Object>> selectCommunityGovernAbilityExistsSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode);
/** /**
* 根据组织类型删除数据 * 根据组织类型删除数据

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.java

@ -86,6 +86,7 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao<FactIndexPart
* @date 2021/1/15 下午3:31 * @date 2021/1/15 下午3:31
*/ */
List<Map<String,Object>> selectPublishArticleCountMapExistSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength); List<Map<String,Object>> selectPublishArticleCountMapExistSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength);
List<Map<String,Object>> selectPublishArticleCountMapExistSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode,@Param("areaCodeLength")Integer areaCodeLength);
/** /**
* @Description 查询社区下的发文数 Map根据areaCode * @Description 查询社区下的发文数 Map根据areaCode
@ -96,6 +97,7 @@ public interface FactIndexPartyAblityOrgMonthlyDao extends BaseDao<FactIndexPart
* @date 2021/1/15 上午9:48 * @date 2021/1/15 上午9:48
*/ */
List<Map<String,Object>> selectPublishArticleCountMapbyAreaCode(@Param("monthId")String monthId,@Param("areaCode")String areaCode); List<Map<String,Object>> selectPublishArticleCountMapbyAreaCode(@Param("monthId")String monthId,@Param("areaCode")String areaCode);
List<Map<String,Object>> selectPublishArticleCountMapbyAreaCodeNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode);
/** /**
* 根据组织类型删除数据 * 根据组织类型删除数据

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.java

@ -87,6 +87,7 @@ public interface FactIndexServiceAblityOrgMonthlyDao extends BaseDao<FactIndexSe
* @date 2021/1/15 下午1:53 * @date 2021/1/15 下午1:53
*/ */
List<Map<String,Object>> selectActivityCountMapExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode); List<Map<String,Object>> selectActivityCountMapExistsSub(@Param("monthId")String monthId,@Param("areaCode")String areaCode);
List<Map<String,Object>> selectActivityCountMapExistsSubNotSelf(@Param("monthId")String monthId,@Param("areaCode")String areaCode);
/** /**
* 根据组织类型删除数据 * 根据组织类型删除数据

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

@ -628,7 +628,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} }
} else { } else {
// 社区名义发文数量 // 社区名义发文数量
List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapbyAreaCode( form.getMonthId(),form.getCustomerAreaCode()); List<Map<String, Object>> publishArticleCountList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapbyAreaCodeNotSelf( form.getMonthId(),form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(publishArticleCountList)) { if (CollectionUtils.isEmpty(publishArticleCountList)) {
log.warn(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL); log.warn(IndexCalConstant.COMMUNITY_PUBLISH_ARTICLE_LIST_NULL);
} else { } else {
@ -702,7 +702,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
} }
} else { } else {
// 治理能力的六个五级指标 // 治理能力的六个五级指标
List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSub(form.getMonthId(),form.getCustomerAreaCode()); List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(communityGovernAbility)){ if (CollectionUtils.isEmpty(communityGovernAbility)){
log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL); log.warn(IndexCalConstant.COMMUNITY_GOVERN_ABILITY_NULL);
}else{ }else{
@ -774,7 +774,7 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
}); });
} }
} else { } else {
List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(form.getMonthId(),form.getCustomerAreaCode()); List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNotSelf(form.getMonthId(),form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(communityActivityCountList)) { if (CollectionUtils.isEmpty(communityActivityCountList)) {
log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL); log.warn(IndexCalConstant.COMMUNITY_SERVICE_ABILITY_NULL);
}else{ }else{

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

@ -613,7 +613,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> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode()); List<SubCommunityAvgResultDTO> subCommPartyAvgScore = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.DANG_JIAN_NENG_LI.getCode(),form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(subCommPartyAvgScore)) { if (CollectionUtils.isEmpty(subCommPartyAvgScore)) {
log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL); log.warn(IndexCalConstant.COMMUNITY_PARTY_AVG_NULL);
} else if (subCommPartyAvgScore.size() > NumConstant.ZERO) { } else if (subCommPartyAvgScore.size() > NumConstant.ZERO) {
@ -634,7 +634,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} }
} else { } else {
// 街道名义发文数量 // 街道名义发文数量
List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSub(monthId,form.getCustomerAreaCode(),NumConstant.NINE); List<Map<String, Object>> mapList = factIndexPartyAblityOrgMonthlyDao.selectPublishArticleCountMapExistSubNotSelf(monthId,form.getCustomerAreaCode(),NumConstant.NINE);
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 {
@ -688,7 +688,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> subGridGovernAvg = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode()); List<SubCommunityAvgResultDTO> subGridGovernAvg = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.ZHI_LI_NENG_LI.getCode(),form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(subGridGovernAvg)){ if (CollectionUtils.isEmpty(subGridGovernAvg)){
log.warn("查询街道下属所有社区治理能力汇总为空"); log.warn("查询街道下属所有社区治理能力汇总为空");
}else if (subGridGovernAvg.size() > NumConstant.ZERO) { }else if (subGridGovernAvg.size() > NumConstant.ZERO) {
@ -708,7 +708,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
} }
} else { } else {
// 治理能力的六个五级指标 // 治理能力的六个五级指标
List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSub(monthId,form.getCustomerAreaCode()); List<Map<String, Object>> communityGovernAbility = factIndexGovrnAblityOrgMonthlyDao.selectCommunityGovernAbilityExistsSubNotSelf(monthId,form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(communityGovernAbility)){ if (CollectionUtils.isEmpty(communityGovernAbility)){
log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL); log.warn(IndexCalConstant.STREET_GOVERN_ABILITY_NULL);
}else{ }else{
@ -762,7 +762,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> subCommServiceAvg = communityScoreDao.selectSubCommAvgScoreExistSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode()); List<SubCommunityAvgResultDTO> subCommServiceAvg = communityScoreDao.selectSubCommAvgScoreExistSubNotSelf(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(subCommServiceAvg)) { if (CollectionUtils.isEmpty(subCommServiceAvg)) {
log.warn("查询街道下属社区服务能力得分平均值为空"); log.warn("查询街道下属社区服务能力得分平均值为空");
} else if (subCommServiceAvg.size() > NumConstant.ZERO) { } else if (subCommServiceAvg.size() > NumConstant.ZERO) {
@ -781,7 +781,7 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
}); });
} }
} else { } else {
List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSub(monthId,form.getCustomerAreaCode()); List<Map<String, Object>> communityActivityCountList = factIndexServiceAblityOrgMonthlyDao.selectActivityCountMapExistsSubNotSelf(monthId,form.getCustomerAreaCode());
if (CollectionUtils.isEmpty(communityActivityCountList)) { if (CollectionUtils.isEmpty(communityActivityCountList)) {
log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL); log.warn(IndexCalConstant.STREET_SERVICE_ABILITY_NULL);
}else{ }else{

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

@ -168,4 +168,25 @@
AND fics.index_code = #{indexCode} AND fics.index_code = #{indexCode}
GROUP BY fics.parent_agency_id GROUP BY fics.parent_agency_id
</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.PARENT_AGENCY_ID
WHERE
fics.del_flag = '0'
AND sca.DEL_FLAG = 0
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sca.AREA_CODE != #{areaCode}
AND fics.month_id = #{monthId}
AND fics.index_code = #{indexCode}
GROUP BY fics.parent_agency_id
</select>
</mapper> </mapper>

1
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcal/GridScoreDao.xml

@ -198,6 +198,7 @@
AND figc.month_id = #{monthId} AND figc.month_id = #{monthId}
AND figc.index_code = #{indexCode} AND figc.index_code = #{indexCode}
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sca.AREA_CODE != #{areaCode}
GROUP BY figc.agency_id GROUP BY figc.agency_id
</select> </select>

23
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityOrgMonthlyDao.xml

@ -173,4 +173,27 @@
AND gm.month_id = #{monthId} AND gm.month_id = #{monthId}
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
</select> </select>
<select id="selectCommunityGovernAbilityExistsSubNotSelf" resultType="java.util.Map">
SELECT
gm.AGENCY_ID,
gm.PARENT_ID,
gm.MONTH_ID,
gm.QUARTER_ID,
gm.YEAR_ID,
gm.TRANSFERED_COUNT,
gm.CLOSED_PROJECT_COUNT,
gm.RESP_PROJECT_RATIO,
gm.OVERDUE_PROJECT_RATIO,
gm.CLOSED_PROJECT_RATIO,
gm.SATISFACTION_RATIO,
gm.HANDLE_PROJECT_RATIO
FROM
fact_index_govrn_ablity_org_monthly gm
LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = gm.AGENCY_ID
WHERE
gm.del_flag = '0'
AND gm.month_id = #{monthId}
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sca.AREA_CODE != #{areaCode}
</select>
</mapper> </mapper>

36
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexPartyAblityOrgMonthlyDao.xml

@ -149,5 +149,41 @@
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND pm.month_id = #{monthId} AND pm.month_id = #{monthId}
</select> </select>
<select id="selectPublishArticleCountMapExistSubNotSelf" resultType="java.util.Map">
SELECT
pm.AGENCY_ID,
pm.PARENT_ID,
pm.MONTH_ID,
pm.QUARTER_ID,
pm.YEAR_ID,
pm.PUBLISH_ARTICLE_COUNT,
pm.CUSTOMER_ID
FROM
fact_index_party_ablity_org_monthly pm
LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = pm.AGENCY_ID
WHERE
pm.del_flag = '0'
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sca.AREA_CODE != #{areaCode}
AND pm.month_id = #{monthId}
</select>
<select id="selectPublishArticleCountMapbyAreaCodeNotSelf" resultType="java.util.Map">
SELECT
fm.AGENCY_ID,
fm.PARENT_ID,
fm.MONTH_ID,
fm.QUARTER_ID,
fm.YEAR_ID,
fm.PUBLISH_ARTICLE_COUNT,
fm.CUSTOMER_ID
FROM
fact_index_party_ablity_org_monthly fm
LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = fm.AGENCY_ID
WHERE
fm.del_flag = '0'
AND fm.month_id = #{monthId}
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sca.AREA_CODE != #{areaCode}
</select>
</mapper> </mapper>

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexServiceAblityOrgMonthlyDao.xml

@ -130,4 +130,22 @@
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%') AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sm.month_id = #{monthId} AND sm.month_id = #{monthId}
</select> </select>
<select id="selectActivityCountMapExistsSubNotSelf" resultType="java.util.Map">
SELECT
sm.AGENCY_ID,
sm.PARENT_ID,
sm.MONTH_ID,
sm.QUARTER_ID,
sm.YEAR_ID,
sm.ACTIVITY_COUNT,
sm.CUSTOMER_ID
FROM
fact_index_service_ablity_org_monthly sm
LEFT JOIN screen_customer_agency sca ON sca.AGENCY_ID = sm.AGENCY_ID
WHERE
sm.del_flag = '0'
AND sca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND sca.AREA_CODE != #{areaCode}
AND sm.month_id = #{monthId}
</select>
</mapper> </mapper>

Loading…
Cancel
Save