Browse Source

Merge remote-tracking branch 'origin/feature/lc_wgyDataReport' into feature/lc_wgyDataReport

# Conflicts:
#	esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application.yml
feature/screenDataPush
liuchuang 4 years ago
parent
commit
cf6a0bef9f
  1. 71
      esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/EpmetConstant.java
  2. 15
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/form/ScreenBaseReportDataFormDTO.java
  3. 75
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityGroupTotalResultDTO.java
  4. 73
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityHotTopicResultDTO.java
  5. 185
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityIssueResultDTO.java
  6. 130
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityProjectResultDTO.java
  7. 68
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicIssueResultDTO.java
  8. 80
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicStatusResultDTO.java
  9. 105
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityUserResultDTO.java
  10. 130
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGridProjectResultDTO.java
  11. 75
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGroupTotalResultDTO.java
  12. 75
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridHotTopicResultDTO.java
  13. 185
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridIssueResultDTO.java
  14. 68
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicIssueResultDTO.java
  15. 80
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicStatusResultDTO.java
  16. 110
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridUserResultDTO.java
  17. 7
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UploadProjectInfoDTO.java
  18. 4
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UserjoinResultDTO.java
  19. 190
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenBaseReportDataController.java
  20. 172
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenBaseReportDataDao.java
  21. 11
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java
  22. 138
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenBaseReportDataService.java
  23. 164
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenBaseReportDataServiceImpl.java
  24. 13
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java
  25. 2
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application.yml
  26. 793
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenBaseReportDataDao.xml
  27. 9
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml
  28. 552
      esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml
  29. 141
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java
  30. 71
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java
  31. 18
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTask.java
  32. 261
      esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTaskImpl.java
  33. 9
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

71
esua-epdc/epdc-commons/epdc-commons-tools/src/main/java/com/elink/esua/epdc/commons/tools/constant/EpmetConstant.java

@ -323,4 +323,75 @@ public interface EpmetConstant {
*/
String EPMET_SCREEN_COLL_USER_TOTAL = "/data/stats/screencoll/usertotaldata";
/**
* 网格状态话题数据
*/
String EPMET_SCREEN_BASE_REPORT_GRID_TOPIC_STATUS = "/data/stats/basereport/gridtopicstatus";
/**
* 组织状态话题数据
*/
String EPMET_SCREEN_BASE_REPORT_AGENCY_TOPIC_STATUS = "/data/stats/basereport/agencytopicstatus";
/**
* 网格话题转议题数据
*/
String EPMET_SCREEN_BASE_REPORT_GRID_TOPIC_ISSUE = "/data/stats/basereport/gridtopicissue";
/**
* 组织话题转议题数据
*/
String EPMET_SCREEN_BASE_REPORT_AGNENCY_TOPIC_ISSUE = "/data/stats/basereport/agencytopicissue";
/**
* 网格项目数据
*/
String EPMET_SCREEN_BASE_REPORT_GRID_PROJECT = "/data/stats/basereport/gridproject";
/**
* 组织项目数据
*/
String EPMET_SCREEN_BASE_REPORT_AGENCY_PROJECT = "/data/stats/basereport/agencyproject";
/**
* 网格群组总数
*/
String EPMET_SCREEN_BASE_REPORT_GRID_GROUP_TOTAL = "/data/stats/basereport/gridgrouptotal";
/**
* 组织群组总数
*/
String EPMET_SCREEN_BASE_REPORT_AGENCY_GROUP_TOTAL = "/data/stats/basereport/agencygrouptotal";
/**
* 网格热议话题数据
*/
String EPMET_SCREEN_BASE_REPORT_GRID_HOT_TOPIC = "/data/stats/basereport/gridhottopic";
/**
* 组织热议话题数据
*/
String EPMET_SCREEN_BASE_REPORT_AGENCY_HOT_TOPIC = "/data/stats/basereport/agencyhottopic";
/**
* 网格议题数据
*/
String EPMET_SCREEN_BASE_REPORT_GRID_ISSUE = "/data/stats/basereport/gridissue";
/**
* 组织议题数据
*/
String EPMET_SCREEN_BASE_REPORT_AGENCY_ISSUE = "/data/stats/basereport/agencyissue";
/**
* 网格注册用户数据
*/
String EPMET_SCREEN_BASE_REPORT_GRID_REGISTER_USER = "/data/stats/basereport/gridreguser";
/**
* 组织注册用户数据
*/
String EPMET_SCREEN_BASE_REPORT_AGENCY_REGISTER_USER = "/data/stats/basereport/agencyreguser";
}

15
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/form/ScreenBaseReportDataFormDTO.java

@ -0,0 +1,15 @@
package com.elink.esua.epdc.dto.screen.form;
import lombok.Data;
import java.io.Serializable;
/**
* @Authorsyp
* @Date2021/6/25 17:56
*/
@Data
public class ScreenBaseReportDataFormDTO implements Serializable {
private static final long serialVersionUID = 8275259571095325022L;
}

75
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityGroupTotalResultDTO.java

@ -0,0 +1,75 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格群组总数
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class CommunityGroupTotalResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
*
*/
private String pid;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 小组总数
*/
private Integer groupTotal;
/**
* 楼院小组总数
*/
private Integer ordinaryTotal ;
/**
* 支部小组总数
*/
private Integer branchTotal ;
}

73
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityHotTopicResultDTO.java

@ -0,0 +1,73 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 组织热议话题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class CommunityHotTopicResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 父级机关ID
*/
private String pid;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 话题状态热议中:hot_discuss
*/
private String status;
/**
* 话题总数
*/
private Integer topicTotal;
/**
* 状态话题数量
*/
private Integer topicCount;
}

185
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityIssueResultDTO.java

@ -0,0 +1,185 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 社区议题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class CommunityIssueResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 父ID
*/
private String pid;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 当日议题增量
*/
private Integer issueIncr;
/**
* 议题总数
*/
private Integer issueTotal ;
/**
* 当日已转项目的议题数增量
*/
private Integer shiftProjectIncr ;
/**
* 已转项目的议题总数
*/
private Integer shiftProjectTotal ;
/**
* 已转项目所占百分比
*/
private Integer shiftProjectPercent ;
/**
* 当日表决中议题数增量
*/
private Integer votingIncr ;
/**
* 表决中议题总数
*/
private Integer votingTotal ;
/**
* 表决中议题所占百分比
*/
private Integer votingPercent ;
/**
* 当日已关闭议题数增量
*/
private Integer closedIncr ;
/**
* 当日已关闭议题中已解决数量
*/
private Integer closedResolvedIncr ;
/**
* 当日已关闭议题中无需解决数量
*/
private Integer closedUnresolvedIncr ;
/**
* 已关闭议题总数
*/
private Integer closedTotal ;
/**
* 已关闭议题中已解决总数
*/
private Integer closedResolvedTotal ;
/**
* 已关闭议题中未解决总数
*/
private Integer closedUnresolvedTotal ;
/**
* 已关闭议题所占百分比
*/
private Integer closedPercent ;
/**
* 已关闭议题中已解决百分比
*/
private Integer closedResolvedPercent ;
/**
* 已关闭议题中未解决百分比
*/
private Integer closedUnresolvedPercent ;
/**
* 当日已结案议题数
*/
private Integer closedCaseIncr ;
/**
* 当日已结案议题中已解决数
*/
private Integer closedCaseResolvedIncr ;
/**
* 当日已结案议题中未解决数
*/
private Integer closedCaseUnresolvedIncr ;
/**
* 已结案议题总数
*/
private Integer closedCaseTotal ;
/**
* 已结案议题中已解决总数
*/
private Integer closedCaseResolvedTotal ;
/**
* 已结案议题中未解决总数
*/
private Integer closedCaseUnresolvedTotal ;
/**
* 已结案议题中已解决百分比
*/
private Integer closedCaseResolvedPercent ;
/**
* 已结案议题中已解决百分比
*/
private Integer closedCaseUnresolvedPercent ;
}

130
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityProjectResultDTO.java

@ -0,0 +1,130 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 社区项目数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class CommunityProjectResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 上级组织ID
*/
private String parentId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 截止当日网格下项目总数 当前组织及下级项目总数
*/
private Integer projectTotal;
/**
* 截止当日网格下处理中项目数 当前组织及下级所有未结案项目总数
*/
private Integer pendingTotal ;
/**
* 截止当日网格下处理中项目占比 当前组织及下级未结案项目百分比存百分比数小数点后两位
*/
private Integer pendingRatio ;
/**
* 截止当日网格下已结案项目数 当前组织及下级已结案项目总数
*/
private Integer closedTotal ;
/**
* 截止当日网格下已结案项目占比 当前组织及下级已结案项目百分比存百分比数小数点后两位
*/
private Integer closedRatio ;
/**
* 截止当日已结案中已解决项目数 当前组织及下级已结案项目中已解决总数
*/
private Integer resolvedTotal ;
/**
* 截止当日已结案中已解决项目占比 当前组织及下级已结案项目中已解决占比
*/
private Integer resolvedRatio ;
/**
* 截止当日已结案中未解决项目数 当前组织及下级已结案项目中未解决总数
*/
private Integer unresolvedTotal ;
/**
* 截止当日已结案中未解决项目占比 当前组织及下级已结案项目中未解决占比
*/
private Integer unresolvedRatio ;
/**
* 当日已结案项目中已解决数 当前组织及下级前一日新增结案中已解决项目数
*/
private Integer resolvedIncr ;
/**
* 当日已结案项目组未解决数 当前组织及下级前一日新增结案中未解决项目数
*/
private Integer unresolvedIncr ;
/**
* 当日网格下项目总数 该网格下项目总数
*/
private Integer projectIncr ;
/**
* 当日网格下处理中项目数 该网格下未结案项目总数
*/
private Integer pendingIncr ;
/**
* 当日网格下已结案项目数 该网格下已结案项目总数
*/
private Integer closedIncr ;
}

68
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicIssueResultDTO.java

@ -0,0 +1,68 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 社区话题转议题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class CommunityTopicIssueResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 父级机关ID
*/
private String pid;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 当日新增转议题数
*/
private Integer issueIncr;
/**
* 转议题总数
*/
private Integer issueTotal ;
}

80
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityTopicStatusResultDTO.java

@ -0,0 +1,80 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 组织状态话题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class CommunityTopicStatusResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 父级机关ID
*/
private String pid;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 话题状态ID [讨论中: discussi ;已屏蔽 : hidden ;已关闭:closed]
*/
private String topicStatusId;
/**
* 话题数量
*/
private Integer topicCount;
/**
* 话题状态占比 指定状态话题数/话题总数
*/
private String topicProportion;
/**
* 话题增量
*/
private Integer topicIncrement;
}

105
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/CommunityUserResultDTO.java

@ -0,0 +1,105 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 社区注册用户数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class CommunityUserResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 注册用户总数
*/
private Integer regTotal;
/**
* 居民总数居民总数=注册用户数
*/
private Integer resiTotal ;
/**
* 热心居民总数
*/
private Integer warmHeartedTotal ;
/**
* 党员总数
*/
private Integer partymemberTotal ;
/**
* 本日注册居民日增量
*/
private Integer regIncr ;
/**
* 本日热心居民日增量
*/
private Integer warmIncr ;
/**
* 本日党员认证日增量
*/
private Integer partymemberIncr ;
/**
* 居民总数占比居民总数/居民总数
*/
private Integer resiProportion ;
/**
* 党员总数占比党员总数/居民总数
*/
private Integer partymemberProportion ;
/**
* 热心居民占比热心居民数/居民总数
*/
private Integer warmHeartedProportion ;
}

130
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGridProjectResultDTO.java

