Browse Source

Merge branch 'dev' into dev_ic_data

# Conflicts:
#	epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
master
wangxianzhang 4 years ago
parent
commit
ca068bdff3
  1. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
  2. 19
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  3. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  4. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  5. 7
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDifficultRankResultDTO.java
  6. 39
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  7. 15
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java
  8. 5
      epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml
  9. 12
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
  10. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java
  11. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java
  12. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectActionConstant.java
  13. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java
  14. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java
  15. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/GovernGridClosedTotalCommonDTO.java
  16. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  17. 81
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
  18. 66
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
  19. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridAndOrgDailyServiceImpl.java
  20. 69
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  21. 26
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  22. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
  23. 11
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  24. 4
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java
  25. 4
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java
  26. 4
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  27. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  28. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  29. 6
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java
  30. 5
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java
  31. 5
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataProjectChangeEventListener.java
  32. 5
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java
  33. 82
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseDisputeProcessServiceImpl.java
  34. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserIdsFormDTO.java
  35. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
  36. 31
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java
  37. 17
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  38. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xls

10
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java

@ -151,6 +151,15 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
*/ */
private Integer inGroupTopicUnResolvedCount; private Integer inGroupTopicUnResolvedCount;
/**
* 11当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 12当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/** /**
* 未出当前网格的结案项目数 * 未出当前网格的结案项目数
*/ */
@ -171,4 +180,5 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
*/ */
private Integer districtDeptClosedCount; private Integer districtDeptClosedCount;
} }

19
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -1188,13 +1188,20 @@ public class DataStatsServiceImpl implements DataStatsService {
Integer streetClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getStreetClosedCount).sum(); Integer streetClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getStreetClosedCount).sum();
//由区直部门结案的项目总数 //由区直部门结案的项目总数
Integer districtDeptClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getDistrictDeptClosedCount).sum(); Integer districtDeptClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getDistrictDeptClosedCount).sum();
Integer issueResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIssueProjectResolvedCount).sum();
resultDTO.setProblemResolvedCount(problemResolvedCount); Integer issueUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIssueProjectUnResolvedCount).sum();
Integer projectResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getApprovalProjectResolvedCount).sum();
Integer projectUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getApprovalProjectUnResolvedCount).sum();
Integer eventResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getEventResolvedCount).sum();
Integer eventUnResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getEventUnResolvedCount).sum();
Integer closedProjectTotal = issueResolvedCount + issueUnResolvedCount+projectResolvedCount
+ projectUnResolvedCount + eventResolvedCount + eventUnResolvedCount;
resultDTO.setProblemResolvedCount(closedProjectTotal);
resultDTO.setGroupSelfGovernRatio(getPercentage(inGroupTopicResolvedCount + inGroupTopicUnResolvedCount, problemResolvedCount)); resultDTO.setGroupSelfGovernRatio(getPercentage(inGroupTopicResolvedCount + inGroupTopicUnResolvedCount, problemResolvedCount));
resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, problemResolvedCount)); resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, closedProjectTotal));
resultDTO.setCommunityResolvedRatio(getPercentage(communityClosedCount, problemResolvedCount)); resultDTO.setCommunityResolvedRatio(getPercentage(communityClosedCount, closedProjectTotal));
resultDTO.setStreetResolvedRatio(getPercentage(streetClosedCount, problemResolvedCount)); resultDTO.setStreetResolvedRatio(getPercentage(streetClosedCount, closedProjectTotal));
resultDTO.setDistrictDeptResolvedRatio(getPercentage(districtDeptClosedCount, problemResolvedCount)); resultDTO.setDistrictDeptResolvedRatio(getPercentage(districtDeptClosedCount, closedProjectTotal));
return resultDTO; return resultDTO;
} }

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -604,6 +604,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
log.error("getStaffInfo have any agency staffId:{}",staffId); log.error("getStaffInfo have any agency staffId:{}",staffId);
return null; return null;
} }
result.setStaffId(staffEntity.getUserId());
result.setAgencyId(agencyDTO.getId()); result.setAgencyId(agencyDTO.getId());
result.setAgencyName(agencyDTO.getOrganizationName()); result.setAgencyName(agencyDTO.getOrganizationName());
result.setAgencyPIds(agencyDTO.getPids()); result.setAgencyPIds(agencyDTO.getPids());

18
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml

@ -624,7 +624,9 @@
SELECT SELECT
agency_id AS agencyId, agency_id AS agencyId,
`level` AS level, `level` AS level,
problem_resolved_count AS problemResolvedCount, ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT
+APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT
+EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT AS problemResolvedCount,
concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio, concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio,
concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio, concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio,
concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio, concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio,
@ -638,13 +640,15 @@
<foreach item="agencyId" collection="agencyIds" open="AND (" separator="or" close=")" index=""> <foreach item="agencyId" collection="agencyIds" open="AND (" separator="or" close=")" index="">
agency_id = #{agencyId} agency_id = #{agencyId}
</foreach> </foreach>
ORDER BY problem_resolved_count DESC ORDER BY problemResolvedCount DESC
</select> </select>
<select id="getGridGovern" resultType="com.epmet.dataaggre.dto.datastats.result.GridGovrnResultDTO"> <select id="getGridGovern" resultType="com.epmet.dataaggre.dto.datastats.result.GridGovrnResultDTO">
SELECT SELECT
grid_id AS gridId, grid_id AS gridId,
problem_resolved_count AS problemResolvedCount, ISSUE_PROJECT_RESOLVED_COUNT+ISSUE_PROJECT_UN_RESOLVED_COUNT
+APPROVAL_PROJECT_RESOLVED_COUNT+APPROVAL_PROJECT_UN_RESOLVED_COUNT
+EVENT_RESOLVED_COUNT+EVENT_UN_RESOLVED_COUNT AS problemResolvedCount,
concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio, concat(ROUND(group_self_govern_ratio*100, 1),'%') AS groupSelfGovernRatio,
concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio, concat(ROUND(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio,
concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio, concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio,
@ -675,7 +679,13 @@
GRID_SELF_GOVERN_PROJECT_TOTAL, GRID_SELF_GOVERN_PROJECT_TOTAL,
COMMUNITY_CLOSED_COUNT, COMMUNITY_CLOSED_COUNT,
STREET_CLOSED_COUNT, STREET_CLOSED_COUNT,
DISTRICT_DEPT_CLOSED_COUNT DISTRICT_DEPT_CLOSED_COUNT,
ISSUE_PROJECT_RESOLVED_COUNT,
ISSUE_PROJECT_UN_RESOLVED_COUNT,
APPROVAL_PROJECT_RESOLVED_COUNT,
APPROVAL_PROJECT_UN_RESOLVED_COUNT,
EVENT_RESOLVED_COUNT,
EVENT_UN_RESOLVED_COUNT
FROM FROM
fact_agency_govern_daily fact_agency_govern_daily
WHERE WHERE

7
epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDifficultRankResultDTO.java

@ -3,6 +3,7 @@ package com.epmet.project.dto.result;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
/** /**
@ -61,4 +62,10 @@ public class ProjectDifficultRankResultDTO implements Serializable {
* */ * */
private Integer handledCount; private Integer handledCount;
/**
* 项目评价分数
* 直接取整数位展示
*/
private BigDecimal score;
} }

39
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

