50 changed files with 14 additions and 3153 deletions
@ -1,48 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.issue.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 最热议题接口入参DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/12 8:31 |
|||
*/ |
|||
@Data |
|||
public class HotIssueFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 页码,从1开始 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认10页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于必须大于0") |
|||
private Integer pageSize = 10; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 数据时间类型(1:最近1个月,2:最近3个月,3:最近半年,4:最近一年),默认1 |
|||
*/ |
|||
@NotNull(message = "数据时间类型不能为空") |
|||
private Integer someMonthsType = 1; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,51 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.issue.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 议题项目数量类目分析DTO |
|||
* @Author zy |
|||
* @Date 2020/2/11 11:58 |
|||
*/ |
|||
@Data |
|||
public class IssueStatisticsInfoFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6544783947414092507L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认5页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于0") |
|||
private Integer pageSize; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 分类类别, 默认1 |
|||
*/ |
|||
@NotBlank(message = "分类类别不能为空") |
|||
private String cotegoryType; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,47 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.issue.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 最新发布议题接口DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/11 10:31 |
|||
*/ |
|||
@Data |
|||
public class NewIssueFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 页码,从1开始 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认10页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于必须大于0") |
|||
private Integer pageSize = 10; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 数据时间类型(1:最近1个月,2:最近3个月,3:最近半年,4:最近一年),默认1 |
|||
*/ |
|||
//@NotNull(message = "数据时间类型不能为空")
|
|||
private Integer someMonthsType = 1; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,32 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.issue.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 最热议题接口DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/12 8:31 |
|||
*/ |
|||
@Data |
|||
public class HotIssueResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 话题Id(TopicId) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 表态数 |
|||
*/ |
|||
private String statementNum; |
|||
|
|||
|
|||
} |
|||
@ -1,35 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.issue.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 议题分类统计 |
|||
* @Author yinzuomei |
|||
* @Date 2020/2/11 9:31 |
|||
*/ |
|||
@Data |
|||
public class IssueClassifiedStatisticDTO implements Serializable { |
|||
private static final long serialVersionUID = 3697313657209369676L; |
|||
/** |
|||
* 目录名称 |
|||
*/ |
|||
private String categoryName; |
|||
/** |
|||
* 议题项目总数 |
|||
*/ |
|||
private Integer categoryNum; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueNum; |
|||
/** |
|||
* 项目数 |
|||
*/ |
|||
private Integer itemNum; |
|||
/** |
|||
* 类目名称:1一级类目2二级类目3三季类目 |
|||
*/ |
|||
private String categoryLevel; |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.issue.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 议题项目数量类目分析DTO |
|||
* @Author zy |
|||
* @Date 2020/2/11 11:58 |
|||
*/ |
|||
@Data |
|||
public class IssueStatisticsInfoResultDTO implements Serializable { |
|||
|
|||
/** |
|||
* 分类名称 |
|||
*/ |
|||
private String cotegoryName; |
|||
|
|||
/** |
|||
* 数量 |
|||
*/ |
|||
private Integer count; |
|||
} |
|||
@ -1,43 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.issue.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 最新发布议题接口DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/10 11:31 |
|||
*/ |
|||
@Data |
|||
public class NewIssueResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 话题Id(TopicId) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 图片 |
|||
*/ |
|||
private List<String> images; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private String createdTime; |
|||
|
|||
|
|||
} |
|||
@ -1,48 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 最热项目接口DTO |
|||
* @Author zy |
|||
* @Date 2020/2/12 |
|||
*/ |
|||
@Data |
|||
public class HotItemListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6145783947444092507L; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认5页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于0") |
|||
private Integer pageSize; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 数据时间类型(1:最近1个月,2:最近3个月,3:最近半年,4:最近一年) |
|||
*/ |
|||
@NotNull(message = "数据时间类型不能为空") |
|||
private Integer someMonthsType; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,60 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 疑难项目分析DTO |
|||
* @Author zy |
|||
* @Date 2020/2/11 |
|||
*/ |
|||
@Data |
|||
public class ItemAnalysisFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6144783947444092507L; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认5页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于0") |
|||
private Integer pageSize; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 分析类型(1:耗时最长,2:设计部门最多,3:处理次数最多) |
|||
*/ |
|||
@NotNull(message = "分析类型不能为空") |
|||
private Integer analysisType; |
|||
|
|||
/** |
|||
* 项目状态(1:结案或关闭,2:解决中) |
|||
*/ |
|||
@NotNull(message = "项目状态不能为空") |
|||
private Integer itemState; |
|||
|
|||
/** |
|||
* 数据时间类型(1:最近1个月,2:最近3个月,3:最近半年,4:最近一年) |
|||
*/ |
|||
@NotNull(message = "数据时间类型不能为空") |
|||
private Integer someMonthsType; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,33 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 重点项目概况DTO |
|||
* @Author zy |
|||
* @Date 2020/2/11 |
|||
*/ |
|||
@Data |
|||
public class ItemSurveyFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 6544783947444092507L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,60 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 疑难项目 |
|||
* @Author yinzuomei |
|||
* @Date 2020/2/11 13:09 |
|||
*/ |
|||
@Data |
|||
public class DifficultItemResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -4125919212689714492L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 项目内容 |
|||
*/ |
|||
private String itemContent; |
|||
/** |
|||
* 转项目时间 |
|||
*/ |
|||
private Date createdTime; |
|||
/** |
|||
* 处理次数 |
|||
*/ |
|||
private Integer operatNum; |
|||
/** |
|||
* 是否流转网格化平台 |
|||
*/ |
|||
private String reportFlag; |
|||
/** |
|||
* 涉及部门数量 |
|||
*/ |
|||
private Integer deptNum; |
|||
/** |
|||
* 项目状态 |
|||
*/ |
|||
private String itemState; |
|||
/** |
|||
* 处理完毕时间 |
|||
*/ |
|||
private Date processedTime; |
|||
/** |
|||
* 处理时长 |
|||
*/ |
|||
private Integer takeTime; |
|||
/** |
|||
* 项目来源网格名称 |
|||
*/ |
|||
private String allDeptNames; |
|||
/** |
|||
* 居民满意度评价 |
|||
*/ |
|||
private String evaluationScore; |
|||
} |
|||
@ -1,29 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 最热项目接口DTO |
|||
* @Author zy |
|||
* @Date 2020/2/12 |
|||
*/ |
|||
@Data |
|||
public class HotItemListResultDTO implements Serializable { |
|||
|
|||
/** |
|||
* 项目Id(itemId) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 表态数 |
|||
*/ |
|||
private String statementNum; |
|||
} |
|||
@ -1,65 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 疑难项目分析DTO |
|||
* @Author zy |
|||
* @Date 2020/2/11 |
|||
*/ |
|||
@Data |
|||
public class ItemAnalysisResultDTO implements Serializable { |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 项目内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private String createdTime; |
|||
|
|||
/** |
|||
* 图片 |
|||
*/ |
|||
private List<String> images; |
|||
|
|||
/** |
|||
* 项目状态 0-处理中,5-已关闭,10-已结案 |
|||
*/ |
|||
private Integer itemState; |
|||
|
|||
/** |
|||
* 分类名称 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 耗时(小时) |
|||
*/ |
|||
private Integer spendTime; |
|||
|
|||
/** |
|||
* 部门数量 |
|||
*/ |
|||
private Integer deptCount; |
|||
|
|||
/** |
|||
* 处理次数 |
|||
*/ |
|||
private Integer handleCount; |
|||
} |
|||
@ -1,49 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 重点项目概况DTO |
|||
* @Author zy |
|||
* @Date 2020/2/11 |
|||
*/ |
|||
@Data |
|||
public class ItemSurveyResultDTO implements Serializable { |
|||
|
|||
/** |
|||
* 未解决项目数 |
|||
*/ |
|||
private Integer unsolvedCount; |
|||
|
|||
/** |
|||
* 超时项目数 |
|||
*/ |
|||
private Integer timeoutCount; |
|||
|
|||
/** |
|||
* 未超时项目数 |
|||
*/ |
|||
private Integer noTimeoutCount; |
|||
|
|||
/** |
|||
* 区调度项目数 |
|||
*/ |
|||
private Integer dispatchCount; |
|||
|
|||
/** |
|||
* 解决中项目数 |
|||
*/ |
|||
private Integer solvingCount; |
|||
|
|||
/** |
|||
* 已解决项目数 |
|||
*/ |
|||
private Integer solvedCount; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private String updateTime; |
|||
} |
|||
@ -1,56 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 区域调度-已解决项目列表 |
|||
* @Author yinzuomei |
|||
* @Date 2020/2/11 15:12 |
|||
*/ |
|||
@Data |
|||
public class ReportSolvedItemResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -600933427201742607L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 项目内容 |
|||
*/ |
|||
private String itemContent; |
|||
/** |
|||
* 转项目时间 |
|||
*/ |
|||
private Date createdTime; |
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String grid; |
|||
/** |
|||
* 向网格化平台上报部门 |
|||
*/ |
|||
private String reportDept; |
|||
/** |
|||
* 向网格化平台上报时间 |
|||
*/ |
|||
private Date reportTime; |
|||
/** |
|||
* 最新处理部门 |
|||
*/ |
|||
private Date lastHandlerTime; |
|||
/** |
|||
* 最新处理时间 |
|||
*/ |
|||
private String lastHandlerDept; |
|||
/** |
|||
* 项目状态 |
|||
*/ |
|||
private String itemState; |
|||
/** |
|||
* 居民评价 |
|||
*/ |
|||
private String evaluationScore; |
|||
} |
|||
@ -1,48 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 区域调度-解决中项目列表 |
|||
* @Author yinzuomei |
|||
* @Date 2020/2/11 15:10 |
|||
*/ |
|||
@Data |
|||
public class ReportUnsolvedItemResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 2364303777789369092L; |
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
/** |
|||
* 项目内容 |
|||
*/ |
|||
private String itemContent; |
|||
/** |
|||
* 转项目时间 |
|||
*/ |
|||
private Date createdTime; |
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String grid; |
|||
/** |
|||
* 向网格化平台上报部门 |
|||
*/ |
|||
private String reportDept; |
|||
/** |
|||
* 向网格化平台吹哨时间 |
|||
*/ |
|||
private Date reportTime; |
|||
/** |
|||
* 最新进展处理部门 |
|||
*/ |
|||
private Date lastHandlerTime; |
|||
/** |
|||
* 最新进展处理时间 |
|||
*/ |
|||
private String lastHandlerDept; |
|||
} |
|||
@ -1,57 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.item.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 未解决项目列表 |
|||
* @Author yinzuomei |
|||
* @Date 2020/2/10 18:58 |
|||
*/ |
|||
@Data |
|||
public class UnsolvedItemResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 7659596790013430029L; |
|||
/** |
|||
* epdc_item表主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 议题内容-项目摘要 |
|||
*/ |
|||
private String itemContent; |
|||
|
|||
/** |
|||
* 发布时间 |
|||
*/ |
|||
private Date releaseTime; |
|||
|
|||
/** |
|||
* 所有部门 |
|||
*/ |
|||
private String allDeptNames; |
|||
|
|||
/** |
|||
* 发布人用户昵称 |
|||
*/ |
|||
private String nickName; |
|||
|
|||
/** |
|||
* 处理次数 |
|||
*/ |
|||
private Integer solveNum; |
|||
|
|||
/** |
|||
*最新进展处理时间 |
|||
*/ |
|||
private Date latestHandleTime; |
|||
|
|||
/** |
|||
* 最新进展处理部门 |
|||
*/ |
|||
private String latestHandleDeptName; |
|||
|
|||
|
|||
} |
|||
@ -1,48 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 最热话题接口入参DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/11 10:31 |
|||
*/ |
|||
@Data |
|||
public class HotTopicFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 页码,从1开始 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认10页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于必须大于0") |
|||
private Integer pageSize = 10; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 数据时间类型(1:最近1个月,2:最近3个月,3:最近半年,4:最近一年),默认1 |
|||
*/ |
|||
@NotNull(message = "数据时间类型不能为空") |
|||
private Integer someMonthsType = 1; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,47 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.topic.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 最新发布话题接口入参DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/11 10:31 |
|||
*/ |
|||
@Data |
|||
public class NewHotTopicFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 页码,从1开始 |
|||
*/ |
|||
@Min(value = 1, message = "页码必须大于0") |
|||
private Integer pageIndex; |
|||
|
|||
/** |
|||
* 页容量,默认10页 |
|||
*/ |
|||
@Min(value = 1, message = "每页条数必须大于必须大于0") |
|||
private Integer pageSize = 10; |
|||
|
|||
/** |
|||
* 第一页查询发起时的时间 |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
|
|||
/** |
|||
* 数据时间类型(1:最近1个月,2:最近3个月,3:最近半年,4:最近一年),默认1 |
|||
*/ |
|||
//@NotNull(message = "数据时间类型不能为空")
|
|||
private Integer someMonthsType = 1; |
|||
|
|||
/** |
|||
* 部门ID列表 |
|||
*/ |
|||
List<Long> deptIdList; |
|||
} |
|||
@ -1,32 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description 最热话题接口DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/11 11:31 |
|||
*/ |
|||
@Data |
|||
public class HotTopicResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 话题Id(TopicId) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 表态数 |
|||
*/ |
|||
private String statementNum; |
|||
|
|||
|
|||
} |
|||
@ -1,43 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.topic.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 最新发布话题接口DTO |
|||
* @Author wgf |
|||
* @Date 2020/2/10 11:31 |
|||
*/ |
|||
@Data |
|||
public class NewHotTopicResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1938141144074477454L; |
|||
|
|||
/** |
|||
* 话题Id(TopicId) |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 图片 |
|||
*/ |
|||
private List<String> images; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private String createdTime; |
|||
|
|||
|
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 用户注册数据分析 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/2/11 10:43 |
|||
*/ |
|||
@Data |
|||
public class UserAnalysisDTO { |
|||
|
|||
|
|||
} |
|||
@ -1,41 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
/** |
|||
* @author songyunpeng |
|||
* @Description 党员老龄化和年轻化排名查询表单 |
|||
* @create 2020-02-11 10:53 上午 |
|||
*/ |
|||
@Data |
|||
public class MemberRankFormDTO { |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@NotNull(message = "页码不能为空") |
|||
private Integer pageIndex; |
|||
/** |
|||
* 页容量 |
|||
*/ |
|||
@NotNull(message = "分页数量不能为空") |
|||
private Integer pageSize; |
|||
/** |
|||
* 时间戳(yyyy-MM-dd HH:mm:ss) |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
/** |
|||
* 排序状态(1:降序,2升序) |
|||
*/ |
|||
@NotBlank(message = "排序状态不能为空") |
|||
private String sortState; |
|||
/** |
|||
* 部门Id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
} |
|||
@ -1,20 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @program: esua-epdc-cloud |
|||
* @description: 用户数据统计/网格开通数量 |
|||
* @author: wangtong |
|||
* @create: 2020-02-12 10:03 |
|||
**/ |
|||
@Data |
|||
public class UserCountDTO{ |
|||
|
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 用户注册数据分析 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/2/11 09:43 |
|||
*/ |
|||
@Data |
|||
public class UserRegisterDataFormDTO { |
|||
} |
|||
@ -1,47 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
|
|||
/** |
|||
* @author lpf |
|||
* @Description 用户排名 |
|||
* @create 2020-02-11 10:53 上午 |
|||
*/ |
|||
@Data |
|||
public class UserSortRankFormDTO { |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@NotNull(message = "页码不能为空") |
|||
private Integer pageIndex; |
|||
/** |
|||
* 页容量 |
|||
*/ |
|||
@NotNull(message = "分页数量不能为空") |
|||
private Integer pageSize; |
|||
/** |
|||
* 时间戳(yyyy-MM-dd HH:mm:ss) |
|||
*/ |
|||
@NotBlank(message = "时间戳不能为空") |
|||
private String timestamp; |
|||
/** |
|||
* 排序状态(1:降序,2升序) |
|||
*/ |
|||
@NotBlank(message = "排序状态不能为空") |
|||
private String sortState ="1"; |
|||
/** |
|||
* 排序类型(1:按用户数,2按党员数) |
|||
*/ |
|||
@NotBlank(message = "排序类型") |
|||
private String sortType = "1"; |
|||
/** |
|||
* 部门Id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
|
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 已开通网格 用户数据总计 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/2/13 13:46 |
|||
*/ |
|||
@Data |
|||
public class GridDataTotalResultDTO extends GridOpeningResultDTO { |
|||
|
|||
/** |
|||
* 已开通网格数 |
|||
*/ |
|||
private int workGridCount = 0; |
|||
/** |
|||
* 未开通网格数 |
|||
*/ |
|||
private int unWorkGridCount = 0; |
|||
|
|||
} |
|||
@ -1,94 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2020/2/11 13:09 |
|||
* @Description: 开通网格情况 |
|||
*/ |
|||
@Data |
|||
public class GridOpeningResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -852226852590425991L; |
|||
|
|||
private String gridId; |
|||
|
|||
/** |
|||
* 街道社区网格 |
|||
*/ |
|||
private String allDeptName; |
|||
/** |
|||
* 用户注册数 |
|||
*/ |
|||
private int registerCount = 0; |
|||
/** |
|||
* 认证居民 |
|||
*/ |
|||
private int residentCount = 0; |
|||
|
|||
/** |
|||
* 认证党员数 |
|||
*/ |
|||
private int partyCount = 0; |
|||
|
|||
/** |
|||
* 居民扫码数 |
|||
*/ |
|||
private int ewmCount = 0; |
|||
|
|||
/** |
|||
* 新闻数 |
|||
*/ |
|||
private int newsCount = 0; |
|||
|
|||
/** |
|||
* 通知数 |
|||
*/ |
|||
private int noticeCount = 0; |
|||
|
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private int eventCount = 0; |
|||
|
|||
/** |
|||
* 项目数 |
|||
*/ |
|||
private int itemCount = 0; |
|||
|
|||
/** |
|||
* 项目解决数 |
|||
*/ |
|||
private int itemCloseCount = 0; |
|||
|
|||
/** |
|||
* 项目好评数(满意度评价为非常满意) |
|||
*/ |
|||
private int itemPraiseCount = 0; |
|||
|
|||
/** |
|||
* 社群数 |
|||
*/ |
|||
private int communityCount = 0; |
|||
|
|||
/** |
|||
* 社群成员数 |
|||
*/ |
|||
private int communityMemberCount = 0; |
|||
|
|||
/** |
|||
* 社群话题数 |
|||
*/ |
|||
private int communityTopicCount = 0; |
|||
|
|||
/** |
|||
* 网格长姓名 |
|||
*/ |
|||
private String gridLeader; |
|||
|
|||
|
|||
} |
|||
@ -1,28 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @program: esua-epdc-cloud |
|||
* @description: 网格数量统计Serializable |
|||
* @author: wangtong |
|||
* @create: 2020-02-11 14:50 |
|||
**/ |
|||
@Data |
|||
public class GriddingCountDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 网格总计 |
|||
**/ |
|||
private Integer gridTotle; |
|||
|
|||
/** |
|||
* 开通网格数量 |
|||
**/ |
|||
private Integer gridCount; |
|||
|
|||
} |
|||
@ -1,34 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author songyunpeng |
|||
* @Description 党员老龄化排名结果 |
|||
* @create 2020-02-11 10:53 上午 |
|||
*/ |
|||
@Data |
|||
public class OldMemberRankResultDTO implements Serializable { |
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private String deptId; |
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
/** |
|||
* 党员数 |
|||
*/ |
|||
private Integer partyMemberCount; |
|||
/** |
|||
* 超过50岁党员数 |
|||
*/ |
|||
private Integer oldMemberCount; |
|||
/** |
|||
* 比例 |
|||
*/ |
|||
private String proportion; |
|||
} |
|||
@ -1,44 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @program: esua-epdc-cloud |
|||
* @description: 用户数据统计 |
|||
* @author: wangtong |
|||
* @create: 2020-02-11 12:14 |
|||
**/ |
|||
@Data |
|||
public class UserAnalysisCountDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 所有用户数 |
|||
**/ |
|||
private Integer allUserCount; |
|||
|
|||
/** |
|||
* 党员数 |
|||
**/ |
|||
private Integer partyMemberCount; |
|||
|
|||
/** |
|||
* 居民数 |
|||
**/ |
|||
private Integer userCount; |
|||
|
|||
/** |
|||
* 党员认证率 |
|||
**/ |
|||
private BigDecimal partyMemberPercent; |
|||
|
|||
/** |
|||
* 居民认证率 |
|||
**/ |
|||
private BigDecimal residentPercent; |
|||
|
|||
} |
|||
@ -1,68 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 用户数据排行 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/2/11 14:44 |
|||
*/ |
|||
@Data |
|||
public class UserDataRankResultDTO { |
|||
|
|||
/** |
|||
* 街道id |
|||
*/ |
|||
private String streetId; |
|||
/** |
|||
* 街道名称 |
|||
*/ |
|||
private String streetName; |
|||
/** |
|||
* 用户注册数 |
|||
*/ |
|||
private Integer userCount; |
|||
/** |
|||
* 男性数 |
|||
*/ |
|||
private Integer maleCount; |
|||
/** |
|||
* 女性数 |
|||
*/ |
|||
private Integer femaleCount; |
|||
/** |
|||
* 未知性别数 |
|||
*/ |
|||
private Integer unknownSexCount; |
|||
/** |
|||
* 居民数 |
|||
*/ |
|||
private Integer residentCount; |
|||
/** |
|||
* 党员数 |
|||
*/ |
|||
private Integer partyMemberCount; |
|||
/** |
|||
* 老人数(年龄大于50) |
|||
*/ |
|||
private Integer oldCount; |
|||
/** |
|||
* 年轻人数(年龄不大于50) |
|||
*/ |
|||
private Integer youngCount; |
|||
/** |
|||
* 老人比例 |
|||
*/ |
|||
private BigDecimal oldPercent; |
|||
/** |
|||
* 年轻人比例 |
|||
*/ |
|||
private BigDecimal youngPercent; |
|||
/** |
|||
* 党员认证失败数 |
|||
*/ |
|||
private Integer partyAuthFailureCount; |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 用户注册数据分析 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/2/11 09:43 |
|||
*/ |
|||
@Data |
|||
public class UserRegisterDataResultDTO { |
|||
} |
|||
@ -1,41 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 用户数据排行 |
|||
* |
|||
* @author work@yujt.net.cn |
|||
* @date 2020/2/11 14:44 |
|||
*/ |
|||
@Data |
|||
public class UserSortRankResultDTO { |
|||
|
|||
/** |
|||
* 街道id |
|||
*/ |
|||
private String deptId; |
|||
/** |
|||
* 街道名称 |
|||
*/ |
|||
private String deptName; |
|||
/** |
|||
* 用户注册数 |
|||
*/ |
|||
private Integer allUserCount; |
|||
/** |
|||
* 居民数 |
|||
*/ |
|||
private Integer userCount; |
|||
/** |
|||
* 党员数 |
|||
*/ |
|||
private Integer pattyMemberCount; |
|||
|
|||
/** |
|||
* 党员占比 |
|||
*/ |
|||
private String partyMemberPercent; |
|||
} |
|||
@ -1,34 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.user.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author songyunpeng |
|||
* @Description 党员年轻化排名结果 |
|||
* @create 2020-02-11 10:53 上午 |
|||
*/ |
|||
@Data |
|||
public class YoungMemberRankResultDTO implements Serializable { |
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private String deptId; |
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
/** |
|||
* 党员数 |
|||
*/ |
|||
private Integer partyMemberCount; |
|||
/** |
|||
* 超过50岁党员数 |
|||
*/ |
|||
private Integer youngMemberCount; |
|||
/** |
|||
* 比例 |
|||
*/ |
|||
private String proportion; |
|||
} |
|||
@ -1,49 +0,0 @@ |
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2020/2/13 15:23 |
|||
* @Description: 网格开通导出 |
|||
*/ |
|||
@Data |
|||
public class GridOpiningExcel { |
|||
@Excel(name = "网格名称") |
|||
private String allDeptName; |
|||
|
|||
@Excel(name = "网格党建指导员姓名") |
|||
private String gridLeader; |
|||
|
|||
@Excel(name = "注册用户数") |
|||
private Integer registerCount; |
|||
|
|||
@Excel(name = "注册党员数") |
|||
private Integer partyCount; |
|||
|
|||
@Excel(name = "新闻发布数") |
|||
private Integer newsCount; |
|||
|
|||
@Excel(name = "社群数") |
|||
private Integer communityCount; |
|||
|
|||
@Excel(name = "群成员数") |
|||
private Integer communityMemberCount; |
|||
|
|||
@Excel(name = "话题数") |
|||
private Integer communityTopicCount; |
|||
|
|||
@Excel(name = "项目数") |
|||
private Integer itemCount; |
|||
|
|||
@Excel(name = "项目关闭数") |
|||
private Integer itemCloseCount; |
|||
|
|||
@Excel(name = "好评数") |
|||
private Integer itemPraiseCount; |
|||
|
|||
@Excel(name = "议题数") |
|||
private Integer eventCount; |
|||
|
|||
} |
|||
@ -1,52 +0,0 @@ |
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2020/2/12 14:24 |
|||
* @Description: 注册用户分析 |
|||
*/ |
|||
@Data |
|||
public class PartyAnalysExcel { |
|||
@Excel(name = "街道名称") |
|||
private String streetName; |
|||
|
|||
@Excel(name = "注册用户数") |
|||
private Integer userCount; |
|||
|
|||
@Excel(name = "注册党员数") |
|||
private Integer partyMemberCount; |
|||
|
|||
@Excel(name = "注册居民数") |
|||
private Integer residentCount; |
|||
|
|||
@Excel(name = "男") |
|||
private Integer maleCount; |
|||
|
|||
@Excel(name = "女") |
|||
private Integer femaleCount; |
|||
|
|||
@Excel(name = "其他") |
|||
private Integer unknownSexCount; |
|||
|
|||
@Excel(name = "超过50岁用户数量") |
|||
private Integer oldCount; |
|||
|
|||
@Excel(name = "老龄化比例") |
|||
private BigDecimal oldPercent; |
|||
|
|||
@Excel(name = "50岁以下用户数量") |
|||
private Integer youngCount; |
|||
|
|||
@Excel(name = "年轻化比例") |
|||
private BigDecimal youngPercent; |
|||
|
|||
@Excel(name = "党员认证失败数") |
|||
private Integer partyAuthFailureCount; |
|||
|
|||
|
|||
} |
|||
@ -1,50 +0,0 @@ |
|||
package com.elink.esua.epdc.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2020/2/12 14:24 |
|||
* @Description: 注册用户分析 |
|||
*/ |
|||
@Data |
|||
public class RegisterExcel { |
|||
@Excel(name = "街道名称") |
|||
private String streetName; |
|||
|
|||
@Excel(name = "注册用户数") |
|||
private Integer userCount; |
|||
|
|||
@Excel(name = "注册党员数") |
|||
private Integer partyMemberCount; |
|||
|
|||
@Excel(name = "注册居民数") |
|||
private Integer residentCount; |
|||
|
|||
@Excel(name = "男") |
|||
private Integer maleCount; |
|||
|
|||
@Excel(name = "女") |
|||
private Integer femaleCount; |
|||
|
|||
@Excel(name = "其他") |
|||
private Integer unknownSexCount; |
|||
|
|||
@Excel(name = "超过50岁用户数量") |
|||
private Integer oldCount; |
|||
|
|||
@Excel(name = "老龄化比例") |
|||
private BigDecimal oldPercent; |
|||
|
|||
@Excel(name = "50岁以下用户数量") |
|||
private Integer youngCount; |
|||
|
|||
@Excel(name = "年轻化比例") |
|||
private BigDecimal youngPercent; |
|||
|
|||
|
|||
} |
|||
@ -1,349 +0,0 @@ |
|||
<?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.issue.dao.IssueAnalysisDao"> |
|||
<!-- 最热议题列表 --> |
|||
<select id="selectListHottestIssue" resultType="com.elink.esua.epdc.dto.issue.result.IssueResultDTO"> |
|||
SELECT |
|||
ei.ID, |
|||
ei.ISSUE_CONTENT, |
|||
ei.ALL_DEPT_NAMES, |
|||
ei.NICK_NAME, |
|||
ei.CREATED_TIME, |
|||
ee.APPROVE_NUM, |
|||
ee.OPPOSE_NUM, |
|||
ee.COMMENT_NUM, |
|||
ee.BROWSE_NUM, |
|||
( ee.COMMENT_NUM + ee.BROWSE_NUM + ee.APPROVE_NUM + ee.OPPOSE_NUM ) AS expressAttitudeNum |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
LEFT JOIN esua_epdc_events.epdc_events ee ON ee.ID = ei.EVENT_ID |
|||
AND ee.DEL_FLAG = '0' |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ei.ISSUE_STATE IN ( 0, 2 ) |
|||
<if test="issueContent != null and issueContent != ''"> |
|||
AND ei.ISSUE_CONTENT LIKE CONCAT('%',#{issueContent},'%') |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND ei.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
<if test="deptIdList!=null and deptIdList.size()>0"> |
|||
and ei.GRID_ID in |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
ORDER BY |
|||
expressAttitudeNum DESC |
|||
</select> |
|||
|
|||
<!-- 最新议题列表 --> |
|||
<select id="selectListLatestIssue" resultType="com.elink.esua.epdc.dto.issue.result.IssueResultDTO"> |
|||
SELECT |
|||
ei.ID, |
|||
ei.ISSUE_CONTENT, |
|||
ei.ALL_DEPT_NAMES, |
|||
ei.NICK_NAME, |
|||
ei.CREATED_TIME, |
|||
ee.APPROVE_NUM, |
|||
ee.OPPOSE_NUM, |
|||
ee.COMMENT_NUM, |
|||
ee.BROWSE_NUM, |
|||
( ee.COMMENT_NUM + ee.BROWSE_NUM + ee.APPROVE_NUM + ee.OPPOSE_NUM ) AS expressAttitudeNum |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
LEFT JOIN esua_epdc_events.epdc_events ee ON ee.ID = ei.EVENT_ID |
|||
AND ee.DEL_FLAG = '0' |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ei.ISSUE_STATE IN ( 0, 2 ) |
|||
<if test="issueContent != null and issueContent != ''"> |
|||
AND ei.ISSUE_CONTENT LIKE CONCAT('%',#{issueContent},'%') |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND ei.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
<if test="deptIdList!=null and deptIdList.size()>0"> |
|||
and ei.GRID_ID in |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
ORDER BY |
|||
expressAttitudeNum DESC,CREATED_TIME desc |
|||
</select> |
|||
|
|||
<sql id="common_where_if"> |
|||
<if test="deptIdList!=null and deptIdList.size()>0"> |
|||
and ei.GRID_ID in |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND ei.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
<if test="categoryName != null and categoryName != ''"> |
|||
AND ei.CATEGORY_FULL_NAME LIKE CONCAT(#{categoryName},'_%') |
|||
</if> |
|||
</sql> |
|||
<sql id="common_order-if"> |
|||
<if test="sort != null and sort != '' and 'desc'==sort"> |
|||
ORDER BY categoryNum desc |
|||
</if> |
|||
<if test="sort != null and sort != '' and 'asc'==sort"> |
|||
ORDER BY categoryNum asc |
|||
</if> |
|||
</sql> |
|||
<!-- 一级类目统计 --> |
|||
<select id="selectFirstIssueClassifiedStatistic" |
|||
resultType="com.elink.esua.epdc.dto.issue.result.IssueClassifiedStatisticDTO"> |
|||
SELECT |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 1 ) AS categoryName, |
|||
COUNT( ei.ID ) AS categoryNum, |
|||
SUM( ei.ISSUE_STATE = 0 OR ei.ISSUE_STATE = 2 ) AS issueNum, |
|||
SUM( ei.ISSUE_STATE = 4 ) AS itemNum, |
|||
'1' as categoryLevel |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
WHERE ei.DEL_FLAG = '0' |
|||
<include refid="common_where_if"/> |
|||
GROUP BY |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 1 ),categoryLevel |
|||
<include refid="common_order-if"/> |
|||
</select> |
|||
|
|||
<!-- 二级类目统计 --> |
|||
<select id="selectSecondIssueClassifiedStatistic" |
|||
resultType="com.elink.esua.epdc.dto.issue.result.IssueClassifiedStatisticDTO"> |
|||
SELECT |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 2 ) AS categoryName, |
|||
COUNT( ei.ID ) AS categoryNum, |
|||
SUM( ei.ISSUE_STATE = 0 OR ei.ISSUE_STATE = 2 ) AS issueNum, |
|||
SUM( ei.ISSUE_STATE = 4 ) AS itemNum, |
|||
'2' as categoryLevel |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ( LENGTH( ei.CATEGORY_FULL_NAME ) - LENGTH( REPLACE ( ei.CATEGORY_FULL_NAME, '-', '' ) ) ) > 0 |
|||
<include refid="common_where_if"/> |
|||
GROUP BY |
|||
SUBSTRING_INDEX( SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 2 ), '-', - 1 ),categoryLevel |
|||
<include refid="common_order-if"/> |
|||
</select> |
|||
|
|||
<!-- 三级类目统计 --> |
|||
<select id="selectThreeIssueClassifiedStatistic" |
|||
resultType="com.elink.esua.epdc.dto.issue.result.IssueClassifiedStatisticDTO"> |
|||
SELECT |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 3 ) AS categoryName, |
|||
COUNT( ei.ID ) AS categoryNum, |
|||
SUM( ei.ISSUE_STATE = 0 OR ei.ISSUE_STATE = 2 ) AS issueNum, |
|||
SUM( ei.ISSUE_STATE = 4 ) AS itemNum, |
|||
'3' as categoryLevel |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ( LENGTH( ei.CATEGORY_FULL_NAME ) - LENGTH( REPLACE ( ei.CATEGORY_FULL_NAME, '-', '' ) ) ) > 1 |
|||
<include refid="common_where_if"/> |
|||
GROUP BY |
|||
SUBSTRING_INDEX( SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 3 ), '-', - 1 ),categoryLevel |
|||
<include refid="common_order-if"/> |
|||
</select> |
|||
|
|||
<select id="selectListStatisticsByFirstCategory" resultType="com.elink.esua.epdc.dto.issue.result.IssueStatisticsInfoResultDTO"> |
|||
SELECT |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 1 ) AS cotegoryName, |
|||
COUNT( ei.ID ) AS count |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
<![CDATA[ AND DATE_FORMAT(ei.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|||
</if> |
|||
GROUP BY |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 1 ) |
|||
ORDER BY |
|||
count DESC |
|||
LIMIT #{pageIndex}, #{pageSize}; |
|||
</select> |
|||
|
|||
<select id="selectListStatisticsByTwoCategory" resultType="com.elink.esua.epdc.dto.issue.result.IssueStatisticsInfoResultDTO"> |
|||
SELECT |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 2 ) AS cotegoryName, |
|||
COUNT( ei.ID ) AS count |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ( LENGTH( ei.CATEGORY_FULL_NAME ) - LENGTH( REPLACE ( ei.CATEGORY_FULL_NAME, '-', '' ) ) ) > 0 |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
<![CDATA[ AND DATE_FORMAT(ei.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|||
</if> |
|||
GROUP BY |
|||
SUBSTRING_INDEX( SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 2 ), '-', - 1 ) |
|||
ORDER BY |
|||
count DESC |
|||
LIMIT #{pageIndex}, #{pageSize}; |
|||
</select> |
|||
|
|||
<select id="selectListStatisticsByThreeCategory" resultType="com.elink.esua.epdc.dto.issue.result.IssueStatisticsInfoResultDTO"> |
|||
SELECT |
|||
SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 3 ) AS cotegoryName, |
|||
COUNT( ei.ID ) AS count |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ( LENGTH( ei.CATEGORY_FULL_NAME ) - LENGTH( REPLACE ( ei.CATEGORY_FULL_NAME, '-', '' ) ) ) > 1 |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
<![CDATA[ AND DATE_FORMAT(ei.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|||
</if> |
|||
GROUP BY |
|||
SUBSTRING_INDEX( SUBSTRING_INDEX( ei.CATEGORY_FULL_NAME, '-', 3 ), '-', - 1 ) |
|||
ORDER BY |
|||
count DESC |
|||
LIMIT #{pageIndex}, #{pageSize}; |
|||
</select> |
|||
|
|||
|
|||
<resultMap id="newIssueListMap" type="com.elink.esua.epdc.dto.issue.result.NewIssueResultDTO"> |
|||
<result property="id" column="ID"/> |
|||
<result property="content" column="content"/> |
|||
<result property="deptName" column="deptName"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<collection property="images" ofType="java.lang.String"> |
|||
<result property="image" column="IMG_URL"/> |
|||
</collection> |
|||
</resultMap> |
|||
<select id="selectNewIssueList" resultMap="newIssueListMap"> |
|||
SELECT |
|||
ei.ID, |
|||
ei.ISSUE_CONTENT AS content, |
|||
eimg.IMG_URL, |
|||
ei.ALL_DEPT_NAMES AS deptName, |
|||
ei.CREATED_TIME |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
LEFT JOIN esua_epdc_events.epdc_img eimg ON eimg.REFERENCE_ID = ei.EVENT_ID |
|||
AND eimg.DEL_FLAG = '0' |
|||
WHERE |
|||
ei.ID IN ( |
|||
SELECT |
|||
tmp.ID |
|||
FROM |
|||
( |
|||
SELECT |
|||
t.ID |
|||
FROM |
|||
esua_epdc_events.epdc_issue t |
|||
WHERE |
|||
t.DEL_FLAG = '0' |
|||
AND t.ISSUE_STATE IN (0, 2) |
|||
AND t.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
AND DATE_FORMAT( t.CREATED_TIME, '%Y-%m-%d %H:%i:%s' ) <= #{timestamp} |
|||
</if> |
|||
ORDER BY |
|||
t.CREATED_TIME DESC |
|||
LIMIT #{pageIndex}, #{pageSize} |
|||
) tmp |
|||
) |
|||
ORDER BY |
|||
ei.CREATED_TIME DESC, |
|||
eimg.IMG_URL |
|||
</select> |
|||
|
|||
<!--最热议题APP接口--> |
|||
<select id="selectHotIssueList" resultType="com.elink.esua.epdc.dto.issue.result.HotIssueResultDTO"> |
|||
SELECT |
|||
ei.ID, |
|||
ei.ISSUE_CONTENT AS content, |
|||
( ee.COMMENT_NUM + ee.BROWSE_NUM + ee.APPROVE_NUM + ee.OPPOSE_NUM ) AS statementNum |
|||
FROM |
|||
esua_epdc_events.epdc_issue ei |
|||
LEFT JOIN esua_epdc_events.epdc_events ee ON ee.ID = ei.EVENT_ID |
|||
AND ee.DEL_FLAG = '0' |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ei.ISSUE_STATE IN ( 0, 2 ) |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
AND DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d %H:%i:%s' ) <= #{timestamp} |
|||
</if> |
|||
<if test="someMonthsType == 1"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 1 MONTH ) <= ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 2"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 3 MONTH ) <= ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 3"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 6 MONTH ) <= ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 4"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 1 YEAR ) <= ei.CREATED_TIME |
|||
</if> |
|||
ORDER BY |
|||
statementNum DESC |
|||
LIMIT #{pageIndex}, #{pageSize} |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -1,482 +0,0 @@ |
|||
<?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.item.dao.ItemAnalysisDao"> |
|||
<!-- 最热项目列表查询 --> |
|||
<select id="selectListHottestItemResultDTO" resultType="com.elink.esua.epdc.dto.item.result.ItemResultDTO"> |
|||
SELECT |
|||
ei.id, |
|||
ei.ITEM_CONTENT, |
|||
m.ALL_DEPT_NAMES, |
|||
ei.GRID, |
|||
ei.NICK_NAME, |
|||
ei.CREATED_TIME AS releaseTime, |
|||
ee.APPROVE_NUM, |
|||
ee.OPPOSE_NUM, |
|||
ee.COMMENT_NUM, |
|||
ee.BROWSE_NUM, |
|||
(ee.APPROVE_NUM + ee.OPPOSE_NUM + ee.COMMENT_NUM + ee.BROWSE_NUM ) AS expressAttitudeNum |
|||
FROM |
|||
epdc_item ei |
|||
LEFT JOIN epdc_events ee |
|||
ON ( ei.EVENT_ID = ee.ID ) |
|||
left join epdc_issue m |
|||
on(ei.issue_id=m.id and m.del_flag='0') |
|||
where ei.DEL_FLAG ='0' |
|||
AND ee.DEL_FLAG = '0' |
|||
AND EXISTS ( |
|||
select eii.id from epdc_issue eii |
|||
where eii.id = ei.ISSUE_ID |
|||
AND eii.DEL_FLAG = '0' |
|||
AND eii.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
) |
|||
<if test='searchContent != null and searchContent != ""'> |
|||
AND ei.ITEM_CONTENT LIKE CONCAT('%',#{searchContent},'%') |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},m.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},m.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND m.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
ORDER BY expressAttitudeNum DESC |
|||
</select> |
|||
|
|||
<!-- 未解决项目列表查询 --> |
|||
<select id="selectListUnsolvedItemResultDTO" resultType="com.elink.esua.epdc.dto.item.result.UnsolvedItemResultDTO"> |
|||
select ei.id, |
|||
ei.ITEM_CONTENT, |
|||
ei.CREATED_TIME as releaseTime, |
|||
iss.ALL_DEPT_NAMES, |
|||
ei.NICK_NAME, |
|||
(select count(1) from epdc_item_handle_process p |
|||
where p.DEL_FLAG='0' |
|||
and p.ITEM_ID=ei.id)as solveNum, |
|||
(select CREATED_TIME from epdc_item_handle_process p where p.DEL_FLAG='0' |
|||
and p.ITEM_ID=ei.id |
|||
order by p.CREATED_TIME desc |
|||
limit 1)as latestHandleTime, |
|||
(select p.HANDLER_DEPT from epdc_item_handle_process p where p.DEL_FLAG='0' |
|||
and p.ITEM_ID=ei.id |
|||
order by p.CREATED_TIME desc |
|||
limit 1)as latestHandleDeptName |
|||
from epdc_item ei |
|||
left join epdc_issue iss |
|||
on(ei.issue_id=iss.id and iss.del_flag='0') |
|||
where ei.DEL_FLAG='0' |
|||
AND ei.ITEM_STATE='0' |
|||
and EXISTS ( |
|||
select eii.id from epdc_issue eii |
|||
where eii.id = ei.ISSUE_ID |
|||
AND eii.DEL_FLAG = '0' |
|||
AND eii.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
) |
|||
<if test='searchContent != null and searchContent != ""'> |
|||
AND ei.ITEM_CONTENT LIKE CONCAT('%',#{searchContent},'%') |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},iss.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},iss.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND iss.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
order by ei.CREATED_TIME desc |
|||
</select> |
|||
|
|||
<!-- 疑难项目分析列表查询 --> |
|||
<select id="selectListDifficultItemResultDTO" |
|||
resultType="com.elink.esua.epdc.dto.item.result.DifficultItemResultDTO"> |
|||
SELECT |
|||
t.ID, |
|||
t.ITEM_CONTENT, |
|||
t.CREATED_TIME, |
|||
t.operatNum, |
|||
t.reportFlag, |
|||
t.deptNum, |
|||
t.ITEM_STATE, |
|||
t.processedTime, |
|||
t.takeTime, |
|||
t.ALL_DEPT_NAMES, |
|||
t.EVALUATION_SCORE |
|||
FROM ( |
|||
SELECT |
|||
ei.ID, |
|||
ei.ITEM_CONTENT, |
|||
ei.CREATED_TIME, |
|||
( SELECT COUNT( eihp.ID ) FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.ITEM_ID = ei.ID ) AS operatNum, |
|||
( SELECT CASE WHEN COUNT(eigp.ID) > 0 THEN '1' ELSE '0' END FROM esua_epdc_events.epdc_item_grid_platform eigp |
|||
WHERE eigp.DEL_FLAG = '0' AND eigp.REFERENCE_ID = ei.ID ) AS reportFlag, |
|||
( SELECT COUNT(eid.ID) FROM esua_epdc_events.epdc_item_dept eid WHERE eid.DEL_FLAG = '0' AND eid.ITEM_ID = ei.ID |
|||
) AS deptNum, |
|||
ei.ITEM_STATE, |
|||
( SELECT eihp.CREATED_TIME FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.ITEM_ID = ei.ID AND eihp.STATE IN (5, 10) LIMIT 1 ) AS processedTime, |
|||
( SELECT TIMESTAMPDIFF( HOUR, MIN(eihp.CREATED_TIME), MAX(eihp.CREATED_TIME) ) FROM |
|||
esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND eihp.ITEM_ID = ei.ID ) AS takeTime, |
|||
ei.ALL_DEPT_NAMES, |
|||
ei.EVALUATION_SCORE |
|||
FROM |
|||
esua_epdc_events.epdc_item ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND ei.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="changeItemStartTime != null and changeItemStartTime != ''"> |
|||
AND DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) >= #{changeItemStartTime} |
|||
</if> |
|||
<if test="changeItemEndTime != null and changeItemEndTime != ''"> |
|||
AND DATE_FORMAT( ei.CREATED_TIME, '%Y-%m-%d' ) <= #{changeItemEndTime} |
|||
</if> |
|||
<if test="itemState != null and itemState != ''"> |
|||
AND ei.ITEM_STATE = #{itemState} |
|||
</if> |
|||
<if test="evaluationScore != null and evaluationScore != ''"> |
|||
AND ei.EVALUATION_SCORE = #{evaluationScore} |
|||
</if> |
|||
ORDER BY |
|||
<if test="orderType == 0"> |
|||
takeTime DESC, |
|||
</if> |
|||
<if test="orderType == 1"> |
|||
deptNum DESC, |
|||
</if> |
|||
<if test=" orderType == 2"> |
|||
operatNum DESC, |
|||
</if> |
|||
CREATED_TIME DESC ) t |
|||
WHERE 1=1 |
|||
<if test="processedStartTime != null and processedStartTime != ''"> |
|||
AND DATE_FORMAT( processedTime, '%Y-%m-%d' ) >= #{processedStartTime} |
|||
</if> |
|||
<if test="processedEndTime != null and processedEndTime != ''"> |
|||
AND DATE_FORMAT( processedTime, '%Y-%m-%d' ) <= #{processedEndTime} |
|||
</if> |
|||
<if test="reportFlag != null and reportFlag != ''"> |
|||
AND reportFlag = #{reportFlag} |
|||
</if> |
|||
</select> |
|||
|
|||
<!-- 区域调度-解决中项目列表 --> |
|||
<select id="selectListReportUnsolvedItemResultDTO" |
|||
resultType="com.elink.esua.epdc.dto.item.result.ReportUnsolvedItemResultDTO"> |
|||
SELECT |
|||
ei.ID as id, |
|||
ei.ITEM_CONTENT as itemContent, |
|||
ei.CREATED_TIME as createdTime, |
|||
ei.GRID as grid, |
|||
( SELECT eihp.HANDLER_DEPT FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.STATE = 15 AND eihp.ITEM_ID = eigp.REFERENCE_ID LIMIT 1 ) AS reportDept, |
|||
eigp.CREATED_TIME AS reportTime, |
|||
( SELECT eihp.CREATED_TIME FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.ITEM_ID = eigp.REFERENCE_ID ORDER BY eihp.CREATED_TIME DESC LIMIT 1 ) AS lastHandlerTime, |
|||
( SELECT eihp.HANDLER_DEPT FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.ITEM_ID = eigp.REFERENCE_ID ORDER BY eihp.CREATED_TIME DESC LIMIT 1 ) AS lastHandlerDept |
|||
FROM |
|||
esua_epdc_events.epdc_item_grid_platform eigp |
|||
LEFT JOIN esua_epdc_events.epdc_item ei ON ei.ID = eigp.REFERENCE_ID |
|||
AND ei.DEL_FLAG = '0' |
|||
WHERE |
|||
eigp.DEL_FLAG = '0' |
|||
AND ei.ITEM_STATE = 0 |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test='searchContent != null and searchContent != ""'> |
|||
AND ei.ITEM_CONTENT LIKE CONCAT('%',#{searchContent},'%') |
|||
</if> |
|||
<if test='reportStartTime != null and reportStartTime != ""'> |
|||
AND DATE_FORMAT( eigp.CREATED_TIME, '%Y-%m-%d' ) >= #{reportStartTime} |
|||
</if> |
|||
<if test='reportEndTime != null and reportEndTime != ""'> |
|||
AND DATE_FORMAT( eigp.CREATED_TIME, '%Y-%m-%d' )<= #{reportEndTime} |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND ei.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test='reportDept != null and reportDept != ""'> |
|||
AND EXISTS ( |
|||
SELECT eihp.HANDLER_DEPT FROM esua_epdc_events.epdc_item_handle_process eihp |
|||
WHERE eihp.DEL_FLAG = '0' |
|||
AND eihp.STATE = 15 |
|||
AND eihp.ITEM_ID = eigp.REFERENCE_ID |
|||
AND eihp.HANDLER_DEPT_ID=#{reportDept} |
|||
LIMIT 1 |
|||
) |
|||
</if> |
|||
ORDER BY |
|||
ei.CREATED_TIME DESC |
|||
</select> |
|||
|
|||
<!-- 区域调度-已解决项目列表 --> |
|||
<select id="selectListReportSolvedItemResultDTO" |
|||
resultType="com.elink.esua.epdc.dto.item.result.ReportSolvedItemResultDTO"> |
|||
SELECT |
|||
ei.ID as id, |
|||
ei.ITEM_CONTENT as itemContent, |
|||
ei.CREATED_TIME as createdTime, |
|||
ei.GRID as grid, |
|||
( SELECT eihp.HANDLER_DEPT FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.STATE = 15 AND eihp.ITEM_ID = eigp.REFERENCE_ID LIMIT 1 ) AS reportDept, |
|||
eigp.CREATED_TIME AS reportTime, |
|||
( SELECT eihp.CREATED_TIME FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.ITEM_ID = eigp.REFERENCE_ID ORDER BY eihp.CREATED_TIME DESC LIMIT 1 ) AS lastHandlerTime, |
|||
( SELECT eihp.HANDLER_DEPT FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND |
|||
eihp.ITEM_ID = eigp.REFERENCE_ID ORDER BY eihp.CREATED_TIME DESC LIMIT 1 ) AS lastHandlerDept, |
|||
ei.ITEM_STATE as itemState, |
|||
ei.EVALUATION_SCORE as evaluationScore |
|||
FROM |
|||
esua_epdc_events.epdc_item_grid_platform eigp |
|||
LEFT JOIN esua_epdc_events.epdc_item ei ON ei.ID = eigp.REFERENCE_ID |
|||
AND ei.DEL_FLAG = '0' |
|||
WHERE |
|||
eigp.DEL_FLAG = '0' |
|||
AND ei.ITEM_STATE IN (5, 10) |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test='searchContent != null and searchContent != ""'> |
|||
AND ei.ITEM_CONTENT LIKE CONCAT('%',#{searchContent},'%') |
|||
</if> |
|||
<if test='reportStartTime != null and reportStartTime != ""'> |
|||
AND DATE_FORMAT( eigp.CREATED_TIME, '%Y-%m-%d' ) >= #{reportStartTime} |
|||
</if> |
|||
<if test='reportEndTime != null and reportEndTime != ""'> |
|||
AND DATE_FORMAT( eigp.CREATED_TIME, '%Y-%m-%d' )<= #{reportEndTime} |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},ei.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND ei.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test='reportDept != null and reportDept != ""'> |
|||
AND EXISTS ( |
|||
SELECT eihp.HANDLER_DEPT FROM esua_epdc_events.epdc_item_handle_process eihp |
|||
WHERE eihp.DEL_FLAG = '0' |
|||
AND eihp.STATE = 15 |
|||
AND eihp.ITEM_ID = eigp.REFERENCE_ID |
|||
AND eihp.HANDLER_DEPT_ID=#{reportDept} |
|||
LIMIT 1 |
|||
) |
|||
</if> |
|||
ORDER BY |
|||
ei.CREATED_TIME DESC |
|||
</select> |
|||
|
|||
<select id="selectOneItemSurvey" resultType="com.elink.esua.epdc.dto.item.result.ItemSurveyResultDTO"> |
|||
SELECT |
|||
t1.unsolvedCount, |
|||
t2.dispatchCount, |
|||
t2.solvingCount, |
|||
t2.solvedCount |
|||
FROM |
|||
( |
|||
SELECT |
|||
COUNT( ei.ID ) AS unsolvedCount |
|||
FROM |
|||
esua_epdc_events.epdc_item ei |
|||
WHERE |
|||
ei.ITEM_STATE = 0 |
|||
AND ei.DEL_FLAG = '0' |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
<![CDATA[ AND DATE_FORMAT(ei.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|||
</if> |
|||
) t1, |
|||
( |
|||
SELECT |
|||
COUNT( DISTINCT eigp.REFERENCE_ID ) AS dispatchCount, |
|||
COUNT( DISTINCT ei1.ID ) AS solvingCount, |
|||
COUNT( DISTINCT ei2.ID ) AS solvedCount |
|||
FROM |
|||
esua_epdc_events.epdc_item_grid_platform eigp |
|||
LEFT JOIN esua_epdc_events.epdc_item ei ON eigp.REFERENCE_ID = ei.ID |
|||
AND ei.DEL_FLAG = '0' |
|||
LEFT JOIN esua_epdc_events.epdc_item ei1 ON eigp.REFERENCE_ID = ei1.ID |
|||
AND ei1.DEL_FLAG = 0 |
|||
AND ei1.ITEM_STATE = 0 |
|||
LEFT JOIN esua_epdc_events.epdc_item ei2 ON eigp.REFERENCE_ID = ei2.ID |
|||
AND ei2.DEL_FLAG = 0 |
|||
AND ( ei2.ITEM_STATE = 5 OR ei2.ITEM_STATE = 10 ) |
|||
WHERE |
|||
eigp.DEL_FLAG = '0' |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
<![CDATA[ AND DATE_FORMAT(eigp.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|||
</if> |
|||
) t2; |
|||
</select> |
|||
|
|||
<!--疑难项目分析--> |
|||
<resultMap id="itemAnalysisListMap" type="com.elink.esua.epdc.dto.item.result.ItemAnalysisResultDTO"> |
|||
<result property="id" column="ID"/> |
|||
<result property="content" column="content"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="handleCount" column="handleCount"/> |
|||
<result property="deptCount" column="deptCount"/> |
|||
<result property="itemState" column="ITEM_STATE"/> |
|||
<result property="spendTime" column="spendTime"/> |
|||
<result property="deptName" column="deptName"/> |
|||
<result property="categoryName" column="categoryName"/> |
|||
<collection property="images" ofType="java.lang.String"> |
|||
<result property="image" column="IMG_URL"/> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="selectOneItemAnalysis" resultMap="itemAnalysisListMap"> |
|||
SELECT |
|||
t.ID, |
|||
t.content, |
|||
t.CREATED_TIME, |
|||
t.handleCount, |
|||
t.deptCount, |
|||
t.ITEM_STATE, |
|||
t.spendTime, |
|||
t.deptName, |
|||
t.categoryName, |
|||
eimg.IMG_URL |
|||
FROM ( |
|||
SELECT |
|||
ei.ID, |
|||
ei.EVENT_ID, |
|||
ei.ITEM_CONTENT AS content, |
|||
ei.CREATED_TIME, |
|||
( SELECT COUNT( eihp.ID ) FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND eihp.ITEM_ID = ei.ID ) AS handleCount, |
|||
( SELECT COUNT(eid.ID) FROM esua_epdc_events.epdc_item_dept eid WHERE eid.DEL_FLAG = '0' AND eid.ITEM_ID = ei.ID ) AS deptCount, |
|||
ei.ITEM_STATE, |
|||
( SELECT TIMESTAMPDIFF( HOUR, MIN(eihp.CREATED_TIME), MAX(eihp.CREATED_TIME) ) FROM esua_epdc_events.epdc_item_handle_process eihp WHERE eihp.DEL_FLAG = '0' AND eihp.ITEM_ID = ei.ID ) AS spendTime, |
|||
ei.ALL_DEPT_NAMES AS deptName, |
|||
ei.CATEGORY_FULL_NAME AS categoryName |
|||
FROM |
|||
esua_epdc_events.epdc_item ei |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="someMonthsType == 1"> |
|||
<![CDATA[ AND DATE_SUB(CURDATE( ), INTERVAL 1 MONTH) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 2"> |
|||
<![CDATA[ AND DATE_SUB(CURDATE( ), INTERVAL 3 MONTH) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 3"> |
|||
<![CDATA[ AND DATE_SUB(CURDATE( ), INTERVAL 6 MONTH) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 4"> |
|||
<![CDATA[ AND DATE_SUB(CURDATE( ), INTERVAL 1 YEAR) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
<![CDATA[ AND DATE_FORMAT(ei.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|||
</if> |
|||
<if test="itemState == 1"> |
|||
AND ei.ITEM_STATE IN (5, 10) |
|||
</if> |
|||
<if test="itemState == 2"> |
|||
AND ei.ITEM_STATE = 0 |
|||
</if> |
|||
ORDER BY |
|||
<if test="analysisType == 1"> |
|||
spendTime DESC, |
|||
</if> |
|||
<if test="analysisType == 2"> |
|||
deptCount DESC, |
|||
</if> |
|||
<if test="analysisType == 3"> |
|||
handleCount DESC, |
|||
</if> |
|||
CREATED_TIME DESC |
|||
LIMIT #{pageIndex}, #{pageSize}) t |
|||
LEFT JOIN esua_epdc_events.epdc_img eimg ON eimg.REFERENCE_ID = t.EVENT_ID |
|||
AND eimg.DEL_FLAG = '0'; |
|||
</select> |
|||
|
|||
<select id="selectListHotItemList" resultType="com.elink.esua.epdc.dto.item.result.HotItemListResultDTO"> |
|||
SELECT |
|||
ei.ID, |
|||
ei.ITEM_CONTENT AS content, |
|||
( ee.COMMENT_NUM + ee.BROWSE_NUM + ee.APPROVE_NUM + ee.OPPOSE_NUM ) AS statementNum |
|||
FROM |
|||
esua_epdc_events.epdc_item ei |
|||
LEFT JOIN esua_epdc_events.epdc_events ee ON ee.ID = ei.EVENT_ID |
|||
AND ee.DEL_FLAG = '0' |
|||
WHERE |
|||
ei.DEL_FLAG = '0' |
|||
AND ei.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
<![CDATA[ AND DATE_FORMAT(ei.CREATED_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|||
</if> |
|||
<if test="someMonthsType == 1"> |
|||
<![CDATA[ AND DATE_SUB( CURDATE( ),INTERVAL 1 MONTH) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 2"> |
|||
<![CDATA[ AND DATE_SUB( CURDATE( ),INTERVAL 3 MONTH) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 3"> |
|||
<![CDATA[ AND DATE_SUB( CURDATE( ),INTERVAL 6 MONTH) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 4"> |
|||
<![CDATA[ AND DATE_SUB( CURDATE( ),INTERVAL 1 YEAR) <= ]]> ei.CREATED_TIME |
|||
</if> |
|||
ORDER BY |
|||
statementNum DESC |
|||
LIMIT #{pageIndex}, #{pageSize}; |
|||
</select> |
|||
</mapper> |
|||
@ -1,178 +0,0 @@ |
|||
<?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.topic.dao.TopicAnalysisDao"> |
|||
<!-- 最热话题列表查询 --> |
|||
<select id="selectListHottestTopicDTO" resultType="com.elink.esua.epdc.dto.topic.result.TopicResultDTO"> |
|||
select |
|||
et.ID, |
|||
et.TOPIC_CONTENT, |
|||
et.ALL_DEPT_NAMES, |
|||
et.GRID, |
|||
et.GROUP_NAME, |
|||
et.NICKNAME, |
|||
et.CREATED_TIME as releaseTime, |
|||
et.COMMENT_NUM, |
|||
et.BROWSE_NUM, |
|||
et.COMMENT_NUM+et.BROWSE_NUM as expressAttitudeNum |
|||
from epdc_topic et |
|||
where et.DEL_FLAG='0' |
|||
and et.STATE='0' |
|||
<if test="topicContent != null and topicContent != ''"> |
|||
and et.TOPIC_CONTENT like concat('%', #{topicContent}, '%') |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},et.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},et.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND et.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
<if test="deptIdList!=null and deptIdList.size()>0"> |
|||
and et.GRID_ID in |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
order by expressAttitudeNum desc |
|||
</select> |
|||
|
|||
<!-- 最新话题列表查询 --> |
|||
<select id="selectListLatesttTopicDTO" resultType="com.elink.esua.epdc.dto.topic.result.TopicResultDTO"> |
|||
select |
|||
et.ID, |
|||
et.TOPIC_CONTENT, |
|||
et.ALL_DEPT_NAMES, |
|||
et.GRID, |
|||
et.GROUP_NAME, |
|||
et.NICKNAME, |
|||
et.CREATED_TIME as releaseTime, |
|||
et.COMMENT_NUM, |
|||
et.BROWSE_NUM, |
|||
et.COMMENT_NUM+et.BROWSE_NUM as expressAttitudeNum |
|||
from epdc_topic et |
|||
where et.DEL_FLAG='0' |
|||
and et.STATE='0' |
|||
<if test="topicContent != null and topicContent != ''"> |
|||
and et.TOPIC_CONTENT like concat('%', #{topicContent}, '%') |
|||
</if> |
|||
<if test="streetId != null and streetId != ''"> |
|||
AND find_in_set(#{streetId},et.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="communityId != null and communityId != ''"> |
|||
AND find_in_set(#{communityId},et.ALL_DEPT_IDS) |
|||
</if> |
|||
<if test="gridId != null and gridId != ''"> |
|||
AND et.GRID_ID = #{gridId} |
|||
</if> |
|||
<if test="startTime != null and startTime != ''"> |
|||
and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) >=#{startTime} |
|||
</if> |
|||
<if test="endTime != null and endTime != ''"> |
|||
and DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d' ) <=#{endTime} |
|||
</if> |
|||
<if test="deptIdList!=null and deptIdList.size()>0"> |
|||
and et.GRID_ID in |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
</if> |
|||
order by expressAttitudeNum desc,releaseTime desc |
|||
</select> |
|||
|
|||
<!--最热话题APP接口--> |
|||
<select id="selectHotTopicList" resultType="com.elink.esua.epdc.dto.topic.result.HotTopicResultDTO"> |
|||
SELECT |
|||
et.ID, |
|||
et.TOPIC_CONTENT AS content, |
|||
( et.COMMENT_NUM + et.BROWSE_NUM ) AS statementNum |
|||
FROM |
|||
esua_epdc_group.epdc_topic et |
|||
WHERE |
|||
et.DEL_FLAG = '0' |
|||
AND et.STATE = 0 |
|||
AND et.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
AND DATE_FORMAT( et.CREATED_TIME, '%Y-%m-%d %H:%i:%s' ) <= #{timestamp} |
|||
</if> |
|||
<if test="someMonthsType == 1"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 1 MONTH ) <= et.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 2"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 3 MONTH ) <= et.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 3"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 6 MONTH ) <= et.CREATED_TIME |
|||
</if> |
|||
<if test="someMonthsType == 4"> |
|||
AND DATE_SUB( CURDATE( ), INTERVAL 1 YEAR ) <= et.CREATED_TIME |
|||
</if> |
|||
ORDER BY |
|||
statementNum DESC |
|||
LIMIT #{pageIndex}, #{pageSize} |
|||
</select> |
|||
|
|||
<!--最新发布话题APP接口--> |
|||
<resultMap id="newHotTopicListMap" type="com.elink.esua.epdc.dto.topic.result.NewHotTopicResultDTO"> |
|||
<result property="id" column="ID"/> |
|||
<result property="content" column="content"/> |
|||
<result property="deptName" column="deptName"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<collection property="images" ofType="java.lang.String"> |
|||
<result property="image" column="IMG_URL"/> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="selectNewHotTopicList" resultMap="newHotTopicListMap"> |
|||
SELECT |
|||
et.ID, |
|||
et.TOPIC_CONTENT AS content, |
|||
timg.IMG_URL, |
|||
et.ALL_DEPT_NAMES AS deptName, |
|||
et.CREATED_TIME |
|||
FROM |
|||
esua_epdc_group.epdc_topic et |
|||
LEFT JOIN esua_epdc_group.epdc_topic_img timg ON timg.REFERENCE_ID = et.ID |
|||
AND timg.DEL_FLAG = '0' |
|||
WHERE |
|||
et.ID IN ( |
|||
SELECT |
|||
tmp.ID |
|||
FROM |
|||
( |
|||
SELECT |
|||
t.ID |
|||
FROM |
|||
esua_epdc_group.epdc_topic t |
|||
WHERE |
|||
t.DEL_FLAG = '0' |
|||
AND t.STATE = 0 |
|||
AND t.GRID_ID IN |
|||
<foreach collection="deptIdList" index="index" item="deptId" open="(" separator="," close=")"> |
|||
#{deptId} |
|||
</foreach> |
|||
<if test="timestamp != null and timestamp != ''"> |
|||
AND DATE_FORMAT( t.CREATED_TIME, '%Y-%m-%d %H:%i:%s' ) <= #{timestamp} |
|||
</if> |
|||
ORDER BY |
|||
t.CREATED_TIME DESC |
|||
LIMIT #{pageIndex}, #{pageSize} |
|||
) tmp |
|||
) |
|||
ORDER BY |
|||
et.CREATED_TIME DESC, |
|||
timg.IMG_URL |
|||
</select> |
|||
|
|||
</mapper> |
|||
@ -1,64 +0,0 @@ |
|||
<?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.user.dao.OldMemberRankDao"> |
|||
<resultMap id="listOfOldMemberRankMap" type="com.elink.esua.epdc.dto.user.result.OldMemberRankResultDTO"> |
|||
<result property="deptId" column="deptId"/> |
|||
<result property="deptName" column="deptName"/> |
|||
<result property="partyMemberCount" column="partyMemberCount"/> |
|||
<result property="oldMemberCount" column="youngMemberCount"/> |
|||
<result property="proportion" column="proportion"/> |
|||
</resultMap> |
|||
|
|||
|
|||
<select id="selectListOfOldMemberRank" resultMap="listOfOldMemberRankMap"> |
|||
SELECT |
|||
* |
|||
FROM ( |
|||
SELECT |
|||
t1.*, |
|||
t1.oldMemberCount / t1.partyMemberCount * 100 proportion |
|||
FROM ( |
|||
SELECT |
|||
t.street as deptName, |
|||
t.streetId as deptId, |
|||
COUNT( t.userId ) AS partyMemberCount, |
|||
COUNT( t.age > 50 or null ) oldMemberCount |
|||
FROM ( |
|||
SELECT |
|||
ad2.`name` AS street, |
|||
ad2.id streetId, |
|||
uu.ID userId, |
|||
TIMESTAMPDIFF( YEAR, uu.BIRTHDAY, CURDATE()) age |
|||
FROM |
|||
esua_epdc_user.epdc_user uu |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad ON uu.DEPT_ID = ad.ID |
|||
AND ad.type_key = 'grid_party' |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad.pid = ad1.id |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad1.pid = ad2.id |
|||
WHERE |
|||
uu.DEL_FLAG = '0' |
|||
AND uu.PARTY_FLAG = '1' |
|||
AND ad.id IS NOT NULL |
|||
<if test="formDto.deptId != null and formDto.deptId !=''"> |
|||
AND (ad2.id = #{formDto.deptId} or ad.id = #{formDto.deptId} or ad1.id = #{formDto.deptId} ) |
|||
</if> |
|||
AND ad.id IN |
|||
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|||
#{deptIdItem} |
|||
</foreach> |
|||
) t |
|||
GROUP BY |
|||
t.streetId |
|||
) t1 |
|||
) t2 |
|||
ORDER BY |
|||
<if test="formDto.sortState == 1"> |
|||
t2.proportion DESC |
|||
</if> |
|||
<if test="formDto.sortState == 2"> |
|||
t2.proportion |
|||
</if> |
|||
LIMIT #{formDto.pageIndex},#{formDto.pageSize}; |
|||
</select> |
|||
</mapper> |
|||
@ -1,385 +0,0 @@ |
|||
<?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.user.dao.UserAnalysisDao"> |
|||
|
|||
<select id="selectListUserDataRank" resultType="com.elink.esua.epdc.dto.user.result.UserDataRankResultDTO"> |
|||
SELECT |
|||
t1.*, |
|||
t1.userCount - t1.partyMemberCount AS residentCount, |
|||
t1.oldCount / t1.userCount oldPercent, |
|||
t1.youngCount / t1.userCount youngPercent |
|||
FROM ( |
|||
SELECT |
|||
t.streetName, t.streetId, |
|||
COUNT( t.userId ) userCount, |
|||
count( t.SEX = '1' OR NULL ) maleCount, |
|||
count( t.SEX = '0' OR NULL ) femaleCount, |
|||
count( t.SEX = '2' OR NULL ) unknownSexCount, |
|||
COUNT( t.PARTY_FLAG = '1' OR NULL ) partyMemberCount, |
|||
COUNT( t.age > 50 OR NULL ) oldCount, |
|||
COUNT( ( t.age <= 50 AND t.age > 0 ) OR NULL ) youngCount |
|||
FROM ( |
|||
SELECT |
|||
uu.ID AS userId, |
|||
CASE WHEN uu.SEX is null or uu.SEX != '0' AND uu.SEX != '1' THEN '2' ELSE uu.SEX END AS SEX, |
|||
uu.STATE, uu.PARTY_FLAG, uu.DEPT_ID, |
|||
IFNULL( TIMESTAMPDIFF( YEAR, uu.BIRTHDAY, CURDATE()), 0 ) age, |
|||
ad2.`name` streetName, ad2.id streetId |
|||
FROM |
|||
esua_epdc_user.epdc_user uu |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad ON uu.DEPT_ID = ad.ID AND ad.type_key = 'grid_party' |
|||
<include refid="joinCommunityStreet"></include> |
|||
WHERE uu.DEL_FLAG = '0' |
|||
<if test='partyFlag != null and partyFlag == "1"'>AND uu.PARTY_FLAG = '1'</if> |
|||
<choose> |
|||
<when test="gridId != null and gridId != ''">AND ad2.ID = #{gridId}</when> |
|||
<otherwise> |
|||
<if test="deptIdList != null and deptIdList.size() > 0"> |
|||
AND ad2.ID in |
|||
<foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">#{deptId}</foreach> |
|||
</if> |
|||
</otherwise> |
|||
</choose> |
|||
<if test="startTime != null and endTime != null and endTime != ''"> |
|||
AND uu.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|||
</if> |
|||
AND ad.id IS NOT NULL |
|||
) t GROUP BY t.streetId |
|||
) t1 |
|||
<choose> |
|||
<when test='category != null and category == "0"'> order by t1.oldCount desc </when> |
|||
<when test='category != null and category == "1"'> order by t1.youngCount desc </when> |
|||
<when test='category != null and category == "2"'> order by t1.oldCount asc </when> |
|||
<when test='category != null and category == "3"'> order by t1.youngCount asc </when> |
|||
<when test='category != null and category == "7"'>order by t1.userCount desc </when> |
|||
<when test='category != null and category == "8"'>order by t1.userCount asc </when> |
|||
<when test='category != null and category == "4"'>order by t1.userCount desc </when> |
|||
<when test='category != null and category == "5"'>order by t1.partyMemberCount desc </when> |
|||
<when test='category != null and category == "6"'>order by residentCount desc </when> |
|||
<otherwise> order by t1.streetId asc </otherwise> |
|||
</choose> |
|||
</select> |
|||
|
|||
<select id="selectListPartyAuthFailureCountByStreetId" |
|||
resultType="com.elink.esua.epdc.dto.user.result.UserDataRankResultDTO"> |
|||
SELECT |
|||
ad2.id AS streetId, |
|||
COUNT( DISTINCT uf.USER_ID ) partyAuthFailureCount |
|||
FROM |
|||
esua_epdc_user.epdc_user uu |
|||
LEFT JOIN esua_epdc_user.epdc_party_authentication_failed uf ON uu.id = uf.user_id |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad ON uu.DEPT_ID = ad.ID AND ad.type_key = 'grid_party' |
|||
<include refid="joinCommunityStreet"></include> |
|||
WHERE |
|||
uu.DEL_FLAG = '0' |
|||
AND uu.PARTY_FLAG = '0' |
|||
AND ad.id IS NOT NULL |
|||
<if test="streetIdList != null and streetIdList.size() > 0"> |
|||
and ad2.ID in |
|||
<foreach collection="streetIdList" item="deptId" open="(" separator="," close=")">#{deptId}</foreach> |
|||
</if> |
|||
GROUP BY |
|||
ad2.ID |
|||
</select> |
|||
|
|||
|
|||
<!--居民扫码数--> |
|||
<select id="selectListEwmCount" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|||
SELECT |
|||
CONCAT(ad2.`name`,ad1.`name`,t0.`name`) AS allDeptName, |
|||
count(ug.ID) AS ewmCount |
|||
FROM |
|||
( |
|||
SELECT |
|||
ad.id, |
|||
ad.`name`, |
|||
ad.pid |
|||
FROM |
|||
esua_epdc_admin.sys_dept ad |
|||
WHERE |
|||
ad.type_key = 'grid_party' |
|||
AND ad.del_flag = 0 |
|||
) t0 |
|||
LEFT JOIN esua_epdc_user.epdc_user_grid_relation ug ON ug.GRID_ID = t0.id AND ug.DEL_FLAG = '0' |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad1.id = t0.pid |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad2.id = ad1.pid |
|||
GROUP BY |
|||
t0.id |
|||
ORDER BY |
|||
t0.id ASC |
|||
</select> |
|||
|
|||
<!--新闻数 通知数 议题数--> |
|||
<select id="selectListNewsNoticeEventCount" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|||
SELECT |
|||
t.gridId, |
|||
COUNT( DISTINCT nne.id ) newsCount, |
|||
COUNT( DISTINCT nnn.ID ) noticeCount, |
|||
COUNT( DISTINCT eee.ID ) eventCount |
|||
FROM |
|||
<foreach collection="gridIdList" item="gridId" open="(" separator="UNION ALL" close=") t"> |
|||
SELECT #{gridId} gridId |
|||
</foreach> |
|||
LEFT JOIN esua_epdc_news.epdc_news nne ON t.gridId = nne.DEPT_ID AND nne.DEL_FLAG = '0' |
|||
LEFT JOIN esua_epdc_news.epdc_notice nnn ON t.gridId = nnn.DEPT_ID AND nnn.DEL_FLAG = '0' |
|||
LEFT JOIN esua_epdc_events.epdc_events eee ON t.gridId = eee.GRID_ID AND eee.DEL_FLAG = '0' AND eee.EVENT_STATE = '4' |
|||
where 1=1 |
|||
<if test="startTime != null and endTime != null and endTime != ''"> |
|||
AND nne.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|||
AND nnn.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|||
AND eee.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|||
</if> |
|||
GROUP BY |
|||
t.gridId |
|||
</select> |
|||
|
|||
<!--项目数--> |
|||
<select id="selectListItemCount" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|||
SELECT |
|||
epen.GRID_ID gridId, |
|||
COUNT( epen.ID ) itemCount, |
|||
COUNT(epen.EVALUATION_SCORE = '2' OR NULL) itemPraiseCount, |
|||
count(epen.ITEM_STATE = '10' or epen.ITEM_STATE = '5' or null) itemCloseCount |
|||
FROM |
|||
esua_epdc_events.epdc_item epen |
|||
WHERE |
|||
epen.DEL_FLAG = '0' |
|||
<if test="gridIdList != null and gridIdList.size() > 0"> |
|||
AND epen.GRID_ID in <include refid="foreachGridIdList"></include> |
|||
</if> |
|||
<if test="startTime != null and endTime != null and endTime != ''"> |
|||
AND epen.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|||
</if> |
|||
GROUP BY epen.GRID_ID |
|||
</select> |
|||
|
|||
<!--社群数--> |
|||
<select id="selectListCommunityCount" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|||
SELECT |
|||
epgr.GRID_ID gridId, |
|||
COUNT( DISTINCT epgr.ID ) communityCount, |
|||
COUNT( DISTINCT ug.user_id ) communityMemberCount, |
|||
COUNT( DISTINCT ut.ID ) communityTopicCount |
|||
FROM |
|||
esua_epdc_group.epdc_group epgr |
|||
LEFT JOIN esua_epdc_group.epdc_user_group ug ON epgr.id = ug.group_id AND ug.DEL_FLAG = '0' |
|||
LEFT JOIN esua_epdc_group.epdc_topic ut ON epgr.id = ut.group_id AND ut.DEL_FLAG = '0' |
|||
WHERE |
|||
epgr.DEL_FLAG = '0' AND ( epgr.STATE = '10' OR epgr.STATE = '15' ) |
|||
<if test="gridIdList != null and gridIdList.size() > 0"> |
|||
AND epgr.GRID_ID in <include refid="foreachGridIdList"></include> |
|||
</if> |
|||
<if test="startTime != null and endTime != null and endTime != ''"> |
|||
AND epgr.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|||
</if> |
|||
GROUP BY epgr.GRID_ID |
|||
</select> |
|||
|
|||
|
|||
<select id="getUserStatistics" resultType="com.elink.esua.epdc.dto.user.result.UserAnalysisCountDTO" |
|||
parameterType="com.elink.esua.epdc.dto.user.form.UserCountDTO"> |
|||
SELECT |
|||
t.userCount as allUserCount, |
|||
t.partyMemberCount, |
|||
t.residentCount userCount, |
|||
round(t.partyMemberCount/t.userCount,2) as partyMemberPercent, |
|||
round(t.residentCount/t.userCount,2) as residentPercent |
|||
FROM |
|||
( |
|||
SELECT |
|||
COUNT( u.ID ) userCount, |
|||
COUNT( u.STATE != '0' OR NULL ) residentCount, |
|||
COUNT( u.party_flag = '1' OR NULL ) partyMemberCount |
|||
FROM |
|||
esua_epdc_user.epdc_user u |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad ON u.DEPT_ID = ad.ID |
|||
AND ad.type_key = 'grid_party' |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad.pid = ad1.id |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad1.pid = ad2.id |
|||
WHERE |
|||
u.DEL_FLAG = '0' |
|||
<if test="deptIdList != null and deptIdList.size() > 0"> |
|||
and ad.ID in |
|||
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|||
#{deptIdItem} |
|||
</foreach> |
|||
</if> |
|||
<if test='formDto.deptId != null and formDto.deptId != ""'> |
|||
AND ( ad1.id = #{formDto.deptId} or ad.id = #{formDto.deptId}) |
|||
</if> |
|||
|
|||
)t |
|||
</select> |
|||
<select id="getGridStatistics" resultType="com.elink.esua.epdc.dto.user.result.GriddingCountDTO" |
|||
parameterType="com.elink.esua.epdc.dto.user.form.UserCountDTO"> |
|||
SELECT |
|||
COUNT( ad.id) gridTotle, |
|||
COUNT( ac.ID) gridCount |
|||
|
|||
FROM |
|||
esua_epdc_admin.sys_dept ad |
|||
LEFT JOIN esua_epdc_admin.epdc_dept_ma_code ac ON ad.id = ac.GRID_ID |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad.pid = ad1.id |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad1.pid = ad2.id |
|||
WHERE |
|||
ad.type_key = 'grid_party' |
|||
<if test="deptIdList != null and deptIdList.size() > 0"> |
|||
and ad2.ID in |
|||
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|||
#{deptIdItem} |
|||
</foreach> |
|||
</if> |
|||
|
|||
<if test='formDto.deptId != null and formDto.deptId != ""'> |
|||
AND (ad.id = #{formDto.deptId} or ad1.id = #{formDto.deptId} or ad2.id = #{formDto.deptId}) |
|||
</if> |
|||
ORDER BY |
|||
ad.create_date ASC |
|||
</select> |
|||
<select id="userRegisterSort" |
|||
resultType="com.elink.esua.epdc.dto.user.result.UserSortRankResultDTO"> |
|||
SELECT |
|||
t.ID as deptId, |
|||
t.street as deptName, |
|||
t.residentCount as allUserCount, |
|||
t.partyMemberCount as partyMemberCount, |
|||
t.residentCount - t.partyMemberCount as userCount, |
|||
t.partyMemberCount / t.residentCount AS partyMemberPercent |
|||
FROM( |
|||
SELECT |
|||
ad.ID as ID, |
|||
ad2.`name` AS street, |
|||
COUNT( uu.id ) residentCount, |
|||
COUNT( uu.PARTY_FLAG = '1' OR NULL ) partyMemberCount |
|||
FROM |
|||
esua_epdc_user.epdc_user uu |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad ON uu.DEPT_ID = ad.ID AND ad.type_key = 'grid_party' |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad.pid = ad1.id |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad1.pid = ad2.id |
|||
WHERE |
|||
uu.DEL_FLAG = '0' |
|||
AND ad.id IS NOT NULL |
|||
<if test="deptIdList != null and deptIdList.size() > 0"> |
|||
and ad.ID in |
|||
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|||
#{deptIdItem} |
|||
</foreach> |
|||
</if> |
|||
<if test='formDto.timestamp != null and formDto.timestamp != ""'> |
|||
AND DATE_FORMAT( uu.CREATED_TIME, '%Y-%m-%d %H:%i:%s' ) <= #{formDto.timestamp} |
|||
</if> |
|||
|
|||
<if test='formDto.deptId != null and formDto.deptId != ""'> |
|||
AND (ad2.id = #{formDto.deptId} or ad1.id = #{formDto.deptId} or ad.id = #{formDto.deptId}) |
|||
</if> |
|||
GROUP BY |
|||
ad2.ID |
|||
) t |
|||
ORDER BY |
|||
<if test='formDto.sortType != null and formDto.sortType != "" and formDto.sortType == "1"'> |
|||
t.residentCount |
|||
</if> |
|||
<if test='formDto.sortType != null and formDto.sortType != "" and formDto.sortType == "2"'> |
|||
t.partyMemberCount |
|||
</if> |
|||
<if test='formDto.sortState != null and formDto.sortState != "" and formDto.sortState == "1"'> |
|||
Desc |
|||
</if> |
|||
<if test='formDto.sortState != null and formDto.sortState != "" and formDto.sortState == "2"'> |
|||
Asc |
|||
</if> |
|||
LIMIT #{formDto.pageIndex},#{formDto.pageSize} |
|||
</select> |
|||
|
|||
<!--循环数据权限中的部门id--> |
|||
<sql id="foreachDeptIdList"> |
|||
<foreach collection="deptIdList" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</sql> |
|||
<!--循环网格id集合--> |
|||
<sql id="foreachGridIdList"> |
|||
<foreach collection="gridIdList" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</sql> |
|||
|
|||
<select id="selectListGridHasMaCode" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|||
SELECT |
|||
ad.id gridId, |
|||
CONCAT( ad2.`name`, '-', ad1.`name`, '-', ad.`name` ) AS allDeptName, |
|||
GROUP_CONCAT( DISTINCT u.real_name ) gridLeader |
|||
FROM |
|||
<include refid="fromGridCommunityStreet"></include> |
|||
LEFT JOIN esua_epdc_admin.epdc_dept_ma_code ama ON ad.id = ama.GRID_ID AND ama.DEL_FLAG = '0' |
|||
LEFT JOIN esua_epdc_admin.sys_role_data_scope ards ON ards.dept_id = ad.id |
|||
LEFT JOIN esua_epdc_admin.sys_role r ON ards.role_id = r.id AND r.DEL_FLAG = 0 and r.type_key = 'gridLeader' |
|||
LEFT JOIN esua_epdc_admin.sys_role_user ru ON r.id = ru.role_id |
|||
LEFT JOIN esua_epdc_admin.sys_user u ON ru.user_id = u.id AND u.del_flag = 0 |
|||
WHERE |
|||
ad.type_key = 'grid_party' |
|||
<if test="deptIdList != null and deptIdList.size() > 0"> |
|||
and ad.ID in <include refid="foreachDeptIdList"></include> |
|||
</if> |
|||
AND ad.del_flag = 0 |
|||
AND ama.ID IS <if test='category != null and category == "1"'>NOT</if> NULL |
|||
<if test="gridId != null and gridId != ''">and (ad1.id = #{gridId} or ad2.id = #{gridId})</if> |
|||
GROUP BY ad.id |
|||
ORDER BY ama.CREATED_TIME DESC, ad.create_date DESC |
|||
</select> |
|||
<select id="selectListReigistData" resultType="com.elink.esua.epdc.dto.user.result.GridOpeningResultDTO"> |
|||
SELECT |
|||
t.DEPT_ID gridId, COUNT( t.ID ) registerCount, |
|||
COUNT(t.PARTY_FLAG = '0' OR NULL) residentCount, |
|||
COUNT(t.PARTY_FLAG = '1' OR NULL) partyCount |
|||
FROM ( |
|||
SELECT |
|||
uu.ID, uu.DEPT_ID, uu.STATE, uu.PARTY_FLAG |
|||
FROM |
|||
esua_epdc_user.epdc_user uu |
|||
WHERE |
|||
uu.DEL_FLAG = '0' |
|||
<if test="gridIdList != null and gridIdList.size() > 0"> |
|||
AND uu.DEPT_ID in <include refid="foreachGridIdList"></include> |
|||
</if> |
|||
<if test="startTime != null and endTime != null and endTime != ''"> |
|||
AND uu.CREATED_TIME BETWEEN #{startTime} AND #{endTime} |
|||
</if> |
|||
AND uu.DEPT_ID IS NOT NULL |
|||
) t |
|||
GROUP BY t.DEPT_ID |
|||
</select> |
|||
|
|||
<select id="selectCountGridWorkOrNot" |
|||
resultType="com.elink.esua.epdc.dto.user.result.GridDataTotalResultDTO"> |
|||
SELECT |
|||
COUNT(t.ID = 'unwork' OR NULL) unWorkGridCount, COUNT(t.ID != 'unwork' OR NULL) workGridCount |
|||
FROM ( |
|||
SELECT |
|||
IFNULL( ama.id, 'unwork' ) id |
|||
FROM |
|||
<include refid="fromGridCommunityStreet"></include> |
|||
LEFT JOIN esua_epdc_admin.epdc_dept_ma_code ama ON ad.id = ama.GRID_ID AND ama.DEL_FLAG = '0' |
|||
WHERE |
|||
ad.type_key = 'grid_party' |
|||
AND ad.del_flag = 0 |
|||
<if test="deptIdList != null and deptIdList.size() > 0"> |
|||
AND ad.id in <include refid="foreachDeptIdList"></include> |
|||
</if> |
|||
<if test="gridId != null and gridId != ''">and (ad1.id = #{gridId} or ad2.id = #{gridId})</if> |
|||
GROUP BY |
|||
ad.id |
|||
)t |
|||
</select> |
|||
|
|||
<sql id="fromGridCommunityStreet"> |
|||
esua_epdc_admin.sys_dept ad |
|||
<include refid="joinCommunityStreet"></include> |
|||
</sql> |
|||
|
|||
<sql id="joinCommunityStreet"> |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad1.id = ad.pid |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad2.id = ad1.pid |
|||
</sql> |
|||
</mapper> |
|||
@ -1,64 +0,0 @@ |
|||
<?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.user.dao.YoungMemberRankDao"> |
|||
<resultMap id="listOfYoungMemberRankMap" type="com.elink.esua.epdc.dto.user.result.YoungMemberRankResultDTO"> |
|||
<result property="deptId" column="deptId"/> |
|||
<result property="deptName" column="deptName"/> |
|||
<result property="partyMemberCount" column="partyMemberCount"/> |
|||
<result property="youngMemberCount" column="youngMemberCount"/> |
|||
<result property="proportion" column="proportion"/> |
|||
</resultMap> |
|||
|
|||
|
|||
<select id="selectListOfYoungMemberRank" resultMap="listOfYoungMemberRankMap"> |
|||
SELECT |
|||
* |
|||
FROM ( |
|||
SELECT |
|||
t1.*, |
|||
t1.youngMemberCount / t1.partyMemberCount * 100 proportion |
|||
FROM ( |
|||
SELECT |
|||
t.street as deptName, |
|||
t.streetId as deptId, |
|||
COUNT( t.userId ) AS partyMemberCount, |
|||
COUNT( t.age <= 50 ) youngMemberCount |
|||
FROM ( |
|||
SELECT |
|||
ad2.`name` AS street, |
|||
ad2.id streetId, |
|||
uu.ID userId, |
|||
TIMESTAMPDIFF( YEAR, uu.BIRTHDAY, CURDATE()) age |
|||
FROM |
|||
esua_epdc_user.epdc_user uu |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad ON uu.DEPT_ID = ad.ID |
|||
AND ad.type_key = 'grid_party' |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad1 ON ad.pid = ad1.id |
|||
LEFT JOIN esua_epdc_admin.sys_dept ad2 ON ad1.pid = ad2.id |
|||
WHERE |
|||
uu.DEL_FLAG = '0' |
|||
AND uu.PARTY_FLAG = '1' |
|||
AND ad.id IS NOT NULL |
|||
<if test="formDto.deptId != null and formDto.deptId !=''"> |
|||
AND (ad2.id = #{formDto.deptId} or ad.id = #{formDto.deptId} or ad1.id = #{formDto.deptId} ) |
|||
</if> |
|||
AND ad.id IN |
|||
<foreach item="deptIdItem" collection="deptIdList" open="(" separator="," close=")"> |
|||
#{deptIdItem} |
|||
</foreach> |
|||
) t |
|||
GROUP BY |
|||
t.streetId |
|||
) t1 |
|||
) t2 |
|||
ORDER BY |
|||
<if test="formDto.sortState == 1"> |
|||
t2.proportion DESC |
|||
</if> |
|||
<if test="formDto.sortState == 2"> |
|||
t2.proportion |
|||
</if> |
|||
LIMIT #{formDto.pageIndex},#{formDto.pageSize}; |
|||
</select> |
|||
</mapper> |
|||
Loading…
Reference in new issue