@ -0,0 +1,130 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格项目数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class GridGridProjectResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 截止当日网格下项目总数 当前组织及下级项目总数
*/
private Integer projectTotal;
/**
* 截止当日网格下处理中项目数 当前组织及下级所有未结案项目总数
*/
private Integer pendingTotal ;
/**
* 截止当日网格下处理中项目占比 当前组织及下级未结案项目百分比存百分比数小数点后两位
*/
private Integer pendingRatio ;
/**
* 截止当日网格下已结案项目数 当前组织及下级已结案项目总数
*/
private Integer closedTotal ;
/**
* 截止当日网格下已结案项目占比 当前组织及下级已结案项目百分比存百分比数小数点后两位
*/
private Integer closedRatio ;
/**
* 截止当日已结案中已解决项目数 当前组织及下级已结案项目中已解决总数
*/
private Integer resolvedTotal ;
/**
* 截止当日已结案中已解决项目占比 当前组织及下级已结案项目中已解决占比
*/
private Integer resolvedRatio ;
/**
* 截止当日已结案中未解决项目数 当前组织及下级已结案项目中未解决总数
*/
private Integer unresolvedTotal ;
/**
* 截止当日已结案中未解决项目占比 当前组织及下级已结案项目中未解决占比
*/
private Integer unresolvedRatio ;
/**
* 当日已结案项目中已解决数 当前组织及下级前一日新增结案中已解决项目数
*/
private Integer resolvedIncr ;
/**
* 当日已结案项目组未解决数 当前组织及下级前一日新增结案中未解决项目数
*/
private Integer unresolvedIncr ;
/**
* 当日网格下项目总数 该网格下项目总数
*/
private Integer projectIncr ;
/**
* 当日网格下处理中项目数 该网格下未结案项目总数
*/
private Integer pendingIncr ;
/**
* 当日网格下已结案项目数 该网格下已结案项目总数
*/
private Integer closedIncr ;
}

75
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGroupTotalResultDTO.java

@ -0,0 +1,75 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格群组总数
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class GridGroupTotalResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 小组总数
*/
private Integer groupTotal;
/**
* 楼院小组总数
*/
private Integer ordinaryTotal ;
/**
* 支部小组总数
*/
private Integer branchTotal ;
}

75
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridHotTopicResultDTO.java

@ -0,0 +1,75 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格热议话题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class GridHotTopicResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 话题状态热议中:hot_discuss
*/
private String status;
/**
* 话题总数
*/
private Integer topicTotal;
/**
* 状态话题数量
*/
private Integer topicCount;
}

185
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridIssueResultDTO.java

@ -0,0 +1,185 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格议题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class GridIssueResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 当日议题增量
*/
private Integer issueIncr;
/**
* 议题总数
*/
private Integer issueTotal ;
/**
* 当日已转项目的议题数增量
*/
private Integer shiftProjectIncr ;
/**
* 已转项目的议题总数
*/
private Integer shiftProjectTotal ;
/**
* 已转项目所占百分比
*/
private Integer shiftProjectPercent ;
/**
* 当日表决中议题数增量
*/
private Integer votingIncr ;
/**
* 表决中议题总数
*/
private Integer votingTotal ;
/**
* 表决中议题所占百分比
*/
private Integer votingPercent ;
/**
* 当日已关闭议题数增量
*/
private Integer closedIncr ;
/**
* 当日已关闭议题中已解决数量
*/
private Integer closedResolvedIncr ;
/**
* 当日已关闭议题中无需解决数量
*/
private Integer closedUnresolvedIncr ;
/**
* 已关闭议题总数
*/
private Integer closedTotal ;
/**
* 已关闭议题中已解决总数
*/
private Integer closedResolvedTotal ;
/**
* 已关闭议题中未解决总数
*/
private Integer closedUnresolvedTotal ;
/**
* 已关闭议题所占百分比
*/
private Integer closedPercent ;
/**
* 已关闭议题中已解决百分比
*/
private Integer closedResolvedPercent ;
/**
* 已关闭议题中未解决百分比
*/
private Integer closedUnresolvedPercent ;
/**
* 当日已结案议题数
*/
private Integer closedCaseIncr ;
/**
* 当日已结案议题中已解决数
*/
private Integer closedCaseResolvedIncr ;
/**
* 当日已结案议题中未解决数
*/
private Integer closedCaseUnresolvedIncr ;
/**
* 已结案议题总数
*/
private Integer closedCaseTotal ;
/**
* 已结案议题中已解决总数
*/
private Integer closedCaseResolvedTotal ;
/**
* 已结案议题中未解决总数
*/
private Integer closedCaseUnresolvedTotal ;
/**
* 已结案议题中已解决百分比
*/
private Integer closedCaseResolvedPercent ;
/**
* 已结案议题中已解决百分比
*/
private Integer 已结案议题中未解决百分比 ;
}

68
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicIssueResultDTO.java

@ -0,0 +1,68 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格话题转议题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class GridTopicIssueResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 当日新增转议题数
*/
private Integer issueIncr;
/**
* 转议题总数
*/
private Integer issueTotal ;
}

80
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridTopicStatusResultDTO.java

@ -0,0 +1,80 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格状态话题数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class GridTopicStatusResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格id
*/
private String gridId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 话题状态ID [讨论中: discussi ;已屏蔽 : hidden ;已关闭:closed]
*/
private String topicStatusId;
/**
* 话题数量
*/
private Integer topicCount;
/**
* 话题状态占比 指定状态话题数/话题总数
*/
private String topicProportion;
/**
* 话题增量
*/
private Integer topicIncrement;
}

110
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridUserResultDTO.java

@ -0,0 +1,110 @@
package com.elink.esua.epdc.dto.screen.result;
import lombok.Data;
import java.io.Serializable;
/**
* 网格注册用户数据
* @Auther: songyunpeng
* @Date: 2021-06-25 09:59
*/
@Data
public class GridUserResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id
*/
private String customerId;
/**
* 机关id:网格所属的组织id
*/
private String agencyId;
/**
* 网格ID
*/
private String gridId;
/**
* 日期ID
*/
private String dateId;
/**
* 周ID
*/
private String weekId;
/**
* 月ID
*/
private String monthId;
/**
* 季度ID
*/
private String quarterId;
/**
* 年ID
*/
private String yearId;
/**
* 注册用户总数
*/
private Integer regTotal;
/**
* 居民总数居民总数=注册用户数
*/
private Integer resiTotal ;
/**
* 热心居民总数
*/
private Integer warmHeartedTotal ;
/**
* 党员总数
*/
private Integer partymemberTotal ;
/**
* 本日注册居民日增量
*/
private Integer regIncr ;
/**
* 本日热心居民日增量
*/
private Integer warmIncr ;
/**
* 本日党员认证日增量
*/
private Integer partymemberIncr ;
/**
* 居民总数占比居民总数/居民总数
*/
private Integer resiProportion ;
/**
* 党员总数占比党员总数/居民总数
*/
private Integer partymemberProportion ;
/**
* 热心居民占比热心居民数/居民总数
*/
private Integer warmHeartedProportion ;
}

7
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UploadProjectInfoDTO.java

@ -108,4 +108,11 @@ public class UploadProjectInfoDTO implements Serializable {
*/
private String projectLevel;
/**
* 满意度得分
*/
private Integer satisfactionScore;
}

4
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/UserjoinResultDTO.java