@ -243,34 +243,41 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
@Override @Override
public List<GovernCapacityRankResultDTO> governCapacityRank(AgencyAndNumFormDTO param) { public List<GovernCapacityRankResultDTO> governCapacityRank(AgencyAndNumFormDTO param) {
List<GovernCapacityResultDTO> orderList = new ArrayList<>(); List<GovernCapacityResultDTO> orderList = new ArrayList<>();
if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE); if(null == param.getTopNum()) {
if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX); param.setTopNum(NumConstant.FIVE);
}
if(NumConstant.ZERO == param.getTopNum()) {
param.setTopNum(NumConstant.MAX);
}
PageHelper.startPage(NumConstant.ONE,param.getTopNum()); PageHelper.startPage(NumConstant.ONE,param.getTopNum());
String monthId = dateUtils.getCurrentMonthId(); String dateId = com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(NumConstant.ONE);
if (StringUtils.isNotEmpty(param.getAreaCode())){ if (StringUtils.isNotEmpty(param.getAreaCode())){
List<String> nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId()); List<String> nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId());
if (CollectionUtils.isEmpty(nextAgencyIds)){ if (CollectionUtils.isEmpty(nextAgencyIds)){
return new ArrayList<>(); return new ArrayList<>();
} }
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(monthId,nextAgencyIds); orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(dateId,nextAgencyIds);
int time = NumConstant.TWELVE; int time = NumConstant.ONE;
while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){ while(CollectionUtils.isEmpty(orderList) && time < NumConstant.TEN){
time--; time++;
monthId = dateUtils.getPreviousMonthIdByDest(null ,monthId); dateId = com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(time);
PageHelper.startPage(NumConstant.ONE,param.getTopNum()); PageHelper.startPage(NumConstant.ONE,param.getTopNum());
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(monthId,nextAgencyIds); orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(dateId,nextAgencyIds);
} }
}else { }else {
orderList = screenGovernRankDataDao.selectGovernCapacityRatio(monthId, param.getAgencyId()); orderList = screenGovernRankDataDao.selectGovernCapacityRatio(dateId, param.getAgencyId());
int time = NumConstant.TWELVE; int time = NumConstant.ONE;
while (CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE) { while (CollectionUtils.isEmpty(orderList) && time < NumConstant.TEN) {
time--; time++;
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId); dateId = com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(time);
PageHelper.startPage(NumConstant.ONE, param.getTopNum()); PageHelper.startPage(NumConstant.ONE, param.getTopNum());
orderList = screenGovernRankDataDao.selectGovernCapacityRatio(monthId, param.getAgencyId()); orderList = screenGovernRankDataDao.selectGovernCapacityRatio(dateId, param.getAgencyId());
} }
} }
if(null == orderList || orderList.isEmpty()) return new ArrayList<>(); if(null == orderList || orderList.isEmpty()) {
return new ArrayList<>();
}
List<GovernCapacityRankResultDTO> result = new LinkedList<>(); List<GovernCapacityRankResultDTO> result = new LinkedList<>();
orderList.forEach(o -> { orderList.forEach(o -> {
GovernCapacityRankResultDTO rank = new GovernCapacityRankResultDTO(); GovernCapacityRankResultDTO rank = new GovernCapacityRankResultDTO();

15
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java

@ -200,13 +200,14 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
logger.info("机关名:"+m.getName()+",总数="+m.getTotal()); logger.info("机关名:"+m.getName()+",总数="+m.getTotal());
} }
//2021.5.25 平音客户热心居民改网格员 sun start //2021.5.25 平音客户热心居民改网格员 sun start
if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) { //2021.121.17 应胡科家要求在改回去
/*if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) {
dimList.forEach(d->{ dimList.forEach(d->{
if("热心居民".equals(d.getType())){ if("热心居民".equals(d.getType())){
d.setType("网格员"); d.setType("网格员");
} }
}); });
} }*/
//2021.5.25 平音客户热心居民改网格员 sun end //2021.5.25 平音客户热心居民改网格员 sun end
return dimList; return dimList;
} }
@ -333,13 +334,14 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
logger.info("网格名:"+m.getName()+",总数="+m.getTotal()); logger.info("网格名:"+m.getName()+",总数="+m.getTotal());
} }
//2021.5.25 平音客户热心居民改网格员 sun start //2021.5.25 平音客户热心居民改网格员 sun start
if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) { //2021.121.17 应胡科家要求在改回去
/*if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) {
dimList.forEach(d->{ dimList.forEach(d->{
if("热心居民".equals(d.getType())){ if("热心居民".equals(d.getType())){
d.setType("网格员"); d.setType("网格员");
} }
}); });
} }*/
//2021.5.25 平音客户热心居民改网格员 sun end //2021.5.25 平音客户热心居民改网格员 sun end
return dimList; return dimList;
} }
@ -507,13 +509,14 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
resultList.add(party); resultList.add(party);
} }
//2021.5.25 平音客户热心居民改网格员 sun start //2021.5.25 平音客户热心居民改网格员 sun start
if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) { //2021.121.17 应胡科家要求在改回去
/*if (StrConstant.PY_CUSTOMER.equals(tokenDto.getCustomerId())) {
resultList.forEach(d->{ resultList.forEach(d->{
if("热心居民".equals(d.getType())){ if("热心居民".equals(d.getType())){
d.setType("网格员"); d.setType("网格员");
} }
}); });
} }*/
//2021.5.25 平音客户热心居民改网格员 sun end //2021.5.25 平音客户热心居民改网格员 sun end
return resultList; return resultList;
} }

5
epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml

@ -278,7 +278,9 @@
diff.EVENT_IMG_URL AS imgUrl, diff.EVENT_IMG_URL AS imgUrl,
floor(diff.EVENT_COST_TIME/60) AS totalHours, floor(diff.EVENT_COST_TIME/60) AS totalHours,
diff.EVENT_RE_ORG AS reOrg, diff.EVENT_RE_ORG AS reOrg,
diff.EVENT_HANDLED_COUNT AS handledCount diff.EVENT_HANDLED_COUNT AS handledCount,
CASE WHEN diff.org_type = 'grid' AND diff.EVENT_STATUS_CODE = 'closed' THEN IFNULL(spd.SATISFACTION_SCORE,80)
ELSE spd.SATISFACTION_SCORE END AS score
FROM FROM
( (
select scg.AREA_CODE,sdd1.* from screen_difficulty_data sdd1 select scg.AREA_CODE,sdd1.* from screen_difficulty_data sdd1
@ -333,6 +335,7 @@
AND sdd2.EVENT_STATUS_CODE in('closed','10','5') AND sdd2.EVENT_STATUS_CODE in('closed','10','5')
</if> </if>
) diff ) diff
LEFT JOIN screen_project_data spd ON (spd.PROJECT_ID = diff.EVENT_ID AND spd.DEL_FLAG = '0' AND spd.CLOSE_CASE_TIME IS NOT NULL and spd.SATISFACTION_SCORE is not null)
ORDER BY ORDER BY
CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME
WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT WHEN 'mosthandled' THEN diff.EVENT_HANDLED_COUNT

12
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml

@ -14,14 +14,14 @@
rankData.SATISFACTION_RATIO, rankData.SATISFACTION_RATIO,
agency.AGENCY_NAME AS parentAgencyName agency.AGENCY_NAME AS parentAgencyName
FROM FROM
screen_govern_rank_data rankData screen_govern_rank_data_daily rankData
LEFT JOIN LEFT JOIN
screen_customer_agency agency screen_customer_agency agency
ON rankData.PARENT_ID = agency.AGENCY_ID AND agency.DEL_FLAG = '0' AND agency.AGENCY_ID = #{agencyId} ON rankData.PARENT_ID = agency.AGENCY_ID AND agency.DEL_FLAG = '0' AND agency.AGENCY_ID = #{agencyId}
WHERE WHERE
rankData.DEL_FLAG = '0' rankData.DEL_FLAG = '0'
AND rankData.PARENT_ID = #{agencyId} AND rankData.PARENT_ID = #{agencyId}
AND rankData.MONTH_ID = #{monthId} AND rankData.DATE_ID = #{monthId}
ORDER BY ORDER BY
rankData.RESPONSE_RATIO DESC rankData.RESPONSE_RATIO DESC
</select> </select>
@ -41,7 +41,7 @@
left join screen_customer_agency pa left join screen_customer_agency pa
on(agency.PARENT_AREA_CODE=pa.AREA_CODE on(agency.PARENT_AREA_CODE=pa.AREA_CODE
and pa.DEL_FLAG='0') and pa.DEL_FLAG='0')
left join screen_govern_rank_data rankData left join screen_govern_rank_data_daily rankData
ON (agency.AGENCY_ID =rankData.org_id ON (agency.AGENCY_ID =rankData.org_id
AND rankData.DEL_FLAG = '0' AND rankData.DEL_FLAG = '0'
and rankData.org_type='agency') and rankData.org_type='agency')
@ -51,7 +51,7 @@
<foreach collection="orgIds" item="orgId" open="(" close=")" separator=","> <foreach collection="orgIds" item="orgId" open="(" close=")" separator=",">
#{orgId} #{orgId}
</foreach> </foreach>
AND rankData.MONTH_ID =#{monthId} AND rankData.DATE_ID =#{monthId}
) )
union union
( (
@ -67,7 +67,7 @@
FROM screen_customer_grid grid FROM screen_customer_grid grid
left join screen_customer_agency ca left join screen_customer_agency ca
on (ca.agency_id = grid.parent_agency_id) on (ca.agency_id = grid.parent_agency_id)
left join screen_govern_rank_data rankData left join screen_govern_rank_data_daily rankData
ON (grid.grid_id=rankData.org_id ON (grid.grid_id=rankData.org_id
AND grid.DEL_FLAG = 0 AND grid.DEL_FLAG = 0
and rankData.org_type='grid') and rankData.org_type='grid')
@ -76,7 +76,7 @@
<foreach collection="orgIds" item="orgId" open="(" close=")" separator=","> <foreach collection="orgIds" item="orgId" open="(" close=")" separator=",">
#{orgId} #{orgId}
</foreach> </foreach>
AND rankData.MONTH_ID =#{monthId} AND rankData.DATE_ID =#{monthId}
) )
ORDER BY ORDER BY
RESPONSE_RATIO DESC RESPONSE_RATIO DESC

9
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java

