Browse Source
# Conflicts: # esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/application.ymlfeature/screenDataPush
33 changed files with 3707 additions and 373 deletions
@ -0,0 +1,15 @@ |
|||
package com.elink.esua.epdc.dto.screen.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author:syp |
|||
* @Date:2021/6/25 17:56 |
|||
*/ |
|||
@Data |
|||
public class ScreenBaseReportDataFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8275259571095325022L; |
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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; |
|||
|
|||
|
|||
} |
@ -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 已结案议题中未解决百分比 ; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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; |
|||
|
|||
|
|||
} |
@ -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 ; |
|||
|
|||
|
|||
} |
@ -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(); |
|||
}; |
|||
} |
@ -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); |
|||
|
|||
|
|||
} |
@ -0,0 +1,138 @@ |
|||
package com.elink.esua.epdc.modules.screen.service; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
|
|||
/** |
|||
* 平阴-大屏基础信息上报 |
|||
* |
|||
* @Author:syp |
|||
* @Date:2021/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(); |
|||
|
|||
} |
@ -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; |
|||
|
|||
/** |
|||
* @Author:liuchuang |
|||
* @Date:2020/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(); } |
|||
} |
@ -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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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') <= 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> |
@ -0,0 +1,18 @@ |
|||
package com.elink.esua.epdc.task.screen; |
|||
|
|||
/** |
|||
* 大屏基础信息上报 |
|||
* |
|||
* @Author:songyunpeng |
|||
* @Date:2021/6/25 |
|||
*/ |
|||
public interface ScreenBaseReportDataPushTask { |
|||
/** |
|||
* @Description 大屏基础信息上报 |
|||
* @Author songyunpeng |
|||
* @Date 2021/6/25 |
|||
* @Param [param] |
|||
* @return void |
|||
**/ |
|||
void run(String param); |
|||
} |
@ -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; |
|||
|
|||
/** |
|||
* 大屏指标信息统计上报 |
|||
* |
|||
* @Author:syp |
|||
* @Date:2021/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 + "|大屏基础信息上报-组织注册用户数据>定时任务执行结束"); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
Loading…
Reference in new issue