@ -51,12 +51,12 @@ public class UserjoinResultDTO implements Serializable {
/**
* 平均参与度
*/
private Integer avgJoin;
private Double avgJoin;
/**
* 人均议题
*/
private Integer avgIssue;
private Double avgIssue;
private String areaCode;
private Integer avgIssueFz;
private Integer avgIssueFm;

190
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenBaseReportDataController.java

@ -0,0 +1,190 @@
package com.elink.esua.epdc.modules.screen.controller;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.modules.screen.service.ScreenBaseReportDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author songyunpeng
* @Description 平阴-大屏基础信息上报
* @create 2021-06-25
*/
@RestController
@RequestMapping("screenBaseReport")
public class ScreenBaseReportDataController {
@Autowired
private ScreenBaseReportDataService screenBaseReportDataService;
/**
* @Description 网格状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("gridtopicstatus")
Result gridTopicStatus(){
return screenBaseReportDataService.gridTopicStatus();
};
/**
* @Description 组织状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("agencytopicstatus")
Result agencyTopicStatus(){
return screenBaseReportDataService.agencyTopicStatus();
};
/**
* @Description 网格话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("gridtopicissue")
Result gridTopicIssue(){
return screenBaseReportDataService.gridTopicIssue();
};
/**
* @Description 组织话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("agencytopicissue")
Result agencyTopicIssue(){
return screenBaseReportDataService.agencyTopicIssue();
};
/**
* @Description 网格项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("gridproject")
Result selectGridProjectList(){
return screenBaseReportDataService.selectGridProjectList();
};
/**
* @Description 组织项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("agencyproject")
Result selectCommunityProjectList(){
return screenBaseReportDataService.selectCommunityProjectList();
};
/**
* @Description 网格群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("gridgrouptotal")
Result selectGridGroupTotalList(){
return screenBaseReportDataService.selectGridGroupTotalList();
};
/**
* @Description 组织群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("agencygrouptotal")
Result selectCommunityGroupTotalList(){
return screenBaseReportDataService.selectCommunityGroupTotalList();
};
/**
* @Description 网格热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("gridhottopic")
Result selectGridHotTopic(){
return screenBaseReportDataService.selectGridHotTopic();
};
/**
* @Description 组织热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("agencyhottopic")
Result selectAgencyHotTopic(){
return screenBaseReportDataService.selectAgencyHotTopic();
};
/**
* @Description 网格议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("gridissue")
Result selectGridIssue(){
return screenBaseReportDataService.selectGridIssue();
};
/**
* @Description 组织议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("agencyissue")
Result selectAgencyIssue(){
return screenBaseReportDataService.selectAgencyIssue();
};
/**
* @Description 网格注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("gridreguser")
Result selectGridRegUser(){
return screenBaseReportDataService.selectGridRegUser();
};
/**
* @Description 组织注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("agencyreguser")
Result selectAgencyRegUser(){
return screenBaseReportDataService.selectAgencyRegUser();
};
}

172
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenBaseReportDataDao.java

@ -0,0 +1,172 @@
package com.elink.esua.epdc.modules.screen.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.screen.form.ScreenBaseReportDataFormDTO;
import com.elink.esua.epdc.dto.screen.result.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Description 平阴-大屏基础信息上报
* @Author songyunpeng
* @Date 2021/6/25
**/
@Mapper
public interface ScreenBaseReportDataDao extends BaseDao<ScreenBaseReportDataFormDTO> {
/**
* @Description 网格状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.GridTopicStatusResultDTO>
**/
List<GridTopicStatusResultDTO> selectGridTopicStatusList(@Param("customId")String customId);
/**
* @Description 社区状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.GridTopicStatusResultDTO>
**/
List<CommunityTopicStatusResultDTO> selectCommunityTopicStatusList(@Param("customId")String customId);
/**
* @Description 网格话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.GridTopicIssueResultDTO>
**/
List<GridTopicIssueResultDTO> selectGridTopicIssueList(@Param("customId")String customId);
/**
* @Description 社区话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.GridTopicIssueResultDTO>
**/
List<CommunityTopicIssueResultDTO> selectCommunityTopicIssueList(@Param("customId")String customId);
/**
* @Description 网格项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.GridGridProjectResultDTO>
**/
List<GridGridProjectResultDTO> selectGridProjectList(@Param("customId")String customId);
/**
* @Description 组织项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityProjectResultDTO>
**/
List<CommunityProjectResultDTO> selectCommunityProjectList(@Param("customId")String customId);
/**
* @Description 网格群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.GridGroupTotalResultDTO>
**/
List<GridGroupTotalResultDTO> selectGridGroupTotalList(@Param("customId")String customId);
/**
* @Description 组织群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<CommunityGroupTotalResultDTO> selectCommunityGroupTotalList(@Param("customId")String customId);
/**
* @Description 网格热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<GridHotTopicResultDTO> selectGridHotTopic(@Param("customId")String customId);
/**
* @Description 组织热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<CommunityHotTopicResultDTO> selectAgencyHotTopic(@Param("customId")String customId);
/**
* @Description 网格议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<GridIssueResultDTO> selectGridIssue(@Param("customId")String customId);
/**
* @Description 网格议题数据 - 当日新增议题转项目数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<GridIssueResultDTO> selectGridIssueShiftProjectIncr();
/**
* @Description 组织议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<CommunityIssueResultDTO> selectAgencyIssue(@Param("customId")String customId);
/**
* @Description 组织议题数据 - 当日新增议题转项目数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<CommunityIssueResultDTO> selectAgencyIssueShiftProjectIncr();
/**
* @Description 网格注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<GridUserResultDTO> selectGridRegUser(@Param("customId")String customId);
/**
* @Description 组织注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
* @return java.util.List<com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO>
**/
List<CommunityUserResultDTO> selectAgencyRegUser(@Param("customId")String customId);
}

11
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java

@ -101,7 +101,7 @@ public interface ScreenPublicDataDao extends BaseDao<ScreenPublicDataResultDTO>
List<DifficultydataResultDTO> getDifficultydata();
/**
* 007基层治理-公众参与
* 007基层治理-公众参与 -平均议题
* @Params:
* @Return: UserjoinResultDTO
* @Author: wanggongfeng
@ -109,6 +109,15 @@ public interface ScreenPublicDataDao extends BaseDao<ScreenPublicDataResultDTO>
*/
List<UserjoinResultDTO> getUserjoin(@Param("yearMonth")String yearMonth);
/**
* 007基层治理-公众参与 - 平均参与度
* @Params:
* @Return: UserjoinResultDTO
* @Author: wanggongfeng
* @Date: 2020/08/20
*/
List<UserjoinResultDTO> getUserJoinList(@Param("yearMonth")String yearMonth);
/**
* @describe: 008公众参与各类总数 - grid
* @author wangtong

138
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenBaseReportDataService.java

@ -0,0 +1,138 @@
package com.elink.esua.epdc.modules.screen.service;
import com.elink.esua.epdc.commons.tools.utils.Result;
/**
* 平阴-大屏基础信息上报
*
* @Authorsyp
* @Date2021/6/25 18:04
*/
public interface ScreenBaseReportDataService {
/**
* @Description 网格状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result gridTopicStatus();
/**
* @Description 组织状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result agencyTopicStatus();
/**
* @Description 网格话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result gridTopicIssue();
/**
* @Description 组织话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result agencyTopicIssue();
/**
* @Description 网格项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectGridProjectList();
/**
* @Description 组织项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectCommunityProjectList();
/**
* @Description 网格群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectGridGroupTotalList();
/**
* @Description 组织群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectCommunityGroupTotalList();
/**
* @Description 网格热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectGridHotTopic();
/**
* @Description 组织热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectAgencyHotTopic();
/**
* @Description 网格议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectGridIssue();
/**
* @Description 组织议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectAgencyIssue();
/**
* @Description 网格注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectGridRegUser();
/**
* @Description 组织注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
Result selectAgencyRegUser();
}

164
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenBaseReportDataServiceImpl.java

@ -0,0 +1,164 @@
package com.elink.esua.epdc.modules.screen.service.impl;
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl;
import com.elink.esua.epdc.commons.tools.constant.EpmetConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.screen.form.ScreenBaseReportDataFormDTO;
import com.elink.esua.epdc.dto.screen.result.*;
import com.elink.esua.epdc.modules.screen.dao.ScreenBaseReportDataDao;
import com.elink.esua.epdc.modules.screen.service.ScreenBaseReportDataService;
import com.elink.esua.epdc.utils.EpmetUtils;
import com.elink.esua.epdc.utils.ScreenDataUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Authorliuchuang
* @Date2020/9/9 18:05
*/
@Service
public class ScreenBaseReportDataServiceImpl extends BaseServiceImpl<ScreenBaseReportDataDao, ScreenBaseReportDataFormDTO> implements ScreenBaseReportDataService {
@Autowired
private EpmetUtils epmetUtils;
@Value("${epmet.config.customerId}")
private String customerId;
@Override
public Result gridTopicStatus() {
List<GridTopicStatusResultDTO> gridTopicStatusResultDTOS = baseDao.selectGridTopicStatusList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(gridTopicStatusResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_GRID_TOPIC_STATUS, dataJson);
return new Result();
}
@Override
public Result agencyTopicStatus() {
List<CommunityTopicStatusResultDTO> communityTopicStatusResultDTOS = baseDao.selectCommunityTopicStatusList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(communityTopicStatusResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGENCY_TOPIC_STATUS, dataJson);
return new Result(); }
@Override
public Result gridTopicIssue() {
List<GridTopicIssueResultDTO> gridTopicIssueResultDTOS = baseDao.selectGridTopicIssueList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(gridTopicIssueResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_GRID_TOPIC_ISSUE, dataJson);
return new Result(); }
@Override
public Result agencyTopicIssue() {
List<CommunityTopicIssueResultDTO> communityTopicIssueResultDTOS = baseDao.selectCommunityTopicIssueList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(communityTopicIssueResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGNENCY_TOPIC_ISSUE, dataJson);
return new Result(); }
@Override
public Result selectGridProjectList() {
List<GridGridProjectResultDTO> gridGridProjectResultDTOS = baseDao.selectGridProjectList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(gridGridProjectResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_GRID_PROJECT, dataJson);
return new Result();
}
@Override
public Result selectCommunityProjectList() {
List<CommunityProjectResultDTO> communityProjectResultDTOS = baseDao.selectCommunityProjectList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(communityProjectResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGENCY_PROJECT, dataJson);
return new Result();
}
@Override
public Result selectGridGroupTotalList() {
List<GridGroupTotalResultDTO> gridGroupTotalResultDTOS = baseDao.selectGridGroupTotalList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(gridGroupTotalResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_GRID_GROUP_TOTAL, dataJson);
return new Result();
}
@Override
public Result selectCommunityGroupTotalList() {
List<CommunityGroupTotalResultDTO> communityGroupTotalResultDTOS = baseDao.selectCommunityGroupTotalList(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(communityGroupTotalResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGENCY_GROUP_TOTAL, dataJson);
return new Result();
}
@Override
public Result selectGridHotTopic() {
List<GridHotTopicResultDTO> gridHotTopicResultDTOS = baseDao.selectGridHotTopic(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(gridHotTopicResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_GRID_HOT_TOPIC, dataJson);
return new Result(); }
@Override
public Result selectAgencyHotTopic() {
List<CommunityHotTopicResultDTO> communityHotTopicResultDTOS = baseDao.selectAgencyHotTopic(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(communityHotTopicResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGENCY_HOT_TOPIC, dataJson);
return new Result(); }
@Override
public Result selectGridIssue() {
List<GridIssueResultDTO> gridIssueResultDTOS = baseDao.selectGridIssue(customerId);
//由于数据量大,字段单独处理
List<GridIssueResultDTO> shiftProjectIncrs = baseDao.selectGridIssueShiftProjectIncr();
for (GridIssueResultDTO gridIssueResultDTO : gridIssueResultDTOS) {
for (GridIssueResultDTO shiftProjectIncr : shiftProjectIncrs) {
if(gridIssueResultDTO.getGridId().equals(shiftProjectIncr.getGridId()) ){
gridIssueResultDTO.setShiftProjectIncr(shiftProjectIncr.getShiftProjectIncr());
}
}
}
String dataJson = ScreenDataUtils.getScreenDateJson(gridIssueResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_GRID_ISSUE, dataJson);
return new Result(); }
@Override
public Result selectAgencyIssue() {
List<CommunityIssueResultDTO> communityIssueResultDTOS = baseDao.selectAgencyIssue(customerId);
//由于数据量大,字段单独处理
List<CommunityIssueResultDTO> shiftProjectIncrs = baseDao.selectAgencyIssueShiftProjectIncr();
for (CommunityIssueResultDTO gridIssueResultDTO : communityIssueResultDTOS) {
for (CommunityIssueResultDTO shiftProjectIncr : shiftProjectIncrs) {
if(gridIssueResultDTO.getAgencyId().equals(shiftProjectIncr.getAgencyId()) ){
gridIssueResultDTO.setShiftProjectIncr(shiftProjectIncr.getShiftProjectIncr());
}
}
}
String dataJson = ScreenDataUtils.getScreenDateJson(communityIssueResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGENCY_ISSUE, dataJson);
return new Result(); }
@Override
public Result selectGridRegUser() {
List<GridUserResultDTO> gridUserResultDTOS = baseDao.selectGridRegUser(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(gridUserResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_GRID_REGISTER_USER, dataJson);
return new Result(); }
@Override
public Result selectAgencyRegUser() {
List<CommunityUserResultDTO> communityUserResultDTOS = baseDao.selectAgencyRegUser(customerId);
String dataJson = ScreenDataUtils.getScreenDateJson(communityUserResultDTOS,true);
// 数据上报
epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_BASE_REPORT_AGENCY_REGISTER_USER, dataJson);
return new Result(); }
}

13
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java

@ -232,7 +232,20 @@ public class ScreenPublicDataServiceImpl extends BaseServiceImpl<ScreenPublicDat
public Result getUserjoin(String yearMonth) {
// 如果统计月份为空,则统计上个月的数据
yearMonth = StringUtils.isEmpty(yearMonth) ? DateUtils.formatYearMonth2(DateUtils.addDateMonths(new Date(),-1)) : yearMonth;
//获取人均议题 ,总的参与次数,
List<UserjoinResultDTO> list = baseDao.getUserjoin(yearMonth);
//获取平均参与度
List<UserjoinResultDTO> joinList = baseDao.getUserJoinList(yearMonth);
for (UserjoinResultDTO userjoinResultDTO : joinList) {
for (UserjoinResultDTO resultDTO : list) {
if(resultDTO.getOrgId().equals(userjoinResultDTO.getOrgId())){
resultDTO.setAvgJoin(userjoinResultDTO.getAvgJoin());
resultDTO.setAvgJoinFz(userjoinResultDTO.getAvgJoinFz());
resultDTO.setAvgJoinFm(userjoinResultDTO.getAvgJoinFm());
}
}
}
// 将list转换为json格式
if(list != null && list.size()>0) {
UserjoinDTO result = new UserjoinDTO();

2
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application.yml

@ -62,8 +62,6 @@ mybatis-plus:
map-underscore-to-camel-case: true
cache-enabled: false
call-setters-on-nulls: true
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
epmet:
config:

793
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenBaseReportDataDao.xml

@ -0,0 +1,793 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.elink.esua.epdc.modules.screen.dao.ScreenBaseReportDataDao">
<select id="selectGridTopicStatusList"
resultType="com.elink.esua.epdc.dto.screen.result.GridTopicStatusResultDTO">
select t.*,
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId
from
(
select
grid.pid as agencyId,
grid.id as gridId,
'discussi' as topicStatusId,
count(et.STATE = 0 or null) as topicCount,
ifnull(round(ifnull(count(et.STATE = 0 or null), 0) / ifnull(count(et.ID), 0),2),0) as topicProportion,
ifnull(count(et.STATE = 0 and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as topicIncrement
from esua_epdc_admin.sys_dept grid
left join esua_epdc_party_group.epdc_party_topic et on et.GRID_ID = grid.ID and et.DEL_FLAG = '0'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where grid.del_flag = '0'
and grid.type_key = 'grid_party'
and grid.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by grid.id
union all
select
grid.pid as agencyId,
grid.id as gridId,
'hidden' as topicStatusId,
count(et.SHIELD_FLAG = 1 or null) as topicCount,
ifnull(round(ifnull(count(et.SHIELD_FLAG = 1 or null), 0) / ifnull(count(et.ID), 0),2),0) as topicProportion,
ifnull(count(et.SHIELD_FLAG = 1 and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0)
from esua_epdc_admin.sys_dept grid
left join esua_epdc_party_group.epdc_party_topic et on et.GRID_ID = grid.ID and et.DEL_FLAG = '0'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where grid.del_flag = '0'
and grid.type_key = 'grid_party'
and grid.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by grid.id
union all
select
grid.pid as agencyId,
grid.id as gridId,
'closed' as topicStatusId,
count(et.STATE = 20 or null) as topicCount,
ifnull(round(ifnull(count(et.STATE = 20 or null), 0) / ifnull(count(et.ID), 0),2),0) as topicProportion,
ifnull(count(et.STATE = 20 and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as topicIncrement
from esua_epdc_admin.sys_dept grid
left join esua_epdc_party_group.epdc_party_topic et on et.GRID_ID = grid.ID and et.DEL_FLAG = '0'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where grid.del_flag = '0'
and grid.type_key = 'grid_party'
and grid.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by grid.id
)t
</select>
<select id="selectCommunityTopicStatusList"
resultType="com.elink.esua.epdc.dto.screen.result.CommunityTopicStatusResultDTO">
select t.*,
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId
from
(
select
sd.id as agencyId,
sd.pid as pid,
'discussi' as topicStatusId,
count(et.STATE = 0 or null) as topicCount,
ifnull(round(ifnull(count(et.STATE = 0 or null), 0) / ifnull(count(et.ID), 0),2),0) as topicProportion,
ifnull(count(et.STATE = 0 and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as topicIncrement
from esua_epdc_admin.sys_dept sd
left join `esua_epdc_party_group`.epdc_party_topic et on find_in_set(sd.id,et.ALL_DEPT_IDS) and et.DEL_FLAG = '0'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where sd.del_flag = '0'
and sd.type_key in( 'community_party','street_party')
and sd.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by sd.id
union all
select
sd.id as agencyId,
sd.pid as pid,
'hidden' as topicStatusId,
count(et.SHIELD_FLAG = 1 or null) as topicCount,
ifnull(round(ifnull(count(et.SHIELD_FLAG = 1 or null), 0) / ifnull(count(et.ID), 0),2),0) as topicProportion,
ifnull(count(et.SHIELD_FLAG = 1 and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as topicIncrement
from esua_epdc_admin.sys_dept sd
left join `esua_epdc_party_group`.epdc_party_topic et on find_in_set(sd.id,et.ALL_DEPT_IDS) and et.DEL_FLAG = '0'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where sd.del_flag = '0'
and sd.type_key in( 'community_party','street_party')
and sd.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by sd.id
union all
select
sd.id as agencyId,
sd.pid as pid,
'hidden' as topicStatusId,
count(et.STATE = 20 or null) as topicCount,
ifnull(round(ifnull(count(et.STATE = 20 or null), 0) / ifnull(count(et.ID), 0),2),0) as topicProportion,
ifnull(count(et.STATE = 20 and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as topicIncrement
from esua_epdc_admin.sys_dept sd
left join `esua_epdc_party_group`.epdc_party_topic et on find_in_set(sd.id,et.ALL_DEPT_IDS) and et.DEL_FLAG = '0'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where sd.del_flag = '0'
and sd.type_key in( 'community_party','street_party')
and sd.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by sd.id
)t;
</select>
<select id="selectGridTopicIssueList"
resultType="com.elink.esua.epdc.dto.screen.result.GridTopicIssueResultDTO">
select
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId,
grid.pid as agencyId,
grid.id as gridId,
ifnull(count(et.ID),0) as issueTotal,
ifnull((count(DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null)),0) as issueIncr
from esua_epdc_admin.sys_dept grid
left join esua_epdc_party_group.epdc_party_topic et on et.GRID_ID = grid.ID and et.DEL_FLAG = '0' and et.PARTY_MEMBER = '1'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where grid.del_flag = '0'
and grid.type_key = 'grid_party'
and grid.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by grid.id;
</select>
<select id="selectCommunityTopicIssueList"
resultType="com.elink.esua.epdc.dto.screen.result.CommunityTopicIssueResultDTO">
select
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId,
sd.id as agencyId,
sd.pid as pid,
ifnull(count(et.ID),0) as issueTotal,
ifnull((count(DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null)),0) as issueIncr
from esua_epdc_admin.sys_dept sd
left join esua_epdc_party_group.epdc_party_topic et on find_in_set(sd.id,et.ALL_DEPT_IDS) and et.DEL_FLAG = '0' and et.`PARTY_MEMBER` = '1'
and DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
where sd.del_flag = '0'
and sd.type_key in ( 'street_party', 'community_party' )
and sd.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
group by sd.id;
</select>
<select id="selectGridProjectList"
resultType="com.elink.esua.epdc.dto.screen.result.GridGridProjectResultDTO">
select
grid.id as gridId,
grid.pid as agencyId,
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId,
ifnull(count(ei.ID),0) as projectTotal,
ifnull(count(ei.ITEM_STATE = '0' or null),0) as pendingTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '0' or null),0) / ifnull(count(ei.ID),0) * 100),0) as pendingRatio,
ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) as closedTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) / ifnull(count(ei.ID),0) * 100),0) as closedRatio,
ifnull(count(ei.ITEM_STATE = '10' or null),0) as resolvedTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '10' or null),0) / ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) * 100),0) as resolvedRatio,
ifnull(count(ei.ITEM_STATE = '5' or null),0) as unresolvedTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '5' or null),0) / ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) * 100),0) as unresolvedRatio,
ifnull(count(ei.ITEM_STATE = '10' and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as resolvedIncr,
ifnull(count(ei.ITEM_STATE = '5' and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as unresolvedIncr,
ifnull(count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as projectIncr,
ifnull(count(ei.ITEM_STATE = '0' and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as pendingIncr,
ifnull(count((ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5') and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as closedIncr
from esua_epdc_admin.sys_dept grid
left join esua_epdc_events.epdc_item ei on ei.GRID_ID = grid.id and ei.DEL_FLAG ='0'
where grid.del_flag = '0'
and grid.type_key = 'grid_party'
and grid.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
group by grid.id
</select>
<select id="selectCommunityProjectList"
resultType="com.elink.esua.epdc.dto.screen.result.CommunityProjectResultDTO">
select
sd.id as agencyId,
sd.pid as parentId,
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId,
ifnull(count(ei.ID),0) as projectTotal,
ifnull(count(ei.ITEM_STATE = '0' or null),0) as pendingTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '0' or null),0) / ifnull(count(ei.ID),0) * 100),0) as pendingRatio,
ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) as closedTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) / ifnull(count(ei.ID),0) * 100),0) as closedRatio,
ifnull(count(ei.ITEM_STATE = '10' or null),0) as resolvedTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '10' or null),0) / ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) * 100),0) as resolvedRatio,
ifnull(count(ei.ITEM_STATE = '5' or null),0) as unresolvedTotal,
ifnull(round(ifnull(count(ei.ITEM_STATE = '5' or null),0) / ifnull(count(ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5' or null),0) * 100),0) as unresolvedRatio,
ifnull(count(ei.ITEM_STATE = '10' and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as resolvedIncr,
ifnull(count(ei.ITEM_STATE = '5' and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as unresolvedIncr,
ifnull(count(DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as projectIncr,
ifnull(count(ei.ITEM_STATE = '0' and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as pendingIncr,
ifnull(count((ei.ITEM_STATE = '10' or ei.ITEM_STATE = '5') and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') = DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d') or null),0) as closedIncr
from esua_epdc_admin.sys_dept sd
left join esua_epdc_events.epdc_item ei on find_in_set(sd.id,ei.ALL_DEPT_IDS) and ei.DEL_FLAG ='0'
where sd.del_flag = '0'
and sd.type_key in ( 'street_party', 'community_party' )
and sd.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
and DATE_FORMAT(ei.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
group by sd.id;
</select>
<select id="selectGridGroupTotalList"
resultType="com.elink.esua.epdc.dto.screen.result.GridGroupTotalResultDTO">
select grid.id as gridId,
grid.pid as agencyId,
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId,
ifnull(community.groupTotal,0) as groupTotal,
ifnull(community.ordinaryTotal,0) as ordinaryTotal,
ifnull(community.branchTotal,0) as branchTotal
from esua_epdc_admin.sys_dept grid
left join
(
select community.id as communityId,
count(eg.ID) as groupTotal,
count(eg.ID) as ordinaryTotal,
0 as branchTotal
from esua_epdc_admin.sys_dept community
left join esua_epdc_party_group.epdc_party_group eg
on eg.`DEPT_ID` = community.id and eg.DEL_FLAG = '0'
where community.del_flag = '0'
and community.type_key = 'community_party'
and community.id not in
(SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
and DATE_FORMAT(eg.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
group by community.id) community on community.communityId = grid.pid
where grid.del_flag = '0' and grid.type_key = 'grid_party'
and grid.id not in
(SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
</select>
<select id="selectCommunityGroupTotalList"
resultType="com.elink.esua.epdc.dto.screen.result.CommunityGroupTotalResultDTO">
select
sd.id as agencyId,
sd.pid as pid,
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), interval -1 day), '%Y%m%d') as dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'W',
WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y'), '%Y'),
'Q',
QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'),
'%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId,
count(eg.ID) as groupTotal,
count(eg.ID) as ordinaryTotal,
0 as branchTotal
from esua_epdc_admin.sys_dept sd
left join `esua_epdc_party_group`.`epdc_party_group` eg on find_in_set(sd.id,eg.ALL_DEPT_IDS) and eg.DEL_FLAG ='0'
where
sd.del_flag = '0'
and sd.type_key in ( 'street_party', 'community_party' )
and sd.id not in (SELECT t.DEPT_ID FROM `esua_epdc_admin`.`sys_dept_config` t WHERE t.DEL_FLAG = '0')
and DATE_FORMAT(eg.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), interval -1 day), '%Y-%m-%d')
group by sd.id;
</select>
<select id="selectGridHotTopic" resultType="com.elink.esua.epdc.dto.screen.result.GridHotTopicResultDTO">
SELECT
'${customId}' as customerId,
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y%m%d'
) AS dateId,
CONCAT(
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y'
),
'%Y'
),
'W',
WEEK (
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y-%m-%d'
)
)
) weekId,
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y'
),
'%Y'
) AS yearId,
CONCAT(
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y'
),
'%Y'
),
'Q',
QUARTER (
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y-%m-%d'
)
)
) quarterId,
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y-%m'
),
'%Y%m'
) AS monthId,
sd.id AS gridId,
sd.pid AS agencyId,
IFNULL(COUNT(et.id), 0) AS topicTotal,
'hot_discuss' AS STATUS,
IFNULL(
SUM(
CASE
WHEN et.STATE = '0' THEN
1
ELSE
0
END
),
0
) AS topicCount
FROM
esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_party_group.epdc_party_topic et ON sd.id = et.GRID_ID
AND et.DEL_FLAG = '0'
AND DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
)
WHERE
sd.del_flag = '0'
AND sd.type_key = 'grid_party'
AND sd.id NOT IN (
SELECT
t.dept_id
FROM
esua_epdc_admin.sys_dept_config t
WHERE
t.del_flag = '0'
)
GROUP BY
sd.id
</select>
<select id="selectAgencyHotTopic"
resultType="com.elink.esua.epdc.dto.screen.result.CommunityHotTopicResultDTO">
SELECT
'${customId}' as customerId,
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y%m%d'
) AS dateId,
CONCAT(
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y'
),
'%Y'
),
'W',
WEEK (
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y-%m-%d'
)
)
) weekId,
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y'
),
'%Y'
) AS yearId,
CONCAT(
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y'
),
'%Y'
),
'Q',
QUARTER (
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y-%m-%d'
)
)
) quarterId,
DATE_FORMAT(
STR_TO_DATE(
DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
),
'%Y-%m'
),
'%Y%m'
) AS monthId,
sd.id AS agencyId,
sd.pid AS pid,
IFNULL(COUNT(et.id), 0) AS topicTotal,
'hot_discuss' AS STATUS,
IFNULL(
SUM(
CASE
WHEN et.STATE = '0' THEN
1
ELSE
0
END
),
0
) AS topicCount
FROM
esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_party_group.epdc_party_topic et ON find_in_set(sd.`id`, et.`ALL_DEPT_IDS`)
AND et.DEL_FLAG = '0'
AND DATE_FORMAT(et.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(
date_add(now(), INTERVAL - 1 DAY),
'%Y-%m-%d'
)
WHERE
sd.del_flag = '0'
AND sd.type_key IN (
'community_party',
'street_party'
)
AND sd.id NOT IN (
SELECT
t.dept_id
FROM
esua_epdc_admin.sys_dept_config t
WHERE
t.del_flag = '0'
)
GROUP BY
sd.id
</select>
<select id="selectGridIssue" resultType="com.elink.esua.epdc.dto.screen.result.GridIssueResultDTO">
SELECT
'${customId}' as customerId,
t.*,
IFNULL(ROUND(t.shiftProjectTotal / t.issueTotal, 6), 0) AS shiftProjectPercent,
IFNULL(t.closedIncr, 0) AS closedResolvedIncr,
0 AS closedUnresolvedIncr,
IFNULL(t.closedTotal, 0) AS closedResolvedTotal,
0 AS closedUnresolvedTotal,
1 AS closedPercent,
0 AS closedResolvedPercent,
0 AS closedUnresolvedPercent,
0 AS closedCaseIncr,
0 AS closedCaseResolvedIncr,
0 AS closedCaseUnresolvedIncr,
0 AS closedCaseTotal,
0 AS closedCaseResolvedTotal,
0 AS closedCaseUnresolvedTotal,
0 AS closedCaseResolvedPercent,
0 AS closedCaseUnresolvedPercent
FROM(
SELECT DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y%m%d') AS dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y'), 'W', WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y'), 'Q', QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m-%d'))) quarterId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId,
sd.id AS gridId,
sd.pid AS agencyId,
IFNULL(COUNT(eis.id), 0) AS issueTotal,
IFNULL(SUM(IF(DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d') =
DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), 1, 0)), 0) AS issueIncr,
IFNULL(SUM(IF(eis.issue_state = '4', 1, 0)), 0) AS shiftProjectTotal,
0 AS votingIncr,
0 AS votingTotal,
0 AS votingPercent,
IFNULL(SUM(IF(DATE_FORMAT(eis.UPDATED_TIME, '%Y-%m-%d') =
DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
AND eis.ISSUE_STATE = '2', 1, 0)), 0) AS closedIncr,
IFNULL(SUM(IF(eis.issue_state = '2', 1, 0)), 0) AS closedTotal
FROM esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_events.epdc_issue eis ON sd.id= eis.GRID_ID
AND eis.DEL_FLAG= '0'
AND DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
WHERE sd.del_flag= '0'
AND sd.type_key= 'grid_party'
AND sd.id NOT IN(
SELECT t.dept_id
FROM esua_epdc_admin.sys_dept_config t
WHERE t.del_flag= '0')
GROUP BY sd.id) t
</select>
<select id="selectGridIssueShiftProjectIncr"
resultType="com.elink.esua.epdc.dto.screen.result.GridIssueResultDTO">
select
sd.id AS gridId,
ifnull(count(DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d') =
DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') or null) ,0) as shiftProjectIncr
FROM esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_events.epdc_item eis ON sd.id= eis.GRID_ID
AND eis.DEL_FLAG= '0'
AND DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
WHERE sd.del_flag= '0'
AND sd.type_key= 'grid_party'
AND sd.id NOT IN(
SELECT t.dept_id
FROM esua_epdc_admin.sys_dept_config t
WHERE t.del_flag= '0')
GROUP BY sd.id
</select>
<select id="selectAgencyIssue" resultType="com.elink.esua.epdc.dto.screen.result.CommunityIssueResultDTO">
SELECT t.*,
'${customId}' as customerId,
IFNULL(ROUND(t.shiftProjectTotal / t.issueTotal, 6), 0) AS shiftProjectPercent,
IFNULL(t.closedIncr, 0) AS closedResolvedIncr,
0 AS closedUnresolvedIncr,
IFNULL(t.closedTotal, 0) AS closedResolvedTotal,
0 AS closedUnresolvedTotal,
1 AS closedPercent,
0 AS closedResolvedPercent,
0 AS closedUnresolvedPercent,
0 AS closedCaseIncr,
0 AS closedCaseResolvedIncr,
0 AS closedCaseUnresolvedIncr,
0 AS closedCaseTotal,
0 AS closedCaseResolvedTotal,
0 AS closedCaseUnresolvedTotal,
0 AS closedCaseResolvedPercent,
0 AS closedCaseUnresolvedPercent
FROM(
SELECT DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y%m%d') AS dateId, CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y'), 'W', WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m-%d'))) weekId, DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y') AS yearId, CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y'), 'Q', QUARTER(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m-%d'))) quarterId, DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m'), '%Y%m') AS monthId, sd.id AS agencyId, sd.pid AS pid, IFNULL(COUNT(eis.id), 0) AS issueTotal, IFNULL(SUM(CASE WHEN DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') THEN 1 ELSE 0 END), 0) AS issueIncr,
IFNULL(SUM(CASE WHEN eis.issue_state= '4' THEN 1 ELSE 0 END), 0) AS shiftProjectTotal, 0 AS votingIncr, 0 AS votingTotal, 0 AS votingPercent, IFNULL(SUM(CASE WHEN DATE_FORMAT(eis.UPDATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
AND eis.ISSUE_STATE= '2' THEN 1 ELSE 0 END), 0) AS closedIncr, IFNULL(SUM(CASE WHEN eis.issue_state= '2' THEN 1 ELSE 0 END), 0) AS closedTotal
FROM esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_events.epdc_issue eis ON find_in_set(sd.`id`, eis.`ALL_DEPT_IDS`)
AND eis.DEL_FLAG= '0'
AND DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
WHERE sd.del_flag= '0'
AND sd.type_key IN('community_party','street_party')
AND sd.id NOT IN(
SELECT t.dept_id
FROM esua_epdc_admin.sys_dept_config t
WHERE t.del_flag= '0')
GROUP BY sd.id) t
</select>
<select id="selectAgencyIssueShiftProjectIncr"
resultType="com.elink.esua.epdc.dto.screen.result.CommunityIssueResultDTO">
select
sd.id AS agencyId,
ifnull(count(DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d') =
DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') or null) ,0) as shiftProjectIncr
FROM esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_events.`epdc_item` eis ON find_in_set(sd.`id`, eis.`ALL_DEPT_IDS`)
AND eis.DEL_FLAG= '0'
AND DATE_FORMAT(eis.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
WHERE sd.del_flag= '0'
AND sd.type_key IN('community_party','street_party')
AND sd.id NOT IN(
SELECT t.dept_id
FROM esua_epdc_admin.sys_dept_config t
WHERE t.del_flag= '0')
GROUP BY sd.id
</select>
<select id="selectGridRegUser" resultType="com.elink.esua.epdc.dto.screen.result.GridUserResultDTO">
SELECT
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y%m%d') AS dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y'), 'W', WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
sd.id AS gridId,
sd.pid AS agencyId,
COUNT(eu.id) AS regTotal,
COUNT(eu.id) AS resiTotal,
SUM(CASE WHEN eu.PARTY_FLAG= '0' THEN 1 ELSE 0 END) AS warmHeartedTotal,
SUM(CASE WHEN eu.PARTY_FLAG= '1' THEN 1 ELSE 0 END) AS partymemberTotal,
SUM(CASE WHEN DATE_FORMAT(r.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') THEN 1 ELSE 0 END) AS regIncr,
SUM(CASE WHEN eu.PARTY_FLAG= '0'
AND DATE_FORMAT(r.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') THEN 1 ELSE 0 END) AS warmIncr,
SUM(CASE WHEN ua.AUTHENTICATED_TYPE= '1'
AND ua.AUTHENTICATED_FLAG= '1'
AND DATE_FORMAT(ua.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') THEN 1 ELSE 0 END) AS partymemberIncr,
COUNT(eu.id) / COUNT(eu.id) AS resiProportion,
ROUND(SUM(CASE WHEN eu.PARTY_FLAG= '1' THEN 1 ELSE 0 END) / COUNT(eu.id), 6) AS partymemberProportion,
ROUND(SUM(CASE WHEN eu.PARTY_FLAG= '0' THEN 1 ELSE 0 END) / COUNT(eu.id), 6) AS warmHeartedProportion
FROM esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_user.epdc_user eu ON sd.id= eu.DEPT_ID
AND eu.STATE= '3'
AND eu.DEL_FLAG= '0'
AND DATE_FORMAT(eu.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
LEFT JOIN esua_epdc_user.epdc_user_authenticate_history ua ON ua.USER_ID= eu.id
LEFT JOIN(
SELECT USER_ID, CREATED_TIME
FROM esua_epdc_user.epdc_user_grid_relation
WHERE DEL_FLAG= '0'
GROUP BY USER_ID
HAVING COUNT(USER_ID)= 1) r ON r.USER_ID= eu.id
WHERE sd.del_flag= '0'
AND sd.type_key= 'grid_party'
AND sd.id NOT IN(
SELECT t.dept_id
FROM esua_epdc_admin.sys_dept_config t
WHERE t.del_flag= '0')
GROUP BY sd.id
</select>
<select id="selectAgencyRegUser" resultType="com.elink.esua.epdc.dto.screen.result.CommunityUserResultDTO">
SELECT
'${customId}' as customerId,
DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y%m%d') AS dateId,
CONCAT(DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y'), 'W', WEEK(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y-%m-%d'))) weekId,
DATE_FORMAT(STR_TO_DATE(DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d'), '%Y'), '%Y') AS yearId,
sd.id AS agencyId,
IFNULL(COUNT(eu.ID), 0) AS regTotal,
IFNULL(COUNT(eu.ID), 0) AS resiTotal,
IFNULL(SUM(CASE WHEN eu.PARTY_FLAG= '0' THEN 1 ELSE 0 END), 0) AS warmHeartedTotal,
IFNULL(SUM(CASE WHEN eu.PARTY_FLAG= '1' THEN 1 ELSE 0 END), 0) AS partymemberTotal,
IFNULL(SUM(CASE WHEN DATE_FORMAT(r.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') THEN 1 ELSE 0 END), 0) AS regIncr,
IFNULL(SUM(CASE WHEN eu.PARTY_FLAG= '0'
AND DATE_FORMAT(r.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') THEN 1 ELSE 0 END), 0) AS warmIncr,
IFNULL(SUM(CASE WHEN ua.AUTHENTICATED_TYPE= '1'
AND ua.AUTHENTICATED_FLAG= '1'
AND DATE_FORMAT(ua.CREATED_TIME, '%Y-%m-%d')= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d') THEN 1 ELSE 0 END), 0) AS partymemberIncr,
IFNULL(COUNT(eu.ID) / COUNT(eu.ID), 0) AS resiProportion,
IFNULL(ROUND(SUM(CASE WHEN eu.PARTY_FLAG= '1' THEN 1 ELSE 0 END) / COUNT(eu.ID), 6), 0) AS partymemberProportion,
IFNULL(ROUND(SUM(CASE WHEN eu.PARTY_FLAG= '0' THEN 1 ELSE 0 END) / COUNT(eu.ID), 6), 0) AS warmHeartedProportion
FROM esua_epdc_admin.sys_dept sd
LEFT JOIN esua_epdc_user.epdc_user eu ON find_in_set(sd.`id`, eu.`ALL_DEPT_IDS`)
AND eu.DEL_FLAG= '0'
AND eu.STATE= '3'
AND DATE_FORMAT(eu.CREATED_TIME, '%Y-%m-%d') &lt;= DATE_FORMAT(date_add(now(), INTERVAL - 1 DAY), '%Y-%m-%d')
LEFT JOIN esua_epdc_user.epdc_user_authenticate_history ua ON ua.USER_ID= eu.id
LEFT JOIN(
SELECT USER_ID, CREATED_TIME
FROM esua_epdc_user.epdc_user_grid_relation
WHERE DEL_FLAG= '0'
GROUP BY USER_ID
HAVING COUNT(USER_ID)= 1) r ON r.USER_ID= eu.id
WHERE sd.del_flag= '0'
AND sd.id NOT IN(
SELECT t.dept_id
FROM esua_epdc_admin.sys_dept_config t
WHERE t.del_flag= '0')
AND sd.type_key IN('community_party','street_party')
GROUP BY sd.id
</select>
</mapper>

9
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

@ -21,6 +21,7 @@
<result property="allCategoryName" column="allCategoryName"/>
<result property="closeCaseTime" column="closeCaseTime"/>
<result property="projectLevel" column="projectLevel"/>
<result property="satisfactionScore" column="satisfactionScore"/>
<collection property="projectImgUrl" ofType="java.lang.String">
<result property="projectImgUrl" column="projectImgUrl"/>
</collection>
@ -49,8 +50,12 @@
when t1.ITEM_STATE = 10 then 3
when t1.ITEM_STATE = 0 and (select COUNT(1) from esua_epdc_events.epdc_item_handle_process where DEL_FLAG ='0' and ITEM_ID = t1.ID) = 1 then 1
when (t1.ITEM_STATE = 0 or t1.ITEM_STATE = 5) and (select COUNT(1) from esua_epdc_events.epdc_item_handle_process where DEL_FLAG ='0' and ITEM_ID = t1.ID) > 1 then 2
else '' end as projectLevel
from (select * from(select * from esua_epdc_events.epdc_item where DEL_FLAG = '0'
else '' end as projectLevel,
case t1.EVALUATION_SCORE
when 0 then 60
when 2 then 100
else 80 end as satisfactionScore
from (select * from(select * from esua_epdc_events.epdc_item where DEL_FLAG = '0'
and GRID_ID not in ( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)

552
esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml

@ -1425,13 +1425,12 @@ select gr.id as orgId,
st.name as orgName,
st.pid as parentId,
'agency' as orgType,
(IFNULL(dg.createGroupTotal,0)) AS createGroupTotal,
(IFNULL(dg.groupUserTotal,0)) AS groupUserTotal,
(IFNULL(sum(dg.createGroupTotal),0)) AS createGroupTotal,
(IFNULL(sum(dg.groupUserTotal),0)) AS groupUserTotal,
DATE_FORMAT(date_add( now( ), INTERVAL - 1 day),'%Y%m%d') as dataEndTime,
st.area_code AS areaCode
from esua_epdc_admin.sys_dept st
left join esua_epdc_admin.sys_dept co on st.id=co.pid
left join esua_epdc_admin.sys_dept gr on co.id=gr.pid
left join
(select eg.DEPT_ID as GRID_ID,
count(eg.id) as createGroupTotal,
@ -1444,11 +1443,11 @@ select gr.id as orgId,
group by PARTY_GROUP_ID)group_user on group_user.PARTY_GROUP_ID = eg.id
where eg.DEL_FLAG=0 and eg.STATE=0
group by eg.DEPT_ID)dg on dg.GRID_ID=co.id
where gr.del_flag=0
and co.del_flag=0
where co.del_flag=0
and st.del_flag=0
and st.type_key='street_party'
group by st.id
GROUP BY st.ID
union all
@ -1980,365 +1979,86 @@ select gr.id as orgId,
</select>
<!-- 007 -->
<select id="getUserjoin" resultType="com.elink.esua.epdc.dto.screen.result.UserjoinResultDTO">
select
t.yearId,
t.monthId,
t.orgType,
t.orgId,
t.parentId,
t.orgName,
t.joinTotal ,
IFNULL(ROUND(t.joinTotal/t.joinUser,0),0) avgJoin,
IFNULL(ROUND(t.issueNum / t.issueJoinUser,0),0) avgIssue,
t.area_code as areaCode,
IFNULL(t.joinTotal,0) as avgIssueFz,
IFNULL(t.joinUser,0) as avgIssueFm,
IFNULL(t.issueNum,0) as avgJoinFz,
IFNULL(t.issueJoinUser,0) as avgJoinFm
from
(
select
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
sd.NAME orgName ,
sd.area_code,
IFNULL(behave.joinTotal,0) joinTotal,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNum
from esua_epdc_admin.sys_dept sd
left join (
select
sum(be.joinUser) joinUser,
sum(be.issueJoinUser) issueJoinUser,
sum(be.joinTotal) joinTotal,
d3.PID DEPT_ID
select
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId,
shoudJoin.id as orgId,
shoudJoin.name as orgName,
shoudJoin.pid as parentId,
case shoudJoin.type_key
when 'grid_party' then 'grid'
when 'community_party' then 'agency'
when 'street_party' then 'agency'
else '' end
as orgType,
shoudJoin.area_code as area_code,
ifnull(round(ifnull(shoudJoin.issueNum,0)/ifnull(shoudJoin.userNum,0) ,2),0) as avgIssue,
ifnull(shoudJoin.issueNum,0) as avgIssueFz,
ifnull(shoudJoin.userNum,0) as avgIssueFm,
(select (sum(APPROVE_NUM) + sum(OPPOSE_NUM) + sum(COMMENT_NUM) + sum(BROWSE_NUM))num from esua_epdc_events.epdc_events where DEL_FLAG = '0'
and DATE_FORMAT(CREATED_TIME, '%Y%m')= #{yearMonth}
)joinTotal,
0 as avgJoin,
0 as avgJoinFz ,
0 as avgJoinFm
from (
SELECT d.id,
d.name,
d.type_key,
COUNT(tmp.EVENT_ID) num
FROM esua_epdc_events.epdc_issue i
LEFT JOIN(
SELECT c.EVENT_ID, c.USER_ID
FROM esua_epdc_events.epdc_event_comment c
WHERE c.DEL_FLAG= '0'
GROUP BY c.EVENT_ID, c.USER_ID
UNION
SELECT a.EVENT_ID, a.USER_ID
FROM esua_epdc_events.epdc_event_user_attitude a
WHERE a.DEL_FLAG= '0'
GROUP BY a.EVENT_ID, a.USER_ID) tmp ON i.EVENT_ID= tmp.EVENT_ID
RIGHT JOIN esua_epdc_admin.sys_dept d ON find_in_set(d.id,i.ALL_DEPT_IDS) and d.DEL_FLAG= 0
WHERE i.DEL_FLAG= '0'
AND DATE_FORMAT(i.CREATED_TIME, '%Y%m')= #{yearMonth} and
d.type_key in('grid_party','community_party','street_party')
GROUP BY d.id) issueJoin
left join (
select user.id,user.name,user.type_key,user.area_code,user.pid, user.userNum * issue.issueNum as total,
user.userNum,issue.issueNum
from
(SELECT
behaviorCount.DEPT_ID,
count( behaviorCount.voiceOpposeFlag + behaviorCount.voiceLikesFlag + behaviorCount.groupPublishFlag
+ behaviorCount.groupLikeFlag + behaviorCount.groupOpposeFlag + behaviorCount.groupJoinFlag
+ behaviorCount.groupCommentFlag + behaviorCount.groupCreateFlag + behaviorCount.eventLikesFlag
+ behaviorCount.eventOpposeFlag + behaviorCount.eventPubilshFlag + behaviorCount.eventCommentFlag
+ behaviorCount.eventEvaFlag > 0 OR NULL ) joinUser,
count( behaviorCount.eventPubilshFlag > 0 OR NULL ) issueJoinUser,
IFNULL(sum(behaviorCount.voiceOpposeFlag)+ sum(behaviorCount.voiceLikesFlag )
+ sum(behaviorCount.groupPublishFlag ) + sum(behaviorCount.groupLikeFlag )
+ sum(behaviorCount.groupOpposeFlag ) + sum(behaviorCount.groupJoinFlag )
+ sum(behaviorCount.groupCommentFlag ) + sum(behaviorCount.groupCreateFlag )
+ sum(behaviorCount.eventLikesFlag ) + sum(behaviorCount.eventOpposeFlag )
+ sum(behaviorCount.eventPubilshFlag ) + sum(behaviorCount.eventCommentFlag )
+ sum(behaviorCount.eventEvaFlag),0) joinTotal
FROM
(
SELECT
USER_ID,
USER.DEPT_ID,
count( behavior.VOICE_OPPOSE_FLAG = 1 OR NULL ) AS voiceOpposeFlag,
count( behavior.VOICE_LIKE_FLAG = 1 OR NULL ) AS voiceLikesFlag,
count( behavior.EVENT_LIKE_FLAG = 1 OR NULL ) AS eventLikesFlag,
count( behavior.EVENT_OPPOSE_FLAG = 1 OR NULL ) AS eventOpposeFlag,
count( behavior.EVENT_PUBLISH_FLAG = 1 OR NULL ) AS eventPubilshFlag,
count( behavior.EVENT_COMMENT_FLAG = 1 OR NULL ) AS eventCommentFlag,
count( behavior.EVENT_EVALUATE_FLAG = 1 OR NULL ) AS eventEvaFlag,
count( behavior.GROUP_PUBLISH_FLAG = 1 OR NULL ) AS groupPublishFlag,
count( behavior.GROUP_LIKE_FLAG = 1 OR NULL ) AS groupLikeFlag,
count( behavior.GROUP_OPPOSE_FLAG = 1 OR NULL ) AS groupOpposeFlag,
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
( SELECT
count( * )
FROM
esua_epdc_party_group.epdc_party_group
WHERE del_flag = 0
) groupCreateFlag
FROM
esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID) be
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
left join esua_epdc_admin.sys_dept d3 on d2.PID = d3.ID
group by d3.PID
) behave on behave.DEPT_ID = sd.ID
left join (
select
d3.PID dept_ID,
sum(isuCount.issueNum) issueNum
from
( select
eisu.GRID_ID DEPT_ID,
count(*) issueNum
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) isuCount
left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID
left join esua_epdc_admin.sys_dept d3 on d2.PID = d3.ID group by d3.PID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'district_party'
and sd.PARTY_CODE = 'shibei'
union all
select
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
sd.NAME orgName ,
sd.area_code,
IFNULL(behave.joinTotal,0) joinTotal,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNum
from esua_epdc_admin.sys_dept sd
left join (
select
sum(be.joinUser) joinUser,
sum(be.joinTotal) joinTotal,
sum(be.issueJoinUser) issueJoinUser,
d2.PID DEPT_ID
from
(SELECT
behaviorCount.DEPT_ID,
count( behaviorCount.voiceOpposeFlag + behaviorCount.voiceLikesFlag + behaviorCount.groupPublishFlag
+ behaviorCount.groupLikeFlag + behaviorCount.groupOpposeFlag + behaviorCount.groupJoinFlag
+ behaviorCount.groupCommentFlag + behaviorCount.groupCreateFlag + behaviorCount.eventLikesFlag
+ behaviorCount.eventOpposeFlag + behaviorCount.eventPubilshFlag + behaviorCount.eventCommentFlag
+ behaviorCount.eventEvaFlag > 0 OR NULL ) joinUser,
count( behaviorCount.eventPubilshFlag > 0 OR NULL ) issueJoinUser,
IFNULL(sum(behaviorCount.voiceOpposeFlag)+ sum(behaviorCount.voiceLikesFlag )
+ sum(behaviorCount.groupPublishFlag ) + sum(behaviorCount.groupLikeFlag )
+ sum(behaviorCount.groupOpposeFlag ) + sum(behaviorCount.groupJoinFlag )
+ sum(behaviorCount.groupCommentFlag ) + sum(behaviorCount.groupCreateFlag )
+ sum(behaviorCount.eventLikesFlag ) + sum(behaviorCount.eventOpposeFlag )
+ sum(behaviorCount.eventPubilshFlag ) + sum(behaviorCount.eventCommentFlag )
+ sum(behaviorCount.eventEvaFlag),0) joinTotal
FROM
(
SELECT
USER_ID,
USER.DEPT_ID,
count( behavior.VOICE_OPPOSE_FLAG = 1 OR NULL ) AS voiceOpposeFlag,
count( behavior.VOICE_LIKE_FLAG = 1 OR NULL ) AS voiceLikesFlag,
count( behavior.EVENT_LIKE_FLAG = 1 OR NULL ) AS eventLikesFlag,
count( behavior.EVENT_OPPOSE_FLAG = 1 OR NULL ) AS eventOpposeFlag,
count( behavior.EVENT_PUBLISH_FLAG = 1 OR NULL ) AS eventPubilshFlag,
count( behavior.EVENT_COMMENT_FLAG = 1 OR NULL ) AS eventCommentFlag,
count( behavior.EVENT_EVALUATE_FLAG = 1 OR NULL ) AS eventEvaFlag,
count( behavior.GROUP_PUBLISH_FLAG = 1 OR NULL ) AS groupPublishFlag,
count( behavior.GROUP_LIKE_FLAG = 1 OR NULL ) AS groupLikeFlag,
count( behavior.GROUP_OPPOSE_FLAG = 1 OR NULL ) AS groupOpposeFlag,
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
( SELECT
count( * )
FROM
esua_epdc_party_group.epdc_party_group
WHERE del_flag = 0 ) groupCreateFlag
FROM esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID) be
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID
) behave on behave.DEPT_ID = sd.ID
left join (
select
d2.PID dept_ID,
sum(isuCount.issueNum) issueNum
from
( select
eisu.GRID_ID DEPT_ID,
count(*) issueNum
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) isuCount
left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID
left join esua_epdc_admin.sys_dept d2 on d1.PID = d2.ID group by d2.PID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'street_party'
union all
select
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId,
'agency' as orgType,
sd.ID orgId,
sd.PID parentId,
sd.NAME orgName ,
sd.area_code,
IFNULL(behave.joinTotal,0) joinTotal,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNumber
from esua_epdc_admin.sys_dept sd
left join (
select
sum(be.joinUser) joinUser,
sum(be.issueJoinUser) issueJoinUser,
sum(be.joinTotal) joinTotal,
d1.PID DEPT_ID
from
(SELECT
behaviorCount.DEPT_ID,
count( behaviorCount.voiceOpposeFlag + behaviorCount.voiceLikesFlag + behaviorCount.groupPublishFlag
+ behaviorCount.groupLikeFlag + behaviorCount.groupOpposeFlag + behaviorCount.groupJoinFlag
+ behaviorCount.groupCommentFlag + behaviorCount.groupCreateFlag + behaviorCount.eventLikesFlag
+ behaviorCount.eventOpposeFlag + behaviorCount.eventPubilshFlag + behaviorCount.eventCommentFlag
+ behaviorCount.eventEvaFlag > 0 OR NULL ) joinUser,
count( behaviorCount.eventPubilshFlag > 0 OR NULL ) issueJoinUser,
IFNULL(sum(behaviorCount.voiceOpposeFlag)+ sum(behaviorCount.voiceLikesFlag )
+ sum(behaviorCount.groupPublishFlag ) + sum(behaviorCount.groupLikeFlag ) + sum(behaviorCount.groupOpposeFlag ) + sum(behaviorCount.groupJoinFlag )
+ sum(behaviorCount.groupCommentFlag ) + sum(behaviorCount.groupCreateFlag ) + sum(behaviorCount.eventLikesFlag ) + sum(behaviorCount.eventOpposeFlag )
+ sum(behaviorCount.eventPubilshFlag ) + sum(behaviorCount.eventCommentFlag ) + sum(behaviorCount.eventEvaFlag),0) joinTotal
FROM
(
SELECT USER_ID, USER.DEPT_ID,
count( behavior.VOICE_OPPOSE_FLAG = 1 OR NULL ) AS voiceOpposeFlag,
count( behavior.VOICE_LIKE_FLAG = 1 OR NULL ) AS voiceLikesFlag,
count( behavior.EVENT_LIKE_FLAG = 1 OR NULL ) AS eventLikesFlag,
count( behavior.EVENT_OPPOSE_FLAG = 1 OR NULL ) AS eventOpposeFlag,
count( behavior.EVENT_PUBLISH_FLAG = 1 OR NULL ) AS eventPubilshFlag,
count( behavior.EVENT_COMMENT_FLAG = 1 OR NULL ) AS eventCommentFlag,
count( behavior.EVENT_EVALUATE_FLAG = 1 OR NULL ) AS eventEvaFlag,
count( behavior.GROUP_PUBLISH_FLAG = 1 OR NULL ) AS groupPublishFlag,
count( behavior.GROUP_LIKE_FLAG = 1 OR NULL ) AS groupLikeFlag,
count( behavior.GROUP_OPPOSE_FLAG = 1 OR NULL ) AS groupOpposeFlag,
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
(SELECT
count( * )
FROM
esua_epdc_party_group.epdc_party_group
WHERE del_flag = 0 ) groupCreateFlag
FROM esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID) be
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID group by d1.PID
) behave on behave.DEPT_ID = sd.ID
left join (
select
d1.PID dept_ID,
sum(isuCount.issueNum) issueNum
from
( select
eisu.GRID_ID DEPT_ID,
count(*) issueNum
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) isuCount
left join esua_epdc_admin.sys_dept d1 on d1.ID = isuCount.DEPT_ID group by d1.PID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'community_party'
union all
select
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y'),'%Y') AS yearId,
DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y%m'),'%Y%m') AS monthId,
'grid' as orgType,
sd.ID orgId,
sd.PID parentId,
sd.NAME orgName ,
sd.area_code,
IFNULL(behave.joinTotal,0) joinTotal,
IFNULL(behave.joinUser,0) joinUser,
IFNULL(behave.issueJoinUser,0) issueJoinUser,
IFNULL(issueNumber.issueNum,0) issueNum
from esua_epdc_admin.sys_dept sd
left join (SELECT
behaviorCount.DEPT_ID,
count( behaviorCount.voiceOpposeFlag + behaviorCount.voiceLikesFlag + behaviorCount.groupPublishFlag
+ behaviorCount.groupLikeFlag + behaviorCount.groupOpposeFlag + behaviorCount.groupJoinFlag
+ behaviorCount.groupCommentFlag + behaviorCount.groupCreateFlag + behaviorCount.eventLikesFlag
+ behaviorCount.eventOpposeFlag + behaviorCount.eventPubilshFlag + behaviorCount.eventCommentFlag + behaviorCount.eventEvaFlag > 0 OR NULL ) joinUser,
count( behaviorCount.eventPubilshFlag > 0 OR NULL ) issueJoinUser,
IFNULL(sum(behaviorCount.voiceOpposeFlag) + sum(behaviorCount.voiceLikesFlag ) + sum(behaviorCount.groupPublishFlag )
+ sum(behaviorCount.groupLikeFlag ) + sum(behaviorCount.groupOpposeFlag ) + sum(behaviorCount.groupJoinFlag )
+ sum(behaviorCount.groupCommentFlag ) + sum(behaviorCount.groupCreateFlag ) + sum(behaviorCount.eventLikesFlag )
+ sum(behaviorCount.eventOpposeFlag ) + sum(behaviorCount.eventPubilshFlag ) + sum(behaviorCount.eventCommentFlag ) + sum(behaviorCount.eventEvaFlag),0) joinTotal
FROM
(
SELECT USER_ID, USER.DEPT_ID,
count( behavior.VOICE_OPPOSE_FLAG = 1 OR NULL ) AS voiceOpposeFlag,
count( behavior.VOICE_LIKE_FLAG = 1 OR NULL ) AS voiceLikesFlag,
count( behavior.EVENT_LIKE_FLAG = 1 OR NULL ) AS eventLikesFlag,
count( behavior.EVENT_OPPOSE_FLAG = 1 OR NULL ) AS eventOpposeFlag,
count( behavior.EVENT_PUBLISH_FLAG = 1 OR NULL ) AS eventPubilshFlag,
count( behavior.EVENT_COMMENT_FLAG = 1 OR NULL ) AS eventCommentFlag,
count( behavior.EVENT_EVALUATE_FLAG = 1 OR NULL ) AS eventEvaFlag,
count( behavior.GROUP_PUBLISH_FLAG = 1 OR NULL ) AS groupPublishFlag,
count( behavior.GROUP_LIKE_FLAG = 1 OR NULL ) AS groupLikeFlag,
count( behavior.GROUP_OPPOSE_FLAG = 1 OR NULL ) AS groupOpposeFlag,
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag,
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag,
( SELECT
count( * )
FROM
esua_epdc_party_group.epdc_party_group
WHERE del_flag = 0 ) groupCreateFlag
FROM esua_epdc_analysis.epdc_user_behavior_log behavior
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID
AND USER.DEL_FLAG = '0'
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu )
AND date_format(behavior.CREATED_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY USER_ID, USER.DEPT_ID
) behaviorCount
GROUP BY behaviorCount.DEPT_ID
) behave on behave.DEPT_ID = sd.ID
left join (
select
eisu.GRID_ID dept_ID,
count(*) issueNum
from esua_epdc_events.epdc_issue eisu
where eisu.DEL_FLAG = '0' AND date_format(eisu.DISTRIBUTE_TIME, '%Y%m' ) = #{yearMonth}
GROUP BY eisu.GRID_ID
) issueNumber on issueNumber.dept_ID = sd.ID
where sd.DEL_FLAG = '0'
AND sd.id IS NOT NULL
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t
WHERE t.`del_flag`= 0)
and sd.TYPE_KEY = 'grid_party'
(
select
sd.id,
sd.name,
sd.type_key,
sd.area_code,
sd.pid,
count(eugr.ID) as userNum
from
esua_epdc_admin.sys_dept sd
left join esua_epdc_user.epdc_user_grid_relation eugr on find_in_set(sd.id,eugr.ALL_DEPT_IDS) and eugr.DEL_FLAG = '0'
where sd.del_flag = '0' and sd.type_key in ('grid_party','community_party','street_party')
AND DATE_FORMAT(eugr.CREATED_TIME, '%Y%m') &lt;= #{yearMonth}
group by sd.id) user
left join (
select
sd.id,
sd.name,
count(ei.ID) as issueNum
from
esua_epdc_admin.sys_dept sd
left join esua_epdc_events.epdc_issue ei on find_in_set(sd.id,ei.ALL_DEPT_IDS) and ei.DEL_FLAG = '0'
where sd.del_flag = '0' and sd.type_key in ('grid_party','community_party','street_party')
AND DATE_FORMAT(ei.CREATED_TIME, '%Y%m')= #{yearMonth}
group by sd.id)issue on user.id = issue.id
)shoudJoin on shoudJoin.id = issueJoin.id
) t
</select>
<!-- 008 -->
<select id="publicpartitotaldataForGrid"
resultType="com.elink.esua.epdc.dto.screen.result.PublicpartitotaldataResultDTO">
@ -3151,6 +2871,114 @@ SELECT gr.id as orgId,
and city.type_key='district_party' and city.party_code='shibei'
GROUP BY city.id;
</select>
<select id="getUserJoinList" resultType="com.elink.esua.epdc.dto.screen.result.UserjoinResultDTO">
select ifnull(fz.num/fm.avgJoinFm,0) as avgJoin,fz.id as orgId, ifnull(fz.num,0) as avgJoinFz ,ifnull(fm.avgJoinFm,0) as avgJoinFm from (
SELECT (sum(APPROVE_NUM) + sum(OPPOSE_NUM) + sum(COMMENT_NUM) + sum(BROWSE_NUM))num
,sd.name,sd.id
FROM esua_epdc_events.epdc_issue ei
left join esua_epdc_events.`epdc_events` ee on ee.`ID` = ei.`EVENT_ID`
right join esua_epdc_admin.sys_dept sd on find_in_set(sd.id,ei.ALL_DEPT_IDS)
where DATE_FORMAT(ei.CREATED_TIME, '%Y%m') = #{yearMonth} and ei.`DEL_FLAG` = '0' and sd.del_flag = '0'
AND sd.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t)
and sd.type_key in('grid_party','community_party','street_party')
group by sd.id)fz
left join (
SELECT grid.id
, grid.name,
ifnull(data.issueNum * data.userNum,0) as avgJoinFm
from (
select issueNum,userNum,a.GRID_ID
from (
SELECT `GRID_ID`, COUNT(1) as issueNum
FROM esua_epdc_events.`epdc_issue`
WHERE `DEL_FLAG` = '0'
and DATE_FORMAT(CREATED_TIME, '%Y%m') = #{yearMonth}
GROUP BY `GRID_ID`) a
LEFT JOIN (
SELECT count(1) as userNum, `GRID_ID`
FROM esua_epdc_user.`epdc_user_grid_relation`
where `DEL_FLAG` = '0'
and DATE_FORMAT(CREATED_TIME, '%Y%m') &lt;= #{yearMonth}
GROUP BY `GRID_ID`) b on b.GRID_ID = a.GRID_ID) data
right join esua_epdc_admin.sys_dept grid on grid.id = data.GRID_ID
where grid.type_key = 'grid_party' and grid.del_flag = '0'
AND grid.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t)
union all
select
community.id,
community.name,
ifnull(sum(avgJoinFm),0) as avgJoinFm
from (
SELECT (a.issueNum * b.userNum) as avgJoinFm, a.GRID_ID
from (
SELECT `GRID_ID`, COUNT(1) as issueNum
FROM esua_epdc_events.`epdc_issue`
WHERE `DEL_FLAG` = '0'
and DATE_FORMAT(CREATED_TIME, '%Y%m') = #{yearMonth}
GROUP BY `GRID_ID`) a
LEFT JOIN (
SELECT count(1) as userNum, `GRID_ID`
FROM esua_epdc_user.`epdc_user_grid_relation`
where `DEL_FLAG` = '0'
and DATE_FORMAT(CREATED_TIME, '%Y%m') &lt;= #{yearMonth}
GROUP BY `GRID_ID`) b
on b.GRID_ID = a.GRID_ID) data
right join esua_epdc_admin.sys_dept grid on grid.id = data.GRID_ID
right join esua_epdc_admin.sys_dept community on grid.pid = community.id
where grid.del_flag = '0' and community.del_flag = '0' and grid.type_key = 'grid_party' and community.type_key = 'community_party'
AND grid.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t)
AND community.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t)
group by community.id
union all
select
street.id,
street.name,
ifnull(sum(avgJoinFm),0) as avgJoinFm
from (
SELECT (a.issueNum * b.userNum) as avgJoinFm, a.GRID_ID
from (
SELECT `GRID_ID`, COUNT(1) as issueNum
FROM esua_epdc_events.`epdc_issue`
WHERE `DEL_FLAG` = '0'
and DATE_FORMAT(CREATED_TIME, '%Y%m') = #{yearMonth}
GROUP BY `GRID_ID`) a
LEFT JOIN (
SELECT count(1) as userNum, `GRID_ID`
FROM esua_epdc_user.`epdc_user_grid_relation`
where `DEL_FLAG` = '0'
and DATE_FORMAT(CREATED_TIME, '%Y%m') &lt;= #{yearMonth}
GROUP BY `GRID_ID`) b
on b.GRID_ID = a.GRID_ID) data
right join esua_epdc_admin.sys_dept grid on grid.id = data.GRID_ID
right join esua_epdc_admin.sys_dept community on grid.pid = community.id
right join esua_epdc_admin.sys_dept street on community.pid = street.id
where grid.del_flag = '0' and community.del_flag = '0' and street.del_flag = '0'
and grid.type_key = 'grid_party' and community.type_key = 'community_party' and street.type_key = 'street_party'
AND grid.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t)
AND community.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t)
AND street.`id` NOT IN( SELECT t.`dept_id`
FROM `esua_epdc_admin`.`sys_dept_config` t)
group by street.id) fm
on fz.id = fm.id
</select>
</mapper>

141
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java

@ -328,4 +328,145 @@ public interface AnalysisFeignClient {
**/
@PostMapping("analysis/category/uploadCategoryCode")
Result uploadCategoryCode();
/**
* @Description 网格状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("analysis/screenBaseReport/gridtopicstatus")
Result gridTopicStatus();
/**
* @Description 组织状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("analysis/screenBaseReport/agencytopicstatus")
Result agencyTopicStatus();
/**
* @Description 网格话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("analysis/screenBaseReport/gridtopicissue")
Result gridTopicIssue();
/**
* @Description 组织话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
@PostMapping("analysis/screenBaseReport/agencytopicissue")
Result agencyTopicIssue();
/**
* @Description 网格项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/gridproject")
Result selectGridProjectList();
/**
* @Description 组织项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/agencyproject")
Result selectCommunityProjectList();
/**
* @Description 网格群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/gridgrouptotal")
Result selectGridGroupTotalList();
/**
* @Description 组织群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/agencygrouptotal")
Result selectCommunityGroupTotalList();
/**
* @Description 网格热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/gridhottopic")
Result selectGridHotTopic();
/**
* @Description 组织热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/agencyhottopic")
Result selectAgencyHotTopic();
/**
* @Description 网格议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/gridissue")
Result selectGridIssue();
/**
* @Description 组织议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/agencyissue")
Result selectAgencyIssue();
/**
* @Description 网格注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/gridreguser")
Result selectGridRegUser();
/**
* @Description 组织注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param [customId]
**/
@PostMapping("analysis/screenBaseReport/agencyreguser")
Result selectAgencyRegUser();
}

71
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java

@ -159,6 +159,77 @@ public class AnalysisFeignClientFallback implements AnalysisFeignClient {
public Result uploadCategoryCode() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "uploadCategoryCode");
}
@Override
public Result gridTopicStatus() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "gridTopicStatus");
}
@Override
public Result agencyTopicStatus() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "agencyTopicStatus");
}
@Override
public Result gridTopicIssue() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "gridTopicIssue");
}
@Override
public Result agencyTopicIssue() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "agencyTopicIssue");
}
@Override
public Result selectGridProjectList() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectGridProjectList");
}
@Override
public Result selectCommunityProjectList() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectCommunityProjectList");
}
@Override
public Result selectGridGroupTotalList() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectGridGroupTotalList");
}
@Override
public Result selectCommunityGroupTotalList() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectCommunityGroupTotalList");
}
@Override
public Result selectGridHotTopic() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectGridHotTopic");
}
@Override
public Result selectAgencyHotTopic() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectAgencyHotTopic");
}
@Override
public Result selectGridIssue() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectGridIssue");
}
@Override
public Result selectAgencyIssue() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectAgencyIssue");
}
@Override
public Result selectGridRegUser() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectGridRegUser");
}
@Override
public Result selectAgencyRegUser() {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "selectAgencyRegUser");
}
@Override
public Result getCategoryGridDaily(String date) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getCategoryGridDaily",date);