@ -129,6 +129,15 @@ public class FactAgencyGovernDailyDTO implements Serializable {
*/ */
private Integer inGroupTopicUnResolvedCount; private Integer inGroupTopicUnResolvedCount;
/**
* 11当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 12当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/** /**
* 未出当前网格的结案项目数 * 未出当前网格的结案项目数
*/ */

9
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java

@ -140,6 +140,15 @@ public class FactGridGovernDailyDTO implements Serializable {
*/ */
private Integer fromAgencyUnResolvedInGridCount; private Integer fromAgencyUnResolvedInGridCount;
/**
* 15当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 16当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/** /**
* 15未出当前网格的结案项目数=11+12+13+14 * 15未出当前网格的结案项目数=11+12+13+14
*/ */

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectActionConstant.java

@ -24,4 +24,6 @@ public interface DimObjectActionConstant {
// perfect 非常满意 // perfect 非常满意
// created 立项 // created 立项
String PROJECT_RETURN="return"; String PROJECT_RETURN="return";
String PROJECT_CLOSE="close";
} }

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java

@ -150,7 +150,14 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
* 10当前组织内未出小组即未转议题的话题关闭无需解决数 * 10当前组织内未出小组即未转议题的话题关闭无需解决数
*/ */
private Integer inGroupTopicUnResolvedCount; private Integer inGroupTopicUnResolvedCount;
/**
* 11当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 12当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/** /**
* 未出当前网格的结案项目数 * 未出当前网格的结案项目数
*/ */

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java

@ -169,6 +169,15 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity {
*/ */
private Integer gridSelfGovernProjectTotal; private Integer gridSelfGovernProjectTotal;
/**
* 15当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 16当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/** /**
* 当前网格内出来的项目由社区结案(已解决+未解决)的项目总数 * 当前网格内出来的项目由社区结案(已解决+未解决)的项目总数
@ -208,6 +217,8 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity {
this.issueProjectUnResolvedCount=NumConstant.ZERO; this.issueProjectUnResolvedCount=NumConstant.ZERO;
this.approvalProjectResolvedCount=NumConstant.ZERO; this.approvalProjectResolvedCount=NumConstant.ZERO;
this.approvalProjectUnResolvedCount=NumConstant.ZERO; this.approvalProjectUnResolvedCount=NumConstant.ZERO;
this.eventResolvedCount=NumConstant.ZERO;
this.eventUnResolvedCount=NumConstant.ZERO;
this.inGroupTopicResolvedCount=NumConstant.ZERO; this.inGroupTopicResolvedCount=NumConstant.ZERO;
this.inGroupTopicUnResolvedCount=NumConstant.ZERO; this.inGroupTopicUnResolvedCount=NumConstant.ZERO;
this.fromIssueResolvedInGridCount=NumConstant.ZERO; this.fromIssueResolvedInGridCount=NumConstant.ZERO;

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/GovernGridClosedTotalCommonDTO.java

@ -51,6 +51,8 @@ public class GovernGridClosedTotalCommonDTO implements Serializable {
*/ */
private Integer districtDeptClosedCount; private Integer districtDeptClosedCount;
private Integer gridSelfGovernProjectTotal;
public GovernGridClosedTotalCommonDTO(){ public GovernGridClosedTotalCommonDTO(){
this.gridId = StrConstant.EPMETY_STR; this.gridId = StrConstant.EPMETY_STR;
this.fromIssueResolvedInGridCount=NumConstant.ZERO; this.fromIssueResolvedInGridCount=NumConstant.ZERO;
@ -60,5 +62,6 @@ public class GovernGridClosedTotalCommonDTO implements Serializable {
this.communityClosedCount=NumConstant.ZERO; this.communityClosedCount=NumConstant.ZERO;
this.streetClosedCount=NumConstant.ZERO; this.streetClosedCount=NumConstant.ZERO;
this.districtDeptClosedCount=NumConstant.ZERO; this.districtDeptClosedCount=NumConstant.ZERO;
this.gridSelfGovernProjectTotal=NumConstant.ZERO;
} }
} }

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -88,7 +88,7 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
threadPool.submit(() -> { threadPool.submit(() -> {
try { try {
long startCpc = System.currentTimeMillis(); long startCpc = System.currentTimeMillis();
//calCpcIndexService.calCpcPartyAbility(customerId, monthId); calCpcIndexService.calCpcPartyAbility(customerId, monthId);
log.error("党员相关-党建能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCpc, param.getCustomerId()); log.error("党员相关-党建能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCpc, param.getCustomerId());
} catch (Exception e) { } catch (Exception e) {
log.error("抽取【党员相关数据】发生异常,参数:" + JSON.toJSONString(param), e); log.error("抽取【党员相关数据】发生异常,参数:" + JSON.toJSONString(param), e);

81
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java

@ -29,7 +29,6 @@ import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.entity.evaluationindex.extract.FactAgencyGovernDailyEntity; import com.epmet.entity.evaluationindex.extract.FactAgencyGovernDailyEntity;
import com.epmet.service.evaluationindex.extract.todata.*; import com.epmet.service.evaluationindex.extract.todata.*;
import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimAgencyService;
import com.epmet.util.DimIdGenerator;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -202,13 +201,11 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
}); });
} }
// 当前组织内:来源于议题的项目:结案已解决数 // 当前组织内:项目立项:结案已解决数
Map<String, OrgStatisticsResultDTO> projectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId, Map<String, OrgStatisticsResultDTO> projectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED, dateId, ProjectConstant.RESOLVED,
OrgTypeConstant.AGENCY); OrgTypeConstant.AGENCY);
Map<String, OrgStatisticsResultDTO> eventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectResolvedTotal.isEmpty()) { if (!projectResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> { agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectResolvedTotal.get(item.getAgencyId()); OrgStatisticsResultDTO dto = projectResolvedTotal.get(item.getAgencyId());
@ -219,23 +216,12 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
item.setApprovalProjectResolvedCount(sum); item.setApprovalProjectResolvedCount(sum);
}); });
} }
if (!eventProjectResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> { // 当前组织内:项目立项:结案无需解决数
OrgStatisticsResultDTO dto = eventProjectResolvedTotal.get(item.getAgencyId());
int sum = item.getApprovalProjectResolvedCount();
if (null != dto) {
sum = sum + dto.getSum();
}
item.setApprovalProjectResolvedCount(sum);
});
}
// 当前组织内:来源于议题的项目:结案无需解决数
Map<String, OrgStatisticsResultDTO> projectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId, Map<String, OrgStatisticsResultDTO> projectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED, dateId, ProjectConstant.UNRESOLVED,
OrgTypeConstant.AGENCY); OrgTypeConstant.AGENCY);
Map<String, OrgStatisticsResultDTO> eventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectUnResolvedTotal.isEmpty()) { if (!projectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> { agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectUnResolvedTotal.get(item.getAgencyId()); OrgStatisticsResultDTO dto = projectUnResolvedTotal.get(item.getAgencyId());
@ -246,17 +232,34 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
item.setApprovalProjectUnResolvedCount(sum); item.setApprovalProjectUnResolvedCount(sum);
}); });
} }
if (!eventProjectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> { }
OrgStatisticsResultDTO dto = eventProjectUnResolvedTotal.get(item.getAgencyId());
int sum = item.getApprovalProjectUnResolvedCount(); //2021.12.15 当前组织内:来源于事件的项目:结案已解决数
if (null != dto) { Map<String, OrgStatisticsResultDTO> eventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
sum = sum + dto.getSum(); dateId, ProjectConstant.RESOLVED,
} ProjectConstant.PROJECT_ORIGIN_EVENT);
item.setApprovalProjectUnResolvedCount(sum); if (!eventProjectResolvedTotal.isEmpty()) {
}); agencyGovernDailyList.forEach(item -> {
} OrgStatisticsResultDTO dto = eventProjectResolvedTotal.get(item.getAgencyId());
if (null != dto) {
item.setEventResolvedCount(dto.getSum());
}
});
} }
//2021.12.15 当前组织内:来源于事件的项目:结案无需解决数
Map<String, OrgStatisticsResultDTO> eventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!eventProjectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = eventProjectUnResolvedTotal.get(item.getAgencyId());
if (null != dto) {
item.setEventUnResolvedCount(dto.getSum());
}
});
}
// 2.党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的) // 2.党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
agencyGovernDailyList.forEach(item -> { agencyGovernDailyList.forEach(item -> {
int count = item.getInGroupTopicResolvedCount() + item.getInGroupTopicUnResolvedCount(); int count = item.getInGroupTopicResolvedCount() + item.getInGroupTopicUnResolvedCount();
@ -267,14 +270,16 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
item.setGroupSelfGovernRatio(selfCount.divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP)); item.setGroupSelfGovernRatio(selfCount.divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP));
} }
}); });
// 3.网格自治占比:当前组织下,所有网格内结案项目数与问题解决总数之比(未出网格) // 3.网格解决占比:当前组织下,由网格结案的项目数与已结案项目之比
Map<String, OrgStatisticsResultDTO> gridSelfCount = factOriginProjectLogDailyService.getAgencyGridSelfDaily(customerId, dateId); Map<String, OrgStatisticsResultDTO> gridSelfCount = factOriginProjectLogDailyService.getAgencyGridSelfDaily(customerId, dateId);
if (!gridSelfCount.isEmpty()) { if (!gridSelfCount.isEmpty()) {
agencyGovernDailyList.forEach(item -> { agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = gridSelfCount.get(item.getAgencyId()); OrgStatisticsResultDTO dto = gridSelfCount.get(item.getAgencyId());
if (null != dto) { if (null != dto) {
int count = dto.getCount(); int count = dto.getCount();
int sum = item.getProblemResolvedCount(); //已结案项目数 = 来源议题的项目结案已解决数+来源议题的项目结案无需解决数+项目立项结案已解决数+项目立项结案无需解决数+来源事件的项目结案已解决数+来源事件的项目结案已解决数
int sum = item.getIssueProjectResolvedCount() + item.getIssueProjectUnResolvedCount() + item.getApprovalProjectResolvedCount()
+ item.getApprovalProjectUnResolvedCount() + item.getEventResolvedCount() + item.getEventUnResolvedCount();
if (sum != NumConstant.ZERO) { if (sum != NumConstant.ZERO) {
BigDecimal resolveCount = new BigDecimal(sum); BigDecimal resolveCount = new BigDecimal(sum);
BigDecimal selfCount = new BigDecimal(count); BigDecimal selfCount = new BigDecimal(count);
@ -284,9 +289,9 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
} }
}); });
} }
// 4.社区解决占比:当前组织下,由社区结案的项目数与问题解决总数之比 // 4.社区解决占比:当前组织下,由社区结案的项目数与已结案项目之比
// 5.区直部门解决占比:当前组织下,由区级部门结案的项目数与问题解决总数之比 // 6.街道解决占比:当前组织下,由街道结案的项目数与已结案项目之比
// 6.街道解决占比:当前组织下,由街道结案的项目数与问题解决总数之比 // 6.区县解决占比:当前组织下,由区县结案的项目数与已结案项目之比
Map<String, List<OrgStatisticsResultDTO>> projectCount = factOriginProjectMainDailyService.getAgencyClosedProjectStatic(customerId, dateId); Map<String, List<OrgStatisticsResultDTO>> projectCount = factOriginProjectMainDailyService.getAgencyClosedProjectStatic(customerId, dateId);
if (!gridSelfCount.isEmpty()) { if (!gridSelfCount.isEmpty()) {
agencyGovernDailyList.forEach(item -> { agencyGovernDailyList.forEach(item -> {
@ -294,7 +299,9 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
Map<String, OrgStatisticsResultDTO> map = list.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getLevel, Map<String, OrgStatisticsResultDTO> map = list.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getLevel,
Function.identity())); Function.identity()));
int sum = item.getProblemResolvedCount(); //已结案项目数 = 来源议题的项目结案已解决数+来源议题的项目结案无需解决数+项目立项结案已解决数+项目立项结案无需解决数+来源事件的项目结案已解决数+来源事件的项目结案已解决数
int sum = item.getIssueProjectResolvedCount() + item.getIssueProjectUnResolvedCount() + item.getApprovalProjectResolvedCount()
+ item.getApprovalProjectUnResolvedCount() + item.getEventResolvedCount() + item.getEventUnResolvedCount();
BigDecimal resolveCount = new BigDecimal(sum); BigDecimal resolveCount = new BigDecimal(sum);
if (sum != NumConstant.ZERO) { if (sum != NumConstant.ZERO) {
// 社区解决占比 // 社区解决占比
@ -316,7 +323,7 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
// 区直部门解决占比 // 区直部门解决占比
OrgStatisticsResultDTO districtDept = map.get(ScreenConstant.DISTRICT); OrgStatisticsResultDTO districtDept = map.get(ScreenConstant.DISTRICT);
if (null != districtDept) { if (null != districtDept) {
int count = districtDept.getCount(); int count = districtDept.getSum();
BigDecimal selfCount = new BigDecimal(count); BigDecimal selfCount = new BigDecimal(count);
item.setDistrictDeptClosedRatio(selfCount.divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP)); item.setDistrictDeptClosedRatio(selfCount.divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP));
item.setDistrictDeptClosedCount(count); item.setDistrictDeptClosedCount(count);
@ -387,6 +394,8 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
entity.setIssueProjectUnResolvedCount(NumConstant.ZERO); entity.setIssueProjectUnResolvedCount(NumConstant.ZERO);
entity.setApprovalProjectResolvedCount(NumConstant.ZERO); entity.setApprovalProjectResolvedCount(NumConstant.ZERO);
entity.setApprovalProjectUnResolvedCount(NumConstant.ZERO); entity.setApprovalProjectUnResolvedCount(NumConstant.ZERO);
entity.setEventResolvedCount(NumConstant.ZERO);
entity.setEventUnResolvedCount(NumConstant.ZERO);
entity.setInGroupTopicResolvedCount(NumConstant.ZERO); entity.setInGroupTopicResolvedCount(NumConstant.ZERO);
entity.setInGroupTopicUnResolvedCount(NumConstant.ZERO); entity.setInGroupTopicUnResolvedCount(NumConstant.ZERO);
entity.setGridSelfGovernProjectTotal(NumConstant.ZERO); entity.setGridSelfGovernProjectTotal(NumConstant.ZERO);

66
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java

@ -148,20 +148,25 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
if(approvalProjectResolvedMap.containsKey(insertEntity.getGridId())){ if(approvalProjectResolvedMap.containsKey(insertEntity.getGridId())){
resolveCount = resolveCount + approvalProjectResolvedMap.get(insertEntity.getGridId()); resolveCount = resolveCount + approvalProjectResolvedMap.get(insertEntity.getGridId());
} }
if(eventProjectResolvedMap.containsKey(insertEntity.getGridId())){
resolveCount = resolveCount + eventProjectResolvedMap.get(insertEntity.getGridId());
}
insertEntity.setApprovalProjectResolvedCount(resolveCount); insertEntity.setApprovalProjectResolvedCount(resolveCount);
// 8、当前网格内:项目立项,结案无需解决数;默认为0, // 8、当前网格内:项目立项,结案无需解决数;默认为0,
int unResolveCount = 0; int unResolveCount = 0;
if(approvalProjectUnResolvedMap.containsKey(insertEntity.getGridId())){ if(approvalProjectUnResolvedMap.containsKey(insertEntity.getGridId())){
unResolveCount = resolveCount + approvalProjectUnResolvedMap.get(insertEntity.getGridId()); unResolveCount = resolveCount + approvalProjectUnResolvedMap.get(insertEntity.getGridId());
} }
insertEntity.setApprovalProjectUnResolvedCount(unResolveCount);
// 当前组织内:来源于事件的项目:结案已解决数
if(eventProjectResolvedMap.containsKey(insertEntity.getGridId())){
insertEntity.setEventResolvedCount(eventProjectResolvedMap.get(insertEntity.getGridId()));
}
// 当前组织内:来源于事件的项目:结案无需解决数
if(eventProjectUnResolvedMap.containsKey(insertEntity.getGridId())){ if(eventProjectUnResolvedMap.containsKey(insertEntity.getGridId())){
unResolveCount = resolveCount + eventProjectUnResolvedMap.get(insertEntity.getGridId()); insertEntity.setEventUnResolvedCount(eventProjectUnResolvedMap.get(insertEntity.getGridId()));
} }
insertEntity.setApprovalProjectUnResolvedCount(unResolveCount);
// 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的) // 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
// 9、当前网格内,未出小组即未转议题的:话题关闭已解决数 // 9、当前网格内,未出小组即未转议题的:话题关闭已解决数
if(inGroupTopicResolvedMap.containsKey(insertEntity.getGridId())){ if(inGroupTopicResolvedMap.containsKey(insertEntity.getGridId())){
@ -183,8 +188,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
insertEntity.setFromAgencyUnResolvedInGridCount(dtoMap.get(insertEntity.getGridId()).getFromAgencyUnResolvedInGridCount()); insertEntity.setFromAgencyUnResolvedInGridCount(dtoMap.get(insertEntity.getGridId()).getFromAgencyUnResolvedInGridCount());
// 所有网格内结案项目数(未出网格)=来源于议题的项目结案已解决+来源于议题的项目结案无需解决+来源于立项的项目结案已解决+来源于立项的项目结案无需解决 // 所有网格内结案项目数(未出网格)=来源于议题的项目结案已解决+来源于议题的项目结案无需解决+来源于立项的项目结案已解决+来源于立项的项目结案无需解决
// 15、未出当前网格的,结案项目数=11+12+13+14 // 15、未出当前网格的,结案项目数=11+12+13+14
insertEntity.setGridSelfGovernProjectTotal(insertEntity.getFromIssueResolvedInGridCount()+insertEntity.getFromIssueUnResolvedInGridCount()+ insertEntity.setGridSelfGovernProjectTotal(dtoMap.get(insertEntity.getGridId()).getGridSelfGovernProjectTotal());
insertEntity.getFromAgencyResolvedInGridCount()+insertEntity.getFromAgencyUnResolvedInGridCount());
//当前网格内出来的项目:由社区结案(已解决+未解决)的项目总数 //当前网格内出来的项目:由社区结案(已解决+未解决)的项目总数
insertEntity.setCommunityClosedCount(dtoMap.get(insertEntity.getGridId()).getCommunityClosedCount()); insertEntity.setCommunityClosedCount(dtoMap.get(insertEntity.getGridId()).getCommunityClosedCount());
@ -199,7 +203,13 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
+insertEntity.getIssueResolvedCount()+insertEntity.getIssueUnResolvedCount() +insertEntity.getIssueResolvedCount()+insertEntity.getIssueUnResolvedCount()
+insertEntity.getIssueProjectResolvedCount()+insertEntity.getIssueProjectUnResolvedCount() +insertEntity.getIssueProjectResolvedCount()+insertEntity.getIssueProjectUnResolvedCount()
+insertEntity.getApprovalProjectResolvedCount()+insertEntity.getApprovalProjectUnResolvedCount()); +insertEntity.getApprovalProjectResolvedCount()+insertEntity.getApprovalProjectUnResolvedCount());
//结案项目数
int projectClosedTotal = insertEntity.getIssueProjectResolvedCount()
+ insertEntity.getIssueProjectUnResolvedCount()
+ insertEntity.getApprovalProjectResolvedCount()
+ insertEntity.getApprovalProjectUnResolvedCount()
+ insertEntity.getEventResolvedCount()
+ insertEntity.getEventUnResolvedCount();
// 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的) // 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
//界面展示:2、党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数 //界面展示:2、党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数
int groupSelfGovernRatioFz=insertEntity.getInGroupTopicResolvedCount()+insertEntity.getInGroupTopicUnResolvedCount(); int groupSelfGovernRatioFz=insertEntity.getInGroupTopicResolvedCount()+insertEntity.getInGroupTopicUnResolvedCount();
@ -212,37 +222,37 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
// 网格自治占比:当前组织下,所有网格内结案项目数与问题解决总数之比(未出网格) // 网格自治占比:当前组织下,所有网格内结案项目数与问题解决总数之比(未出网格)
//界面展示:3、网格自治占比=GRID_SELF_GOVERN_PROJECT_TOTAL/PROBLEM_RESOLVED_COUNT;此列存储的是小数 //界面展示:3、网格自治占比=GRID_SELF_GOVERN_PROJECT_TOTAL/PROBLEM_RESOLVED_COUNT;此列存储的是小数
if(NumConstant.ZERO==insertEntity.getGridSelfGovernProjectTotal()||NumConstant.ZERO == insertEntity.getProblemResolvedCount()){ if(NumConstant.ZERO==insertEntity.getGridSelfGovernProjectTotal()||NumConstant.ZERO == projectClosedTotal){
insertEntity.setGridSelfGovernRatio(BigDecimal.ZERO); insertEntity.setGridSelfGovernRatio(BigDecimal.ZERO);
}else{ }else{
String gridSelfGovernRatioStr = numberFormat.format((float) insertEntity.getGridSelfGovernProjectTotal() / insertEntity.getProblemResolvedCount()); String gridSelfGovernRatioStr = numberFormat.format((float) insertEntity.getGridSelfGovernProjectTotal() / projectClosedTotal);
insertEntity.setGridSelfGovernRatio(new BigDecimal(gridSelfGovernRatioStr)); insertEntity.setGridSelfGovernRatio(new BigDecimal(gridSelfGovernRatioStr));
} }
//界面展示:4、社区解决占比=COMMUNITY_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数 //界面展示:4、社区解决占比=COMMUNITY_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数
//网格内出来的项目,最终由社区结案的项目数 //网格内出来的项目,最终由社区结案的项目数
if (NumConstant.ZERO == insertEntity.getCommunityClosedCount()||NumConstant.ZERO == insertEntity.getProblemResolvedCount()) { if (NumConstant.ZERO == insertEntity.getCommunityClosedCount()||NumConstant.ZERO == projectClosedTotal) {
insertEntity.setCommunityClosedRatio(BigDecimal.ZERO); insertEntity.setCommunityClosedRatio(BigDecimal.ZERO);
}else{ }else{
String setCommunityClosedRatioStr = numberFormat.format((float) insertEntity.getCommunityClosedCount() / insertEntity.getProblemResolvedCount()); String setCommunityClosedRatioStr = numberFormat.format((float) insertEntity.getCommunityClosedCount() / projectClosedTotal);
insertEntity.setCommunityClosedRatio(new BigDecimal(setCommunityClosedRatioStr)); insertEntity.setCommunityClosedRatio(new BigDecimal(setCommunityClosedRatioStr));
} }
// 界面展示:5、街道解决占比=STREET_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数 // 界面展示:5、街道解决占比=STREET_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数
//网格内出来的项目,最终由街道结案的项目数 //网格内出来的项目,最终由街道结案的项目数
if (NumConstant.ZERO == insertEntity.getStreetClosedCount() || NumConstant.ZERO == insertEntity.getProblemResolvedCount()) { if (NumConstant.ZERO == insertEntity.getStreetClosedCount() || NumConstant.ZERO == projectClosedTotal) {
insertEntity.setStreetClosedRatio(BigDecimal.ZERO); insertEntity.setStreetClosedRatio(BigDecimal.ZERO);
} else { } else {
String streetClosedRatioStr = numberFormat.format((float) insertEntity.getStreetClosedCount() / insertEntity.getProblemResolvedCount()); String streetClosedRatioStr = numberFormat.format((float) insertEntity.getStreetClosedCount() / projectClosedTotal);
insertEntity.setStreetClosedRatio(new BigDecimal(streetClosedRatioStr)); insertEntity.setStreetClosedRatio(new BigDecimal(streetClosedRatioStr));
} }
//界面展示:6、区直部门解决占比=DISTRICT_DEPT_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数 //界面展示:6、区直部门解决占比=DISTRICT_DEPT_CLOSED_COUNT/PROBLEM_RESOLVED_COUNT;此列存储的是小数
//网格内出来的项目,最终由区直部门结案的项目数 //网格内出来的项目,最终由区直部门结案的项目数
if (NumConstant.ZERO == insertEntity.getDistrictDeptClosedCount() || NumConstant.ZERO == insertEntity.getProblemResolvedCount()) { if (NumConstant.ZERO == insertEntity.getDistrictDeptClosedCount() || NumConstant.ZERO == projectClosedTotal) {
insertEntity.setDistrictDeptClosedRatio(BigDecimal.ZERO); insertEntity.setDistrictDeptClosedRatio(BigDecimal.ZERO);
} else { } else {
String setDistrictDeptClosedRatioStr = numberFormat.format((float) insertEntity.getDistrictDeptClosedCount() / insertEntity.getProblemResolvedCount()); String setDistrictDeptClosedRatioStr = numberFormat.format((float) insertEntity.getDistrictDeptClosedCount() / projectClosedTotal);
insertEntity.setDistrictDeptClosedRatio(new BigDecimal(setDistrictDeptClosedRatioStr)); insertEntity.setDistrictDeptClosedRatio(new BigDecimal(setDistrictDeptClosedRatioStr));
} }
@ -310,7 +320,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
int streetClosedCount=NumConstant.ZERO; int streetClosedCount=NumConstant.ZERO;
// 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数 // 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数
int districtDeptClosedCount=NumConstant.ZERO; int districtDeptClosedCount=NumConstant.ZERO;
int gridSelfGovernProjectTotal=NumConstant.ZERO;
//当前网格内已结案的项目 //当前网格内已结案的项目
List<GovernProjectInfoDTO> currentGridClosedProjectList = factOriginProjectMainDailyService.getGridClosedProjectList(customerId, gridId, List<GovernProjectInfoDTO> currentGridClosedProjectList = factOriginProjectMainDailyService.getGridClosedProjectList(customerId, gridId,
ProjectConstant.CLOSED,null,null); ProjectConstant.CLOSED,null,null);
@ -339,6 +349,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
fromAgencyUnResolvedInGridCount += 1; fromAgencyUnResolvedInGridCount += 1;
} }
} }
gridSelfGovernProjectTotal += 1;
} else { } else {
// 3、出了网格的判断是由谁解决的? // 3、出了网格的判断是由谁解决的?
String resolveOrgType=getProjectResolveOrgType(governProjectInfoDTO.getProjectLogDTOList()); String resolveOrgType=getProjectResolveOrgType(governProjectInfoDTO.getProjectLogDTOList());
@ -350,10 +361,12 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
// 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数 // 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数
log.info("projectId=【"+governProjectInfoDTO.getId()+"】属于街道解决"); log.info("projectId=【"+governProjectInfoDTO.getId()+"】属于街道解决");
streetClosedCount+=1; streetClosedCount+=1;
}else if("districtdept".equals(resolveOrgType)){ }else if("district".equals(resolveOrgType)){
// 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数 // 当前网格内出来的项目:由区县结案(已解决+未解决)的项目总数
log.info("projectId=【"+governProjectInfoDTO.getId()+"】属于区直部门解决"); log.info("projectId=【"+governProjectInfoDTO.getId()+"】属于区直部门解决");
districtDeptClosedCount+=1; districtDeptClosedCount+=1;
} else if ("grid".equals(resolveOrgType)) {
gridSelfGovernProjectTotal += 1;
} }
// todo 可能是 市级解决、省级解决呢??? // todo 可能是 市级解决、省级解决呢???
} }
@ -366,6 +379,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
governGridClosedTotalCommonDTO.setCommunityClosedCount(communityClosedCount); governGridClosedTotalCommonDTO.setCommunityClosedCount(communityClosedCount);
governGridClosedTotalCommonDTO.setStreetClosedCount(streetClosedCount); governGridClosedTotalCommonDTO.setStreetClosedCount(streetClosedCount);
governGridClosedTotalCommonDTO.setDistrictDeptClosedCount(districtDeptClosedCount); governGridClosedTotalCommonDTO.setDistrictDeptClosedCount(districtDeptClosedCount);
governGridClosedTotalCommonDTO.setGridSelfGovernProjectTotal(gridSelfGovernProjectTotal);
resultMap.put(gridId, governGridClosedTotalCommonDTO); resultMap.put(gridId, governGridClosedTotalCommonDTO);
} }
return resultMap; return resultMap;
@ -380,7 +394,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
private String getProjectResolveOrgType(List<FactOriginProjectLogDailyDTO> projectLogDTOList) { private String getProjectResolveOrgType(List<FactOriginProjectLogDailyDTO> projectLogDTOList) {
List<Integer> handleLevelList=new ArrayList<>(); List<Integer> handleLevelList=new ArrayList<>();
for (FactOriginProjectLogDailyDTO logDailyDTO : projectLogDTOList) { for (FactOriginProjectLogDailyDTO logDailyDTO : projectLogDTOList) {
if(logDailyDTO.getActionCode().equals(DimObjectActionConstant.PROJECT_RETURN)||NumConstant.ZERO==logDailyDTO.getIsActive()){ if(!logDailyDTO.getActionCode().equals(DimObjectActionConstant.PROJECT_CLOSE)||NumConstant.ZERO==logDailyDTO.getIsActive()){
//当前操作如果是退回,不参与比较 //当前操作如果是退回,不参与比较
continue; continue;
} }
@ -395,32 +409,42 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
// orgType: 网格grid,部门department,组织:agency // orgType: 网格grid,部门department,组织:agency
if ("grid".equals(logDailyDTO.getOrgType())) { if ("grid".equals(logDailyDTO.getOrgType())) {
handleLevelList.add(NumConstant.ONE); handleLevelList.add(NumConstant.ONE);
return "grid";
} else if ("agency".equals(logDailyDTO.getOrgType())) { } else if ("agency".equals(logDailyDTO.getOrgType())) {
CustomerAgencyEntity agencyEntity=customerAgencyService.getAgencyById(logDailyDTO.getOrgId()); CustomerAgencyEntity agencyEntity=customerAgencyService.getAgencyById(logDailyDTO.getOrgId());
if("community".equals(agencyEntity.getLevel())){ if("community".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.TWO); handleLevelList.add(NumConstant.TWO);
return "community";
}else if("street".equals(agencyEntity.getLevel())){ }else if("street".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.THREE); handleLevelList.add(NumConstant.THREE);
return "street";
}else if("district".equals(agencyEntity.getLevel())){ }else if("district".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.FOUR); handleLevelList.add(NumConstant.FOUR);
return "district";
}else if("city".equals(agencyEntity.getLevel())){ }else if("city".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.FIVE); handleLevelList.add(NumConstant.FIVE);
return "city";
}else if("province".equals(agencyEntity.getLevel())){ }else if("province".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.SIX); handleLevelList.add(NumConstant.SIX);
return "province";
} }
} else if ("department".equals(logDailyDTO.getOrgType())) { } else if ("department".equals(logDailyDTO.getOrgType())) {
CustomerAgencyEntity deptAgencyEntity=customerAgencyService.getAgencyByDeptId(logDailyDTO.getOrgId()); CustomerAgencyEntity deptAgencyEntity=customerAgencyService.getAgencyByDeptId(logDailyDTO.getOrgId());
if("district".equals(deptAgencyEntity.getLevel())){ if("district".equals(deptAgencyEntity.getLevel())){
// 区直部门直接返回 // 区直部门直接返回
return "districtdept"; return "district";
}else if("community".equals(deptAgencyEntity.getLevel())){ }else if("community".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.TWO); handleLevelList.add(NumConstant.TWO);
return "community";
}else if("street".equals(deptAgencyEntity.getLevel())){ }else if("street".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.THREE); handleLevelList.add(NumConstant.THREE);
return "street";
}else if("city".equals(deptAgencyEntity.getLevel())){ }else if("city".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.FIVE); handleLevelList.add(NumConstant.FIVE);
return "city";
}else if("province".equals(deptAgencyEntity.getLevel())){ }else if("province".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.SIX); handleLevelList.add(NumConstant.SIX);
return "province";
} }
} }
} }

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridAndOrgDailyServiceImpl.java

