Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-cloud into develop

 Conflicts:
	epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
dev
wangxianzhang 4 years ago
parent
commit
a406d0e22c
  1. 22
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java
  2. 10
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/datastats/FactAgencyGovernDailyEntity.java
  3. 19
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  4. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  5. 22
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  6. 7
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/project/dto/result/ProjectDifficultRankResultDTO.java
  7. 39
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java
  8. 15
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/user/impl/UserAnalysisServiceImpl.java
  9. 5
      epmet-module/data-report/data-report-server/src/main/resources/mapper/project/ProjectDao.xml
  10. 12
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenGovernRankDataDao.xml
  11. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactAgencyGovernDailyDTO.java
  12. 9
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/FactGridGovernDailyDTO.java
  13. 7
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/AggregationExtractFormDTO.java
  14. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/constant/DimObjectActionConstant.java
  15. 104
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java
  16. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java
  17. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactAgencyGovernDailyEntity.java
  18. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/FactGridGovernDailyEntity.java
  19. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/evaluationindex/extract/GovernGridClosedTotalCommonDTO.java
  20. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java
  21. 34
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java
  22. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  23. 81
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactAgencyGovernDailyServiceImpl.java
  24. 66
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactGridGovernDailyServiceImpl.java
  25. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java
  26. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenProjectCategoryGridAndOrgDailyServiceImpl.java
  27. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java
  28. 35
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  29. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java
  30. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java
  31. 69
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml
  32. 26
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml
  33. 18
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml
  34. 2
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml
  35. 32
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml
  36. 11
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java
  37. 4
      epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/utils/ModuleConstant.java
  38. 5
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointUserTotalDetailServiceImpl.java
  39. 4
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteDetailServiceImpl.java
  40. 4
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  41. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java
  42. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerDepartmentRedis.java
  43. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerGridRedis.java
  44. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerPartyBranchRedis.java
  45. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java
  46. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffDepartmentRedis.java
  47. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffGridRedis.java
  48. 47
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/StaffTransferRecordRedis.java
  49. 46
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java
  50. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerDepartmentServiceImpl.java
  51. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java
  52. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerPartyBranchServiceImpl.java
  53. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java
  54. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffDepartmentServiceImpl.java
  55. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
  56. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffTransferRecordServiceImpl.java
  57. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java
  58. 6
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java
  59. 5
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java
  60. 5
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataProjectChangeEventListener.java
  61. 5
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java
  62. 82
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/BaseDisputeProcessServiceImpl.java
  63. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java
  64. 6
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserIdsFormDTO.java
  65. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java
  66. 31
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java
  67. 17
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  68. BIN
      epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xls

22
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java

@ -11,10 +11,24 @@ import lombok.Getter;
@Getter
@AllArgsConstructor
public enum BizTypeEnum {
//枚举类型
//枚举类型 user,group,topic,issue,project,article
USER("user", "用户"),
GROUP("group", "小组"),
ACTIVITY("activity", "活动"),
AGENCY("agency", "组织");
TOPIC("topic", "话题"),
ISSUE("issue", "议题"),
PROJECT("project", "项目"),
ARTICLE("article", "文章(党建声音)"),
;
public static BizTypeEnum getEnum(String code) {
BizTypeEnum[] values = BizTypeEnum.values();
for (BizTypeEnum value : values) {
if (value.getType().equals(code)) {
return value;
}
}
return null;
}
/**
* 类型
@ -23,6 +37,6 @@ public enum BizTypeEnum {
/**
* 描述
*/
private String typeDesc;
private String desc;
}

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;
/**
* 11当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 12当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/**
* 未出当前网格的结案项目数
*/
@ -171,4 +180,5 @@ public class FactAgencyGovernDailyEntity extends BaseEpmetEntity {
*/
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 districtDeptClosedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getDistrictDeptClosedCount).sum();
resultDTO.setProblemResolvedCount(problemResolvedCount);
Integer issueResolvedCount = list.stream().mapToInt(FactAgencyGovernDailyEntity::getIssueProjectResolvedCount).sum();
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.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, problemResolvedCount));
resultDTO.setCommunityResolvedRatio(getPercentage(communityClosedCount, problemResolvedCount));
resultDTO.setStreetResolvedRatio(getPercentage(streetClosedCount, problemResolvedCount));
resultDTO.setDistrictDeptResolvedRatio(getPercentage(districtDeptClosedCount, problemResolvedCount));
resultDTO.setGridSelfGovernRatio(getPercentage(gridSelfGovernProjectTotal, closedProjectTotal));
resultDTO.setCommunityResolvedRatio(getPercentage(communityClosedCount, closedProjectTotal));
resultDTO.setStreetResolvedRatio(getPercentage(streetClosedCount, closedProjectTotal));
resultDTO.setDistrictDeptResolvedRatio(getPercentage(districtDeptClosedCount, closedProjectTotal));
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);
return null;
}
result.setStaffId(staffEntity.getUserId());
result.setAgencyId(agencyDTO.getId());
result.setAgencyName(agencyDTO.getOrganizationName());
result.setAgencyPIds(agencyDTO.getPids());

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