18
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTask.java

@ -0,0 +1,18 @@
package com.elink.esua.epdc.task.screen;
/**
* 大屏基础信息上报
*
* @Authorsongyunpeng
* @Date2021/6/25
*/
public interface ScreenBaseReportDataPushTask {
/**
* @Description 大屏基础信息上报
* @Author songyunpeng
* @Date 2021/6/25
* @Param [param]
* @return void
**/
void run(String param);
}

261
esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenBaseReportDataPushTaskImpl.java

@ -0,0 +1,261 @@
package com.elink.esua.epdc.task.screen;
import com.elink.esua.epdc.feign.AnalysisFeignClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 大屏指标信息统计上报
*
* @Authorsyp
* @Date2021/6/25 15:19
*/
@Component("screenBaseReportDataPushTask")
public class ScreenBaseReportDataPushTaskImpl implements ScreenIndexDataPushTask {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private AnalysisFeignClient analysisFeignClient;
@Override
public void run(String param) {
// 01、网格状态话题数据
gridTopicStatus();
// 02、组织状态话题数据
agencyTopicStatus();
// 03、网格话题转议题数据
gridTopicIssue();
// 04、组织话题转议题数据
agencyTopicIssue();
// 05、网格项目数据
selectGridProjectList();
// 组织项目数据
selectCommunityProjectList();
// 网格群组总数
selectGridGroupTotalList();
// 组织群组总数
selectCommunityGroupTotalList();
// 网格热议话题数据
selectGridHotTopic();
// 组织热议话题数据
selectAgencyHotTopic();
// 网格议题数据
selectGridIssue();
// 组织议题数据
selectAgencyIssue();
// 网格注册用户数据
selectGridRegUser();
// 组织注册用户数据
selectAgencyRegUser();
}
/**
* @Description 网格状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void gridTopicStatus() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-网格状态话题数据>定时任务开始执行");
analysisFeignClient.gridTopicStatus();
logger.info("<" + methodName + "|大屏基础信息上报-网格状态话题数据>定时任务执行结束");
}
/**
* @Description 组织状态话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void agencyTopicStatus() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-组织状态话题数据>定时任务开始执行");
analysisFeignClient.agencyTopicStatus();
logger.info("<" + methodName + "|大屏基础信息上报-组织状态话题数据>定时任务执行结束");
}
/**
* @Description 网格话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void gridTopicIssue() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-网格话题转议题数据>定时任务开始执行");
analysisFeignClient.gridTopicIssue();
logger.info("<" + methodName + "|大屏基础信息上报-网格话题转议题数据>定时任务执行结束");
}
/**
* @Description 组织话题转议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void agencyTopicIssue() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-组织话题转议题数据>定时任务开始执行");
analysisFeignClient.agencyTopicIssue();
logger.info("<" + methodName + "|大屏基础信息上报-组织话题转议题数据>定时任务执行结束");
}
/**
* @Description 网格项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectGridProjectList() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-网格项目数据>定时任务开始执行");
analysisFeignClient.selectGridProjectList();
logger.info("<" + methodName + "|大屏基础信息上报-网格项目数据>定时任务执行结束");
}
/**
* @Description 组织项目数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectCommunityProjectList() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-组织项目数据>定时任务开始执行");
analysisFeignClient.selectCommunityProjectList();
logger.info("<" + methodName + "|大屏基础信息上报-组织项目数据>定时任务执行结束");
}
/**
* @Description 网格群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectGridGroupTotalList() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-网格群组总数>定时任务开始执行");
analysisFeignClient.selectGridGroupTotalList();
logger.info("<" + methodName + "|大屏基础信息上报-网格群组总数>定时任务执行结束");
}
/**
* @Description 组织群组总数
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectCommunityGroupTotalList() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-组织群组总数>定时任务开始执行");
analysisFeignClient.selectCommunityGroupTotalList();
logger.info("<" + methodName + "|大屏基础信息上报-组织群组总数>定时任务执行结束");
}
/**
* @Description 网格热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectGridHotTopic() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-网格热议话题数据>定时任务开始执行");
analysisFeignClient.selectGridHotTopic();
logger.info("<" + methodName + "|大屏基础信息上报-网格热议话题数据>定时任务执行结束");
}
/**
* @Description 组织热议话题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectAgencyHotTopic() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-组织热议话题数据>定时任务开始执行");
analysisFeignClient.selectAgencyHotTopic();
logger.info("<" + methodName + "|大屏基础信息上报-组织热议话题数据>定时任务执行结束");
}
/**
* @Description 网格议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectGridIssue() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-网格议题数据>定时任务开始执行");
analysisFeignClient.selectGridIssue();
logger.info("<" + methodName + "|大屏基础信息上报-网格议题数据>定时任务执行结束");
}
/**
* @Description 组织议题数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectAgencyIssue() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-组织议题数据>定时任务开始执行");
analysisFeignClient.selectAgencyIssue();
logger.info("<" + methodName + "|大屏基础信息上报-组织议题数据>定时任务执行结束");
}
/**
* @Description 网格注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectGridRegUser() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-网格注册用户数据>定时任务开始执行");
analysisFeignClient.selectGridRegUser();
logger.info("<" + methodName + "|大屏基础信息上报-网格注册用户数据>定时任务执行结束");
}
/**
* @Description 组织注册用户数据
* @Author songyunpeng
* @Date 2021/6/25
* @Param []
* @return void
**/
public void selectAgencyRegUser() {
// 方法名
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
logger.info("<" + methodName + "|大屏基础信息上报-组织注册用户数据>定时任务开始执行");
analysisFeignClient.selectAgencyRegUser();
logger.info("<" + methodName + "|大屏基础信息上报-组织注册用户数据>定时任务执行结束");
}
}