@ -142,8 +142,6 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr
log.info("开始执行组织项目分类统计"); log.info("开始执行组织项目分类统计");
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
List<CustomerRelationEntity> relationInfo = relationService.selectSubCustomer(customerId); List<CustomerRelationEntity> relationInfo = relationService.selectSubCustomer(customerId);
List<String> customerIds = new ArrayList<>();
customerIds.add(customerId);
List<GridAndOrgCategoryCountResultDTO> result = new ArrayList<>(); List<GridAndOrgCategoryCountResultDTO> result = new ArrayList<>();
if (CollectionUtils.isEmpty(relationInfo)){ if (CollectionUtils.isEmpty(relationInfo)){
// one customer // one customer
@ -169,12 +167,13 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr
List<String> subCustomerIds = relationInfo.stream().map(CustomerRelationEntity::getCustomerId).collect(Collectors.toList()); List<String> subCustomerIds = relationInfo.stream().map(CustomerRelationEntity::getCustomerId).collect(Collectors.toList());
for (int i = NumConstant.ZERO; i < subCustomerIds.size(); i++) { for (int i = NumConstant.ZERO; i < subCustomerIds.size(); i++) {
if (subCustomerIds.get(i).equals(PingYinConstant.KONG_CUN_CUSTOMER_ID)){ if (subCustomerIds.get(i).equals(PingYinConstant.KONG_CUN_CUSTOMER_ID)){
customerIds.remove(i); subCustomerIds.remove(i);
continue; continue;
} }
} }
subCustomerIds.add(customerId); subCustomerIds.add(customerId);
List<GridAndOrgCategoryCountResultDTO> allAgencies = screenCustomerAgencyDao.selectParentSonAgency(subCustomerIds, PingYinConstant.KONG_CUN_CUSTOMER_ID); List<GridAndOrgCategoryCountResultDTO> allAgencies = screenCustomerAgencyDao.selectParentSonAgency(subCustomerIds, PingYinConstant.KONG_CUN_CUSTOMER_ID);
log.info("父子客户所有的组织{}",JSON.toJSONString(allAgencies));
List<List<GridAndOrgCategoryCountResultDTO>> partition = ListUtils.partition(allAgencies, NumConstant.FIFTY); List<List<GridAndOrgCategoryCountResultDTO>> partition = ListUtils.partition(allAgencies, NumConstant.FIFTY);
List<GridAndOrgCategoryCountResultDTO> allOrgCategoryList = result; List<GridAndOrgCategoryCountResultDTO> allOrgCategoryList = result;
partition.forEach(p -> { partition.forEach(p -> {

69
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml

@ -843,54 +843,35 @@
AND m.PROJECT_ID = #{projectId} AND m.PROJECT_ID = #{projectId}
</select> </select>
<select id="selectAgencyGridSelfDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="selectAgencyGridSelfDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT SELECT
da.ID AS AGENCY_ID, a.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "sum", a.`LEVEL`,
IFNULL( a.count, 0 ) AS "count" COUNT( b.PROJECT_ID ) AS "count"
FROM FROM
dim_agency da dim_agency a
INNER JOIN fact_origin_project_main_daily fm ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' ) INNER JOIN (
LEFT JOIN ( SELECT
SELECT PROJECT_ID,
agency.ID, main.PIDS,
orgId, ORG_TYPE
COUNT( PROJECT_ID ) AS "count" FROM
FROM fact_origin_project_main_daily main
dim_agency agency INNER JOIN fact_origin_project_log_daily log ON main.ID = log.PROJECT_ID
INNER JOIN ( AND ACTION_CODE = 'close'
SELECT AND ORG_TYPE = 'grid'
AGENCY_ID, AND log.DEL_FLAG = '0'
PIDS, AND log.CUSTOMER_ID = #{customerId}
ORG_ID AS orgId, WHERE
PROJECT_ID main.CUSTOMER_ID = #{customerId}
FROM AND main.DATE_ID &lt;= #{dateId}
fact_origin_project_log_daily
WHERE
DEL_FLAG = 0 ) b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
AND CUSTOMER_ID = #{customerId}
AND ( ACTION_CODE = 'response' OR ACTION_CODE = 'close' OR ACTION_CODE = 'transfer' OR ACTION_CODE = 'created' )
AND PROJECT_ID IN ( SELECT ID FROM fact_origin_project_main_daily WHERE DEL_FLAG = 0 AND PROJECT_STATUS = 'closed' AND ORIGIN = 'issue'
AND CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId})
GROUP BY
PROJECT_ID
HAVING
COUNT(
DISTINCT ( ORG_ID )) = 1
) a ON a.PIDS LIKE CONCAT( '%', agency.ID, '%' )
WHERE
agency.CUSTOMER_ID = #{customerId}
GROUP BY
agency.ID
) a ON a.ID = da.ID
WHERE WHERE
PROJECT_STATUS = 'closed' a.CUSTOMER_ID = #{customerId}
AND ORIGIN = "issue"
AND da.CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId}
GROUP BY GROUP BY
da.ID a.ID,
a.`LEVEL`
</select> </select>
<select id="getProjectResponseCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="getProjectResponseCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT SELECT

26
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml

@ -1069,28 +1069,34 @@
<select id="selectAgencyClosedProjectStaticDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO"> <select id="selectAgencyClosedProjectStaticDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT SELECT
a.ID AS AGENCY_ID, a.ID AS AGENCY_ID,
a.`LEVEL`, b.`LEVEL`,
COUNT( b.PROJECT_ID ) AS "sum", COUNT( b.PROJECT_ID ) AS "sum",
SUM(IF( b.ORG_TYPE = 'department', 1, 0 )) AS "count" SUM(IF( b.ORG_TYPE = 'department', 1, 0 )) AS "count"
FROM FROM
dim_agency a dim_agency a
INNER JOIN ( INNER JOIN (
SELECT SELECT
PROJECT_ID, PROJECT_ID,
PIDS, main.PIDS,
ORG_TYPE ORG_TYPE,
da.`LEVEL`
FROM FROM
fact_origin_project_log_daily fact_origin_project_main_daily main
WHERE INNER JOIN fact_origin_project_log_daily log ON main.ID = log.PROJECT_ID
CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId}
AND ACTION_CODE = 'close' AND ACTION_CODE = 'close'
AND (ORG_TYPE = 'agency' OR ORG_TYPE = 'department')
AND log.DEL_FLAG = '0'
AND log.CUSTOMER_ID = #{customerId}
INNER JOIN dim_agency da ON log.AGENCY_ID = da.ID AND da.CUSTOMER_ID = #{customerId}
WHERE
main.CUSTOMER_ID = #{customerId}
AND main.DATE_ID &lt;= #{dateId}
) b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' ) ) b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
WHERE WHERE
a.CUSTOMER_ID = #{customerId} a.CUSTOMER_ID = #{customerId}
GROUP BY GROUP BY
a.ID, a.ID,
a.`LEVEL` b.`LEVEL`
</select> </select>

2
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml

@ -200,7 +200,7 @@
+ s.PERFECT_COUNT * 100 + s.PERFECT_COUNT * 100
)/s.SHOULD_EVALUATE_COUNT )/s.SHOULD_EVALUATE_COUNT
, ,
0 80
) AS score ) AS score
FROM FROM
project_satisfaction_statistics s project_satisfaction_statistics s