@ -221,7 +221,7 @@
agency_id AS agencyId,
issue_total AS shiftedIssueTotal
FROM
fact_issue_agency_daily
fact_topic_issue_agency_daily
WHERE
del_flag = '0'
AND date_id = #{dateId}
@ -266,7 +266,7 @@
grid_id AS gridId,
issue_total AS shiftedIssueTotal
FROM
fact_issue_grid_daily
fact_topic_issue_grid_daily
WHERE
del_flag = '0'
AND date_id = #{dateId}
@ -624,7 +624,9 @@
SELECT
agency_id AS agencyId,
`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(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio,
concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio,
@ -638,13 +640,15 @@
<foreach item="agencyId" collection="agencyIds" open="AND (" separator="or" close=")" index="">
agency_id = #{agencyId}
</foreach>
ORDER BY problem_resolved_count DESC
ORDER BY problemResolvedCount DESC
</select>
<select id="getGridGovern" resultType="com.epmet.dataaggre.dto.datastats.result.GridGovrnResultDTO">
SELECT
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(grid_self_govern_ratio*100, 1),'%') AS gridSelfGovernRatio,
concat(ROUND(community_closed_ratio*100, 1),'%') AS communityResolvedRatio,
@ -675,7 +679,13 @@
GRID_SELF_GOVERN_PROJECT_TOTAL,
COMMUNITY_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
fact_agency_govern_daily
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 java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
@ -61,4 +62,10 @@ public class ProjectDifficultRankResultDTO implements Serializable {
* */
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
public List<GovernCapacityRankResultDTO> governCapacityRank(AgencyAndNumFormDTO param) {
List<GovernCapacityResultDTO> orderList = new ArrayList<>();
if(null == param.getTopNum()) param.setTopNum(NumConstant.FIVE);
if(NumConstant.ZERO == param.getTopNum()) param.setTopNum(NumConstant.MAX);
if(null == param.getTopNum()) {
param.setTopNum(NumConstant.FIVE);
}
if(NumConstant.ZERO == param.getTopNum()) {
param.setTopNum(NumConstant.MAX);
}
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())){
List<String> nextAgencyIds = screenCustomerAgencyService.getNextAgencyIds(param.getAreaCode(), param.getAgencyId());
if (CollectionUtils.isEmpty(nextAgencyIds)){
return new ArrayList<>();
}
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(monthId,nextAgencyIds);
int time = NumConstant.TWELVE;
while(CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE){
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null ,monthId);
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(dateId,nextAgencyIds);
int time = NumConstant.ONE;
while(CollectionUtils.isEmpty(orderList) && time < NumConstant.TEN){
time++;
dateId = com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(time);
PageHelper.startPage(NumConstant.ONE,param.getTopNum());
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(monthId,nextAgencyIds);
orderList = screenGovernRankDataDao.selectGovernCapacityRatioNew(dateId,nextAgencyIds);
}
}else {
orderList = screenGovernRankDataDao.selectGovernCapacityRatio(monthId, param.getAgencyId());
int time = NumConstant.TWELVE;
while (CollectionUtils.isEmpty(orderList) && time > NumConstant.ONE) {
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId);
orderList = screenGovernRankDataDao.selectGovernCapacityRatio(dateId, param.getAgencyId());
int time = NumConstant.ONE;
while (CollectionUtils.isEmpty(orderList) && time < NumConstant.TEN) {
time++;
dateId = com.epmet.commons.tools.utils.DateUtils.getBeforeNDay(time);
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<>();
orderList.forEach(o -> {
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());
}
//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->{
if("热心居民".equals(d.getType())){
d.setType("网格员");
}
});
}
}*/
//2021.5.25 平音客户热心居民改网格员 sun end
return dimList;
}
@ -333,13 +334,14 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
logger.info("网格名:"+m.getName()+",总数="+m.getTotal());
}
//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->{
if("热心居民".equals(d.getType())){
d.setType("网格员");
}
});
}
}*/
//2021.5.25 平音客户热心居民改网格员 sun end
return dimList;
}
@ -507,13 +509,14 @@ public class UserAnalysisServiceImpl implements UserAnalysisService {
resultList.add(party);
}
//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->{
if("热心居民".equals(d.getType())){
d.setType("网格员");
}
});
}
}*/
//2021.5.25 平音客户热心居民改网格员 sun end
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,
floor(diff.EVENT_COST_TIME/60) AS totalHours,
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
(
select scg.AREA_CODE,sdd1.* from screen_difficulty_data sdd1
@ -333,6 +335,7 @@
AND sdd2.EVENT_STATUS_CODE in('closed','10','5')
</if>
) 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
CASE #{type} WHEN 'timelongest' THEN diff.EVENT_COST_TIME
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,
agency.AGENCY_NAME AS parentAgencyName
FROM
screen_govern_rank_data rankData
screen_govern_rank_data_daily rankData
LEFT JOIN
screen_customer_agency agency
ON rankData.PARENT_ID = agency.AGENCY_ID AND agency.DEL_FLAG = '0' AND agency.AGENCY_ID = #{agencyId}
WHERE
rankData.DEL_FLAG = '0'
AND rankData.PARENT_ID = #{agencyId}
AND rankData.MONTH_ID = #{monthId}
AND rankData.DATE_ID = #{monthId}
ORDER BY
rankData.RESPONSE_RATIO DESC
</select>
@ -41,7 +41,7 @@
left join screen_customer_agency pa
on(agency.PARENT_AREA_CODE=pa.AREA_CODE
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
AND rankData.DEL_FLAG = '0'
and rankData.org_type='agency')
@ -51,7 +51,7 @@
<foreach collection="orgIds" item="orgId" open="(" close=")" separator=",">
#{orgId}
</foreach>
AND rankData.MONTH_ID =#{monthId}
AND rankData.DATE_ID =#{monthId}
)
union
(
@ -67,7 +67,7 @@
FROM screen_customer_grid grid
left join screen_customer_agency ca
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
AND grid.DEL_FLAG = 0
and rankData.org_type='grid')
@ -76,7 +76,7 @@
<foreach collection="orgIds" item="orgId" open="(" close=")" separator=",">
#{orgId}
</foreach>
AND rankData.MONTH_ID =#{monthId}
AND rankData.DATE_ID =#{monthId}
)
ORDER BY
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;
/**
* 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;
/**
* 15当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 16当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/**
* 15未出当前网格的结案项目数=11+12+13+14
*/

7
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/form/AggregationExtractFormDTO.java

@ -3,6 +3,7 @@ package com.epmet.dto.extract.form;
import lombok.Data;
import java.io.Serializable;
import java.util.Set;
/**
* desc: 从业务数据抽取到统计库Form DTO
@ -30,4 +31,10 @@ public class AggregationExtractFormDTO implements Serializable {
* 抽取类型 monthlydaily
*/
private String type;
/**
* 要抽取的具体业务类型 不传默认所有
* @see com.epmet.commons.tools.enums.BizTypeEnum
*/
private Set<String> bizType;
}

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

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

104
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactAggregationExtractController.java

@ -1,6 +1,12 @@
package com.epmet.controller;
import cn.hutool.core.thread.ThreadUtil;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.BizTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.StatsFormDTO;
@ -14,8 +20,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
* @author liujianjun
@ -49,42 +57,101 @@ public class FactAggregationExtractController {
* @date 2020/11/10 3:14 下午
*/
@RequestMapping("extractDailyOrMonthly")
public Result extractDaily(@RequestBody AggregationExtractFormDTO formDTO) {
public Result extractDailyOrMonthly(@RequestBody AggregationExtractFormDTO formDTO) {
if (StringUtils.isBlank(formDTO.getStartDate()) && StringUtils.isBlank(formDTO.getEndDate())) {
log.error("抽取日期范围不能为空");
return new Result().error();
}
if (formDTO.getStartDate().indexOf(StrConstant.HYPHEN) < 0 || formDTO.getEndDate().indexOf(StrConstant.HYPHEN) < 0) {
if (!formDTO.getStartDate().contains(StrConstant.HYPHEN) || !formDTO.getEndDate().contains(StrConstant.HYPHEN)) {
log.error("抽取日期范围格式不正确,yyyy-MM-dd");
return new Result().error();
}
BizTypeEnum bizTypeEnum = null;
Set<String> bizType = formDTO.getBizType();
for (String item : bizType) {
bizTypeEnum = BizTypeEnum.getEnum(item);
if (bizTypeEnum == null) {
log.error("抽取业务类型不正确,BizTypeEnum");
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode());
}
}
List<String> daysBetween = DateUtils.getDaysBetween(formDTO.getStartDate(), formDTO.getEndDate(), DateUtils.DATE_PATTERN, DateUtils.DATE_PATTERN);
daysBetween.forEach(dateId -> {
Date date = DateUtils.parse(dateId, DateUtils.DATE_PATTERN);
for (String dateId : daysBetween) {
StatsFormDTO param = new StatsFormDTO();
param.setCustomerId(formDTO.getCustomerId());
param.setDate(dateId);
switch (formDTO.getType()) {
case "monthly":
if ("monthly".equals(formDTO.getType())) {
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.GROUP.getType())) {
extractGroupDataMonthly(param);
}
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.ARTICLE.getType())) {
extractArticleDataMonthlyAndQuarterly(param);
}
} else {
//todo 如果要加方法 记得这个枚举里要加
int threadCount = bizType.isEmpty() ? BizTypeEnum.values().length : bizType.size();
System.out.println(threadCount);
CountDownLatch countDownLatch = ThreadUtil.newCountDownLatch(threadCount);
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.USER.getType())) {
ThreadUtil.execute(() -> {
extractUserDataDaily(param);
countDownLatch.countDown();
});
}
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.GROUP.getType())) {
ThreadUtil.execute(() -> {
extractGroupDataDaily(param);
countDownLatch.countDown();
});
}
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.TOPIC.getType())) {
ThreadUtil.execute(() -> {
extractTopicDataDaily(param);
countDownLatch.countDown();
});
}
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.ISSUE.getType())) {
ThreadUtil.execute(() -> {
extractIssueDataDaily(param);
countDownLatch.countDown();
});
}
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.PROJECT.getType())) {
ThreadUtil.execute(() -> {
extractProjectDataDaily(param);
countDownLatch.countDown();
});
}
if (bizType.isEmpty() || bizType.contains(BizTypeEnum.ARTICLE.getType())) {
ThreadUtil.execute(() -> {
extractAtricleDataDaily(param);
countDownLatch.countDown();
});
}
try {
//如果半小时还没执行完 则中断 说明执行方法有问题 要优化
countDownLatch.await(NumConstant.THIRTY, TimeUnit.MINUTES);
} catch (InterruptedException e) {
log.error("extractDailyOrMonthly dateId:{} 始终没有结束 中断操作 InterruptedException", dateId);
break;
default:
extractUserDataDaily(param);
extractGroupDataDaily(param);
extractTopicDataDaily(param);
extractIssueDataDaily(param);
extractProjectDataDaily(param);
extractAtricleDataDaily(param);
}
}
});
log.info("extractDailyOrMonthly dateId:{} run end", dateId);
}
return new Result();
}
private void extractUserDataDaily(StatsFormDTO formDTO) {
try {
statsUserService.partition(formDTO);
log.info("extractUserDataDaily end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【用户】数据失败", e);
}
@ -93,6 +160,7 @@ public class FactAggregationExtractController {
private void extractTopicDataDaily(StatsFormDTO formDTO) {
try {
statsTopicService.partition(formDTO);
log.info("extractTopicDataDaily end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【话题】数据失败", e);
}
@ -101,6 +169,7 @@ public class FactAggregationExtractController {
private void extractIssueDataDaily(StatsFormDTO formDTO) {
try {
statsIssueService.agencyGridIssueStats(formDTO);
log.info("extractIssueDataDaily end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【议题】数据失败", e);
}
@ -110,6 +179,7 @@ public class FactAggregationExtractController {
try {
statsProjectService.gridProjectStats(formDTO);
statsProjectService.agencyProjectStats(formDTO);
log.info("extractProjectDataDaily end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【项目】数据失败", e);
}
@ -120,6 +190,7 @@ public class FactAggregationExtractController {
statsPublicityService.articleSummaryDailyStatsjob(formDTO);
statsPublicityService.tagUsedDailyStatsjob(formDTO);
statsPublicityService.tagViewedDailyStatsjob(formDTO);
log.info("extractAtricleDataDaily end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【文章】数据失败", e);
}
@ -133,6 +204,7 @@ public class FactAggregationExtractController {
statsGroupService.groupGridDaily(groupStatsFormDTO);
statsGroupService.groupAgencyDaily(groupStatsFormDTO);
log.info("extractGroupDataDaily end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【小组】数据失败", e);
}
@ -145,6 +217,7 @@ public class FactAggregationExtractController {
groupStatsFormDTO.setCustomerId(formDTO.getCustomerId());
statsGroupService.groupAgencyMonthly(groupStatsFormDTO);
log.info("extractGroupDataMonthly end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【小组】数据失败", e);
}
@ -156,6 +229,7 @@ public class FactAggregationExtractController {
statsPublicityService.tagUsedQuarterlyStatsjob(formDTO);
statsPublicityService.tagViewedMonthlyStatsjob(formDTO);
statsPublicityService.tagViewedQuarterlyStatsjob(formDTO);
log.info("extractArticleDataMonthlyAndQuarterly end param:{}", JSON.toJSONString(formDTO));
} catch (Exception e) {
log.error("抽取【文章】数据失败", e);
}

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/issue/StatsIssueDao.java

@ -3,7 +3,6 @@ package com.epmet.dao.issue;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.issue.*;
import com.epmet.entity.issue.IssueEntity;
@ -173,22 +172,8 @@ public interface StatsIssueDao extends BaseDao<IssueEntity> {
*/
List<SatisfactionInfoResultDTO> selectIssueVoteInfo(@Param("customerId") String customerId, @Param("dateId") String dateId);
/**
* desc: 根据客户id 获取当前议题的情况
*
* @param customerId
* @param dateId
* @return java.util.List<com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO>
* @author LiuJanJun
* @date 2020/9/27 1:22 下午
*/
List<IssueVoteStatisticalResultDTO> selectIssueVoteStatis(@Param("customerId") String customerId, @Param("dateId") String dateId);
List<IssueProjectCategoryDictDTO> selectCategory(@Param("customerId") String customerId, @Param("ids") Set<String> set);
List<IssueDTO> getIssueTotalList(@Param("customerId") String customerId, @Param("date") String date);
/**
* @Author sun
* @Description 查询议题库已删除网格下可能存在的项目Id集合

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当前组织内未出小组即未转议题的话题关闭无需解决数
*/
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;
/**
* 15当前组织内来源于事件的项目结案已解决数
*/
private Integer eventResolvedCount;
/**
* 16当前组织内来源于事件的项目结案无需解决数
*/
private Integer eventUnResolvedCount;
/**
* 当前网格内出来的项目由社区结案(已解决+未解决)的项目总数
@ -208,6 +217,8 @@ public class FactGridGovernDailyEntity extends BaseEpmetEntity {
this.issueProjectUnResolvedCount=NumConstant.ZERO;
this.approvalProjectResolvedCount=NumConstant.ZERO;
this.approvalProjectUnResolvedCount=NumConstant.ZERO;
this.eventResolvedCount=NumConstant.ZERO;
this.eventUnResolvedCount=NumConstant.ZERO;
this.inGroupTopicResolvedCount=NumConstant.ZERO;
this.inGroupTopicUnResolvedCount=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 gridSelfGovernProjectTotal;
public GovernGridClosedTotalCommonDTO(){
this.gridId = StrConstant.EPMETY_STR;
this.fromIssueResolvedInGridCount=NumConstant.ZERO;
@ -60,5 +62,6 @@ public class GovernGridClosedTotalCommonDTO implements Serializable {
this.communityClosedCount=NumConstant.ZERO;
this.streetClosedCount=NumConstant.ZERO;
this.districtDeptClosedCount=NumConstant.ZERO;
this.gridSelfGovernProjectTotal=NumConstant.ZERO;
}
}

34
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/IssueService.java

@ -2,7 +2,6 @@ package com.epmet.service.Issue;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.issue.IssueAgencyDTO;
import com.epmet.dto.issue.IssueDTO;
@ -163,18 +162,6 @@ public interface IssueService {
*/
List<SatisfactionInfoResultDTO> selectIssueVoteInfo(String customerId, String dateId);
/**
* desc: 查询议题支持反对及应表决人数
* 数据由两部分组成 1本月内已经关闭的话题的支持和反对数据 来自issueissue_vote_statistical
*
* @param customerId
* @param monthId
* @return java.util.List<com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO>
* @author LiuJanJun
* @date 2020/9/27 11:20 上午
*/
List<IssueVoteStatisticalResultDTO> selectIssueVoteStatis(String customerId, String monthId);
/**
* @Description 查找项目的分类名称 -相连,分隔
* @param param
@ -184,27 +171,6 @@ public interface IssueService {
*/
Map<String,List<String>> getIntegratedProjectCategory(Map<String, Set<String>> param,String customerId);
/**
* 获取议题总数
* @author zhaoqifeng
* @date 2021/7/20 16:20
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
*/
List<IssueDTO> getIssueTotalList(String customerId, String date);
/**
* 获取议题增量
* @author zhaoqifeng
* @date 2021/7/20 16:20
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
*/
List<IssueDTO> getIssueIncrList(String customerId, String date);
/**
* @Author sun
* @Description 查询议题库已删除网格下可能存在的项目Id集合

34
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/Issue/impl/IssueServiceImpl.java

@ -7,7 +7,6 @@ import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.issue.StatsIssueDao;
import com.epmet.dto.extract.result.IssueInfoResultDTO;
import com.epmet.dto.extract.result.IssueProcessInfoResultDTO;
import com.epmet.dto.extract.result.IssueVoteStatisticalResultDTO;
import com.epmet.dto.extract.result.SatisfactionInfoResultDTO;
import com.epmet.dto.issue.*;
import com.epmet.entity.issue.IssueEntity;
@ -141,11 +140,6 @@ public class IssueServiceImpl implements IssueService {
return statsIssueDao.selectIssueVoteInfo(customerId, dateId);
}
@Override
public List<IssueVoteStatisticalResultDTO> selectIssueVoteStatis(String customerId, String dateId) {
return statsIssueDao.selectIssueVoteStatis(customerId, dateId);
}
/**
* @Description 查找项目的分类名称 -相连,分隔
* @param param
@ -177,34 +171,6 @@ public class IssueServiceImpl implements IssueService {
return map;
}
/**
* 获取议题总数
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
* @author zhaoqifeng
* @date 2021/7/20 16:20
*/
@Override
public List<IssueDTO> getIssueTotalList(String customerId, String date) {
return null;
}
/**
* 获取议题增量
*
* @param customerId
* @param date
* @return java.util.List<com.epmet.dto.issue.IssueDTO>
* @author zhaoqifeng
* @date 2021/7/20 16:20
*/
@Override
public List<IssueDTO> getIssueIncrList(String customerId, String date) {
return null;
}
/**
* @Author sun
* @Description 查询议题库已删除网格下可能存在的项目Id集合

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(() -> {
try {
long startCpc = System.currentTimeMillis();
//calCpcIndexService.calCpcPartyAbility(customerId, monthId);
calCpcIndexService.calCpcPartyAbility(customerId, monthId);
log.error("党员相关-党建能力执行完毕======总耗时:{}ms,customerId:{}",System.currentTimeMillis()-startCpc, param.getCustomerId());
} catch (Exception 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.service.evaluationindex.extract.todata.*;
import com.epmet.service.stats.DimAgencyService;
import com.epmet.util.DimIdGenerator;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
@ -202,13 +201,11 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
});
}
// 当前组织内:来源于议题的项目:结案已解决数
// 当前组织内:项目立项:结案已解决数
Map<String, OrgStatisticsResultDTO> projectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
OrgTypeConstant.AGENCY);
Map<String, OrgStatisticsResultDTO> eventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectResolvedTotal.get(item.getAgencyId());
@ -219,23 +216,12 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
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,
dateId, ProjectConstant.UNRESOLVED,
OrgTypeConstant.AGENCY);
Map<String, OrgStatisticsResultDTO> eventProjectUnResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.UNRESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
if (!projectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = projectUnResolvedTotal.get(item.getAgencyId());
@ -246,17 +232,34 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
item.setApprovalProjectUnResolvedCount(sum);
});
}
if (!eventProjectUnResolvedTotal.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = eventProjectUnResolvedTotal.get(item.getAgencyId());
int sum = item.getApprovalProjectUnResolvedCount();
if (null != dto) {
sum = sum + dto.getSum();
}
item.setApprovalProjectUnResolvedCount(sum);
});
}
}
//2021.12.15 当前组织内:来源于事件的项目:结案已解决数
Map<String, OrgStatisticsResultDTO> eventProjectResolvedTotal = factOriginProjectMainDailyService.getAgencyClosedProjectCount(customerId,
dateId, ProjectConstant.RESOLVED,
ProjectConstant.PROJECT_ORIGIN_EVENT);
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.党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
agencyGovernDailyList.forEach(item -> {
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));
}
});
// 3.网格自治占比:当前组织下,所有网格内结案项目数与问题解决总数之比(未出网格)
// 3.网格解决占比:当前组织下,由网格结案的项目数与已结案项目之比
Map<String, OrgStatisticsResultDTO> gridSelfCount = factOriginProjectLogDailyService.getAgencyGridSelfDaily(customerId, dateId);
if (!gridSelfCount.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
OrgStatisticsResultDTO dto = gridSelfCount.get(item.getAgencyId());
if (null != dto) {
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) {
BigDecimal resolveCount = new BigDecimal(sum);
BigDecimal selfCount = new BigDecimal(count);
@ -284,9 +289,9 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
}
});
}
// 4.社区解决占比:当前组织下,由社区结案的项目数与问题解决总数之比
// 5.区直部门解决占比:当前组织下,由区级部门结案的项目数与问题解决总数之比
// 6.街道解决占比:当前组织下,由街道结案的项目数与问题解决总数之比
// 4.社区解决占比:当前组织下,由社区结案的项目数与已结案项目之比
// 6.街道解决占比:当前组织下,由街道结案的项目数与已结案项目之比
// 6.区县解决占比:当前组织下,由区县结案的项目数与已结案项目之比
Map<String, List<OrgStatisticsResultDTO>> projectCount = factOriginProjectMainDailyService.getAgencyClosedProjectStatic(customerId, dateId);
if (!gridSelfCount.isEmpty()) {
agencyGovernDailyList.forEach(item -> {
@ -294,7 +299,9 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
if (CollectionUtils.isNotEmpty(list)) {
Map<String, OrgStatisticsResultDTO> map = list.stream().collect(Collectors.toMap(OrgStatisticsResultDTO::getLevel,
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);
if (sum != NumConstant.ZERO) {
// 社区解决占比
@ -316,7 +323,7 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
// 区直部门解决占比
OrgStatisticsResultDTO districtDept = map.get(ScreenConstant.DISTRICT);
if (null != districtDept) {
int count = districtDept.getCount();
int count = districtDept.getSum();
BigDecimal selfCount = new BigDecimal(count);
item.setDistrictDeptClosedRatio(selfCount.divide(resolveCount, NumConstant.SIX, RoundingMode.HALF_UP));
item.setDistrictDeptClosedCount(count);
@ -387,6 +394,8 @@ public class FactAgencyGovernDailyServiceImpl extends BaseServiceImpl<FactAgency
entity.setIssueProjectUnResolvedCount(NumConstant.ZERO);
entity.setApprovalProjectResolvedCount(NumConstant.ZERO);
entity.setApprovalProjectUnResolvedCount(NumConstant.ZERO);
entity.setEventResolvedCount(NumConstant.ZERO);
entity.setEventUnResolvedCount(NumConstant.ZERO);
entity.setInGroupTopicResolvedCount(NumConstant.ZERO);
entity.setInGroupTopicUnResolvedCount(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())){
resolveCount = resolveCount + approvalProjectResolvedMap.get(insertEntity.getGridId());
}
if(eventProjectResolvedMap.containsKey(insertEntity.getGridId())){
resolveCount = resolveCount + eventProjectResolvedMap.get(insertEntity.getGridId());
}
insertEntity.setApprovalProjectResolvedCount(resolveCount);
// 8、当前网格内:项目立项,结案无需解决数;默认为0,
int unResolveCount = 0;
if(approvalProjectUnResolvedMap.containsKey(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())){
unResolveCount = resolveCount + eventProjectUnResolvedMap.get(insertEntity.getGridId());
insertEntity.setEventUnResolvedCount(eventProjectUnResolvedMap.get(insertEntity.getGridId()));
}
insertEntity.setApprovalProjectUnResolvedCount(unResolveCount);
// 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
// 9、当前网格内,未出小组即未转议题的:话题关闭已解决数
if(inGroupTopicResolvedMap.containsKey(insertEntity.getGridId())){
@ -183,8 +188,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
insertEntity.setFromAgencyUnResolvedInGridCount(dtoMap.get(insertEntity.getGridId()).getFromAgencyUnResolvedInGridCount());
// 所有网格内结案项目数(未出网格)=来源于议题的项目结案已解决+来源于议题的项目结案无需解决+来源于立项的项目结案已解决+来源于立项的项目结案无需解决
// 15、未出当前网格的,结案项目数=11+12+13+14
insertEntity.setGridSelfGovernProjectTotal(insertEntity.getFromIssueResolvedInGridCount()+insertEntity.getFromIssueUnResolvedInGridCount()+
insertEntity.getFromAgencyResolvedInGridCount()+insertEntity.getFromAgencyUnResolvedInGridCount());
insertEntity.setGridSelfGovernProjectTotal(dtoMap.get(insertEntity.getGridId()).getGridSelfGovernProjectTotal());
//当前网格内出来的项目:由社区结案(已解决+未解决)的项目总数
insertEntity.setCommunityClosedCount(dtoMap.get(insertEntity.getGridId()).getCommunityClosedCount());
@ -199,7 +203,13 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
+insertEntity.getIssueResolvedCount()+insertEntity.getIssueUnResolvedCount()
+insertEntity.getIssueProjectResolvedCount()+insertEntity.getIssueProjectUnResolvedCount()
+insertEntity.getApprovalProjectResolvedCount()+insertEntity.getApprovalProjectUnResolvedCount());
//结案项目数
int projectClosedTotal = insertEntity.getIssueProjectResolvedCount()
+ insertEntity.getIssueProjectUnResolvedCount()
+ insertEntity.getApprovalProjectResolvedCount()
+ insertEntity.getApprovalProjectUnResolvedCount()
+ insertEntity.getEventResolvedCount()
+ insertEntity.getEventUnResolvedCount();
// 党群自治占比:当前组织下,所有小组内关闭(已解决+无需解决)的话题数与问题解决总数之比(未出小组:未转议题的)
//界面展示:2、党群自治占比=(9+10)/PROBLEM_RESOLVED_COUNT; 此列存储的是小数
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;此列存储的是小数
if(NumConstant.ZERO==insertEntity.getGridSelfGovernProjectTotal()||NumConstant.ZERO == insertEntity.getProblemResolvedCount()){
if(NumConstant.ZERO==insertEntity.getGridSelfGovernProjectTotal()||NumConstant.ZERO == projectClosedTotal){
insertEntity.setGridSelfGovernRatio(BigDecimal.ZERO);
}else{
String gridSelfGovernRatioStr = numberFormat.format((float) insertEntity.getGridSelfGovernProjectTotal() / insertEntity.getProblemResolvedCount());
String gridSelfGovernRatioStr = numberFormat.format((float) insertEntity.getGridSelfGovernProjectTotal() / projectClosedTotal);
insertEntity.setGridSelfGovernRatio(new BigDecimal(gridSelfGovernRatioStr));
}
//界面展示: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);
}else{
String setCommunityClosedRatioStr = numberFormat.format((float) insertEntity.getCommunityClosedCount() / insertEntity.getProblemResolvedCount());
String setCommunityClosedRatioStr = numberFormat.format((float) insertEntity.getCommunityClosedCount() / projectClosedTotal);
insertEntity.setCommunityClosedRatio(new BigDecimal(setCommunityClosedRatioStr));
}
// 界面展示: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);
} else {
String streetClosedRatioStr = numberFormat.format((float) insertEntity.getStreetClosedCount() / insertEntity.getProblemResolvedCount());
String streetClosedRatioStr = numberFormat.format((float) insertEntity.getStreetClosedCount() / projectClosedTotal);
insertEntity.setStreetClosedRatio(new BigDecimal(streetClosedRatioStr));
}
//界面展示: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);
} else {
String setDistrictDeptClosedRatioStr = numberFormat.format((float) insertEntity.getDistrictDeptClosedCount() / insertEntity.getProblemResolvedCount());
String setDistrictDeptClosedRatioStr = numberFormat.format((float) insertEntity.getDistrictDeptClosedCount() / projectClosedTotal);
insertEntity.setDistrictDeptClosedRatio(new BigDecimal(setDistrictDeptClosedRatioStr));
}
@ -310,7 +320,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
int streetClosedCount=NumConstant.ZERO;;
// 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数
int districtDeptClosedCount=NumConstant.ZERO;
int gridSelfGovernProjectTotal=NumConstant.ZERO;
//当前网格内已结案的项目
List<GovernProjectInfoDTO> currentGridClosedProjectList = factOriginProjectMainDailyService.getGridClosedProjectList(customerId, gridId,
ProjectConstant.CLOSED,null,null);
@ -339,6 +349,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
fromAgencyUnResolvedInGridCount += 1;
}
}
gridSelfGovernProjectTotal += 1;
} else {
// 3、出了网格的判断是由谁解决的?
String resolveOrgType=getProjectResolveOrgType(governProjectInfoDTO.getProjectLogDTOList());
@ -350,10 +361,12 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
// 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数
log.info("projectId=【"+governProjectInfoDTO.getId()+"】属于街道解决");
streetClosedCount+=1;
}else if("districtdept".equals(resolveOrgType)){
// 当前网格内出来的项目:由街道结案(已解决+未解决)的项目总数
}else if("district".equals(resolveOrgType)){
// 当前网格内出来的项目:由区县结案(已解决+未解决)的项目总数
log.info("projectId=【"+governProjectInfoDTO.getId()+"】属于区直部门解决");
districtDeptClosedCount+=1;
} else if ("grid".equals(resolveOrgType)) {
gridSelfGovernProjectTotal += 1;
}
// todo 可能是 市级解决、省级解决呢???
}
@ -366,6 +379,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
governGridClosedTotalCommonDTO.setCommunityClosedCount(communityClosedCount);
governGridClosedTotalCommonDTO.setStreetClosedCount(streetClosedCount);
governGridClosedTotalCommonDTO.setDistrictDeptClosedCount(districtDeptClosedCount);
governGridClosedTotalCommonDTO.setGridSelfGovernProjectTotal(gridSelfGovernProjectTotal);
resultMap.put(gridId, governGridClosedTotalCommonDTO);
}
return resultMap;
@ -380,7 +394,7 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
private String getProjectResolveOrgType(List<FactOriginProjectLogDailyDTO> projectLogDTOList) {
List<Integer> handleLevelList=new ArrayList<>();
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;
}
@ -395,32 +409,42 @@ public class FactGridGovernDailyServiceImpl extends BaseServiceImpl<FactGridGove
// orgType: 网格grid,部门department,组织:agency
if ("grid".equals(logDailyDTO.getOrgType())) {
handleLevelList.add(NumConstant.ONE);
return "grid";
} else if ("agency".equals(logDailyDTO.getOrgType())) {
CustomerAgencyEntity agencyEntity=customerAgencyService.getAgencyById(logDailyDTO.getOrgId());
if("community".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.TWO);
return "community";
}else if("street".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.THREE);
return "street";
}else if("district".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.FOUR);
return "district";
}else if("city".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.FIVE);
return "city";
}else if("province".equals(agencyEntity.getLevel())){
handleLevelList.add(NumConstant.SIX);
return "province";
}
} else if ("department".equals(logDailyDTO.getOrgType())) {
CustomerAgencyEntity deptAgencyEntity=customerAgencyService.getAgencyByDeptId(logDailyDTO.getOrgId());
if("district".equals(deptAgencyEntity.getLevel())){
// 区直部门直接返回
return "districtdept";
return "district";
}else if("community".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.TWO);
return "community";
}else if("street".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.THREE);
return "street";
}else if("city".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.FIVE);
return "city";
}else if("province".equals(deptAgencyEntity.getLevel())){
handleLevelList.add(NumConstant.SIX);
return "province";
}
}
}

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java

@ -11,6 +11,7 @@ import com.epmet.dto.org.GridInfoDTO;
import com.epmet.dto.project.result.ProjectLatestOperationResultDTO;
import com.epmet.dto.screen.form.ProjectSourceMapFormDTO;
import com.epmet.dto.screen.form.ScreenCentralZoneDataFormDTO;
import com.epmet.dto.topic.TopicAttachmentDTO;
import com.epmet.dto.topic.result.ResiTopicAndImgResultDTO;
import com.epmet.entity.evaluationindex.extract.FactOriginProjectMainDailyEntity;
import com.epmet.entity.evaluationindex.extract.FactOriginProjectOrgPeriodDailyEntity;
@ -293,16 +294,20 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr
//获取图片及话题内容
ResiTopicAndImgResultDTO topicInfo = topicService.getTopicAndImgs(project.getTopicId(), "image");
if (topicInfo != null) {
diffEntity.setEventImgUrl(topicInfo.getTopicImgList().get(NumConstant.ZERO).getAttachmentUrl());
List<TopicAttachmentDTO> topicImgList = topicInfo.getTopicImgList();
if (!CollectionUtils.isEmpty(topicImgList)){
diffEntity.setEventImgUrl(topicImgList.get(NumConstant.ZERO).getAttachmentUrl());
topicImgList.forEach(img -> {
ScreenDifficultyImgDataEntity imgData = new ScreenDifficultyImgDataEntity();
imgData.setEventId(project.getId());
imgData.setEventImgUrl(img.getAttachmentUrl());
imgData.setSort(img.getSort());
imgDataEntities.add(imgData);
imgData.setCustomerId(param.getCustomerId());
});
}
diffEntity.setEventContent(topicInfo.getTopicContent());
topicInfo.getTopicImgList().forEach(img -> {
ScreenDifficultyImgDataEntity imgData = new ScreenDifficultyImgDataEntity();
imgData.setEventId(project.getId());
imgData.setEventImgUrl(img.getAttachmentUrl());
imgData.setSort(img.getSort());
imgDataEntities.add(imgData);
imgData.setCustomerId(param.getCustomerId());
});
log.info("projectId:{} imgs:{}", project.getId(), imgDataEntities.stream().filter(o -> o.getEventId().equals(project.getId())).count());
}

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("开始执行组织项目分类统计");
long start = System.currentTimeMillis();
List<CustomerRelationEntity> relationInfo = relationService.selectSubCustomer(customerId);
List<String> customerIds = new ArrayList<>();
customerIds.add(customerId);
List<GridAndOrgCategoryCountResultDTO> result = new ArrayList<>();
if (CollectionUtils.isEmpty(relationInfo)){
// one customer
@ -169,12 +167,13 @@ public class ScreenProjectCategoryGridAndOrgDailyServiceImpl implements ScreenPr
List<String> subCustomerIds = relationInfo.stream().map(CustomerRelationEntity::getCustomerId).collect(Collectors.toList());
for (int i = NumConstant.ZERO; i < subCustomerIds.size(); i++) {
if (subCustomerIds.get(i).equals(PingYinConstant.KONG_CUN_CUSTOMER_ID)){
customerIds.remove(i);
subCustomerIds.remove(i);
continue;
}
}
subCustomerIds.add(customerId);
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<GridAndOrgCategoryCountResultDTO> allOrgCategoryList = result;
partition.forEach(p -> {

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsIssueServiceImpl.java

@ -103,14 +103,14 @@ public class StatsIssueServiceImpl implements StatsIssueService {
*/
private void customerStats(String customerId, Date date) {
Date lastDate = DateUtils.getLastDayOfMonth(date);
//机关议题日统计
saveIssueAgencyDaily(customerId, date);
//机关议题月统计
saveIssueAgencyMonthly(customerId, lastDate);
//网格议题日统计
saveIssueGridDaily(customerId, date);
//网格议题月统计
saveIssueGridMonthly(customerId, lastDate);
//机关议题日统计
saveIssueAgencyDaily(customerId, date);
//机关议题月统计
saveIssueAgencyMonthly(customerId, lastDate);
}
@Override

35
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java

@ -77,7 +77,6 @@ public class StatsProjectServiceImpl implements StatsProjectService {
}
//入参有客户Id的则按客户Id执行,没有的则全部客户都执行
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
log.info("单独统计客户机关-项目-日月数据,当前统计的客户Id:" + formDTO.getCustomerId());
customerAgencyStats(formDTO.getCustomerId(), date);
} else {
int pageNo = 1;
@ -88,7 +87,6 @@ public class StatsProjectServiceImpl implements StatsProjectService {
if (!CollectionUtils.isEmpty(customerIdList)) {
for (String customerId : customerIdList) {
try {
log.info("for循环统计机关-项目-日月数据,当前统计的客户Id:" + customerId);
//遍历统计每一个客户数据
customerAgencyStats(customerId, date);
} catch (Exception e) {
@ -110,13 +108,11 @@ public class StatsProjectServiceImpl implements StatsProjectService {
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
//2:根据客户Id查询机关维度表数据
log.info("StatsProjectServiceImpl.customerAgencyStats-根据客户Id查询机关维度数据,对应客户Id:" + customerId);
DimAgencyDTO dimAgencyDTO = new DimAgencyDTO();
dimAgencyDTO.setCustomerId(customerId);
List<DimAgencyDTO> dimAgencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO);
//3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据)
log.info("StatsProjectServiceImpl.customerAgencyStats-根据客户Id查询项目业务表已结案数据,对应客户Id:" + customerId);
ProjectEntity projectEntity = new ProjectEntity();
projectEntity.setCustomerId(customerId);
projectEntity.setCreatedTime(date);
@ -124,7 +120,6 @@ public class StatsProjectServiceImpl implements StatsProjectService {
List<ProjectEntity> projectList = projectService.getProjectList(projectEntity);
//4:查询项目处理进展表中有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询传入日期及之前的数据)
log.info("StatsProjectServiceImpl.customerAgencyStats-根据客户Id查询项目进展表业务数据,对应客户Id:" + customerId);
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(projectEntity);
//20210721 sun 业务逻辑调整,网格删除,组织没有删除情况,相应的组织层级数据统计应舍弃以删除网格数据 start
@ -134,21 +129,9 @@ public class StatsProjectServiceImpl implements StatsProjectService {
if (list.size() > NumConstant.ZERO) {
Map<String, String> map = list.stream().collect(Collectors.toMap(String::toString, v -> v, (c1, c2) -> c1));
//4-2.遍历删除项目主表查询的无效数据
Iterator<ProjectEntity> proiter = projectList.iterator();
while (proiter.hasNext()) {
ProjectEntity next = proiter.next();
if (map.containsKey(next.getId())) {
proiter.remove();
}
}
projectList.removeIf(next -> map.containsKey(next.getId()));
//4-3.遍历删除项目节点表查询的无效数据
Iterator<ProjectProcessEntity> iterator = processList.iterator();
while (iterator.hasNext()) {
ProjectProcessEntity next = iterator.next();
if (map.containsKey(next.getProjectId())) {
iterator.remove();
}
}
processList.removeIf(next -> map.containsKey(next.getProjectId()));
}
//20210721 sun end
@ -156,21 +139,17 @@ public class StatsProjectServiceImpl implements StatsProjectService {
if (null != dimAgencyList && dimAgencyList.size() > NumConstant.ZERO) {
//5.1:执行机关日数据统计
try {
log.info("StatsProjectServiceImpl.customerAgencyStats-开始执行机关日统计方法,方法名:agencyDateProjectStats,客户Id:" + customerId);
agencyDateProjectStats(customerId, dimId, date, dimAgencyList, projectList, processList);
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "agencyDateProjectStats", customerId, dimId.getDateId()), e);
}
//5.2:执行机关月数据统计
//if (Calendar.getInstance().get(Calendar.DATE) == 1) {
try {
log.info("StatsProjectServiceImpl.customerAgencyStats-开始执行机关月统计方法,方法名:agencyMonthProjectStats,客户Id:" + customerId);
agencyMonthProjectStats(customerId, dimId, dimAgencyList);
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "agencyMonthProjectStats", customerId, dimId.getMonthId()), e);
}
//}
}
}
@ -404,7 +383,6 @@ public class StatsProjectServiceImpl implements StatsProjectService {
}
//入参有客户Id的则按客户Id执行,没有的则全部客户都执行
if (null != formDTO && StringUtils.isNotBlank(formDTO.getCustomerId())) {
log.info("单独统计客户网格-项目-日月数据,当前统计的客户Id:" + formDTO.getCustomerId());
customerGridStats(formDTO.getCustomerId(), date);
} else {
int pageNo = 1;
@ -415,11 +393,9 @@ public class StatsProjectServiceImpl implements StatsProjectService {
if (!CollectionUtils.isEmpty(customerIdList)) {
for (String customerId : customerIdList) {
try {
log.info("for循环统计网格-项目-日月数据,当前统计的客户Id:" + customerId);
//遍历统计每一个客户数据
customerGridStats(customerId, date);
} catch (Exception e) {
log.error("项目-网格-数据统计程序错误,对应客户Id:" + customerId, e);
log.error("Error creating model JSON", e);
}
}
@ -437,11 +413,9 @@ public class StatsProjectServiceImpl implements StatsProjectService {
DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date);
//2:根据客户Id查询网格维度表数据
log.info("StatsProjectServiceImpl.customerGridStats-根据客户Id查询网格维度数据,对应客户Id:" + customerId);
List<DimGridEntity> dimGridList = dimGridService.getGridListByCustomerId(customerId);
//3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据)
log.info("StatsProjectServiceImpl.customerGridStats-根据客户Id查询项目业务表已结案数据,对应客户Id:" + customerId);
ProjectEntity projectEntity = new ProjectEntity();
projectEntity.setCustomerId(customerId);
projectEntity.setCreatedTime(date);
@ -449,14 +423,12 @@ public class StatsProjectServiceImpl implements StatsProjectService {
List<ProjectEntity> projectList = projectService.getProjectList(projectEntity);
//4:查询项目处理进展表中有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询传入日期及之前的数据)
log.info("StatsProjectServiceImpl.customerGridStats-根据客户Id查询项目进展表业务数据,对应客户Id:" + customerId);
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(projectEntity);
//5:网格层级日月统计
if (null != dimGridList && dimGridList.size() > NumConstant.ZERO) {
//5.1:执行网格日数据统计
try {
log.info("StatsProjectServiceImpl.customerGridStats-开始执行机关日统计方法,方法名:gridDateProjectStats,客户Id:" + customerId);
gridDateProjectStats(customerId, dimId, date, dimGridList, projectList, processList);
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "gridDateProjectStats", customerId, dimId.getDateId()), e);
@ -464,7 +436,6 @@ public class StatsProjectServiceImpl implements StatsProjectService {
//5.2:执行网格月数据统计
try {
log.info("StatsProjectServiceImpl.customerGridStats-开始执行机关月统计方法,方法名:gridMonthProjectStats,客户Id:" + customerId);
gridMonthProjectStats(customerId, dimId, dimGridList);
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "gridMonthProjectStats", customerId, dimId.getMonthId()), e);
@ -711,4 +682,4 @@ public class StatsProjectServiceImpl implements StatsProjectService {
return date;
}
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsPublicityServiceImpl.java

@ -404,7 +404,7 @@ public class StatsPublicityServiceImpl implements StatsPublicityService {
for (ArticleGridPublishedSummaryDTO summaryDTO : publishedArticleCount) {
FactArticlePublishedDepartmentDailyEntity gridDailyEntities = departmentDailyEntityMap.get(summaryDTO.getPublisherId());
if (gridDailyEntities == null) {
log.error("publicitySummary bizData departmentId:{} not exist in dimDepartment", summaryDTO.getGridId());
log.warn("publicitySummary bizData departmentId:{} not exist in dimDepartment", summaryDTO.getGridId());
continue;
}
gridDailyEntities.setArticleTotalCount(summaryDTO.getArticleTotalCount());

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java

@ -3,6 +3,7 @@ package com.epmet.service.topic.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.topic.TopicDao;
import com.epmet.dto.AgencySubTreeDto;
@ -75,8 +76,12 @@ public class TopicServiceImpl implements TopicService {
agencies.forEach(agency -> {
initAgencyGridMap(agency.getAgencyId(),agency,subGridOfAgency);
});
//计算网格-组-话题映射关系
List<ResiGroupTopicResultDTO> topics = topicDao.selectGroupOrderByGrid(targetDate,customerId);
//计算网格-组-话题映射关系 如果时间为空则 默认取维度里的时间(也是默认t-1天)
Date breforeDate = targetDate;
if (targetDate == null){
breforeDate = DateUtils.parse(timeDimension.getDateId(),DateUtils.DATE_PATTERN_YYYYMMDD);
}
List<ResiGroupTopicResultDTO> topics = topicDao.selectGroupOrderByGrid(breforeDate,customerId);
topics.forEach(groupTopic -> {
if(null != groupTopic.getTopics() && groupTopic.getTopics().size() == NumConstant.ONE && StringUtils.isBlank(groupTopic.getTopics().get(NumConstant.ZERO).getTopicId())){
groupTopic.setTopics(new ArrayList<>());
@ -287,7 +292,8 @@ public class TopicServiceImpl implements TopicService {
* @author wangc
* @date 2020.06.22 13:13
**/
TopicStatisticalData calculateAndSummarizeTopicStatisticalData(Map<String, Set<String>> subGridOfAgency, List<AgencySubTreeDto> agencies, Map<String,List<ResiGroupTopicResultDTO>> gridGroupMap, Date targetDate,List<DimTopicStatusDTO> statusDimension ,DimIdGenerator.DimIdBean timeDimension ,String customerId){
TopicStatisticalData calculateAndSummarizeTopicStatisticalData(Map<String, Set<String>> subGridOfAgency, List<AgencySubTreeDto> agencies, Map<String,List<ResiGroupTopicResultDTO>> gridGroupMap,
Date targetDate,List<DimTopicStatusDTO> statusDimension ,DimIdGenerator.DimIdBean timeDimension ,String customerId){
if(null == subGridOfAgency || subGridOfAgency.size() <= NumConstant.ZERO){
return null;
}
@ -306,8 +312,7 @@ public class TopicServiceImpl implements TopicService {
//参数:gridGroupMap 所有网格的组以及组内话题
//[所有]话题当日的操作记录
List<ResiTopicOperationResultDTO> operations =
topicDao.selectTopicOperationRecord(targetDate);
List<ResiTopicOperationResultDTO> operations = topicDao.selectTopicOperationRecord(targetDate);
//key:话题Id value:这个话题在当日的操作记录
//操作类型有: ①discussing(发布) ②hidden(屏蔽) ③hidden_cancelled(取消屏蔽) ④closed(关闭) ⑤shift_issue(转议题)
//注意不要把【发布】和【取消屏蔽】混淆!!!

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}
</select>
<select id="selectAgencyGridSelfDaily" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
SELECT
da.ID AS AGENCY_ID,
COUNT( fm.ID ) AS "sum",
IFNULL( a.count, 0 ) AS "count"
a.ID AS AGENCY_ID,
a.`LEVEL`,
COUNT( b.PROJECT_ID ) AS "count"
FROM
dim_agency da
INNER JOIN fact_origin_project_main_daily fm ON fm.PIDS LIKE CONCAT( '%', da.ID, '%' )
LEFT JOIN (
SELECT
agency.ID,
orgId,
COUNT( PROJECT_ID ) AS "count"
FROM
dim_agency agency
INNER JOIN (
SELECT
AGENCY_ID,
PIDS,
ORG_ID AS orgId,
PROJECT_ID
FROM
fact_origin_project_log_daily
WHERE
DEL_FLAG = 0
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
dim_agency a
INNER JOIN (
SELECT
PROJECT_ID,
main.PIDS,
ORG_TYPE
FROM
fact_origin_project_main_daily main
INNER JOIN fact_origin_project_log_daily log ON main.ID = log.PROJECT_ID
AND ACTION_CODE = 'close'
AND ORG_TYPE = 'grid'
AND log.DEL_FLAG = '0'
AND log.CUSTOMER_ID = #{customerId}
WHERE
main.CUSTOMER_ID = #{customerId}
AND main.DATE_ID &lt;= #{dateId}
) b ON b.PIDS LIKE CONCAT( '%', a.ID, '%' )
WHERE
PROJECT_STATUS = 'closed'
AND ORIGIN = "issue"
AND da.CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId}
a.CUSTOMER_ID = #{customerId}
GROUP BY
da.ID
a.ID,
a.`LEVEL`
</select>
<select id="getProjectResponseCount" resultType="com.epmet.dto.extract.result.OrgStatisticsResultDTO">
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
a.ID AS AGENCY_ID,
a.`LEVEL`,
b.`LEVEL`,
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
dim_agency a
INNER JOIN (
SELECT
PROJECT_ID,
PIDS,
ORG_TYPE
PROJECT_ID,
main.PIDS,
ORG_TYPE,
da.`LEVEL`
FROM
fact_origin_project_log_daily
WHERE
CUSTOMER_ID = #{customerId}
AND DATE_ID &lt;= #{dateId}
fact_origin_project_main_daily main
INNER JOIN fact_origin_project_log_daily log ON main.ID = log.PROJECT_ID
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, '%' )
WHERE
a.CUSTOMER_ID = #{customerId}
GROUP BY
a.ID,
a.`LEVEL`
b.`LEVEL`
</select>

18
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/issue/StatsIssueDao.xml

@ -12,7 +12,7 @@
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND DATE(UPDATED_TIME) <![CDATA[ <= ]]> #{date}
AND DATE(CREATED_TIME) <![CDATA[ <= ]]> #{date}
<if test="gridList != null and gridList.size() > 0">
<foreach collection="gridList" item="gridId" index="index">
AND GRID_ID != #{gridId}
@ -322,20 +322,6 @@
</foreach>
order by a.category_type,a.sort
</select>
<select id="getIssueTotalList" resultType="com.epmet.dto.issue.IssueDTO">
SELECT ORG_ID AS "agencyId",
ORG_ID_PATH AS "pIds",
ISSUE_STATUS AS "status",
COUNT(ID) AS "count"
FROM
issue
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
AND DATE(UPDATED_TIME) <![CDATA[ <= ]]> #{date}
GROUP BY
ORG_ID, ISSUE_STATUS
</select>
<select id="selectProjectByGrids" resultType="java.lang.String">
SELECT DISTINCT
@ -349,4 +335,4 @@
</foreach>
</select>
</mapper>
</mapper>

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

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

32
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/topic/TopicDao.xml

@ -35,25 +35,14 @@
topic.ID AS topicID,
topic.STATUS,
topic.SHIFT_ISSUE,
<choose>
<when test="null != targetDate">
(CASE WHEN
topic.CREATED_TIME <![CDATA[>=]]> #{targetDate} AND topic.CREATED_TIME <![CDATA[<]]> DATE_SUB( #{targetDate}, INTERVAL - 1 DAY)
THEN '1'
ELSE '0' END ) AS incrFlag
</when>
<otherwise>
(CASE WHEN
topic.CREATED_TIME <![CDATA[<]]> CURDATE( ) AND topic.CREATED_TIME <![CDATA[>=]]> DATE_SUB( CURDATE( ), INTERVAL 1 DAY )
THEN '1'
ELSE '0' END ) AS incrFlag
</otherwise>
</choose>
FROM RESI_GROUP groupp LEFT JOIN RESI_TOPIC topic ON groupp.ID = topic.GROUP_ID AND topic.DEL_FLAG = '0'
CASE WHEN log.CREATED_TIME IS NULL THEN 0 ELSE 1 END AS 'SHIFT_ISSUE',
(CASE WHEN
topic.CREATED_TIME <![CDATA[>=]]> #{targetDate} AND topic.CREATED_TIME <![CDATA[<]]> DATE_SUB( #{targetDate}, INTERVAL - 1 DAY)
THEN '1' ELSE '0' END ) AS incrFlag
FROM
RESI_GROUP groupp
LEFT JOIN RESI_TOPIC topic ON groupp.ID = topic.GROUP_ID AND topic.DEL_FLAG = '0'
LEFT JOIN resi_topic_operation log ON log.TOPIC_ID = topic.ID AND log.DEL_FLAG = '0' AND log.OPERATION_TYPE = 'shift_issue' AND log.CREATED_TIME <![CDATA[<]]> DATE_SUB( #{targetDate}, INTERVAL - 1 DAY )
WHERE groupp.DEL_FLAG = '0'
<if test='null != customerId and "" != customerId'>
AND groupp.CUSTOMER_ID = #{customerId}
@ -301,11 +290,10 @@
a.ATTACHMENT_URL,
a.SORT
from resi_topic t
LEFT JOIN resi_topic_attachment a ON t.ID = a.TOPIC_ID
LEFT JOIN resi_topic_attachment a ON t.ID = a.TOPIC_ID AND ATTACHMENT_TYPE = 'image'
WHERE
t.del_flag = '0'
AND ATTACHMENT_TYPE = 'image'
and TOPIC_ID = #{topicId}
and t.ID = #{topicId}
</select>
<select id="selectTopicList" resultType="com.epmet.dto.stats.topic.result.TopicListResultDTO">

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())
&& !MediaType.IMAGE_JPEG_VALUE.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());
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getCode()
, EpmetErrorCode.OPER_UPLOAD_FILE_TYPE_ERROR.getMsg());
@ -232,6 +234,13 @@ public class OssController {
throw new RenException(EpmetErrorCode.OPER_UPLOAD_FILE_OVER_SIZE.getCode()
, 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 {
// 校验文件大小,不超过2m
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文件类型
*/
String FILE_CONTENT_TYPE_PDF = "application/pdf";
/**
* vedio文件类型前缀 不具体什么视频格式了
*/
String FILE_CONTENT_TYPE_VEDIO_PREFIX = "video/";
/**
* 项目附件-允许上传的文件类型

5
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/BizPointUserTotalDetailServiceImpl.java

@ -23,7 +23,6 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.BizTypeEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
@ -160,10 +159,6 @@ public class BizPointUserTotalDetailServiceImpl extends BaseServiceImpl<BizPoint
return entity.getTotalPoint();
}
public static void main(String[] args) {
System.out.println(BizTypeEnum.ACTIVITY.getType());
}
/**
* 小组积分贡献榜
*

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

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java

@ -38,9 +38,6 @@ public class CustomerAgencyRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void delete(String agencyId) {
String key = RedisKeys.getAgencyByIdKey(agencyId);
@ -62,4 +59,4 @@ public class CustomerAgencyRedis {
return BeanUtil.mapToBean(resultMap, CustomerAgencyDTO.class, true);
}
}
}

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerDepartmentRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerDepartmentRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerGridRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 客户网格表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-16
*/
@Component
public class CustomerGridRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerPartyBranchRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 党支部信息
*
* @author yinzuomei yinzuomei@elink-cn.com
* @since v1.0.0 2020-06-17
*/
@Component
public class CustomerPartyBranchRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 人员-机关单位关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerStaffAgencyRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffDepartmentRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 部门人员关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerStaffDepartmentRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffGridRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 网格人员关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
*/
@Component
public class CustomerStaffGridRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/StaffTransferRecordRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 工作人员调动记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-27
*/
@Component
public class StaffTransferRecordRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

46
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java

@ -19,7 +19,6 @@ package com.epmet.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
@ -46,7 +45,6 @@ import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.redis.CustomerAgencyRedis;
import com.epmet.send.SendMqMsgUtil;
import com.epmet.service.AgencyService;
import com.epmet.service.CustomerAgencyService;
import com.epmet.service.CustomerOrgParameterService;
@ -547,14 +545,25 @@ public class AgencyServiceImpl implements AgencyService {
formDTO.setOrgId(staffInfo.getAgencyId());
formDTO.setLevel(OrgInfoConstant.AGENCY);
}
if (StringUtils.isNotBlank(customerAgencyEntity.getLatitude())){
result.setLatitude(new BigDecimal(customerAgencyEntity.getLatitude()));
}
if (StringUtils.isNotBlank(customerAgencyEntity.getLongitude())){
result.setLongitude(new BigDecimal(customerAgencyEntity.getLongitude()));
}
if (formDTO.getLevel().equals(OrgInfoConstant.AGENCY)){
CustomerAgencyEntity entity = customerAgencyDao.selectById(formDTO.getOrgId());
result = ConvertUtils.sourceToTarget(entity,MapOrgResultDTO.class);
result.setName(entity.getOrganizationName());
result.setLevel(formDTO.getLevel());
result.setAgencyLevel(entity.getLevel());
result.setLatitude(StringUtils.isBlank(entity.getLatitude()) ? new BigDecimal(customerAgencyEntity.getLatitude()) : new BigDecimal(entity.getLatitude()));
result.setLongitude(StringUtils.isBlank(entity.getLongitude()) ? new BigDecimal(customerAgencyEntity.getLongitude()) : new BigDecimal(entity.getLongitude()));
//经纬度 如果本级没有则取根级组织的 根级没有就空着
if (StringUtils.isNotBlank(entity.getLatitude())){
result.setLatitude(new BigDecimal(entity.getLatitude()));
}
if (StringUtils.isNotBlank(entity.getLongitude())){
result.setLongitude(new BigDecimal(entity.getLongitude()));
}
if (entity.getLevel().equals(OrgInfoConstant.COMMUNITY)){
List<MapSonOrgResultDTO> son = customerAgencyDao.selectSonOrg(formDTO.getOrgId(), OrgInfoConstant.GRID);
if (CollectionUtils.isNotEmpty(son)){
@ -576,12 +585,9 @@ public class AgencyServiceImpl implements AgencyService {
if (CollectionUtils.isNotEmpty(directlySub)){
dtoList.addAll(directlySub);
}
if (CollectionUtils.isNotEmpty(dtoList)){
MapOrgResultDTO finalResult1 = result;
dtoList.forEach(d -> {
d.setLatitude(StringUtils.isBlank(d.getLatitudeOrigin()) ? finalResult1.getLatitude() : new BigDecimal(d.getLatitudeOrigin()));
d.setLongitude(StringUtils.isBlank(d.getLongitudeOrigin()) ? finalResult1.getLongitude() : new BigDecimal(d.getLongitudeOrigin()));
});
for (MapSonOrgResultDTO d : dtoList) {
d.setLatitude(StringUtils.isBlank(d.getLatitudeOrigin()) ? result.getLatitude() : new BigDecimal(d.getLatitudeOrigin()));
d.setLongitude(StringUtils.isBlank(d.getLongitudeOrigin()) ? result.getLongitude() : new BigDecimal(d.getLongitudeOrigin()));
}
result.setChildren(dtoList);
}
@ -591,15 +597,19 @@ public class AgencyServiceImpl implements AgencyService {
result.setName(entity.getGridName());
result.setLevel(formDTO.getLevel());
result.setAgencyLevel(OrgInfoConstant.GRID);
result.setLatitude(StringUtils.isBlank(entity.getLatitude()) ? new BigDecimal(customerAgencyEntity.getLatitude()) : new BigDecimal(entity.getLatitude()));
result.setLongitude(StringUtils.isBlank(entity.getLongitude()) ? new BigDecimal(customerAgencyEntity.getLongitude()) : new BigDecimal(entity.getLongitude()));
//经纬度 如果本级没有则取根级组织的 根级没有就空着
if (StringUtils.isNotBlank(entity.getLatitude())){
result.setLatitude(new BigDecimal(entity.getLatitude()));
}
if (StringUtils.isNotBlank(entity.getLongitude())){
result.setLongitude(new BigDecimal(entity.getLongitude()));
}
List<MapSonOrgResultDTO> son = customerAgencyDao.selectSonOrg(formDTO.getOrgId(), OrgInfoConstant.NEIGHBOR_HOOD);
if (CollectionUtils.isNotEmpty(son)){
MapOrgResultDTO finalResult2 = result;
son.forEach(s -> {
s.setLatitude(StringUtils.isBlank(s.getLatitudeOrigin()) ? finalResult2.getLatitude() : new BigDecimal(s.getLatitudeOrigin()));
s.setLongitude(StringUtils.isBlank(s.getLongitudeOrigin()) ? finalResult2.getLongitude() : new BigDecimal(s.getLongitudeOrigin()));
});
for (MapSonOrgResultDTO s : son) {
s.setLatitude(StringUtils.isBlank(s.getLatitudeOrigin()) ? result.getLatitude() : new BigDecimal(s.getLatitudeOrigin()));
s.setLongitude(StringUtils.isBlank(s.getLongitudeOrigin()) ? result.getLongitude() : new BigDecimal(s.getLongitudeOrigin()));
}
}
result.setChildren(CollectionUtils.isEmpty(son) ? new ArrayList<>() : son);
}
@ -686,4 +696,4 @@ public class AgencyServiceImpl implements AgencyService {
return insertEntity;
}
}
}

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerDepartmentServiceImpl.java

@ -20,18 +20,16 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.CustomerDepartmentDao;
import com.epmet.dto.CustomerDepartmentDTO;
import com.epmet.dto.result.DepartmentListResultDTO;
import com.epmet.entity.CustomerDepartmentEntity;
import com.epmet.redis.CustomerDepartmentRedis;
import com.epmet.service.CustomerDepartmentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -41,7 +39,7 @@ import java.util.List;
import java.util.Map;
/**
* 客户部门表
* 客户部门表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
@ -49,9 +47,6 @@ import java.util.Map;
@Service
public class CustomerDepartmentServiceImpl extends BaseServiceImpl<CustomerDepartmentDao, CustomerDepartmentEntity> implements CustomerDepartmentService {
@Autowired
private CustomerDepartmentRedis customerDepartmentRedis;
@Override
public PageData<CustomerDepartmentDTO> page(Map<String, Object> params) {
IPage<CustomerDepartmentEntity> page = baseDao.selectPage(
@ -125,4 +120,4 @@ public class CustomerDepartmentServiceImpl extends BaseServiceImpl<CustomerDepar
}
}
}

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
public Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList) {
Result<List<AllGridsByUserIdResultDTO>> result = new Result<List<AllGridsByUserIdResultDTO>>();
if (gridIdList.size() < NumConstant.ONE) {
logger.error("根据网格Id集合获取网格列表信息-传入的网格Id集合为空数组!");
if (CollectionUtils.isEmpty(gridIdList)) {
logger.warn("根据网格Id集合获取网格列表信息-传入的网格Id集合为空数组!");
return result;
}
List<AllGridsByUserIdResultDTO> list = baseDao.selectGridByIds(gridIdList);

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerPartyBranchServiceImpl.java

@ -32,7 +32,6 @@ import com.epmet.dto.CustomerPartyBranchDTO;
import com.epmet.dto.form.ListPartyBranchFormDTO;
import com.epmet.dto.result.ListPartyBranchResultDTO;
import com.epmet.entity.CustomerPartyBranchEntity;
import com.epmet.redis.CustomerPartyBranchRedis;
import com.epmet.service.CustomerAgencyService;
import com.epmet.service.CustomerGridService;
import com.epmet.service.CustomerPartyBranchService;
@ -59,8 +58,6 @@ import java.util.stream.Collectors;
@Service
public class CustomerPartyBranchServiceImpl extends BaseServiceImpl<CustomerPartyBranchDao, CustomerPartyBranchEntity> implements CustomerPartyBranchService {
@Autowired
private CustomerPartyBranchRedis customerPartyBranchRedis;
@Autowired
private CustomerGridService customerGridService;
@Autowired
@ -171,4 +168,4 @@ public class CustomerPartyBranchServiceImpl extends BaseServiceImpl<CustomerPart
}).collect(Collectors.toList());
}
}
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java

@ -33,7 +33,6 @@ import com.epmet.dto.result.LatestCustomerResultDTO;
import com.epmet.entity.CustomerStaffAgencyEntity;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.OperCrmFeignClient;
import com.epmet.redis.CustomerStaffAgencyRedis;
import com.epmet.service.CustomerAgencyService;
import com.epmet.service.CustomerDepartmentService;
import com.epmet.service.CustomerGridService;
@ -57,8 +56,6 @@ import java.util.*;
@Service
public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaffAgencyDao, CustomerStaffAgencyEntity> implements CustomerStaffAgencyService {
@Autowired
private CustomerStaffAgencyRedis customerStaffAgencyRedis;
@Autowired
private EpmetUserFeignClient epmetUserFeignClient;
@Autowired
@ -251,4 +248,4 @@ public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaf
result.addAll(gridUserIds);
return result;
}
}
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffDepartmentServiceImpl.java

@ -27,7 +27,6 @@ import com.epmet.dao.CustomerStaffDepartmentDao;
import com.epmet.dto.CustomerStaffDepartmentDTO;
import com.epmet.dto.form.DepartmentIdFormDTO;
import com.epmet.entity.CustomerStaffDepartmentEntity;
import com.epmet.redis.CustomerStaffDepartmentRedis;
import com.epmet.service.CustomerStaffDepartmentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -39,7 +38,7 @@ import java.util.List;
import java.util.Map;
/**
* 部门人员关系表
* 部门人员关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
@ -114,4 +113,4 @@ public class CustomerStaffDepartmentServiceImpl extends BaseServiceImpl<Customer
return customerStaffDepartmentDao.getDepartmentStaffList(departmentId);
}
}
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java

@ -35,7 +35,6 @@ import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.redis.CustomerStaffGridRedis;
import com.epmet.service.CustomerStaffGridService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -58,9 +57,6 @@ import java.util.stream.Collectors;
@Service
public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffGridDao, CustomerStaffGridEntity> implements CustomerStaffGridService {
@Autowired
private CustomerStaffGridRedis customerStaffGridRedis;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@ -193,4 +189,4 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffG
public List<EventTitleOrgResultDTO> eventOrg(String userId) {
return baseDao.eventOrg(userId);
}
}
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffTransferRecordServiceImpl.java

@ -20,16 +20,14 @@ package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.StaffTransferRecordDao;
import com.epmet.dto.StaffTransferRecordDTO;
import com.epmet.entity.StaffTransferRecordEntity;
import com.epmet.redis.StaffTransferRecordRedis;
import com.epmet.service.StaffTransferRecordService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -46,9 +44,6 @@ import java.util.Map;
@Service
public class StaffTransferRecordServiceImpl extends BaseServiceImpl<StaffTransferRecordDao, StaffTransferRecordEntity> implements StaffTransferRecordService {
@Autowired
private StaffTransferRecordRedis staffTransferRecordRedis;
@Override
public PageData<StaffTransferRecordDTO> page(Map<String, Object> params) {
IPage<StaffTransferRecordEntity> page = baseDao.selectPage(
@ -101,4 +96,4 @@ public class StaffTransferRecordServiceImpl extends BaseServiceImpl<StaffTransfe
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}
}

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

@ -3148,4 +3148,4 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
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.epmet.commons.rocketmq.constants.MQUserPropertys;
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.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
@ -68,7 +69,10 @@ public class OpenDataOrgChangeEventListener implements MessageListenerConcurrent
logger.info("【开放数据事件监听器】-组织信息变更-收到消息内容:{},操作:{}", msg, tags);
OrgOrStaffMQMsg obj = JSON.parseObject(msg, OrgOrStaffMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(obj.getCustomerId())) {
return;
}
RLock lock = null;
try {
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.epmet.commons.rocketmq.constants.MQUserPropertys;
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.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
@ -69,6 +70,10 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr
logger.info("【开放数据事件监听器】-巡查记录信息变更-收到消息内容:{}, 操作:{}", msg, tags);
StaffPatrolMQMsg msgObj = JSON.parseObject(msg, StaffPatrolMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(msgObj.getCustomerId())) {
return;
}
if (msgObj == null) {
log.warn("consumeMessage msg body is blank");
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.epmet.commons.rocketmq.constants.MQUserPropertys;
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.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
@ -72,6 +73,10 @@ public class OpenDataProjectChangeEventListener implements MessageListenerConcur
logger.info("【开放数据事件监听器】-项目信息变更-收到消息内容:{}, 操作:{}, pendingMsgLabel:{}", msg, tags, pendingMsgLabel);
DisputeProcessMQMsg obj = JSON.parseObject(msg, DisputeProcessMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(obj.getCustomerId())) {
return;
}
EventInfoFormDTO formDTO = ConvertUtils.sourceToTarget(obj, EventInfoFormDTO.class);
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.epmet.commons.rocketmq.constants.MQUserPropertys;
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.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
@ -72,6 +73,10 @@ public class OpenDataStaffChangeEventListener implements MessageListenerConcurre
logger.info("【开放数据事件监听器】-工作人员信息变更-收到消息内容:{}, 操作:{}, blockedMsgLabel:{}", msg, tags, pendingMsgLabel);
OrgOrStaffMQMsg obj = JSON.parseObject(msg, OrgOrStaffMQMsg.class);
//只推送平阴数据
if (!StrConstant.PY_CUSTOMER.equals(obj.getCustomerId())) {
return;
}
RLock lock = null;
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.ExDeptService;
import com.epmet.opendata.service.ExUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@ -47,6 +48,7 @@ import java.util.stream.Collectors;
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-10-15
*/
@Slf4j
@Service
public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputeProcessDao, BaseDisputeProcessEntity> implements BaseDisputeProcessService {
@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) {
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 -> {
BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity();
entity.setId(item.getId().concat("_PY"));
entity.setCustomerId(item.getCustomerId());
entity.setGridId(deptMap.get(item.getOrgId()));
entity.setGridName(item.getOrgName());
entity.setEventName(item.getEventName());
entity.setHappenDate(item.getHappenDate());
entity.setHappenPlace(item.getHappenPlace());
String eventDescription = item.getEventDescription();
//如果不为空 长度控制1000以内
if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.ONE_THOUSAND){
eventDescription = eventDescription.substring(NumConstant.ZERO,NumConstant.ONE_THOUSAND);
}
entity.setEventDescription(eventDescription);
entity.setLng(null == item.getLng()?null:item.getLng().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.setCreateDate(item.getReportTime());
entity.setUpdateDate(new Date());
entity.setStatus(item.getStatus());
//业务不确定
if (("03").equals(item.getStatus())) {
entity.setSuccessfulOrNot("Y");
}
entity.setEventNo(("py_").concat(item.getId()));
entity.setFirstEventCategory(item.getParentEventCategory());
entity.setSource("01");
entity.setSecondEventCategory(item.getEventCategory());
entity.setResolveWay(item.getWaysOfResolving());
entity.setResolveGridLevel(item.getCompleteLevel());
entity.setResolveTime(item.getCompleteTime());
return entity;
}).collect(Collectors.toList());
List<BaseConflictsResolveEntity> resolveList = list.stream().map(item -> {
BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity();
entity.setId(item.getId().concat("_PY"));
entity.setCustomerId(item.getCustomerId());
entity.setGridId(deptMap.get(item.getOrgId()));
entity.setGridName(item.getOrgName());
entity.setEventName(item.getEventName());
entity.setHappenDate(item.getHappenDate());
entity.setHappenPlace(item.getHappenPlace());
String eventDescription = item.getEventDescription();
//如果不为空 长度控制1000以内
if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.ONE_THOUSAND) {
eventDescription = eventDescription.substring(NumConstant.ZERO, NumConstant.ONE_THOUSAND);
}
entity.setEventDescription(eventDescription);
entity.setLng(null == item.getLng() ? null : item.getLng().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.setCreateDate(item.getReportTime());
entity.setUpdateDate(new Date());
entity.setStatus(item.getStatus());
//业务不确定
if (("03").equals(item.getStatus())) {
entity.setSuccessfulOrNot("Y");
}
//业务不包含 一级分类里 如果是03 矛盾纠纷 则涉及人数写2(目前业务不支持 所以应产品需求 填2)
if ("03".equals(item.getParentEventCategory())) {
entity.setNumberInvolved(NumConstant.TWO);
}
entity.setEventNo(("py_").concat(item.getId()));
entity.setFirstEventCategory(item.getParentEventCategory());
entity.setSource("01");
entity.setSecondEventCategory(item.getEventCategory());
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());
}
}

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java

@ -3,6 +3,7 @@ package com.epmet.modules.topic.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
@ -255,6 +256,7 @@ public class ResiTopicController {
* @author wangc
* @date 2020.05.13 19:08
**/
@NoRepeatSubmit
@PostMapping("turnintoissuev2")
public Result<FirstTopicShiftedToIssueApplicationResultDTO> turnIntoIssueV2(@LoginUser TokenDto tokenDto, @RequestBody ResiTopicTurnIssueFromDTO topicTurnIssueFromDTO){
topicTurnIssueFromDTO.setUserId(tokenDto.getUserId());

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 javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
@ -14,5 +16,9 @@ public class UserIdsFormDTO implements Serializable {
private static final long serialVersionUID = -6168528618954442905L;
@NotBlank(message = "客户ID不能为空")
private String customerId;
@NotEmpty(message = "工作人员Id 不能为空")
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.RequirePermission;
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.page.PageData;
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.send.SendMqMsgUtil;
import com.epmet.service.CustomerStaffService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;
@ -367,7 +364,8 @@ public class CustomerStaffController {
* @date 2020/8/13 1:45 下午
*/
@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);
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.epmet.commons.mybatis.entity.DataScope;
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.NumConstant;
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.GovOrgOpenFeignClient;
import com.epmet.feign.OperCrmOpenFeignClient;
import com.epmet.send.SendMqMsgUtil;
import com.epmet.service.CustomerStaffService;
import com.epmet.service.GovStaffRoleService;
import com.epmet.service.StaffRoleService;
@ -64,7 +62,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -603,7 +600,31 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
public List<StaffSinGridResultDTO> getStaffInfoList(UserIdsFormDTO formDTO) {
List<String> userIds = formDTO.getUserIds();
// 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){
return staffInfoList;
}
@ -619,7 +640,7 @@ public class CustomerStaffServiceImpl extends BaseServiceImpl<CustomerStaffDao,
}
});
staffInfo.setRoleList(roleResult);
});
});*/
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
*/
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("content-Type", "application/vnd.ms-excel");
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