9
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

@ -221,16 +221,16 @@
</update>
<select id="selectListVolunteer" resultType="com.elink.esua.epdc.dto.epdc.result.EpdcAppVolunteerListResultDTO">
SELECT
select t.id,t.nickname,t.faceImg,t.volunteerSignature,u.PARTY_FLAG from
(SELECT
v.ID id,
v.VOLUNTEER_NICKNAME nickname,
v.VOLUNTEER_FACE_IMG faceImg,
v.VOLUNTEER_SIGNATURE volunteerSignature,
u.party_flag
v.USER_ID
FROM
epdc_volunteer_info v
LEFT JOIN epdc_volunteer_tag_relation vt ON vt.VOLUNTEER_ID = v.ID
LEFT JOIN epdc_user u on u.id = v.user_id
AND vt.DEL_FLAG = '0'
WHERE
v.DEL_FLAG = 0
@ -242,7 +242,8 @@
AND vt.TAG_ID = #{volunteerTagId}
</if>
ORDER BY v.VOLUNTEER_ORDER ASC ,CONVERT(v.VOLUNTEER_NICKNAME USING gbk)
LIMIT #{pageIndex},#{pageSize}
LIMIT #{pageIndex},#{pageSize}) t
LEFT JOIN epdc_user u on u.id = t.USER_ID
</select>
<select id="selectListVolunteerCount" resultType="Integer">

Loading…
Cancel
Save