11
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java

@ -219,7 +219,9 @@ public class OssController {
if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType()) if (!MediaType.IMAGE_PNG_VALUE.equals(file.getContentType())
&& !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType()) && !MediaType.IMAGE_JPEG_VALUE.equals(file.getContentType())
&& !ModuleConstant.FILE_CONTENT_TYPE_JPG.equals(file.getContentType()) && !ModuleConstant.FILE_CONTENT_TYPE_JPG.equals(file.getContentType())
&& !ModuleConstant.FILE_CONTENT_TYPE_PDF.equals(file.getContentType())) { && !ModuleConstant.FILE_CONTENT_TYPE_PDF.equals(file.getContentType())
&& !file.getContentType().startsWith(ModuleConstant.FILE_CONTENT_TYPE_VEDIO_PREFIX)
) {
log.error("uploadArticleImg file type:{} is not support 2 upload", file.getContentType()); log.error("uploadArticleImg file type:{} is not support 2 upload", file.getContentType());
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode() throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg()); , EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg());
@ -232,6 +234,13 @@ public class OssController {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode() throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg()); , EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
} }
} else if (file.getContentType().startsWith(ModuleConstant.FILE_CONTENT_TYPE_VEDIO_PREFIX)) {
// 校验文件大小,不超过5m
long maxSize = 25 * 1024 * 1024;
if (size > maxSize) {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getMsg());
}
} else { } else {
// 校验文件大小,不超过2m // 校验文件大小,不超过2m
long maxSize = 2 * 1024 * 1024; long maxSize = 2 * 1024 * 1024;

4
epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java

@ -30,6 +30,10 @@ public interface ModuleConstant extends Constant {
* pdf文件类型 * pdf文件类型
*/ */
String FILE_CONTENT_TYPE_PDF = "application/pdf"; String FILE_CONTENT_TYPE_PDF = "application/pdf";
/**
* vedio文件类型前缀 不具体什么视频格式了
*/
String FILE_CONTENT_TYPE_VEDIO_PREFIX = "video/";
/** /**
* 项目附件-允许上传的文件类型 * 项目附件-允许上传的文件类型

4
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java

@ -131,12 +131,12 @@ public class IssueVoteDetailServiceImpl extends BaseServiceImpl<IssueVoteDetailD
public void vote(VoteFormDTO formDTO) { public void vote(VoteFormDTO formDTO) {
IssueVoteDetailEntity entity = new IssueVoteDetailEntity(); IssueVoteDetailEntity entity = new IssueVoteDetailEntity();
BeanUtils.copyProperties(formDTO,entity); BeanUtils.copyProperties(formDTO,entity);
VoteRedisFormDTO redisData = issueVoteDetailRedis.get(formDTO.getIssueId()); VoteRedisFormDTO redisData = issueVoteDetailRedis.getVoteStatistical(formDTO.getIssueId());
if (redisData==null){ if (redisData==null){
VoteRedisFormDTO voteRedisFormDTO = new VoteRedisFormDTO(); VoteRedisFormDTO voteRedisFormDTO = new VoteRedisFormDTO();
voteRedisFormDTO.setIssueId(formDTO.getIssueId()); voteRedisFormDTO.setIssueId(formDTO.getIssueId());
issueVoteDetailRedis.set(voteRedisFormDTO); issueVoteDetailRedis.set(voteRedisFormDTO);
redisData = issueVoteDetailRedis.get(formDTO.getIssueId()); redisData = voteRedisFormDTO;
} }
redisData.setIssueId(formDTO.getIssueId()); redisData.setIssueId(formDTO.getIssueId());
if (formDTO.getAttitude().equals(IssueConstant.SUPPORT)){ if (formDTO.getAttitude().equals(IssueConstant.SUPPORT)){

4
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -163,7 +163,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
voteResultDTO.setVoteFlag(false); voteResultDTO.setVoteFlag(false);
} else { } else {
voteResultDTO.setVoteFlag(true); voteResultDTO.setVoteFlag(true);
VoteRedisFormDTO redisData = issueVoteDetailRedis.get(issueId.getIssueId()); VoteRedisFormDTO redisData = issueVoteDetailRedis.getVoteStatistical(issueId.getIssueId());
voteResultDTO.setVoteType(voteStatus); voteResultDTO.setVoteType(voteStatus);
voteResultDTO.setSupportCount(redisData.getSupportAmount()); voteResultDTO.setSupportCount(redisData.getSupportAmount());
voteResultDTO.setOppositionCount(redisData.getOppositionAmount()); voteResultDTO.setOppositionCount(redisData.getOppositionAmount());
@ -181,7 +181,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
@Override @Override
public VotingTrendResultDTO votingTrend(IssueIdFormDTO issueId) { public VotingTrendResultDTO votingTrend(IssueIdFormDTO issueId) {
//缓存获取议题表决详情 //缓存获取议题表决详情
VoteRedisFormDTO voteRedisFormDTO = issueVoteDetailRedis.get(issueId.getIssueId()); VoteRedisFormDTO voteRedisFormDTO = issueVoteDetailRedis.getVoteStatistical(issueId.getIssueId());
VotingTrendResultDTO votingTrendResultDTO = new VotingTrendResultDTO(); VotingTrendResultDTO votingTrendResultDTO = new VotingTrendResultDTO();
BeanUtils.copyProperties(voteRedisFormDTO, votingTrendResultDTO); BeanUtils.copyProperties(voteRedisFormDTO, votingTrendResultDTO);
votingTrendResultDTO.setRealityVoteCount(voteRedisFormDTO.getSupportAmount() + voteRedisFormDTO.getOppositionAmount()); votingTrendResultDTO.setRealityVoteCount(voteRedisFormDTO.getSupportAmount() + voteRedisFormDTO.getOppositionAmount());

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java

@ -594,8 +594,8 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
@Override @Override
public Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList) { public Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList) {
Result<List<AllGridsByUserIdResultDTO>> result = new Result<List<AllGridsByUserIdResultDTO>>(); Result<List<AllGridsByUserIdResultDTO>> result = new Result<List<AllGridsByUserIdResultDTO>>();
if (gridIdList.size() < NumConstant.ONE) { if (CollectionUtils.isEmpty(gridIdList)) {
logger.error("根据网格Id集合获取网格列表信息-传入的网格Id集合为空数组!"); logger.warn("根据网格Id集合获取网格列表信息-传入的网格Id集合为空数组!");
return result; return result;
} }
List<AllGridsByUserIdResultDTO> list = baseDao.selectGridByIds(gridIdList); List<AllGridsByUserIdResultDTO> list = baseDao.selectGridByIds(gridIdList);

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java

@ -3149,4 +3149,4 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
return simpleDateFormat.format(date); return simpleDateFormat.format(date);
} }
} }

6
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java

@ -3,6 +3,7 @@ package com.epmet.opendata.mq.listener;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.rocketmq.constants.MQUserPropertys; import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
@ -68,7 +69,10 @@ public class OpenDataOrgChangeEventListener implements MessageListenerConcurrent
logger.info("【开放数据事件监听器】-组织信息变更-收到消息内容:{},操作:{}", msg, tags); logger.info("【开放数据事件监听器】-组织信息变更-收到消息内容:{},操作:{}", msg, tags);
OrgOrStaffMQMsg obj = JSON.parseObject(msg, OrgOrStaffMQMsg.class); OrgOrStaffMQMsg obj = JSON.parseObject(msg, OrgOrStaffMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(obj.getCustomerId())) {
return;
}
RLock lock = null; RLock lock = null;
try { try {
lock = distributedLock.getLock(String.format("lock:open_data_org:%s", obj.getOrgId()), lock = distributedLock.getLock(String.format("lock:open_data_org:%s", obj.getOrgId()),

5
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java

@ -3,6 +3,7 @@ package com.epmet.opendata.mq.listener;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.rocketmq.constants.MQUserPropertys; import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.StaffPatrolMQMsg; import com.epmet.commons.rocketmq.messages.StaffPatrolMQMsg;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
@ -69,6 +70,10 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr
logger.info("【开放数据事件监听器】-巡查记录信息变更-收到消息内容:{}, 操作:{}", msg, tags); logger.info("【开放数据事件监听器】-巡查记录信息变更-收到消息内容:{}, 操作:{}", msg, tags);
StaffPatrolMQMsg msgObj = JSON.parseObject(msg, StaffPatrolMQMsg.class); StaffPatrolMQMsg msgObj = JSON.parseObject(msg, StaffPatrolMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(msgObj.getCustomerId())) {
return;
}
if (msgObj == null) { if (msgObj == null) {
log.warn("consumeMessage msg body is blank"); log.warn("consumeMessage msg body is blank");
return; return;

5
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataProjectChangeEventListener.java

@ -3,6 +3,7 @@ package com.epmet.opendata.mq.listener;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.rocketmq.constants.MQUserPropertys; import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.DisputeProcessMQMsg; import com.epmet.commons.rocketmq.messages.DisputeProcessMQMsg;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
@ -72,6 +73,10 @@ public class OpenDataProjectChangeEventListener implements MessageListenerConcur
logger.info("【开放数据事件监听器】-项目信息变更-收到消息内容:{}, 操作:{}, pendingMsgLabel:{}", msg, tags, pendingMsgLabel); logger.info("【开放数据事件监听器】-项目信息变更-收到消息内容:{}, 操作:{}, pendingMsgLabel:{}", msg, tags, pendingMsgLabel);
DisputeProcessMQMsg obj = JSON.parseObject(msg, DisputeProcessMQMsg.class); DisputeProcessMQMsg obj = JSON.parseObject(msg, DisputeProcessMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(obj.getCustomerId())) {
return;
}
EventInfoFormDTO formDTO = ConvertUtils.sourceToTarget(obj, EventInfoFormDTO.class); EventInfoFormDTO formDTO = ConvertUtils.sourceToTarget(obj, EventInfoFormDTO.class);
RLock lock = null; RLock lock = null;

5
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java

@ -3,6 +3,7 @@ package com.epmet.opendata.mq.listener;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.rocketmq.constants.MQUserPropertys; import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
@ -72,6 +73,10 @@ public class OpenDataStaffChangeEventListener implements MessageListenerConcurre
logger.info("【开放数据事件监听器】-工作人员信息变更-收到消息内容:{}, 操作:{}, blockedMsgLabel:{}", msg, tags, pendingMsgLabel); logger.info("【开放数据事件监听器】-工作人员信息变更-收到消息内容:{}, 操作:{}, blockedMsgLabel:{}", msg, tags, pendingMsgLabel);
OrgOrStaffMQMsg obj = JSON.parseObject(msg, OrgOrStaffMQMsg.class); OrgOrStaffMQMsg obj = JSON.parseObject(msg, OrgOrStaffMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(obj.getCustomerId())) {
return;
}
RLock lock = null; RLock lock = null;
try { try {

82
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseDisputeProcessServiceImpl.java

@ -31,6 +31,7 @@ import com.epmet.opendata.service.BaseConflictsResolveService;
import com.epmet.opendata.service.BaseDisputeProcessService; import com.epmet.opendata.service.BaseDisputeProcessService;
import com.epmet.opendata.service.ExDeptService; import com.epmet.opendata.service.ExDeptService;
import com.epmet.opendata.service.ExUserService; import com.epmet.opendata.service.ExUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -47,6 +48,7 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-15 * @since v1.0.0 2021-10-15
*/ */
@Slf4j
@Service @Service
public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputeProcessDao, BaseDisputeProcessEntity> implements BaseDisputeProcessService { public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputeProcessDao, BaseDisputeProcessEntity> implements BaseDisputeProcessService {
@Resource @Resource
@ -90,44 +92,50 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr
} }
private void saveEvent(EventInfoFormDTO formDTO, Map<String, Integer> deptMap, Map<String, Integer> userMap, List<EventInfoResultDTO> list) { private void saveEvent(EventInfoFormDTO formDTO, Map<String, Integer> deptMap, Map<String, Integer> userMap, List<EventInfoResultDTO> list) {
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
log.warn("no event data to save table base_conflicts_resolve");
return;
}
List<BaseConflictsResolveEntity> resolveList = list.stream().map(item -> { List<BaseConflictsResolveEntity> resolveList = list.stream().map(item -> {
BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity(); BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity();
entity.setId(item.getId().concat("_PY")); entity.setId(item.getId().concat("_PY"));
entity.setCustomerId(item.getCustomerId()); entity.setCustomerId(item.getCustomerId());
entity.setGridId(deptMap.get(item.getOrgId())); entity.setGridId(deptMap.get(item.getOrgId()));
entity.setGridName(item.getOrgName()); entity.setGridName(item.getOrgName());
entity.setEventName(item.getEventName()); entity.setEventName(item.getEventName());
entity.setHappenDate(item.getHappenDate()); entity.setHappenDate(item.getHappenDate());
entity.setHappenPlace(item.getHappenPlace()); entity.setHappenPlace(item.getHappenPlace());
String eventDescription = item.getEventDescription(); String eventDescription = item.getEventDescription();
//如果不为空 长度控制1000以内 //如果不为空 长度控制1000以内
if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.ONE_THOUSAND){ if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.ONE_THOUSAND) {
eventDescription = eventDescription.substring(NumConstant.ZERO,NumConstant.ONE_THOUSAND); eventDescription = eventDescription.substring(NumConstant.ZERO, NumConstant.ONE_THOUSAND);
} }
entity.setEventDescription(eventDescription); entity.setEventDescription(eventDescription);
entity.setLng(null == item.getLng()?null:item.getLng().toPlainString()); entity.setLng(null == item.getLng() ? null : item.getLng().toPlainString());
entity.setLat(null == item.getLat()?null:item.getLat().toPlainString()); entity.setLat(null == item.getLat() ? null : item.getLat().toPlainString());
entity.setCreateBy(null == userMap.get(item.getReporterId())?null:String.valueOf(userMap.get(item.getReporterId()))); entity.setCreateBy(null == userMap.get(item.getReporterId()) ? null : String.valueOf(userMap.get(item.getReporterId())));
entity.setCreateDate(item.getReportTime()); entity.setCreateDate(item.getReportTime());
entity.setUpdateDate(new Date()); entity.setUpdateDate(new Date());
entity.setStatus(item.getStatus()); entity.setStatus(item.getStatus());
//业务不确定 //业务不确定
if (("03").equals(item.getStatus())) { if (("03").equals(item.getStatus())) {
entity.setSuccessfulOrNot("Y"); entity.setSuccessfulOrNot("Y");
} }
entity.setEventNo(("py_").concat(item.getId())); //业务不包含 一级分类里 如果是03 矛盾纠纷 则涉及人数写2(目前业务不支持 所以应产品需求 填2)
entity.setFirstEventCategory(item.getParentEventCategory()); if ("03".equals(item.getParentEventCategory())) {
entity.setSource("01"); entity.setNumberInvolved(NumConstant.TWO);
entity.setSecondEventCategory(item.getEventCategory()); }
entity.setResolveWay(item.getWaysOfResolving()); entity.setEventNo(("py_").concat(item.getId()));
entity.setResolveGridLevel(item.getCompleteLevel()); entity.setFirstEventCategory(item.getParentEventCategory());
entity.setResolveTime(item.getCompleteTime()); entity.setSource("01");
return entity; entity.setSecondEventCategory(item.getEventCategory());
}).collect(Collectors.toList()); entity.setResolveWay(item.getWaysOfResolving());
entity.setResolveGridLevel(item.getCompleteLevel());
entity.setResolveTime(item.getCompleteTime());
return entity;
}).collect(Collectors.toList());
baseConflictsResolveService.saveOrUpdateBatch(resolveList, formDTO.getPageSize()); baseConflictsResolveService.saveOrUpdateBatch(resolveList, formDTO.getPageSize());
}
} }
} }

6
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserIdsFormDTO.java

@ -2,6 +2,8 @@ package com.epmet.dto.form;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ -14,5 +16,9 @@ public class UserIdsFormDTO implements Serializable {
private static final long serialVersionUID = -6168528618954442905L; private static final long serialVersionUID = -6168528618954442905L;
@NotBlank(message = "客户ID不能为空")
private String customerId;
@NotEmpty(message = "工作人员Id 不能为空")
private List<String> userIds; private List<String> userIds;
} }

6
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java

@ -21,7 +21,6 @@ import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg;
import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.annotation.RequirePermission;
import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
@ -40,12 +39,10 @@ import com.epmet.excel.CustomerStaffExcel;
import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.send.SendMqMsgUtil; import com.epmet.send.SendMqMsgUtil;
import com.epmet.service.CustomerStaffService; import com.epmet.service.CustomerStaffService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -367,7 +364,8 @@ public class CustomerStaffController {
* @date 2020/8/13 1:45 下午 * @date 2020/8/13 1:45 下午
*/ */
@PostMapping("getstaffinfolist") @PostMapping("getstaffinfolist")
public Result<List<StaffSinGridResultDTO>> getStaffInfoList(@RequestBody UserIdsFormDTO formDTO){ public Result<List<StaffSinGridResultDTO>> getStaffInfoList(@RequestHeader("customerId") String customerId,@RequestBody UserIdsFormDTO formDTO){
formDTO.setCustomerId(customerId);
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
return new Result<List<StaffSinGridResultDTO>>().ok(customerStaffService.getStaffInfoList(formDTO)); return new Result<List<StaffSinGridResultDTO>>().ok(customerStaffService.getStaffInfoList(formDTO));
} }

31
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java

@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.commons.mybatis.entity.DataScope;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
@ -54,7 +53,6 @@ import com.epmet.feign.AuthFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.OperCrmOpenFeignClient; import com.epmet.feign.OperCrmOpenFeignClient;
import com.epmet.send.SendMqMsgUtil;
import com.epmet.service.CustomerStaffService; import com.epmet.service.CustomerStaffService;
import com.epmet.service.GovStaffRoleService; import com.epmet.service.GovStaffRoleService;
import com.epmet.service.StaffRoleService; import com.epmet.service.StaffRoleService;
@ -64,7 +62,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -603,7 +600,31 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
public List<StaffSinGridResultDTO> getStaffInfoList(UserIdsFormDTO formDTO) { public List<StaffSinGridResultDTO> getStaffInfoList(UserIdsFormDTO formDTO) {
List<String> userIds = formDTO.getUserIds(); List<String> userIds = formDTO.getUserIds();
// 1. 根据userId查询人员基本信息 // 1. 根据userId查询人员基本信息
List<StaffSinGridResultDTO> staffInfoList = customerStaffDao.getStaffInfoList(userIds); List<StaffSinGridResultDTO> staffInfoList = new ArrayList<>();
userIds.forEach(staffId->{
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), staffId);
if (staffInfo ==null){
log.error("getStaffInfoList fail customerId:{}, staffId:{} not exist in db",formDTO.getCustomerId(), staffId);
return;
}
StaffSinGridResultDTO resultDTO = new StaffSinGridResultDTO();
resultDTO.setStaffId(staffId);
resultDTO.setStaffName(staffInfo.getRealName());
resultDTO.setHeadPhoto(staffInfo.getHeadPhoto());
resultDTO.setGender(staffInfo.getGender());
List<RoleResultDTO> roleInfoList = new ArrayList<>();
staffInfo.getRoleMap().forEach((key,value) ->{
RoleResultDTO dto = new RoleResultDTO();
dto.setRoleKey(key);
dto.setRoleName(value);
roleInfoList.add(dto);
});
resultDTO.setRoleList(roleInfoList);
staffInfoList.add(resultDTO);
});
/*List<StaffSinGridResultDTO> staffInfoList = customerStaffDao.getStaffInfoList(userIds);
if (staffInfoList.size() == NumConstant.ZERO){ if (staffInfoList.size() == NumConstant.ZERO){
return staffInfoList; return staffInfoList;
} }
@ -619,7 +640,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
} }
}); });
staffInfo.setRoleList(roleResult); staffInfo.setRoleList(roleResult);
}); });*/
return staffInfoList; return staffInfoList;
} }

17
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -918,9 +918,22 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
* @throws IOException * @throws IOException
*/ */
public void downLoadResults(HttpServletResponse response) throws IOException { public void downLoadResults(HttpServletResponse response) throws IOException {
//public static final ThreadLocal<Map<String, List<ErrorRow>>> errorRows = new ThreadLocal<>(); String fileName;
// 判断是否有错误信息,以确定文件名
boolean hasError = false;
Map<String, List<ErrorRow>> tableAndErrorRows = errorRows.get();
for (Map.Entry<String, List<ErrorRow>> entry:tableAndErrorRows.entrySet()) {
if (entry.getValue().size() != 0) {
hasError = true;
}
}
String fileName = "导入失败条目清单.xls"; if (hasError) {
fileName = "导入失败条目清单.xls";
} else {
fileName = "导入成功.xls";
}
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
response.setHeader("content-Type", "application/vnd.ms-excel"); response.setHeader("content-Type", "application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode(fileName, "UTF-8")); response.setHeader("Content-Disposition", "attachment;fileName=" + URLEncoder.encode(fileName, "UTF-8"));

BIN
epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xls

Binary file not shown.
Loading…
Cancel
Save