Merge remote-tracking branch 'origin/test' into test
1 文件已重命名
83个文件已修改
5个文件已删除
36个文件已添加
| | |
| | | /** |
| | | * 令牌有效期(分钟) |
| | | */ |
| | | public final static long TOKEN_EXPIRE = 720; |
| | | public final static long _EXPIRE = 720; |
| | | |
| | | /** |
| | | * 参数管理 cache key |
| | |
| | | * 首页商城是否展示(1.是 2.否) |
| | | */ |
| | | public static final Integer IS_SHOP_OPEN = 2; |
| | | |
| | | /** |
| | | * 网格综治-默认角色权限默认字符串 |
| | | */ |
| | | public static final String GRID_DEFAULT_ROLE_KEY="grid_member_default_role"; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 随手拍处理请求参数 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("后台管理随手拍批量操作请求参数") |
| | | public class ComActEasyPhotoEditAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "随手拍id",required = true) |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "是否公示(0.否 1.是)", hidden = false, example = "1") |
| | | private Integer isPublicity; |
| | | |
| | | @ApiModelProperty(value = "1.切换公示状态 2.删除随手拍",required = true) |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "发生地点-位置备注", hidden = false, example = "") |
| | | private String happentAddress; |
| | | |
| | | //位置备注 |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "事件发生地点", hidden = false, example = "", required = true) |
| | | private String happenAddress; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "发生区域-网格ID", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "发生区域-网格ID不能为空") |
| | | private Long gridId; |
| | | |
| | | @Length(max=255) |
| | | |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "", required = true) |
| | | @NotNull(message = "事件描述不能为空") |
| | | private String eventDes; |
| | |
| | | @ApiModelProperty(value = "音频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp3") |
| | | private String audio; |
| | | |
| | | @ApiModelProperty(value = "音频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer audioTime; |
| | | |
| | | @ApiModelProperty(value = "视频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp4") |
| | | private String video; |
| | | |
| | | @ApiModelProperty(value = "视频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer videoTime; |
| | | |
| | | @ApiModelProperty(value = "图片,逗号隔开(限9张)", hidden = false, |
| | | example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg,http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg") |
| | | private String pics; |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("社区后台添加事件请求参数") |
| | | public class CommonEventCommunityAddDTO extends CommonEventAddDTO { |
| | | |
| | | @ApiModelProperty(value = "网格员ID", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "网格员不能为空") |
| | | private Long gridMemberId; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "音频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp3") |
| | | private String audio; |
| | | |
| | | @ApiModelProperty(value = "音频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer audioTime; |
| | | |
| | | @ApiModelProperty(value = "视频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp4") |
| | | private String video; |
| | | |
| | | @ApiModelProperty(value = "视频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer videoTime; |
| | | |
| | | @ApiModelProperty(value = "图片,逗号隔开(限9张)", hidden = false, |
| | | example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg,http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg") |
| | | private String pics; |
| | | |
| | | |
| | | @ApiModelProperty(value = "是否验证:社区后台处理时必填", hidden = false, example = "true") |
| | | private Boolean needVerify; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "张三") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户类型:0网格员 1 社区后台", hidden = true, example = "1") |
| | | private Integer operateType; |
| | | @ApiModelProperty(value = "(当前操作)用户社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | @ApiModelProperty(value = "(当前操作)用户社区名称", hidden = true, example = "学园社区") |
| | | private String communityName; |
| | | } |
| | |
| | | @ApiModelProperty(value = "发生地点-位置备注", hidden = false, example = "") |
| | | private String happentAddress; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "事件发生地点", hidden = false, example = "", required = true) |
| | | private String happenAddress; |
| | | |
| | | //位置备注 |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "发生区域-网格ID", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "发生区域-网格ID不能为空") |
| | | private Long gridId; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "", required = true) |
| | | @NotNull(message = "事件描述不能为空") |
| | | private String eventDes; |
| | |
| | | @ApiModelProperty(value = "音频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp3") |
| | | private String audio; |
| | | |
| | | @ApiModelProperty(value = "音频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer audioTime; |
| | | |
| | | @ApiModelProperty(value = "视频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp4") |
| | | private String video; |
| | | |
| | | @ApiModelProperty(value = "视频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer videoTime; |
| | | |
| | | @ApiModelProperty(value = "图片,逗号隔开(限9张)", hidden = false, |
| | | example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg,http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg") |
| | | private String pics; |
| | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "张三") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | } |
File was renamed from springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventRepublicDTO.java |
| | |
| | | * */ |
| | | @Data |
| | | @ApiModel("事件重新发布请求参数") |
| | | public class CommonEventRepublicDTO { |
| | | public class CommonEventRepublishDTO { |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "事件id", hidden = false, example = "1", required = true) |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 新增网格请求参数 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("新增网格请求参数") |
| | | public class EventGridDataAddAdminDTO { |
| | | |
| | | @NotBlank() @Length(max=100) |
| | | @ApiModelProperty(value = "网格名称", hidden = false, example = "") |
| | | private String gridName; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "网格描述", hidden = false, example = "") |
| | | private String remarks; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "面积", hidden = false, example = "") |
| | | private String area; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "网格颜色", hidden = false, example = "") |
| | | private String fillColor; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "网格边框颜色", hidden = false, example = "") |
| | | private String lineColor; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "网格边框宽度", hidden = false, example = "") |
| | | private String lineBroadband; |
| | | |
| | | @Length(max=2147483647) |
| | | @ApiModelProperty(value = "围栏数据", hidden = false, example = "") |
| | | private String data; |
| | | |
| | | @ApiModelProperty(value = "网格员id集合", hidden = false, example = "") |
| | | private List<Long> memberIds; |
| | | |
| | | @ApiModelProperty(value = "网格所属社区ID", hidden = true, example = "1") |
| | | private Long gridCommunityId; |
| | | |
| | | @ApiModelProperty(value = "当前登录用户id", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.hibernate.validator.constraints.Length; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | |
| | | @ApiModelProperty(value = "围栏数据", hidden = false, example = "") |
| | | private String data; |
| | | |
| | | @ApiModelProperty(value = "网格员ID", hidden = false, example = "[12,45]") |
| | | private List<Long> gridMemebers; |
| | | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 新增网格请求参数 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("新增网格请求参数") |
| | | public class EventGridDataEditAdminDTO { |
| | | |
| | | @NotBlank() @Length(max=100) |
| | | @ApiModelProperty(value = "网格名称", hidden = false, example = "") |
| | | private String gridName; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "网格描述", hidden = false, example = "") |
| | | private String remarks; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "面积", hidden = false, example = "") |
| | | private String area; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "网格颜色", hidden = false, example = "") |
| | | private String fillColor; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "网格边框颜色", hidden = false, example = "") |
| | | private String lineColor; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "网格边框宽度", hidden = false, example = "") |
| | | private String lineBroadband; |
| | | |
| | | @Length(max=2147483647) |
| | | @ApiModelProperty(value = "围栏数据", hidden = false, example = "") |
| | | private String data; |
| | | |
| | | @ApiModelProperty(value = "网格员id集合", hidden = false, example = "") |
| | | private List<Long> memberIds; |
| | | |
| | | @ApiModelProperty(value = "网格id", hidden = false, example = "1") |
| | | private Long gridId; |
| | | |
| | | @ApiModelProperty(value = "当前登录用户id", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 编辑表单 |
| | |
| | | @ApiModelProperty(value = "围栏数据", hidden = false, example = "") |
| | | private String data; |
| | | |
| | | @ApiModelProperty(value = "网格员ID", hidden = false, example = "[12,45]") |
| | | private List<Long> gridMemebers; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | import org.hibernate.validator.constraints.Length; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("创建网格员请求参数") |
| | | public class EventGridMemberAddDTO { |
| | | |
| | | @NotBlank(message = "账号昵称不能为空") |
| | | @Length(max=50) |
| | | @ApiModelProperty(value = "账号昵称", example = "") |
| | | private String nickName; |
| | | |
| | | @NotBlank(message = "登录账号不能为空") |
| | | @Length(max=50) |
| | | @ApiModelProperty(value = "登录账号", hidden = false, example = "") |
| | | private String account; |
| | | |
| | | @NotBlank(message = "登录密码不能为空") |
| | | @Length(min = 8, max=100) |
| | | @ApiModelProperty(value = "登录密码", hidden = false, example = "") |
| | | private String password; |
| | | |
| | | @NotBlank(message = "联系电话不能为空") |
| | | @Length(max=11) |
| | | @ApiModelProperty(value = "联系电话", hidden = false, example = "") |
| | | private String phone; |
| | | |
| | | @NotNull(message = "工作开始时间不能为空") |
| | | @Max(24) |
| | | @ApiModelProperty(value = "工作开始时间", hidden = false, example = "") |
| | | private Integer workStartTime; |
| | | |
| | | @NotNull(message = "工作结束时间不能为空") |
| | | @Max(24) |
| | | @ApiModelProperty(value = "工作结束时间", hidden = false, example = "") |
| | | private Integer workEndTime; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "头像", hidden = false, example = "") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(value = "账号状态", hidden = false, example = "") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "张三") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "网格员id", hidden = false, example = "") |
| | | private Long gridMemberId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("创建网格员请求参数") |
| | | public class EventGridMemberEditAdminDTO { |
| | | |
| | | @NotBlank(message = "账号昵称不能为空") |
| | | @Length(max=50) |
| | | @ApiModelProperty(value = "账号昵称", example = "") |
| | | private String nickName; |
| | | |
| | | @NotBlank(message = "登录账号不能为空") |
| | | @Length(max=50) |
| | | @ApiModelProperty(value = "登录账号", hidden = false, example = "") |
| | | private String account; |
| | | |
| | | @NotBlank(message = "联系电话不能为空") |
| | | @Length(max=11) |
| | | @ApiModelProperty(value = "联系电话", hidden = false, example = "") |
| | | private String phone; |
| | | |
| | | @NotNull(message = "工作开始时间不能为空") |
| | | @Max(24) |
| | | @ApiModelProperty(value = "工作开始时间", hidden = false, example = "") |
| | | private Integer workStartTime; |
| | | |
| | | @NotNull(message = "工作结束时间不能为空") |
| | | @Max(24) |
| | | @ApiModelProperty(value = "工作结束时间", hidden = false, example = "") |
| | | private Integer workEndTime; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "头像", hidden = false, example = "") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(value = "账号状态", hidden = false, example = "") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "张三") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "网格员id", hidden = false, example = "") |
| | | private Long gridMemberId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 编辑表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("编辑网格和网格员的关联关系请求参数") |
| | | public class EventGridMemberEditDTO { |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "id,如果是新增则不填", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | @NotBlank() |
| | | @Length(max=50) |
| | | @ApiModelProperty(value = "账号昵称", hidden = false, example = "") |
| | | private String nickName; |
| | | |
| | | @NotBlank() @Length(max=50) |
| | | @ApiModelProperty(value = "登录账号", hidden = false, example = "") |
| | | private String account; |
| | | |
| | | @NotBlank() @Length(min = 8, max=100) |
| | | @ApiModelProperty(value = "登录密码", hidden = false, example = "") |
| | | private String paswd; |
| | | |
| | | @NotBlank() @Length(max=11) |
| | | @ApiModelProperty(value = "联系电话", hidden = false, example = "") |
| | | private String phone; |
| | | |
| | | @NotNull() |
| | | @Max(24) |
| | | @ApiModelProperty(value = "工作开始时间", hidden = false, example = "") |
| | | private Integer workStart; |
| | | |
| | | @NotNull() |
| | | @Max(24) |
| | | @ApiModelProperty(value = "工作结束时间", hidden = false, example = "") |
| | | private String workEnd; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "头像", hidden = false, example = "") |
| | | private String imageUrl; |
| | | |
| | | @NotBlank() @Length(max=100) |
| | | @ApiModelProperty(value = "账号状态", hidden = false, example = "") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "张三") |
| | | private String userName; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("修改网格员状态请求参数") |
| | | public class EventGridMemberEditStatusDTO { |
| | | |
| | | @ApiModelProperty(value = "需要修改的网格员id集合", example = "") |
| | | private List<Long> ids; |
| | | |
| | | @ApiModelProperty(value = "状态(1.启用 2.禁用)", example = "") |
| | | private Integer status; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 网格员密码重置请求参数 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("网格员密码重置请求参数") |
| | | public class EventGridMemberPassResetDTO { |
| | | |
| | | @NotBlank(message = "登录密码不能为空") |
| | | @Length(min = 8, max=100) |
| | | @ApiModelProperty(value = "登录密码", hidden = false, example = "") |
| | | private String password; |
| | | |
| | | @ApiModelProperty(value = "网格员id集合", hidden = false, example = "") |
| | | private List<Long> ids; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | |
| | | /** |
| | | * 创建表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("网格员预警记录请求参数") |
| | | public class EventGridMemberWainDTO { |
| | | |
| | | @Length(max=50) |
| | | @ApiModelProperty(value = "关键词", example = "") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "网格员id", hidden = false, example = "") |
| | | private Long gridMemberId; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | |
| | | /** |
| | | * 网格员工作轨迹请求参数 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("网格员工作轨迹请求参数") |
| | | public class EventGridMemberWorkTrajectoryDTO { |
| | | |
| | | @ApiModelProperty(value = "工作日期(格式:yyyy-MM-dd)", example = "") |
| | | private String time; |
| | | |
| | | @ApiModelProperty(value = "网格员id", example = "") |
| | | private Long gridMemberId; |
| | | |
| | | @ApiModelProperty(value = "查询开始时间", hidden = true, example = "") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "查询结束时间", hidden = true, example = "") |
| | | private String endTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.google.common.base.CaseFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询网格统计信息请求参数") |
| | | public class EventGridStatisticsDataDTO { |
| | | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "网格ID", hidden = true, example = "1", required = true) |
| | | @NotNull |
| | | private Long gridId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * 分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询用户待处理请求参数") |
| | | public class EventGridTodoDataDTO { |
| | | |
| | | @ApiModelProperty(value = "网格ID", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "网格ID不能为空") |
| | | private Long gridId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "李四") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "操作人所属社区", hidden = true, example = "学院社区") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty(value = "操作人所属社区", hidden = true, example = "学院社区") |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "事件类型", hidden = false, example = "1") |
| | | private Integer eventType; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "") |
| | | private String eventDes; |
| | | |
| | |
| | | @ApiModelProperty(value = "事件类型", hidden = false, example = "1") |
| | | private Integer eventType; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "") |
| | | private String eventDes; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("分页查询网格员统计请求参数") |
| | | public class MemberStatisticsAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "查询开始时间") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "查询结束时间") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "网格员名称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "社区id",hidden = true) |
| | | private Long communityId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * 随手拍列表请求参数 |
| | | * |
| | | * @author lyq |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("随手拍列表请求参数") |
| | | public class PageEasyAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "状态 1.待处理 2.已处理") |
| | | private Integer handleStatus; |
| | | |
| | | @ApiModelProperty(value = "是否公示(0.否 1.是)") |
| | | private Integer isPublicity; |
| | | |
| | | @ApiModelProperty(value = "是否上报社区处理(0.否 1.是)") |
| | | private Integer isReport; |
| | | |
| | | @ApiModelProperty(value = "随手拍类型id") |
| | | private Long easyPhotoTypeId; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "街道id") |
| | | private Long streetId; |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date propagandaTimeEnd; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "") |
| | | private String eventDes; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.google.common.base.CaseFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询网格数据管理请求参数") |
| | | public class PageEventGridDataAdminDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "网格所属街道", hidden = false, example = "1") |
| | | private Long gridStreetId; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "网格所属社区ID", hidden = false, example = "1") |
| | | private Long gridCommunityId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | @ApiModelProperty(value = "关键字", example = "") |
| | | private String keyWord; |
| | | |
| | | } |
| | |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询区县/街道/社区/网格员网格数据管理请求参数") |
| | | @ApiModel("查询网格数据管理请求参数") |
| | | public class PageEventGridDataDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | @ApiModelProperty(value = "关键字", example = "") |
| | | private String keyWord; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "排序字段, 默认createAt", example = "createAt") |
| | | private String sortAttr="createAt"; |
| | | |
| | | @ApiModelProperty(value = "排序方式: asc/desc(默认)", example = "desc") |
| | | @Pattern(regexp = "asc|desc|ASC|DESC") |
| | | private String sortType="desc"; |
| | | |
| | | public String getSortColumns(){ |
| | | String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr); |
| | | return dbColumn; |
| | | } |
| | | |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "主键ID", hidden = false, example = "1") |
| | | private Long id; |
| | | |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "网格所属街道", hidden = false, example = "1") |
| | | @ApiModelProperty(value = "网格所属街道id", hidden = false, example = "1") |
| | | private Long gridStreetId; |
| | | |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "网格所属社区ID", hidden = false, example = "1") |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "网格所属社区id", hidden = false, example = "1") |
| | | private Long gridCommunityId; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "关键词", hidden = false, example = "") |
| | | private String keyWord; |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "网格ID", hidden = false, example = "1") |
| | | private Long gridId; |
| | | |
| | | |
| | | @NotBlank() @Length(max=100) |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "网格名称", hidden = false, example = "") |
| | | private String gridName; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "账号昵称", hidden = true, example = "") |
| | | private String nickName; |
| | | |
| | | @NotNull() @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "网格员ID", hidden = false, example = "1") |
| | | private Long gridMemberId; |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "登录账号", hidden = true, example = "") |
| | | private String account; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "联系电话", hidden = true, example = "") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "账号状态(1.启用 2.禁用)", example = "1") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "网格员工作状态(1.在岗 2.脱岗 3.已下班)", example = "1") |
| | | private Integer workStatus; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "创建人", hidden = false, example = "1") |
| | | private Long createBy; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间-开始时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date createAtBegin; |
| | | @ApiModelProperty(value = "创建时间-结束时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAtEnd; |
| | | |
| | | @ApiModelProperty(value = "网格员ID", hidden = true, example = "1") |
| | | private String gridMemberId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.google.common.base.CaseFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 事件管理分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询事件请求参数") |
| | | public class PageEventManageDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "排序字段, 默认createAt", example = "createAt") |
| | | private String sortAttr="createAt"; |
| | | |
| | | @ApiModelProperty(value = "排序方式: asc/desc(默认)", example = "desc") |
| | | @Pattern(regexp = "asc|desc|ASC|DESC", message = "排序方式参数错误") |
| | | private String sortType="desc"; |
| | | |
| | | public String getSortColumns(){ |
| | | String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr); |
| | | return dbColumn; |
| | | } |
| | | |
| | | |
| | | @ApiModelProperty(value = "搜索关键词", hidden = false, example = "1", required = true) |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "上报社区处理: 0 否 1 是", hidden = false, example = "1") |
| | | private Integer communityProcess; |
| | | |
| | | @Max(value = 6, message = "事件处理状态参数错误") |
| | | @ApiModelProperty(value = "事件处理状态(为空时查询全部):1 待处理、2 待验证、4 已解决、6 已失效", hidden = false, example = "1") |
| | | private Integer eventDealStatus; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件", hidden = false, example = "1") |
| | | //@NotNull(message = "事件分类不能为空") |
| | | private Integer eventType; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "危险级别", hidden = false, example = "1") |
| | | private Integer dangerLevel; |
| | | |
| | | @ApiModelProperty(value = "是否紧急", hidden = false, example = "true") |
| | | private Boolean urgent; |
| | | |
| | | @ApiModelProperty(value = "是否重大", hidden = false, example = "true") |
| | | private Boolean major; |
| | | |
| | | @ApiModelProperty(value = "红牌", hidden = false, example = "true") |
| | | private Boolean redCard; |
| | | |
| | | @ApiModelProperty(value = "黄牌", hidden = false, example = "true") |
| | | private Boolean yellowCard; |
| | | |
| | | @ApiModelProperty(value = "是否有效", hidden = false, example = "true") |
| | | private Boolean invalid; |
| | | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | private Integer eventType; |
| | | |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "") |
| | | private String eventDes; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.google.common.base.CaseFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import javax.validation.constraints.Max; |
| | | import javax.validation.constraints.NotNull; |
| | | import javax.validation.constraints.Pattern; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 分页查询表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("查询宣传教育事件请求参数") |
| | | public class PagePublicityEventCommunityDTO { |
| | | |
| | | @Max(value = 8, message = "事件处理状态参数错误") |
| | | @ApiModelProperty(value = "事件处理状态(为空时查询全部):1 已发布、5 草稿箱、6已撤销", hidden = false, example = "1") |
| | | private Integer eventDealStatus; |
| | | |
| | | @Length(max=50) |
| | | @ApiModelProperty(value = "关键词", example = "") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数,默认1", example = "1") |
| | | private Long pageNum = 1L; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数,默认10", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "排序字段, 默认createAt", example = "createAt") |
| | | private String sortAttr="createAt"; |
| | | |
| | | @ApiModelProperty(value = "排序方式: asc/desc(默认)", example = "desc") |
| | | @Pattern(regexp = "asc|desc|ASC|DESC", message = "排序方式参数错误") |
| | | private String sortType="desc"; |
| | | |
| | | public String getSortColumns(){ |
| | | String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr); |
| | | return dbColumn; |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | } |
| | |
| | | @NotNull(message = "网格ID不能为空") |
| | | private Long gridId; |
| | | |
| | | @Max(value = 6, message = "事件处理状态参数错误") |
| | | @Max(value = 8, message = "事件处理状态参数错误") |
| | | @ApiModelProperty(value = "事件处理状态(为空时查询全部):1 已发布、5 草稿箱、6已撤销", hidden = false, example = "1") |
| | | private Integer eventDealStatus; |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date propagandaTimeEnd; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "") |
| | | private String eventDes; |
| | | |
| | |
| | | @ApiModelProperty(value = "创建人", hidden = false, example = "1") |
| | | private Long createBy; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "创建时间-开始时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date createAtBegin; |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAtEnd; |
| | | |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "修改人", hidden = false, example = "1") |
| | | private Long updateBy; |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "修改时间-开始时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | private Date updateAtBegin; |
| | | |
| | | @ApiModelProperty(value = "修改时间-结束时间", hidden = false, example = "2021-05-01 18:05:50") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAtEnd; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "发生地点-位置备注", hidden = false, example = "") |
| | | private String happentAddress; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "事件发生地点", hidden = false, example = "", required = true) |
| | | private String happenAddress; |
| | | |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "宣传区域-网格ID", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "宣传区域不能为空") |
| | |
| | | @NotNull(message = "宣传主题不能为空") |
| | | private String eventTitle; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "宣传内容", hidden = false, example = "", required = true) |
| | | @NotNull(message = "宣传内容不能为空") |
| | | private String eventDes; |
| | |
| | | @URL |
| | | private String audio; |
| | | |
| | | @ApiModelProperty(value = "音频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer audioTime; |
| | | |
| | | @ApiModelProperty(value = "视频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp4") |
| | | @URL |
| | | private String video; |
| | | |
| | | @ApiModelProperty(value = "视频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer videoTime; |
| | | |
| | | @ApiModelProperty(value = "图片,逗号隔开(限9张)", hidden = false, |
| | | example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg,http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg") |
| | | private String pics; |
| | |
| | | @ApiModelProperty(value = "发生地点-位置备注", hidden = false, example = "") |
| | | private String happentAddress; |
| | | |
| | | @Length(max=255) |
| | | @ApiModelProperty(value = "事件发生地点", hidden = false, example = "", required = true) |
| | | private String happenAddress; |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "宣传区域-网格ID", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "宣传区域不能为空") |
| | |
| | | @NotNull(message = "宣传主题不能为空") |
| | | private String eventTitle; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "宣传内容", hidden = false, example = "", required = true) |
| | | @NotNull(message = "宣传内容不能为空") |
| | | private String eventDes; |
| | |
| | | @URL |
| | | private String audio; |
| | | |
| | | @ApiModelProperty(value = "音频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer audioTime; |
| | | |
| | | @ApiModelProperty(value = "视频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp4") |
| | | @URL |
| | | private String video; |
| | | |
| | | @ApiModelProperty(value = "视频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer videoTime; |
| | | |
| | | @ApiModelProperty(value = "图片,逗号隔开(限9张)", hidden = false, |
| | | example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg,http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg") |
| | | private String pics; |
| | |
| | | @NotNull(message = "发生区域-网格ID不能为空") |
| | | private Long gridId; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "", required = true) |
| | | @NotNull(message = "事件描述不能为空") |
| | | private String eventDes; |
| | |
| | | @ApiModelProperty(value = "音频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp3") |
| | | private String audio; |
| | | |
| | | @ApiModelProperty(value = "音频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer audioTime; |
| | | |
| | | @ApiModelProperty(value = "视频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp4") |
| | | private String video; |
| | | |
| | | @ApiModelProperty(value = "视频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer videoTime; |
| | | |
| | | @ApiModelProperty(value = "图片,逗号隔开(限9张)", hidden = false, |
| | | example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg,http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg") |
| | | private String pics; |
| | |
| | | @NotNull(message = "发生区域-网格ID不能为空") |
| | | private Long gridId; |
| | | |
| | | @Length(max=255) |
| | | @Length(max=500) |
| | | @ApiModelProperty(value = "事件描述", hidden = false, example = "", required = true) |
| | | @NotNull(message = "事件描述不能为空") |
| | | private String eventDes; |
| | |
| | | @ApiModelProperty(value = "音频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp3") |
| | | private String audio; |
| | | |
| | | @ApiModelProperty(value = "音频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer audioTime; |
| | | |
| | | @ApiModelProperty(value = "视频(限1个)", hidden = false, example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.mp4") |
| | | private String video; |
| | | |
| | | @ApiModelProperty(value = "视频时长(单位:秒)", hidden = false, example = "10") |
| | | private Integer videoTime; |
| | | |
| | | @ApiModelProperty(value = "图片,逗号隔开(限9张)", hidden = false, |
| | | example = "http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg,http://image.panzhihua.nhys.cdnhxx.com/idcard/8f77d43e8bce47d38b63e2a8ceb0a7c6.jpg") |
| | | private String pics; |
| | |
| | | @ApiModelProperty("0 未申请 1 申请中 2 通过 3 驳回") |
| | | private Integer volunteerStatus; |
| | | |
| | | |
| | | @ApiModelProperty("是否注册 0 否 1 是") |
| | | private Integer isRegister; |
| | | |
| | |
| | | @ApiModelProperty("是否已实名") |
| | | private Boolean isRealNamed; |
| | | |
| | | @ApiModelProperty("上班时间") |
| | | private Integer workStartTime; |
| | | |
| | | @ApiModelProperty("下班时间") |
| | | private Integer workEndTime; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "是否公示(0.否 1.是)") |
| | | private Integer isPublicity; |
| | | |
| | | @ApiModelProperty(value = "处理状态(1.待处理 2.已处理)") |
| | | private Integer handleStatus; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 随手拍列表 |
| | | */ |
| | | @Data |
| | | @ApiModel("社区活动 》随手拍") |
| | | public class ComActEasyPhotoAdminVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("随手拍内容") |
| | | private String detail; |
| | | |
| | | @ApiModelProperty("发布人昵称") |
| | | private String userNickName; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "是否上报社区处理(0.否 1.是)") |
| | | private Integer isReport; |
| | | |
| | | @ApiModelProperty(value = "是否公示(0.否 1.是)") |
| | | private Integer isPublicity; |
| | | |
| | | @ApiModelProperty(value = "处理状态(1.待处理 2.已处理)") |
| | | private Integer handleStatus; |
| | | |
| | | @ApiModelProperty("发起人头像") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty("图片路径列表,逗号分隔") |
| | | private String photoPathList; |
| | | |
| | | @ApiModelProperty("发生地址") |
| | | private String happenAddr; |
| | | |
| | | @ApiModelProperty(value = "地址备注") |
| | | private String addrRemark; |
| | | |
| | | @ApiModelProperty(value = "发生地址经纬度信息,逗号分割") |
| | | private String lngLat; |
| | | |
| | | @ApiModelProperty(value = "随手拍类型集合") |
| | | private List<String> photoTypeList; |
| | | |
| | | @ApiModelProperty(value = "随手拍处理意见") |
| | | private String handleResult; |
| | | |
| | | @ApiModelProperty(value = "处理结果,图片路径列表,逗号分隔") |
| | | private String handlePhotoList; |
| | | |
| | | @ApiModelProperty("处理人名字") |
| | | private String handlerName; |
| | | |
| | | @ApiModelProperty("处理人id") |
| | | private Long handlerId; |
| | | |
| | | @ApiModelProperty("处理时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date feedbackAt; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "地址备注") |
| | | private String addrRemark; |
| | | |
| | | // @ApiModelProperty(value = "状态 1待处理 2已处理") |
| | | // private Integer status; |
| | | @ApiModelProperty(value = "状态 1待处理 2已处理") |
| | | private Integer handleStatus; |
| | | |
| | | @ApiModelProperty(value = "处理人id") |
| | | private Long handlerId; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 社区 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-12-15 10:06 |
| | | **/ |
| | | @Data |
| | | @ApiModel("网格社区表") |
| | | public class ComGridActVO { |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("社区名字") |
| | | @NotBlank(groups = {AddGroup.class},message = "社区名字不能为空") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("社区地址") |
| | | @NotBlank(groups = {AddGroup.class},message = "社区地址不能为空") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("经度") |
| | | @NotBlank(groups = {AddGroup.class},message = "经度不能为空") |
| | | private String lng; |
| | | |
| | | @ApiModelProperty("维度") |
| | | @NotBlank(groups = {AddGroup.class},message = "纬度不能为空") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("省份地址编码") |
| | | @NotBlank(groups = {AddGroup.class},message = "省份地址编码不能为空") |
| | | private String provinceCode; |
| | | |
| | | @ApiModelProperty("市级地址编码") |
| | | @NotBlank(groups = {AddGroup.class},message = "市级地址编码不能为空") |
| | | private String cityCode; |
| | | |
| | | @ApiModelProperty("区级地址编码") |
| | | @NotBlank(groups = {AddGroup.class},message = "区级地址编码不能为空") |
| | | private String areaCode; |
| | | |
| | | @ApiModelProperty("区级地址编码-名字") |
| | | private String areaName; |
| | | |
| | | @ApiModelProperty("社区面积") |
| | | @Min(value =1,groups = {AddGroup.class},message = "社区面积不能为空") |
| | | private Double square; |
| | | |
| | | @ApiModelProperty("联系人") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系人不能为空") |
| | | private String contacts; |
| | | |
| | | @ApiModelProperty("联系人电话") |
| | | @NotBlank(groups = {AddGroup.class},message = "联系人电话不能为空") |
| | | private String contactsPhone; |
| | | |
| | | @ApiModelProperty("超管账号") |
| | | @NotBlank(groups = {AddGroup.class},message = "超管账号不能为空") |
| | | private String account; |
| | | |
| | | @ApiModelProperty("账号密码") |
| | | @NotBlank(groups = {AddGroup.class},message = "账号密码不能为空") |
| | | private String password; |
| | | |
| | | @ApiModelProperty(value = "状态 0 启用 1 禁用",example = "0") |
| | | private Integer state; |
| | | |
| | | @ApiModelProperty("距离-单位米") |
| | | private String distance; |
| | | |
| | | @ApiModelProperty("街道Id") |
| | | private Long streetId; |
| | | |
| | | @ApiModelProperty("是否默认") |
| | | private Boolean isGridUserDefault = false; |
| | | } |
| | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "事件处理状态") |
| | | private Integer eventDealStatus; |
| | | |
| | | @ApiModelProperty(value = "服务单号") |
| | | private String orderSn; |
| | | |
| | | @ApiModelProperty(value = "事件类型") |
| | | private String EventClazz; |
| | | |
| | | @ApiModelProperty(value = "1、办件事件2是宣传事件3是阅读事件") |
| | | private Long eventCategory; |
| | |
| | | @ApiModelProperty(value = "网格ID") |
| | | private Long gridId; |
| | | |
| | | @ApiModelProperty(value = "网格名称") |
| | | private String gridName; |
| | | |
| | | @ApiModelProperty(value = "网格员") |
| | | private Long gridMemberId; |
| | | |
| | | @ApiModelProperty(value = "网格员名字") |
| | | private String gridMemberName; |
| | | |
| | | @ApiModelProperty(value = "网格员头像") |
| | | private String gridMemberImageUrl; |
| | | |
| | | @ApiModelProperty(value = "网格员联系方式") |
| | | private String gridMemberTelephone; |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | | @ApiModelProperty(value = "发生地点") |
| | | @ApiModelProperty(value = "事件发生地点备注") |
| | | private String happentAddress; |
| | | |
| | | @ApiModelProperty(value = "事件发生地点") |
| | | private String happenAddress; |
| | | |
| | | @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)") |
| | | private String happentLatLng; |
| | |
| | | @ApiModelProperty(value = "处理人ID") |
| | | private Long processUserId; |
| | | |
| | | @ApiModelProperty(value = "处理流程记录ID") |
| | | private Long processRecordId; |
| | | |
| | | @ApiModelProperty(value = "处理人名称") |
| | | private String processUserName; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("管理后台-网格返回参数") |
| | | public class EventGridAdminVO { |
| | | |
| | | @ApiModelProperty(value = "网格id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | @ApiModelProperty(value = "网格名称") |
| | | private String gridName; |
| | | @ApiModelProperty(value = "网格员") |
| | | private List<GridMemberAdminVO> gridMembers; |
| | | @ApiModelProperty(value = "网格描述") |
| | | private String remarks; |
| | | @ApiModelProperty(value = "网格面积") |
| | | private BigDecimal area; |
| | | @ApiModelProperty(value = "居住人口") |
| | | private Integer populationTotal = 0; |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createAt; |
| | | @ApiModelProperty(value = "创建人") |
| | | private String createBy; |
| | | @ApiModelProperty(value = "线条颜色") |
| | | private String lineColor; |
| | | @ApiModelProperty(value = "线条宽度") |
| | | private String lineBroadband; |
| | | @ApiModelProperty(value = "填充颜色") |
| | | private String fillColor; |
| | | @ApiModelProperty(value = "围栏数据") |
| | | private String data; |
| | | @ApiModelProperty(value = "所在社区") |
| | | private String communityName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("网格数据") |
| | | public class EventGridDataAreaVO { |
| | | |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "类型,1、区县网格2街道网格3社区网格") |
| | | private Long type; |
| | | |
| | | @ApiModelProperty(value = "区/县ID") |
| | | private Long zoneId; |
| | | |
| | | @ApiModelProperty(value = "区/县名称") |
| | | private String zoneName; |
| | | |
| | | @ApiModelProperty(value = "网格所属街道") |
| | | private Long gridStreetId; |
| | | |
| | | @ApiModelProperty(value = "网格所属街道名称") |
| | | private String gridStreetName; |
| | | |
| | | @ApiModelProperty(value = "网格所属社区ID") |
| | | private Long gridCommunityId; |
| | | |
| | | @ApiModelProperty(value = "网格所属社区名称") |
| | | private String gridCommunityName; |
| | | |
| | | @ApiModelProperty(value = "网格名称") |
| | | private String gridName; |
| | | |
| | | @ApiModelProperty(value = "所属图层") |
| | | private Integer mapLevel; |
| | | |
| | | @ApiModelProperty(value = "面积") |
| | | private String area; |
| | | |
| | | @ApiModelProperty(value = "线条颜色") |
| | | private String lineColor; |
| | | |
| | | @ApiModelProperty(value = "线条宽度") |
| | | private String lineBroadband; |
| | | |
| | | @ApiModelProperty(value = "填充颜色") |
| | | private String fillColor; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remarks; |
| | | |
| | | @ApiModelProperty(value = "围栏数据") |
| | | private String data; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createBy; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty(value = "修改人") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("管理后台-网格员返回参数") |
| | | public class EventGridMemberAdminVO { |
| | | |
| | | @ApiModelProperty(value = "网格id") |
| | | private Long userId; |
| | | @ApiModelProperty(value = "网格名称") |
| | | private String nickName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("网格员预警记录返回参数") |
| | | public class EventGridMemberWarnLogAdminVO { |
| | | |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "地点") |
| | | private String positionAddress; |
| | | |
| | | @ApiModelProperty(value = "内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "预警发生时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String happenAt; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "资源大小") |
| | | private String resourceSize; |
| | | |
| | | @ApiModelProperty(value = "资源时长") |
| | | private Integer resourceTime; |
| | | |
| | | @ApiModelProperty(value = "事件上传的资源URL地址") |
| | | private String url; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("管理后台统计网格所有事件返回参数") |
| | | public class EventStatisticsAllAdminVO { |
| | | |
| | | @ApiModelProperty(value = "发布事件总数") |
| | | private Integer eventTotal; |
| | | |
| | | @ApiModelProperty(value = "处理事件总数") |
| | | private Integer handleEventTotal; |
| | | |
| | | @ApiModelProperty(value = "发布宣传教育总数") |
| | | private Integer propagandaEducationTotal; |
| | | |
| | | @ApiModelProperty(value = "随手拍处理总数") |
| | | private Integer easyPhotoTotal; |
| | | |
| | | @ApiModelProperty(value = "新增居民数") |
| | | private Integer addResidentTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "新增实有房屋数") |
| | | private Integer addHouseTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "完成走访数") |
| | | private Integer finishVisitTotal = 0; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("管理后台统计网格员返回参数") |
| | | public class EventStatisticsMemberAdminVO { |
| | | |
| | | @ApiModelProperty(value = "网格员名称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "发布突发事件") |
| | | private Integer addTFTotal; |
| | | |
| | | @ApiModelProperty(value = "处理突发事件") |
| | | private Integer handleTFTotal; |
| | | |
| | | @ApiModelProperty(value = "发布矛盾纠纷") |
| | | private Integer addMDTotal; |
| | | |
| | | @ApiModelProperty(value = "处理矛盾纠纷") |
| | | private Integer handleMDTotal; |
| | | |
| | | @ApiModelProperty(value = "发布治安隐患") |
| | | private Integer addZATotal; |
| | | |
| | | @ApiModelProperty(value = "处理治安隐患") |
| | | private Integer handleZATotal; |
| | | |
| | | @ApiModelProperty(value = "发布不稳定因素") |
| | | private Integer addBWDTotal; |
| | | |
| | | @ApiModelProperty(value = "处理不稳定因素") |
| | | private Integer handleBWDTotal; |
| | | |
| | | @ApiModelProperty(value = "发布公共服务") |
| | | private Integer addGGTotal; |
| | | |
| | | @ApiModelProperty(value = "处理公共服务") |
| | | private Integer handleGGTotal; |
| | | |
| | | @ApiModelProperty(value = "发布特殊人群") |
| | | private Integer addTSTotal; |
| | | |
| | | @ApiModelProperty(value = "处理特殊人群") |
| | | private Integer handleTSTotal; |
| | | |
| | | @ApiModelProperty(value = "完成走访任务") |
| | | private Integer handleZFTotal; |
| | | |
| | | @ApiModelProperty(value = "处理随手拍") |
| | | private Integer easyPhotoTotal; |
| | | |
| | | @ApiModelProperty(value = "发布宣传教育") |
| | | private Integer propagandaEducationTotal; |
| | | |
| | | @ApiModelProperty(value = "新增居民数") |
| | | private Integer addResidentTotal = 0; |
| | | |
| | | @ApiModelProperty(value = "新增实有房屋数") |
| | | private Integer addHouseTotal = 0; |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date processDate; |
| | | |
| | | @ApiModelProperty(value = "处理人或社区") |
| | | private Long processBy; |
| | | |
| | | @ApiModelProperty(value = "处理人名或社区名") |
| | | private String processByName; |
| | | |
| | | @ApiModelProperty(value = "业务处理类型") |
| | | private Integer processType; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "事件处理状态") |
| | | private Integer eventDealStatus; |
| | | |
| | | @ApiModelProperty(value = "服务单号") |
| | | private String orderSn; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "网格员名字") |
| | | private String gridMemberName; |
| | | |
| | | @ApiModelProperty(value = "网格员头像url") |
| | | private String gridMemberImageUrl; |
| | | |
| | | @ApiModelProperty(value = "网格员联系方式") |
| | | private String gridMemberTelephone; |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date happenTime; |
| | | |
| | | @ApiModelProperty(value = "发生地点") |
| | | @ApiModelProperty(value = "事件发生地点备注") |
| | | private String happentAddress; |
| | | |
| | | @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)") |
| | |
| | | |
| | | @ApiModelProperty(value = "事件状态(1草稿箱2发布3逻辑删除4、撤销)") |
| | | private Integer eventStatus; |
| | | |
| | | @ApiModelProperty(value = "事件类型") |
| | | private String eventClazz; |
| | | |
| | | @ApiModelProperty(value = "1待处理2已解决3待验证") |
| | | private Integer eventProcessStatus; |
| | |
| | | @ApiModelProperty(value = "事件来源") |
| | | private String eventResource; |
| | | |
| | | @ApiModelProperty(value = "事件发生地点") |
| | | private String happenAddress; |
| | | |
| | | @ApiModelProperty(value = "危险级别") |
| | | private Integer dangerLevel; |
| | | |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("管理后台-网格员返回参数") |
| | | public class GridMemberAdminVO { |
| | | |
| | | @ApiModelProperty(value = "网格员id") |
| | | private Long userId; |
| | | @ApiModelProperty(value = "账号昵称") |
| | | private String nickName; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("管理后台-网格员返回参数") |
| | | public class GridMemberVO { |
| | | |
| | | @ApiModelProperty(value = "网格员id") |
| | | private Long userId; |
| | | @ApiModelProperty(value = "网格员头像") |
| | | private String imageUrl; |
| | | @ApiModelProperty(value = "账号昵称") |
| | | private String nickName; |
| | | @ApiModelProperty(value = "登录账号") |
| | | private String account; |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | @ApiModelProperty(value = "网格员工作状态(1.在岗 2.脱岗 3.已下班)") |
| | | private String workStatus; |
| | | @ApiModelProperty(value = "账号状态(1 启用 2 禁用)") |
| | | private String status; |
| | | @ApiModelProperty(value = "所属社区") |
| | | private String communityName; |
| | | @ApiModelProperty(value = "网格员上班开始时间") |
| | | private Integer workStartTime; |
| | | @ApiModelProperty(value = "网格员上班结束时间") |
| | | private Integer workEndTime; |
| | | |
| | | } |
| | |
| | | @ApiModel("用户网格待处理数据统计信息") |
| | | public class UserEventGridDataVO { |
| | | |
| | | private Map<Integer, Integer> gridData; |
| | | @ApiModelProperty(value = "事件分类 1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群信息上报、7宣传教育") |
| | | private Integer eventType; |
| | | @ApiModelProperty(value = "待处理事件数") |
| | | private Integer todoNums; |
| | | |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * |
| | |
| | | @FeignClient(name = "grid") |
| | | public interface GridService { |
| | | |
| | | /** |
| | | * 新增事件 |
| | | * @param eventAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/event/add") |
| | | R add(@RequestBody EventAddDTO eventAddDTO); |
| | | |
| | | /** |
| | | * 修改事件 |
| | | * @param eventEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/event/edit") |
| | | R edit(@RequestBody EventEditDTO eventEditDTO); |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | |
| | | |
| | | /** |
| | | * 新增网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationAddDTO |
| | | * @param eventGridMemberAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/eventgridmemberrelation/add") |
| | | R add(@RequestBody EventGridMemberRelationAddDTO eventGridMemberRelationAddDTO); |
| | | R add(@RequestBody EventGridMemberAddDTO eventGridMemberAddDTO); |
| | | |
| | | /** |
| | | * 修改网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationEditDTO |
| | | * @param eventGridMemberEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/eventgridmemberrelation/edit") |
| | | R edit(@RequestBody EventGridMemberRelationEditDTO eventGridMemberRelationEditDTO); |
| | | R edit(@RequestBody EventGridMemberEditDTO eventGridMemberEditDTO); |
| | | |
| | | /** |
| | | * 分页查找网格和网格员的关联关系 |
| | |
| | | |
| | | /** |
| | | * 处理事件 |
| | | * @param commonEventRepublicDTO |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/event/republish") |
| | | R republishEvent(@RequestBody CommonEventRepublicDTO commonEventRepublicDTO); |
| | | R republishEvent(@RequestBody CommonEventRepublishDTO commonEventRepublishDTO); |
| | | |
| | | /** |
| | | * 网格数据待处理统计信息 |
| | | * @param pageEventGridDataDTO |
| | | * @param eventGridStatisticsDataDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventgriddata/getGridData") |
| | | R getGridData(@RequestBody PageEventGridDataDTO pageEventGridDataDTO); |
| | | @PostMapping("/eventgriddata/getGridStatisticsdData") |
| | | R getGridStatisticsdData(@RequestBody EventGridStatisticsDataDTO eventGridStatisticsDataDTO); |
| | | |
| | | /** |
| | | * 查询用户网格 |
| | |
| | | R queryPublicity(@RequestBody PagePublicityEventDTO pagePublicityEventDTO); |
| | | |
| | | /** |
| | | * 分页查询宣传教育事件 |
| | | * @param pagePublicityEventDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/event/queryPublicityCommunity") |
| | | R queryPublicityCommunity(@RequestBody PagePublicityEventCommunityDTO pagePublicityEventDTO); |
| | | |
| | | |
| | | /** |
| | | * 分页查询社区列表 |
| | | * @return 结果 |
| | | */ |
| | |
| | | */ |
| | | @GetMapping("/eventapplicationapprelease/edition") |
| | | R editionUpdate(); |
| | | |
| | | /** |
| | | * 首页待处理 |
| | | * @param eventGridTodoDataDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventgriddata/getGridTodoData") |
| | | R getGridTodoData(@RequestBody EventGridTodoDataDTO eventGridTodoDataDTO); |
| | | |
| | | /** |
| | | * 后台获取网格员运动轨迹 |
| | | * @param workTrajectoryDTO 请求参数 |
| | | * @return 运动轨迹 |
| | | */ |
| | | @PostMapping("/map/gridMemberWorkTrajectory") |
| | | R gridMemberWorkTrajectory(@RequestBody EventGridMemberWorkTrajectoryDTO workTrajectoryDTO); |
| | | |
| | | /** |
| | | * 后台获取网格员预警记录 |
| | | * @param gridMemberWainDTO 请求参数 |
| | | * @return 预警记录 |
| | | */ |
| | | @PostMapping("/map/gridMemberWorkWarning") |
| | | R gridMemberWorkWarning(@RequestBody EventGridMemberWainDTO gridMemberWainDTO); |
| | | |
| | | /** |
| | | * 分页查询网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 网格列表 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/list") |
| | | R getGridDataList(@RequestBody PageEventGridDataAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 查询社区下所有网格员 |
| | | * @param communityId 社区id |
| | | * @return 网格员列表 |
| | | */ |
| | | @PostMapping("/eventgriddata/member/list") |
| | | R getGridMemberLists(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 查询管理事件 |
| | | * @param pageEventManageDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/event/manage/list") |
| | | R queryEventToManage(@RequestBody PageEventManageDTO pageEventManageDTO); |
| | | |
| | | /** |
| | | * 社区网格后台标记事件无效 |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/event/markInvalid") |
| | | R markEventInvalid(@RequestBody EventRevokeDTO eventRevokeDTO); |
| | | |
| | | /** |
| | | * 社区网格后台重新发布已标记无效的事件 |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/event/republishInvalid") |
| | | R republishInvalidEvent(@RequestBody CommonEventRepublishDTO commonEventRepublishDTO); |
| | | |
| | | /** |
| | | * 后台新增网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/add") |
| | | R addGridDataByAdmin(@RequestBody EventGridDataAddAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 后台修改网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/edit") |
| | | R editGridDataByAdmin(@RequestBody EventGridDataEditAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 后台管理-分页查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | @PostMapping("/easy/admin/list") |
| | | R easyListByAdmin(@RequestBody PageEasyAdminDTO easyAppDTO); |
| | | |
| | | /** |
| | | * 后台管理-随手拍详情 |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | */ |
| | | @PostMapping("/easy/admin/detail") |
| | | R easyDetailByAdmin(@RequestParam("easyId") Long easyId); |
| | | |
| | | /** |
| | | * 后台管理-随手拍处理 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @PostMapping("/easy/admin/handle") |
| | | R easyHandleByAdmin(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 后台管理-批量修改随手拍公示状态/删除随手拍 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 修改/删除结果 |
| | | */ |
| | | @PostMapping("/easy/admin/publicity") |
| | | R easyPublicityByAdmin(@RequestBody ComActEasyPhotoEditAdminDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * @param gridId |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventgriddata/grid/member") |
| | | R getGridMemberListsByGrid(@RequestParam("gridId") Long gridId); |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventgriddata/communitygrid") |
| | | R getGridDataListByCommunity(@RequestParam("gridId") Long communityId); |
| | | |
| | | /** |
| | | * 后台管理-统计模块 |
| | | * @param communityId 社区id |
| | | * @return 统计信息 |
| | | */ |
| | | @GetMapping("/statistics/admin/eventStatistics") |
| | | R eventStatistics(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 后台管理-删除网格 |
| | | * @param Ids 网格id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/delete") |
| | | R deleteGridData(@RequestBody List<Long> Ids); |
| | | |
| | | /** |
| | | * 后台管理-网格员统计 |
| | | * @param statisticsAdminDTO 请求参数 |
| | | * @return 网格员统计信息 |
| | | */ |
| | | @GetMapping("/statistics/admin/gridMemberStatistics") |
| | | R gridMemberStatistics(@RequestBody MemberStatisticsAdminDTO statisticsAdminDTO); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.ExportSpecialUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.NoticeReadDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.*; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | |
| | | */ |
| | | @PutMapping("updateUserPassByApp") |
| | | R updateUserPassByApp(@RequestBody EditUserInfoPassAppDTO userInfoAppDTO); |
| | | |
| | | /** |
| | | * 添加网格员 |
| | | * @param eventGridMemberAddDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("addGridUser") |
| | | R addGridUser(@RequestBody EventGridMemberAddDTO eventGridMemberAddDTO); |
| | | |
| | | /** |
| | | * 分页查询网格员 |
| | | * @param memberRelationDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("member/list") |
| | | R getGridMemberList(@RequestBody PageEventGridMemberRelationDTO memberRelationDTO); |
| | | |
| | | /** |
| | | * 修改网格员信息 |
| | | * @param eventGridMemberAddDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("editGridUser") |
| | | R editGridUser(@RequestBody EventGridMemberEditAdminDTO eventGridMemberAddDTO); |
| | | |
| | | /** |
| | | * 重置网格员密码 |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 重置结果 |
| | | */ |
| | | @PostMapping("passResetUser") |
| | | R gridMemberPassReset(@RequestBody EventGridMemberPassResetDTO gridMemberDTO); |
| | | |
| | | /** |
| | | * 批量删除网格员 |
| | | * @param Ids 网格员id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("deleteMembers") |
| | | R deleteMembers(@RequestBody List<Long> Ids); |
| | | |
| | | /** |
| | | * 批量修改网格员状态 |
| | | * @param gridMemberEditDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("gridMemberEditStatus") |
| | | R gridMemberEditStatus(@RequestBody EventGridMemberEditStatusDTO gridMemberEditDTO); |
| | | } |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Arrays; |
| | | import java.util.Base64; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | /** |
| | |
| | | fileExtension = ".mp4"; |
| | | } |
| | | |
| | | if(originName.toLowerCase().endsWith(".mp3")){ |
| | | fileExtension = ".mp3"; |
| | | } |
| | | |
| | | String fileName = property + File.separator + UUID.randomUUID().toString().replace("-", "") + fileExtension; |
| | | File file1 = new File(fileName); |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "批量上传照片/视频 (jpg/jpeg/png/mp4/mov)") |
| | | @PostMapping(value = "uploads", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImages(@RequestParam MultipartFile[] files, HttpServletRequest request) throws IOException { |
| | | // 微信图片内容校验 |
| | | // WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | String property = System.getProperty("user.dir"); |
| | | String fileExtension = ".jpg"; |
| | | |
| | | List<String> urlList = new ArrayList<>(); |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | |
| | | for (MultipartFile file:files) { |
| | | String originName = file.getOriginalFilename(); |
| | | AtomicBoolean isVideo = new AtomicBoolean(false); |
| | | videoExtensionAllow.forEach(ext ->{ |
| | | String originNameLowerCase = originName.toLowerCase(); |
| | | if(originNameLowerCase.endsWith("." +ext)){ |
| | | isVideo.set(true); |
| | | } |
| | | }); |
| | | if(isVideo.get()){ |
| | | fileExtension = ".mp4"; |
| | | } |
| | | |
| | | if(originName.toLowerCase().endsWith(".mp3")){ |
| | | fileExtension = ".mp3"; |
| | | } |
| | | |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + fileExtension; |
| | | try { |
| | | InputStream is = file.getInputStream(); |
| | | String fileName = property + File.separator + UUID.randomUUID().toString().replace("-", "") + fileExtension; |
| | | File file1 = new File(fileName); |
| | | file.transferTo(file1); |
| | | boolean delete = file1.delete(); |
| | | log.info("临时文件删除【{}】", delete); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | urlList.add(url + "/idcard/" + name); |
| | | } catch (Exception e) { |
| | | log.error("上传文件失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | sftp.logout(); |
| | | return R.ok(urlList); |
| | | } |
| | | } |
| | |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventAddDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventAddDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventAddDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventAddDTO.setPhone(loginUserInfoVO.getPhone()); |
| | | return gridService.addCommon(commonEventAddDTO); |
| | | } |
| | |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventEditDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventEditDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventEditDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventEditDTO.setPhone(loginUserInfoVO.getPhone()); |
| | | return gridService.saveDraft(commonEventEditDTO); |
| | | } |
| | |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | ClazzUtils.setIfStringIsEmpty(commonEventReportDTO); |
| | | commonEventReportDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventReportDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventReportDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventReportDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.report(commonEventReportDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "处理事件", response = R.class) |
| | | R deal(@Validated @RequestBody CommonEventDealDTO commonEventDealDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(commonEventDealDTO); |
| | | LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventDealDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventDealDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventDealDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventDealDTO.setOperateType(0); |
| | | commonEventDealDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | commonEventDealDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | return gridService.dealEvent(commonEventDealDTO); |
| | | } |
| | | |
| | |
| | | ClazzUtils.setIfStringIsEmpty(commonEventVerifyDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventVerifyDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventVerifyDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventVerifyDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.verifyEvent(commonEventVerifyDTO); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/easy/") |
| | | @Api(tags = {"网格综治APP随手拍模块"}) |
| | | @Api(tags = {"网格综治APP随手拍模块@lyq"}) |
| | | public class EasyPhotoApi extends BaseController { |
| | | |
| | | @Resource |
| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationVO; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.IdCardUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.common.model.vos.grid.EventDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | |
| | | /** |
| | | * |
| | |
| | | ClazzUtils.setIfStringIsEmpty(eventRevokeDTO); |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getName()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.emergenciesRevoke(eventRevokeDTO); |
| | | } |
| | | |
| | |
| | | } |
| | | /** |
| | | * 重新发布事件 |
| | | * @param commonEventRepublicDTO 重新发布事件传递对象 |
| | | * @param commonEventRepublishDTO 重新发布事件传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("/republish") |
| | | @ApiOperation(value = "重新发布事件", response = R.class) |
| | | R republish(@Validated @RequestBody CommonEventRepublicDTO commonEventRepublicDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(commonEventRepublicDTO); |
| | | R republish(@Validated @RequestBody CommonEventRepublishDTO commonEventRepublishDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(commonEventRepublishDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventRepublicDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventRepublicDTO.setUserName(loginUserInfoVO.getName()); |
| | | return gridService.republishEvent(commonEventRepublicDTO); |
| | | commonEventRepublishDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventRepublishDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.republishEvent(commonEventRepublishDTO); |
| | | } |
| | | |
| | | |
| | |
| | | ClazzUtils.setIfStringIsEmpty(commonEventPublicDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventPublicDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventPublicDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventPublicDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.draftRelease(commonEventPublicDTO); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.grid_app.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | import com.panzhihua.common.model.vos.grid.UserEventGridDataVO; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataEditDTO; |
| | | //import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO; |
| | | |
| | | /** |
| | | * |
| | |
| | | return gridService.userGrid(pageEventGridDataDTO); |
| | | } |
| | | |
| | | |
| | | //------------- |
| | | /** |
| | | * 网格数据待处理统计信息 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/myGridTodoData") |
| | | @ApiOperation(value = "网格待处理统计数据", response= UserEventGridDataVO.class) |
| | | R myTodoGridData(@Valid @ModelAttribute EventGridTodoDataDTO eventGridTodoDataDTO){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | eventGridTodoDataDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | return gridService.getGridTodoData(eventGridTodoDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 网格数据待处理统计信息 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/myGridData") |
| | | @GetMapping("/statistics/{gridId}") |
| | | @ApiOperation(value = "网格统计数据", response= UserEventGridDataVO.class) |
| | | R myGridData(){ |
| | | R myGridData(@PathVariable("gridId") Long gridId){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | PageEventGridDataDTO pageEventGridDataDTO = new PageEventGridDataDTO(); |
| | | pageEventGridDataDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pageEventGridDataDTO.setType(3l); |
| | | return gridService.getGridData(pageEventGridDataDTO); |
| | | EventGridStatisticsDataDTO eventGridStatisticsDataDTO = new EventGridStatisticsDataDTO(); |
| | | eventGridStatisticsDataDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventGridStatisticsDataDTO.setGridId(gridId); |
| | | return gridService.getGridStatisticsdData(eventGridStatisticsDataDTO); |
| | | } |
| | | |
| | | |
| | | //=== |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/map/") |
| | | @Api(tags = {"网格综治APP地图模块"}) |
| | | @Api(tags = {"网格综治APP地图模块@lyq"}) |
| | | public class MapApi extends BaseController { |
| | | |
| | | @Resource |
| | |
| | | ClazzUtils.setIfStringIsEmpty(publicityEventAddDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | publicityEventAddDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | publicityEventAddDTO.setUserName(loginUserInfoVO.getName()); |
| | | publicityEventAddDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | publicityEventAddDTO.setPhone(loginUserInfoVO.getPhone()); |
| | | return gridService.addPublicity(publicityEventAddDTO); |
| | | } |
| | |
| | | ClazzUtils.setIfStringIsEmpty(publicityEventEditDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | publicityEventEditDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | publicityEventEditDTO.setUserName(loginUserInfoVO.getName()); |
| | | publicityEventEditDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | publicityEventEditDTO.setPhone(loginUserInfoVO.getPhone()); |
| | | return gridService.savePublicityDraft(publicityEventEditDTO); |
| | | } |
| | |
| | | ClazzUtils.setIfStringIsEmpty(specialEventEditDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | specialEventEditDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | specialEventEditDTO.setUserName(loginUserInfoVO.getName()); |
| | | specialEventEditDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | specialEventEditDTO.setPhone(loginUserInfoVO.getPhone()); |
| | | return gridService.saveSpecialDraft(specialEventEditDTO); |
| | | } |
| | |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | ClazzUtils.setIfStringIsEmpty(commonEventReportDTO); |
| | | commonEventReportDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventReportDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventReportDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventReportDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.report(commonEventReportDTO); |
| | | } |
| | | |
| | |
| | | ClazzUtils.setIfStringIsEmpty(commonEventDealDTO); |
| | | LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(); |
| | | commonEventDealDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventDealDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventDealDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventDealDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | commonEventDealDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | return gridService.dealEvent(commonEventDealDTO); |
| | | } |
| | | |
| | |
| | | ClazzUtils.setIfStringIsEmpty(commonEventVerifyDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventVerifyDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventVerifyDTO.setUserName(loginUserInfoVO.getName()); |
| | | commonEventVerifyDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.verifyEvent(commonEventVerifyDTO); |
| | | } |
| | | |
New file |
| | |
| | | package com.panzhihua.grid_app.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.ComMapGridDetailVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RestController |
| | | @RequestMapping("/statistics/") |
| | | @Api(tags = {"网格综治APP统计模块@lyq"}) |
| | | public class StatisticsApi extends BaseController { |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | @ApiOperation(value = "根据网格id查询统计详情-lyq",response = ComMapGridDetailVO.class) |
| | | @PostMapping("event") |
| | | public R getGridDetail(@RequestParam("gridId") Long gridId){ |
| | | if(gridId == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | active: ${ENV:dev} |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 10MB |
| | | max-request-size: 10MB |
| | | max-file-size: 200MB |
| | | max-request-size: 200MB |
| | | |
| | | eureka: |
| | | client: |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | import com.panzhihua.common.constants.FtpConstants; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 公共接口 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-12-10 15:41 |
| | | **/ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/common/") |
| | | @Api(tags = {"公共接口"}) |
| | | public class CommonApi { |
| | | |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | | // FTP 登录密码 |
| | | @Value("${ftp.password}") |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | @Value("${ftp.host}") |
| | | private String host; |
| | | // FTP 端口 |
| | | @Value("${ftp.port}") |
| | | private int port; |
| | | @Value("${ftp.url}") |
| | | private String url; |
| | | |
| | | /** |
| | | * 允许的图片文件后缀 |
| | | */ |
| | | private static List<String> fileExtensionAllow = Arrays.asList("gif", "jpg", "png", "jpeg"); |
| | | /** |
| | | * 允许的视频文件后缀 |
| | | */ |
| | | private static List<String> videoExtensionAllow = Arrays.asList("mp4", "mov"); |
| | | |
| | | @ApiOperation(value = "上传照片/视频 (jpg/jpeg/png/mp4/mov)") |
| | | @PostMapping(value = "uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) throws IOException { |
| | | // 微信图片内容校验 |
| | | // WxMaSecCheckService wxMaSecCheckService = wxMaConfiguration.getMaService().getSecCheckService(); |
| | | String property = System.getProperty("user.dir"); |
| | | |
| | | String fileExtension = ".jpg"; |
| | | |
| | | String originName = file.getOriginalFilename(); |
| | | AtomicBoolean isVideo = new AtomicBoolean(false); |
| | | videoExtensionAllow.forEach(ext ->{ |
| | | String originNameLowerCase = originName.toLowerCase(); |
| | | if(originNameLowerCase.endsWith("." +ext)){ |
| | | isVideo.set(true); |
| | | } |
| | | }); |
| | | if(isVideo.get()){ |
| | | fileExtension = ".mp4"; |
| | | } |
| | | |
| | | String fileName = property + File.separator + UUID.randomUUID().toString().replace("-", "") + fileExtension; |
| | | File file1 = new File(fileName); |
| | | |
| | | String name = file.getOriginalFilename(); |
| | | name = UUID.randomUUID().toString().replaceAll("-", "") + fileExtension; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | InputStream is = file.getInputStream(); |
| | | file.transferTo(file1); |
| | | boolean delete = file1.delete(); |
| | | log.info("临时文件删除【{}】", delete); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | sftp.logout(); |
| | | return R.ok(url + "/idcard/" + name); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoHandleDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEasyAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEasyAppDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.grid.ComActEasyPhotoAdminVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author lyq |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/easy/") |
| | | @Api(tags = {"随手拍模块@lyq"}) |
| | | public class EasyPhotoApi extends BaseController { |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | @ApiOperation(value = "随手拍列表-lyq",response = ComActEasyPhotoAdminVO.class) |
| | | @PostMapping("list") |
| | | public R list(@RequestBody PageEasyAdminDTO easyAppDTO){ |
| | | LoginUserInfoVO userInfoVO = this.getLoginUserInfo(); |
| | | if(userInfoVO == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | if(easyAppDTO.getCommunityId() == null){ |
| | | easyAppDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | | } |
| | | return gridService.easyListByAdmin(easyAppDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情-lyq",response = ComActEasyPhotoAdminVO.class) |
| | | @PostMapping("detail") |
| | | public R detail(@RequestParam("easyId") Long easyId){ |
| | | if(easyId == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return gridService.easyDetailByApp(easyId); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍类型列表-lyq",response = ComActEasyPhotoVO.class) |
| | | @PostMapping("type/list") |
| | | public R typeList(){ |
| | | return gridService.easyTypeListByApp(); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍处理-lyq") |
| | | @PostMapping("handle") |
| | | public R handle(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO){ |
| | | LoginUserInfoVO userInfoVO = this.getLoginUserInfo(); |
| | | if(userInfoVO == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | photoHandleDTO.setHandlerId(userInfoVO.getUserId()); |
| | | return gridService.easyHandle(photoHandleDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍切换公示状态-lyq") |
| | | @PostMapping("publicity") |
| | | public R publicity(@RequestBody ComActEasyPhotoEditAdminDTO photoHandleDTO){ |
| | | return gridService.easyPublicityByAdmin(photoHandleDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.GridMemberVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataEditDTO; |
| | | //import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/eventgriddata") |
| | | @Api(tags = {"区县/街道/社区/网格员网格数据管理 @陈东"}) |
| | | @Api(tags = {"网格数据管理 @lyq"}) |
| | | public class EventGridDataApi extends BaseController { |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 我的网格 |
| | | * @return 查找结果 |
| | | * 网格员分页查询 |
| | | * @param memberRelationDTO 请求参数 |
| | | * @return 网格员列表 |
| | | */ |
| | | @GetMapping("/myGrid") |
| | | @ApiOperation(value = "我的网格", response= EventGridDataVO.class) |
| | | R myGrid(){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | PageEventGridDataDTO pageEventGridDataDTO = new PageEventGridDataDTO(); |
| | | pageEventGridDataDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pageEventGridDataDTO.setType(3l); |
| | | return gridService.userGrid(pageEventGridDataDTO); |
| | | @ApiOperation(value = "网格员分页查询", response = GridMemberVO.class) |
| | | @PostMapping("/member/list") |
| | | public R getGridMemberList(@Validated @RequestBody PageEventGridMemberRelationDTO memberRelationDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(memberRelationDTO); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | if(loginUserInfo.getCommunityId() != 0){ |
| | | memberRelationDTO.setGridCommunityId(loginUserInfo.getCommunityId()); |
| | | } |
| | | return userService.getGridMemberList(memberRelationDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增区县/街道/社区/网格员网格数据管理 |
| | | * @param {classNameFirstLower}AddDTO 添加区县/街道/社区/网格员网格数据管理传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping() |
| | | @ApiOperation(value = "新增区县/街道/社区/网格员网格数据管理", response = R.class) |
| | | R add(@Validated @RequestBody EventGridDataAddDTO eventGridDataAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataAddDTO); |
| | | eventGridDataAddDTO.setUserId(getUserId()); |
| | | return gridService.add(eventGridDataAddDTO); |
| | | @ApiOperation(value = "网格员添加") |
| | | @PostMapping("/member/add") |
| | | public R gridMemberAdd(@Validated @RequestBody EventGridMemberAddDTO gridMemberDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(gridMemberDTO); |
| | | LoginUserInfoVO userInfoVO = this.getLoginUserInfo(); |
| | | if(userInfoVO.getCommunityId() != null){ |
| | | gridMemberDTO.setCommunityId(userInfoVO.getCommunityId()); |
| | | } |
| | | return userService.addGridUser(gridMemberDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param eventGridDataEditDTO 修改区县/街道/社区/网格员网格数据管理传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping() |
| | | @ApiOperation(value = "编辑区县/街道/社区/网格员网格数据管理", response = R.class) |
| | | R edit(@Validated @RequestBody EventGridDataEditDTO eventGridDataEditDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataEditDTO); |
| | | eventGridDataEditDTO.setUserId(getUserId()); |
| | | return gridService.edit(eventGridDataEditDTO); |
| | | @ApiOperation(value = "网格员修改") |
| | | @PostMapping("/member/edit") |
| | | public R gridMemberEdit(@Validated @RequestBody EventGridMemberEditAdminDTO gridMemberDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(gridMemberDTO); |
| | | return userService.editGridUser(gridMemberDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查找 |
| | | * @param pageEventGridDataDTO 查找区县/街道/社区/网格员网格数据管理传递对象 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping() |
| | | @ApiOperation(value = "查询区县/街道/社区/网格员网格数据管理", response= EventGridDataVO.class) |
| | | R query(@Validated @ModelAttribute PageEventGridDataDTO pageEventGridDataDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(pageEventGridDataDTO); |
| | | return gridService.query(pageEventGridDataDTO); |
| | | @ApiOperation(value = "网格员密码重置") |
| | | @PostMapping("/member/pass/reset") |
| | | public R gridMemberPassReset(@Validated @RequestBody EventGridMemberPassResetDTO gridMemberDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(gridMemberDTO); |
| | | return userService.gridMemberPassReset(gridMemberDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param eventGridDataDeleteDTO 删除区县/街道/社区/网格员网格数据管理传递对象 |
| | | * @return 删除结果 |
| | | */ |
| | | @DeleteMapping() |
| | | @ApiOperation(value = "删除区县/街道/社区/网格员网格数据管理", response = R.class) |
| | | R delete(@Validated @RequestBody EventGridDataDeleteDTO eventGridDataDeleteDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataDeleteDTO); |
| | | return gridService.delete(eventGridDataDeleteDTO); |
| | | @ApiOperation(value = "批量删除网格员") |
| | | @PostMapping("/member/delete") |
| | | public R deleteMembers(@RequestBody List<Long> Ids){ |
| | | return userService.deleteMembers(Ids); |
| | | } |
| | | |
| | | /** |
| | | * 查询区县/街道/社区/网格员网格数据管理详细信息 |
| | | * @param id 区县/街道/社区/网格员网格数据管理 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询区县/街道/社区/网格员网格数据管理详细信息") |
| | | R<EventGridDataDetailsVO> details(@PathVariable("id") Long id){ |
| | | return gridService.eventGridDataDetails(id); |
| | | @ApiOperation(value = "网格员工作轨迹") |
| | | @PostMapping("/member/work/trajectory") |
| | | public R gridMemberWorkTrajectory(@RequestBody EventGridMemberWorkTrajectoryDTO workTrajectoryDTO){ |
| | | if(StringUtils.isEmpty(workTrajectoryDTO.getTime())){ |
| | | workTrajectoryDTO.setTime(DateUtils.getCurrentDateStrymd()); |
| | | } |
| | | workTrajectoryDTO.setStartTime(workTrajectoryDTO.getTime() + " 00:00:00"); |
| | | workTrajectoryDTO.setEndTime(workTrajectoryDTO.getTime() + " 23:59:59"); |
| | | return gridService.gridMemberWorkTrajectory(workTrajectoryDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "网格员工作预警",response = EventGridMemberWarnLogAdminVO.class) |
| | | @PostMapping("/member/work/warning") |
| | | public R gridMemberWorkWarning(@RequestBody EventGridMemberWainDTO gridMemberWainDTO){ |
| | | return gridService.gridMemberWorkWarning(gridMemberWainDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "网格员批量修改状态") |
| | | @PostMapping("/member/edit/status") |
| | | public R gridMemberEditStatus(@RequestBody EventGridMemberEditStatusDTO gridMemberEditDTO){ |
| | | return userService.gridMemberEditStatus(gridMemberEditDTO); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationEditDTO; |
| | | //import com.panzhihua.common.model.vos.IPageVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | |
| | | import javax.annotation.Resource; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationVO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberRelationDTO; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * |
| | |
| | | * */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/eventgridmemberrelation") |
| | | @Api(tags = {"网格和网格员的关联关系"}) |
| | | @RequestMapping("/eventgridmember") |
| | | @Api(tags = {"网格管理"}) |
| | | public class EventGridMemberRelationApi extends BaseController { |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | /** |
| | | * 新增网格和网格员的关联关系 |
| | | * @param {classNameFirstLower}AddDTO 添加网格和网格员的关联关系传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping() |
| | | @ApiOperation(value = "新增网格和网格员的关联关系", response = R.class) |
| | | R add(@Validated @RequestBody EventGridMemberRelationAddDTO eventGridMemberRelationAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridMemberRelationAddDTO); |
| | | eventGridMemberRelationAddDTO.setUserId(getUserId()); |
| | | return gridService.add(eventGridMemberRelationAddDTO); |
| | | @ApiOperation(value = "网格分页查询", response = EventGridAdminVO.class) |
| | | @PostMapping("/event/list") |
| | | public R getGridDataList(@Validated @RequestBody PageEventGridDataAdminDTO eventGridDataDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataDTO); |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | eventGridDataDTO.setGridCommunityId(communityId); |
| | | return gridService.getGridDataList(eventGridDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param eventGridMemberRelationEditDTO 修改网格和网格员的关联关系传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping() |
| | | @ApiOperation(value = "编辑网格和网格员的关联关系", response = R.class) |
| | | R edit(@Validated @RequestBody EventGridMemberRelationEditDTO eventGridMemberRelationEditDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridMemberRelationEditDTO); |
| | | eventGridMemberRelationEditDTO.setUserId(getUserId()); |
| | | return gridService.edit(eventGridMemberRelationEditDTO); |
| | | @ApiOperation(value = "查询当前社区所有网格员", response = EventGridMemberAdminVO.class) |
| | | @PostMapping("/member/list") |
| | | public R getGridMemberLists(){ |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return gridService.getGridMemberLists(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查找 |
| | | * @param pageEventGridMemberRelationDTO 查找网格和网格员的关联关系传递对象 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping() |
| | | @ApiOperation(value = "查询网格和网格员的关联关系", response= EventGridMemberRelationVO.class) |
| | | R query(@Validated @ModelAttribute PageEventGridMemberRelationDTO pageEventGridMemberRelationDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(pageEventGridMemberRelationDTO); |
| | | return gridService.query(pageEventGridMemberRelationDTO); |
| | | @ApiOperation(value = "新增网格") |
| | | @PostMapping("/event/add") |
| | | public R addGridData(@Validated @RequestBody EventGridDataAddAdminDTO eventGridDataDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataDTO); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | eventGridDataDTO.setGridCommunityId(loginUserInfo.getCommunityId()); |
| | | eventGridDataDTO.setUserId(loginUserInfo.getUserId()); |
| | | return gridService.addGridDataByAdmin(eventGridDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param eventGridMemberRelationDeleteDTO 删除网格和网格员的关联关系传递对象 |
| | | * @return 删除结果 |
| | | */ |
| | | @DeleteMapping() |
| | | @ApiOperation(value = "删除网格和网格员的关联关系", response = R.class) |
| | | R delete(@Validated @RequestBody EventGridMemberRelationDeleteDTO eventGridMemberRelationDeleteDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridMemberRelationDeleteDTO); |
| | | return gridService.delete(eventGridMemberRelationDeleteDTO); |
| | | @ApiOperation(value = "修改网格") |
| | | @PostMapping("/event/edit") |
| | | public R editGridData(@Validated @RequestBody EventGridDataEditAdminDTO eventGridDataDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataDTO); |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if(loginUserInfo == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | eventGridDataDTO.setUserId(loginUserInfo.getUserId()); |
| | | return gridService.editGridDataByAdmin(eventGridDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询网格和网格员的关联关系详细信息 |
| | | * @param id 网格和网格员的关联关系 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询网格和网格员的关联关系详细信息") |
| | | R<EventGridMemberRelationDetailsVO> details(@PathVariable("id") Long id){ |
| | | return gridService.eventGridMemberRelationDetails(id); |
| | | @ApiOperation(value = "删除网格") |
| | | @PostMapping("/event/delete") |
| | | public R deleteGridData(@RequestBody List<Long> Ids){ |
| | | if(Ids.isEmpty()){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | return gridService.deleteGridData(Ids); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.grid.EventDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/event") |
| | | @Api(tags = {"事件管理 @chendong"}) |
| | | public class EventManageApi extends BaseController { |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | |
| | | private boolean isCommonType(Integer eventType){ |
| | | if(eventType==null){ |
| | | return false; |
| | | } |
| | | boolean inType = eventType==1 | eventType==2 |eventType==3| eventType==4| eventType==5; |
| | | return inType; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 事件列表 |
| | | * @param pageEventManageDTO 查找事件 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/usersList") |
| | | @ApiOperation(value = "事件列表", response= EventVO.class) |
| | | R usersList(@Validated @ModelAttribute PageEventManageDTO pageEventManageDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(pageEventManageDTO); |
| | | if(!isCommonType(pageEventManageDTO.getEventType())){ |
| | | return R.fail(400, "事件类型错误"); |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pageEventManageDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pageEventManageDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.queryEventToManage(pageEventManageDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 事件标为无效 |
| | | * @param eventRevokeDTO 修改事件传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("/markInvalid") |
| | | @ApiOperation(value = "事件标为无效", response = R.class) |
| | | R revoke(@Validated @RequestBody EventRevokeDTO eventRevokeDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventRevokeDTO); |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | eventRevokeDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | eventRevokeDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.markEventInvalid(eventRevokeDTO); |
| | | } |
| | | /** |
| | | * 新增并发布事件事件 |
| | | * @param commonEventCommunityAddDTO 添加事件传递对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/release") |
| | | @ApiOperation(value = "新增并发布事件", response = R.class) |
| | | R add(@Validated @RequestBody CommonEventCommunityAddDTO commonEventCommunityAddDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(commonEventCommunityAddDTO); |
| | | if(!isCommonType(commonEventCommunityAddDTO.getEventType())){ |
| | | return R.fail(400, "事件类型错误"); |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventCommunityAddDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventCommunityAddDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventCommunityAddDTO.setPhone(loginUserInfoVO.getPhone()); |
| | | return gridService.addCommon(commonEventCommunityAddDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询事件详细信息 |
| | | * @param id 事件 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询事件详细信息") |
| | | R<EventDetailsVO> details(@PathVariable("id") Long id){ |
| | | return gridService.eventDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param eventDeleteDTO 删除事件传递对象 |
| | | * @return 删除结果 |
| | | */ |
| | | @DeleteMapping() |
| | | @ApiOperation(value = "删除事件", response = R.class) |
| | | R delete(@Validated @RequestBody EventDeleteDTO eventDeleteDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventDeleteDTO); |
| | | eventDeleteDTO.setUserId(this.getUserId()); |
| | | return gridService.delete(eventDeleteDTO); |
| | | } |
| | | /** |
| | | * 重新发布事件 |
| | | * @param commonEventRepublishDTO 重新发布事件传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("/republish") |
| | | @ApiOperation(value = "重新发布已标为失效的事件", response = R.class) |
| | | R republish(@Validated @RequestBody CommonEventRepublishDTO commonEventRepublishDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(commonEventRepublishDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventRepublishDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventRepublishDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | return gridService.republishInvalidEvent(commonEventRepublishDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区列表 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/actList") |
| | | @ApiOperation(value = "查询社区列表", response = ComActVO.class) |
| | | R actList(){ |
| | | return gridService.actList(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理事件 |
| | | * @param commonEventDealDTO 修改事件传递对象 |
| | | * @return 处理结果 |
| | | */ |
| | | @PutMapping("/deal") |
| | | @ApiOperation(value = "处理事件", response = R.class) |
| | | R deal(@Validated @RequestBody CommonEventDealDTO commonEventDealDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(commonEventDealDTO); |
| | | if(commonEventDealDTO.getNeedVerify()==null){ |
| | | return R.fail("是否验证不能为空"); |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventDealDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventDealDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | commonEventDealDTO.setOperateType(1); |
| | | commonEventDealDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | commonEventDealDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | return gridService.dealEvent(commonEventDealDTO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "查询当前社区所有网格员", response = EventGridMemberAdminVO.class) |
| | | @GetMapping("/member/list") |
| | | public R getGridMemberLists(){ |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return gridService.getGridMemberLists(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询网格下所有网格员", response = EventGridMemberAdminVO.class) |
| | | @GetMapping("/member/{gridId}") |
| | | public R getGridMemberInLists(@PathVariable("gridId") Long gridId){ |
| | | return gridService.getGridMemberListsByGrid(gridId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区所有网格", response = EventGridMemberAdminVO.class) |
| | | @GetMapping("/grid/list/{communityId}") |
| | | public R getGridLists(@PathVariable("communityId") Long communityId){ |
| | | return gridService.getGridDataListByCommunity(communityId); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/publicity") |
| | | @Api(tags = {"宣传教育 @chendong"}) |
| | | public class PublicityEventApi extends BaseController { |
| | | |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | /** |
| | | * 事件列表 |
| | | * |
| | | * @param pagePublicityEventDTO 查找事件 |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/usersList") |
| | | @ApiOperation(value = "宣传教育事件列表", response = EventVO.class) |
| | | R usersPublicityList(@Validated @ModelAttribute PagePublicityEventCommunityDTO pagePublicityEventDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(pagePublicityEventDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pagePublicityEventDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pagePublicityEventDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.queryPublicityCommunity(pagePublicityEventDTO); |
| | | } |
| | | |
| | | /** |
| | | * 添加宣传教育事件 |
| | | * |
| | | * @param publicityEventAddDTO 特殊人群信息 |
| | | * @return 查找结果 |
| | | */ |
| | | @PostMapping() |
| | | @ApiOperation(value = "发布宣传教育事件", response = R.class) |
| | | R addPublicity(@Validated @RequestBody PublicityEventAddDTO publicityEventAddDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(publicityEventAddDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | publicityEventAddDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | publicityEventAddDTO.setUserName(loginUserInfoVO.getName()); |
| | | publicityEventAddDTO.setPhone(loginUserInfoVO.getPhone()); |
| | | return gridService.addPublicity(publicityEventAddDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询事件详细信息 |
| | | * |
| | | * @param id 事件 id |
| | | * @return 查找结果 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "查询事件详细信息") |
| | | R<EventDetailsVO> details(@PathVariable("id") Long id) { |
| | | return gridService.eventDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param eventDeleteDTO 删除事件传递对象 |
| | | * @return 删除结果 |
| | | */ |
| | | @DeleteMapping() |
| | | @ApiOperation(value = "删除事件", response = R.class) |
| | | R delete(@Validated @RequestBody EventDeleteDTO eventDeleteDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(eventDeleteDTO); |
| | | return gridService.delete(eventDeleteDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 撤销事件 |
| | | * |
| | | * @param eventRevokeDTO 修改事件传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("/revoke") |
| | | @ApiOperation(value = "撤销事件", response = R.class) |
| | | R revoke(@Validated @RequestBody EventRevokeDTO eventRevokeDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(eventRevokeDTO); |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getName()); |
| | | return gridService.emergenciesRevoke(eventRevokeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 重新发布事件 |
| | | * |
| | | * @param commonEventRepublishDTO 重新发布事件传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("/republish") |
| | | @ApiOperation(value = "重新发布事件", response = R.class) |
| | | R republish(@Validated @RequestBody CommonEventRepublishDTO commonEventRepublishDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(commonEventRepublishDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | commonEventRepublishDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | commonEventRepublishDTO.setUserName(loginUserInfoVO.getName()); |
| | | return gridService.republishEvent(commonEventRepublishDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 事件标为无效 |
| | | * |
| | | * @param eventRevokeDTO 修改事件传递对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("/markInvalid") |
| | | @ApiOperation(value = "事件标为无效", response = R.class) |
| | | R markInvalid(@Validated @RequestBody EventRevokeDTO eventRevokeDTO) { |
| | | ClazzUtils.setIfStringIsEmpty(eventRevokeDTO); |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getName()); |
| | | eventRevokeDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | eventRevokeDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.markEventInvalid(eventRevokeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询当前社区所有网格员", response = EventGridMemberAdminVO.class) |
| | | @GetMapping("/member/list") |
| | | public R getGridMemberLists(){ |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return gridService.getGridMemberLists(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询网格下所有网格员", response = EventGridMemberAdminVO.class) |
| | | @GetMapping("/member/{gridId}") |
| | | public R getGridMemberInLists(@PathVariable("gridId") Long gridId){ |
| | | return gridService.getGridMemberListsByGrid(gridId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询社区所有网格", response = EventGridMemberAdminVO.class) |
| | | @GetMapping("/grid/list/{communityId}") |
| | | public R getGridLists(@PathVariable("communityId") Long communityId){ |
| | | return gridService.getGridDataListByCommunity(communityId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.MemberStatisticsAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventManageDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventStatisticsAllAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.EventStatisticsMemberAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | import com.panzhihua.common.service.grid.GridService; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 统计模块 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/statistics/") |
| | | @Api(tags = {"统计模块 @lyq"}) |
| | | public class StatisticsApi extends BaseController { |
| | | |
| | | @Resource |
| | | private GridService gridService; |
| | | |
| | | @ApiOperation(value = "事件统计", response= EventStatisticsAllAdminVO.class) |
| | | @GetMapping("/eventStatistics") |
| | | public R eventStatistics(){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | if(loginUserInfoVO == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | return gridService.eventStatistics(loginUserInfoVO.getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "网格员统计", response= EventStatisticsMemberAdminVO.class) |
| | | @GetMapping("/gridMemberStatistics") |
| | | public R gridMemberStatistics(@RequestBody MemberStatisticsAdminDTO statisticsAdminDTO){ |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | if(loginUserInfoVO == null){ |
| | | return R.fail("请先登录"); |
| | | } |
| | | if(statisticsAdminDTO.getCommunityId() == null){ |
| | | statisticsAdminDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | } |
| | | return gridService.gridMemberStatistics(statisticsAdminDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_grid.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoHandleDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEasyAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEasyAppDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_grid.service.ComActEasyPhotoService; |
| | |
| | | public R easyReport(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO){ |
| | | return comActEasyPhotoService.easyReport(photoHandleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-分页查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | @PostMapping("admin/list") |
| | | public R easyListByAdmin(@RequestBody PageEasyAdminDTO easyAppDTO){ |
| | | return comActEasyPhotoService.easyListByAdmin(easyAppDTO); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-随手拍详情 |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | */ |
| | | @PostMapping("admin/detail") |
| | | public R easyDetailByAdmin(@RequestParam("easyId") Long easyId){ |
| | | return comActEasyPhotoService.easyDetailByAdmin(easyId); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-随手拍处理 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @PostMapping("admin/handle") |
| | | public R easyHandleByAdmin(@RequestBody ComActEasyPhotoHandleDTO photoHandleDTO){ |
| | | return comActEasyPhotoService.easyHandleByAdmin(photoHandleDTO); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-批量修改随手拍公示状态/删除随手拍 |
| | | * @param photoEditDTO 请求参数 |
| | | * @return 修改/删除结果 |
| | | */ |
| | | @PostMapping("admin/publicity") |
| | | public R easyPublicityByAdmin(@RequestBody ComActEasyPhotoEditAdminDTO photoEditDTO){ |
| | | return comActEasyPhotoService.easyPublicityByAdmin(photoEditDTO); |
| | | } |
| | | } |
| | |
| | | private EventService eventService; |
| | | |
| | | /** |
| | | * 新增事件 |
| | | * @param eventAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | R add(@RequestBody EventAddDTO eventAddDTO){ |
| | | return eventService.add(eventAddDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 修改事件 |
| | | * @param eventEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/edit") |
| | | R edit(@RequestBody EventEditDTO eventEditDTO){ |
| | | return eventService.edit(eventEditDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | | * @param pageEventDTO |
| | | * @return 维护结果 |
| | |
| | | |
| | | |
| | | /** |
| | | * 突发事件上报社区 |
| | | * 事件上报社区 |
| | | * @param commonEventReportDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * 突发事件撤销 |
| | | * 事件撤销 |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | |
| | | */ |
| | | @PostMapping("/dealEvent") |
| | | R dealEvent(@RequestBody CommonEventDealDTO commonEventDealDTO){ |
| | | return eventService.dealEvent(commonEventDealDTO); |
| | | switch (commonEventDealDTO.getOperateType()){ |
| | | case 1: |
| | | return eventService.communityDealEvent(commonEventDealDTO); |
| | | case 0: |
| | | return eventService.dealEvent(commonEventDealDTO); |
| | | default: |
| | | return R.fail("参数错误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 重新发布事件 |
| | | * @param commonEventRepublicDTO |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/republish") |
| | | R republishEvent(@RequestBody CommonEventRepublicDTO commonEventRepublicDTO){ |
| | | return eventService.republishEvent(commonEventRepublicDTO); |
| | | R republishEvent(@RequestBody CommonEventRepublishDTO commonEventRepublishDTO){ |
| | | return eventService.republishEvent(commonEventRepublishDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 分页查询宣传教育事件 |
| | | * @param pagePublicityEventDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/queryPublicityCommunity") |
| | | R queryPublicityCommunity(@RequestBody PagePublicityEventCommunityDTO pagePublicityEventDTO){ |
| | | return eventService.selectCommunityPublicity(pagePublicityEventDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询宣传教育事件 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("/actList") |
| | |
| | | return eventService.actList(); |
| | | } |
| | | |
| | | /** |
| | | * 查询管理事件 |
| | | * @param pageEventManageDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/manage/list") |
| | | R queryEventToManage(@RequestBody PageEventManageDTO pageEventManageDTO){ |
| | | return eventService.eventToManage(pageEventManageDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区网格后台标记事件无效 |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/markInvalid") |
| | | R markEventInvalid(@RequestBody EventRevokeDTO eventRevokeDTO){ |
| | | return eventService.markEventInvalid(eventRevokeDTO); |
| | | } |
| | | |
| | | /** |
| | | * 社区网格后台重新发布已标记无效的事件 |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/republishInvalid") |
| | | R republishInvalidEvent(@RequestBody CommonEventRepublishDTO commonEventRepublishDTO){ |
| | | return eventService.republishInvalidEvent(commonEventRepublishDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * |
| | |
| | | @PostMapping("/add") |
| | | R add(@RequestBody EventGridDataAddDTO eventGridDataAddDTO){ |
| | | return eventGridDataService.add(eventGridDataAddDTO); |
| | | }; |
| | | } |
| | | |
| | | /** |
| | | * 修改区县/街道/社区/网格员网格数据管理 |
| | |
| | | @PostMapping("/edit") |
| | | R edit(@RequestBody EventGridDataEditDTO eventGridDataEditDTO){ |
| | | return eventGridDataService.edit(eventGridDataEditDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 分页查找区县/街道/社区/网格员网格数据管理 |
| | | * @param pageEventGridDataDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/page") |
| | | R<IPage<EventGridDataVO>> query(@RequestBody PageEventGridDataDTO pageEventGridDataDTO){ |
| | | return eventGridDataService.query(pageEventGridDataDTO); |
| | | }; |
| | | } |
| | | |
| | | /** |
| | | * 删除区县/街道/社区/网格员网格数据管理 |
| | |
| | | @PostMapping("/delete") |
| | | R delete(@RequestBody EventGridDataDeleteDTO EventGridDataDeleteDTO){ |
| | | return eventGridDataService.delete(EventGridDataDeleteDTO); |
| | | }; |
| | | } |
| | | |
| | | /** |
| | | * 查询区县/街道/社区/网格员网格数据管理详细信息 |
| | |
| | | @PostMapping("/{id}") |
| | | R<EventGridDataDetailsVO> eventGridDataDetails(@PathVariable("id") Long id){ |
| | | return eventGridDataService.eventGridDataDetails(id); |
| | | }; |
| | | } |
| | | |
| | | /** |
| | | * 分页查询网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 网格列表 |
| | | */ |
| | | @PostMapping("/data/list") |
| | | public R getGridMemberList(@RequestBody PageEventGridDataAdminDTO eventGridDataDTO){ |
| | | return eventGridDataService.getGridMemberList(eventGridDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区下所有网格员 |
| | | * @param communityId 社区id |
| | | * @return 网格员列表 |
| | | */ |
| | | @PostMapping("/member/list") |
| | | public R getGridMemberLists(@RequestParam("communityId") Long communityId){ |
| | | return eventGridDataService.getGridMemberLists(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 首页待处理 |
| | | * @param eventGridTodoDataDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/getGridTodoData") |
| | | R getGridTodoData(@RequestBody EventGridTodoDataDTO eventGridTodoDataDTO){ |
| | | return eventGridDataService.getGridTodoData(eventGridTodoDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 网格数据待处理统计信息 |
| | | * @param eventGridStatisticsDataDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/eventgriddata/getGridStatisticsdData") |
| | | R getGridStatisticsdData(@RequestBody EventGridStatisticsDataDTO eventGridStatisticsDataDTO){ |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 后台新增网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/data/add") |
| | | public R addGridDataByAdmin(@RequestBody EventGridDataAddAdminDTO eventGridDataDTO){ |
| | | return eventGridDataService.addGridDataByAdmin(eventGridDataDTO); |
| | | } |
| | | |
| | | /** |
| | | * 后台修改网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/data/edit") |
| | | public R editGridDataByAdmin(@RequestBody EventGridDataEditAdminDTO eventGridDataDTO){ |
| | | return eventGridDataService.editGridDataByAdmin(eventGridDataDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * @param gridId |
| | | * @return |
| | | */ |
| | | @PostMapping("/grid/member") |
| | | R getGridMemberListsByGrid(@RequestParam("gridId") Long gridId){ |
| | | return eventGridDataService.getGridMemberListsByGrid(gridId); |
| | | } |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @PostMapping("/communitygrid") |
| | | R getGridDataListByCommunity(@RequestParam("gridId") Long communityId){ |
| | | return eventGridDataService.getGridDataListByCommunity(communityId); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping("/data/delete") |
| | | public R deleteGridDataByAdmin(@RequestBody List<Long> Ids){ |
| | | return eventGridDataService.deleteGridDataByAdmin(Ids); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberRelationDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationDetailsVO; |
| | |
| | | |
| | | /** |
| | | * 新增网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationAddDTO |
| | | * @param eventGridMemberAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/add") |
| | | R add(@RequestBody EventGridMemberRelationAddDTO eventGridMemberRelationAddDTO){ |
| | | return eventGridMemberRelationService.add(eventGridMemberRelationAddDTO); |
| | | R add(@RequestBody EventGridMemberAddDTO eventGridMemberAddDTO){ |
| | | return eventGridMemberRelationService.add(eventGridMemberAddDTO); |
| | | }; |
| | | |
| | | /** |
| | | * 修改网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationEditDTO |
| | | * @param eventGridMemberEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @PostMapping("/edit") |
| | | R edit(@RequestBody EventGridMemberRelationEditDTO eventGridMemberRelationEditDTO){ |
| | | return eventGridMemberRelationService.edit(eventGridMemberRelationEditDTO); |
| | | R edit(@RequestBody EventGridMemberEditDTO eventGridMemberEditDTO){ |
| | | return eventGridMemberRelationService.edit(eventGridMemberEditDTO); |
| | | }; |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_grid.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWainDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWorkTrajectoryDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_grid.service.EventGridDataService; |
| | | import com.panzhihua.service_grid.service.EventGridMemberGpsLogService; |
| | | import com.panzhihua.service_grid.service.EventGridMemberRelationService; |
| | | import com.panzhihua.service_grid.service.EventService; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_grid.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | private EventGridDataService eventGridDataService; |
| | | @Resource |
| | | private EventGridMemberGpsLogService eventGridMemberGpsLogService; |
| | | @Resource |
| | | private EventGridMemberWarnLogService eventGridMemberWarnLogService; |
| | | @Resource |
| | | private EventGridMemberRelationService eventGridMemberRelationService; |
| | | |
| | |
| | | return eventGridMemberRelationService.getMapGridListByApp(userId); |
| | | } |
| | | |
| | | /** |
| | | * 后台获取网格员运动轨迹 |
| | | * @param workTrajectoryDTO 请求参数 |
| | | * @return 运动轨迹 |
| | | */ |
| | | @PostMapping("gridMemberWorkTrajectory") |
| | | public R gridMemberWorkTrajectory(@RequestBody EventGridMemberWorkTrajectoryDTO workTrajectoryDTO){ |
| | | if(StringUtils.isEmpty(workTrajectoryDTO.getTime())){ |
| | | workTrajectoryDTO.setTime(DateUtils.getCurrentDateStrymd()); |
| | | } |
| | | return eventGridMemberGpsLogService.gridMemberWorkTrajectory(workTrajectoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 后台获取网格员预警记录 |
| | | * @param gridMemberWainDTO 请求参数 |
| | | * @return 预警记录 |
| | | */ |
| | | @PostMapping("gridMemberWorkWarning") |
| | | public R gridMemberWorkWarning(@RequestBody EventGridMemberWainDTO gridMemberWainDTO){ |
| | | return eventGridMemberWarnLogService.gridMemberWorkWarning(gridMemberWainDTO); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_grid.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.grid.MemberStatisticsAdminDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_grid.service.EventService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/statistics/") |
| | | public class StatisticsApi { |
| | | |
| | | @Resource |
| | | private EventService eventService; |
| | | |
| | | /** |
| | | * 后台管理-统计模块 |
| | | * @param communityId 社区id |
| | | * @return 统计信息 |
| | | */ |
| | | @GetMapping("/admin/eventStatistics") |
| | | public R eventStatistics(@RequestParam("communityId") Long communityId){ |
| | | return eventService.eventStatistics(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-网格员统计 |
| | | * @param statisticsAdminDTO 请求参数 |
| | | * @return 网格员统计信息 |
| | | */ |
| | | @PostMapping("/admin/gridMemberStatistics") |
| | | public R gridMemberStatistics(@RequestBody MemberStatisticsAdminDTO statisticsAdminDTO){ |
| | | return eventService.gridMemberStatistics(statisticsAdminDTO); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.grid.ComActEasyPhotoEditAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEasyAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEasyAppDTO; |
| | | import com.panzhihua.common.model.vos.grid.ComActEasyPhotoAdminVO; |
| | | import com.panzhihua.service_grid.model.dos.ComActEasyPhotoDO; |
| | | import com.panzhihua.common.model.vos.grid.ComActEasyPhotoVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | */ |
| | | ComActEasyPhotoVO findByEaseId(@Param("easyId") Long easyId); |
| | | |
| | | /** |
| | | * 后台管理-分页查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | IPage<ComActEasyPhotoAdminVO> easyListByAdmin(Page page, @Param("easyAppDTO") PageEasyAdminDTO easyAppDTO); |
| | | |
| | | /** |
| | | * 后台管理-随手拍详情 |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | */ |
| | | ComActEasyPhotoAdminVO easyDetailByAdmin(@Param("easyId") Long easyId); |
| | | |
| | | /** |
| | | * 后台管理-批量修改随手拍公示状态/删除随手拍 |
| | | * @param photoEditDTO 请求参数 |
| | | * @return 修改/删除结果 |
| | | */ |
| | | Integer easyPublicityByAdmin(@Param("photoEditDTO") ComActEasyPhotoEditAdminDTO photoEditDTO); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridTodoDataDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridDataAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.service_grid.model.dos.EventGridDataDO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * DAO |
| | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param pageEventGridDataDTO |
| | | * @param eventGridDataDTO |
| | | * @return |
| | | */ |
| | | IPage<EventGridDataVO> findByPage(Page page, @Param("pageEventGridDataDTO") PageEventGridDataDTO pageEventGridDataDTO); |
| | | IPage<EventGridAdminVO> findByPage(Page page, @Param("pageEventGridDataDTO") PageEventGridDataAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 分页查询网格员所在网格 |
| | |
| | | */ |
| | | IPage<EventGridDataVO> selectUserGrid(Page page, @Param("pageEventGridDataDTO") PageEventGridDataDTO pageEventGridDataDTO); |
| | | |
| | | /** |
| | | * 查询当前用户网格内待处理事件统计信息 |
| | | * @param eventGridTodoDataDTO |
| | | * @return |
| | | */ |
| | | List<UserEventGridDataVO> getGridTodoData(@Param("eventGridTodoDataDTO") EventGridTodoDataDTO eventGridTodoDataDTO); |
| | | /** |
| | | * 查询社区下所有网格员 |
| | | * @param communityId 社区id |
| | | * @return 网格员列表 |
| | | */ |
| | | List<EventGridMemberAdminVO> getGridMemberLists(@Param("communityId") Long communityId); |
| | | |
| | | List<GridMemberAdminVO> getGridMember(@Param("gridId") Long gridId); |
| | | |
| | | ComGridActVO getComActByActId(@Param("communityId") Long communityId); |
| | | |
| | | void removeGridRelationByGridId(@Param("gridId") Long gridId); |
| | | |
| | | List<EventGridMemberAdminVO> getGridMemberListsByGrid(@Param("gridId") Long gridId); |
| | | |
| | | List<EventGridDataAreaVO> getGridDataListByCommunity(@Param("communityId") Long communityId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWorkTrajectoryDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberGpsLogDTO; |
| | | import com.panzhihua.common.model.vos.grid.EventMapTrajectoryVO; |
| | | import com.panzhihua.service_grid.model.dos.EventGridMemberGpsLogDO; |
| | |
| | | |
| | | List<EventMapTrajectoryVO> getTrajectoryByApp(@Param("userId") Long userId); |
| | | |
| | | List<String> gridMemberWorkTrajectory(@Param("workTrajectoryDTO") EventGridMemberWorkTrajectoryDTO workTrajectoryDTO); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.grid.MemberStatisticsAdminDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberRelationDTO; |
| | | import com.panzhihua.common.model.vos.grid.EventMapGridVO; |
| | | import com.panzhihua.common.model.vos.grid.EventStatisticsMemberAdminVO; |
| | | import com.panzhihua.service_grid.model.dos.EventGridMemberRelationDO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | */ |
| | | List<EventMapGridVO> getMapGridListByApp(@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 后台管理-网格员统计 |
| | | * @param statisticsAdminDTO 请求参数 |
| | | * @return 网格员统计信息 |
| | | */ |
| | | IPage<EventStatisticsMemberAdminVO> gridMemberStatistics(Page page, @Param("statisticsAdminDTO") MemberStatisticsAdminDTO statisticsAdminDTO); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_grid.dao; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWainDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberWarnLogDTO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogAdminVO; |
| | | import com.panzhihua.service_grid.model.dos.EventGridMemberWarnLogDO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | * @since 1.0 |
| | | */ |
| | | @Mapper |
| | | public interface EventGridMemberWarnLogMapper extends BaseMapper<EventGridMemberWarnLogDO> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param pageEventGridMemberWarnLogDTO |
| | | * @return |
| | | */ |
| | | IPage<EventGridMemberWarnLogVO> findByPage(Page page, @Param("pageEventGridMemberWarnLogDTO")PageEventGridMemberWarnLogDTO pageEventGridMemberWarnLogDTO); |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param pageEventGridMemberWarnLogDTO |
| | | * @return |
| | | */ |
| | | IPage<EventGridMemberWarnLogVO> findByPage(Page page, @Param("pageEventGridMemberWarnLogDTO") PageEventGridMemberWarnLogDTO pageEventGridMemberWarnLogDTO); |
| | | |
| | | /** |
| | | * 后台获取网格员预警记录 |
| | | * @param gridMemberWainDTO 请求参数 |
| | | * @return 预警记录 |
| | | */ |
| | | IPage<EventGridMemberWarnLogAdminVO> gridMemberWorkWarning(Page page, @Param("gridMemberWainDTO") EventGridMemberWainDTO gridMemberWainDTO); |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PagePublicityEventDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.grid.ComMapGridEventVO; |
| | | import com.panzhihua.common.model.vos.grid.EventStatisticsAllAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.EventStatisticsMemberAdminVO; |
| | | import com.panzhihua.service_grid.model.dos.EventDO; |
| | | import com.panzhihua.common.model.vos.grid.EventVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | |
| | | */ |
| | | List<ComMapGridEventVO> getEventByGridId(@Param("gridId") Long gridId); |
| | | |
| | | /** |
| | | * 根据网格员id查询网格员头像url |
| | | * @param gridMemberId 网格员id |
| | | * @return 头像url |
| | | */ |
| | | String getGridMemberImageUrl(@Param("gridMemberId") Long gridMemberId); |
| | | |
| | | /** |
| | | * 查询事件(管理)列表 |
| | | * @param page |
| | | * @param pageEventManageDTO |
| | | * @return |
| | | */ |
| | | IPage<EventVO> findToManageByPage(Page page, @Param("pageEventManageDTO") PageEventManageDTO pageEventManageDTO); |
| | | |
| | | /** |
| | | * 查询事件(管理)列表 |
| | | * @param page |
| | | * @param pagePublicityEventCommunityDTO |
| | | * @return |
| | | */ |
| | | IPage<EventVO> findCommunityPublicityByPage(Page page, @Param("pagePublicityEventCommunityDTO") PagePublicityEventCommunityDTO pagePublicityEventCommunityDTO); |
| | | |
| | | /** |
| | | * 后台管理-统计模块 |
| | | * @param communityId 社区id |
| | | * @return 统计信息 |
| | | */ |
| | | EventStatisticsAllAdminVO eventStatistics(@Param("communityId") Long communityId); |
| | | |
| | | Integer getEventCountByGridIds(@Param("ids") List<Long> ids); |
| | | } |
| | |
| | | /** |
| | | * 事件类型 列: event_clazz |
| | | */ |
| | | private Integer eventClazz; |
| | | private String eventClazz; |
| | | /** |
| | | * 事件描述 列: event_des |
| | | */ |
| | |
| | | */ |
| | | private Date happenTime; |
| | | /** |
| | | * 发生地点 列: happent_address |
| | | * 事件发生地点备注 列: happent_address |
| | | */ |
| | | private String happentAddress; |
| | | /** |
| | | * 事件发生地点 列: happen_address |
| | | */ |
| | | private String happenAddress; |
| | | /** |
| | | * 发生的精度纬度信息(逗号隔开) 列: happent_lat_lng |
| | | */ |
| | |
| | | * 处理人ID 列: process_user_id |
| | | */ |
| | | private Long processUserId; |
| | | /** |
| | | * 处理流程记录ID 列: process_record_id |
| | | */ |
| | | private Long processRecordId; |
| | | /** |
| | | * 处理人名称 列: process_user_name |
| | | */ |
| | |
| | | */ |
| | | private Date submitDate; |
| | | /** |
| | | * 事件处理状态 列: event_deal_status |
| | | */ |
| | | private Integer eventDealStatus; |
| | | /** |
| | | * 创建人 列: create_by |
| | | */ |
| | | private Long createBy; |
| | |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 类型,1、区县网格2街道网格3社区网格 |
| | | */ |
| | | public interface type{ |
| | | Long qx = 1L; |
| | | Long jd = 2L; |
| | | Long sq = 3L; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | /** |
| | | * 定位地址信息 列:position_address |
| | | */ |
| | | private String positionAddress; |
| | | } |
| | |
| | | */ |
| | | private Long gridMemberId; |
| | | /** |
| | | * 网格员工作状态 列: work_status |
| | | */ |
| | | private Integer workStatus; |
| | | /** |
| | | * 工作开始时间 列: work_start_at |
| | | */ |
| | | private Integer workStartAt; |
| | | /** |
| | | * 工作结束时间 列: work_end_at |
| | | */ |
| | | private Integer workEndAt; |
| | | /** |
| | | * 创建人 列: create_by |
| | | */ |
| | | private Long createBy; |
| | |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createAt; |
| | | /** |
| | | * 定位地址信息 列:position_address |
| | | */ |
| | | private String positionAddress; |
| | | } |
| | |
| | | package com.panzhihua.service_grid.model.dos; |
| | | |
| | | import java.util.*; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | |
| | |
| | | */ |
| | | private String resourceSize; |
| | | /** |
| | | * 视频或音频时长 列: resource_time |
| | | */ |
| | | private Integer resourceTime; |
| | | /** |
| | | * 事件上传的资源URL地址 列: url |
| | | */ |
| | | private String url; |
| | |
| | | */ |
| | | private Date processDate; |
| | | /** |
| | | * 处理人或社区 列: process_by |
| | | */ |
| | | private Long processBy; |
| | | /** |
| | | * 处理人名或社区名 列: process_by_name |
| | | */ |
| | | private String processByName; |
| | | /** |
| | | * 业务处理类型 列: process_type |
| | | */ |
| | | private Integer processType; |
| | | /** |
| | | * 创建时间 列: create_at |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | |
| | | */ |
| | | R easyReport(ComActEasyPhotoHandleDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 后台管理-分页查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | R easyListByAdmin(PageEasyAdminDTO easyAppDTO); |
| | | |
| | | /** |
| | | * 后台管理-随手拍详情 |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | */ |
| | | R easyDetailByAdmin(Long easyId); |
| | | |
| | | /** |
| | | * 后台管理-随手拍处理 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | R easyHandleByAdmin(ComActEasyPhotoHandleDTO photoHandleDTO); |
| | | |
| | | /** |
| | | * 后台管理-批量修改随手拍公示状态/删除随手拍 |
| | | * @param photoEditDTO 请求参数 |
| | | * @return 修改/删除结果 |
| | | */ |
| | | R easyPublicityByAdmin(ComActEasyPhotoEditAdminDTO photoEditDTO); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.service_grid.model.dos.EventGridDataDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 区县/街道/社区/网格员网格数据管理 service |
| | |
| | | * @return 维护结果 |
| | | */ |
| | | R edit(EventGridDataEditDTO eventGridDataEditDTO); |
| | | |
| | | /** |
| | | * 分页查找区县/街道/社区/网格员网格数据管理 |
| | | * @param pageEventGridDataDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R<IPage<EventGridDataVO>> query(PageEventGridDataDTO pageEventGridDataDTO); |
| | | |
| | | /** |
| | | * 删除区县/街道/社区/网格员网格数据管理 |
| | |
| | | * @return 网格详细信息 |
| | | */ |
| | | R getMapGridDetail(Long gridId); |
| | | |
| | | /** |
| | | * 获取网格后台待处理事件统计信息 |
| | | * @param eventGridTodoDataDTO |
| | | * @return |
| | | */ |
| | | R getGridTodoData(EventGridTodoDataDTO eventGridTodoDataDTO); |
| | | |
| | | /** |
| | | * 分页查询网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 网格列表 |
| | | */ |
| | | R getGridMemberList(PageEventGridDataAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 查询社区下所有网格员 |
| | | * @param communityId 社区id |
| | | * @return 网格员列表 |
| | | */ |
| | | R getGridMemberLists(Long communityId); |
| | | |
| | | /** |
| | | * 后台新增网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addGridDataByAdmin(EventGridDataAddAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 后台修改网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | R editGridDataByAdmin(EventGridDataEditAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * @param gridId |
| | | * @return |
| | | */ |
| | | R getGridMemberListsByGrid(Long gridId); |
| | | |
| | | /** |
| | | * 查询网格下所有网格员 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getGridDataListByCommunity(Long communityId); |
| | | |
| | | R deleteGridDataByAdmin(List<Long> Ids); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberGpsLogAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberGpsLogDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberGpsLogEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberGpsLogDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberGpsLogDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberGpsLogVO; |
| | |
| | | */ |
| | | R getTrajectoryByApp(Long userId); |
| | | |
| | | /** |
| | | * 后台获取网格员运动轨迹 |
| | | * @param workTrajectoryDTO 请求参数 |
| | | * @return 运动轨迹 |
| | | */ |
| | | R gridMemberWorkTrajectory(EventGridMemberWorkTrajectoryDTO workTrajectoryDTO); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberRelationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationVO; |
| | |
| | | |
| | | /** |
| | | * 新增网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationAddDTO |
| | | * @param eventGridMemberAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | R add(EventGridMemberRelationAddDTO eventGridMemberRelationAddDTO); |
| | | R add(EventGridMemberAddDTO eventGridMemberAddDTO); |
| | | |
| | | /** |
| | | * 修改网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationEditDTO |
| | | * @param eventGridMemberEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R edit(EventGridMemberRelationEditDTO eventGridMemberRelationEditDTO); |
| | | R edit(EventGridMemberEditDTO eventGridMemberEditDTO); |
| | | |
| | | /** |
| | | * 分页查找网格和网格员的关联关系 |
| | |
| | | R getMapGridListByApp(Long userId); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWarnLogAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWarnLogDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWarnLogEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberWarnLogDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogVO; |
| | |
| | | */ |
| | | R<EventGridMemberWarnLogDetailsVO> eventGridMemberWarnLogDetails(Long id); |
| | | |
| | | /** |
| | | * 后台获取网格员预警记录 |
| | | * @param gridMemberWainDTO 请求参数 |
| | | * @return 预警记录 |
| | | */ |
| | | R gridMemberWorkWarning(EventGridMemberWainDTO gridMemberWainDTO); |
| | | |
| | | |
| | | } |
| | |
| | | public interface EventService extends IService<EventDO> { |
| | | |
| | | /** |
| | | * 新增事件 |
| | | * @param eventAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | R add(EventAddDTO eventAddDTO); |
| | | |
| | | /** |
| | | * 修改事件 |
| | | * @param eventEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | R edit(EventEditDTO eventEditDTO); |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | | * @param pageEventDTO |
| | | * @return 维护结果 |
| | |
| | | R report(CommonEventReportDTO commonEventReportDTO); |
| | | |
| | | /** |
| | | * 突发事件撤销 |
| | | * 事件撤销 |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 重新发布事件 |
| | | * @param commonEventRepublicDTO |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | | R republishEvent(CommonEventRepublicDTO commonEventRepublicDTO); |
| | | R republishEvent(CommonEventRepublishDTO commonEventRepublishDTO); |
| | | |
| | | /** |
| | | * 草稿发布 |
| | |
| | | * @return |
| | | */ |
| | | R<ComActVO> actList(); |
| | | |
| | | /** |
| | | * 查询事件管理 |
| | | * @param pageEventManageDTO |
| | | * @return |
| | | */ |
| | | R eventToManage(PageEventManageDTO pageEventManageDTO); |
| | | |
| | | /** |
| | | * 社区网格后台标记事件无效 |
| | | * @param eventRevokeDTO |
| | | * @return |
| | | */ |
| | | R markEventInvalid(EventRevokeDTO eventRevokeDTO); |
| | | |
| | | /** |
| | | * 社区在网格后台重新发布已标记失效的事件 |
| | | * @param commonEventRepublishDTO |
| | | * @return |
| | | */ |
| | | R republishInvalidEvent(CommonEventRepublishDTO commonEventRepublishDTO); |
| | | |
| | | /** |
| | | * 社区后台处理事件 |
| | | * @param commonEventDealDTO |
| | | * @return |
| | | */ |
| | | R communityDealEvent(CommonEventDealDTO commonEventDealDTO); |
| | | /** |
| | | * 分页查询社区宣传教育事件 |
| | | * @param pagePublicityEventDTO |
| | | * @return |
| | | */ |
| | | R selectCommunityPublicity(PagePublicityEventCommunityDTO pagePublicityEventDTO); |
| | | |
| | | /** |
| | | * 后台管理-统计模块 |
| | | * @param communityId 社区id |
| | | * @return 统计信息 |
| | | */ |
| | | R eventStatistics(Long communityId); |
| | | |
| | | /** |
| | | * 后台管理-网格员统计 |
| | | * @param statisticsAdminDTO 请求参数 |
| | | * @return 网格员统计信息 |
| | | */ |
| | | R gridMemberStatistics(MemberStatisticsAdminDTO statisticsAdminDTO); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.ComActEasyPhotoAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.ComActEasyPhotoDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.ComActEasyPhotoVO; |
| | | import com.panzhihua.service_grid.dao.*; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | |
| | | * @return 处理结果 |
| | | */ |
| | | @Override |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R easyHandle(ComActEasyPhotoHandleDTO photoHandleDTO){ |
| | | ComActEasyPhotoDO easyPhotoDO = this.baseMapper.selectById(photoHandleDTO.getId()); |
| | | if(easyPhotoDO == null){ |
| | |
| | | } |
| | | BeanUtils.copyProperties(photoHandleDTO,easyPhotoDO); |
| | | easyPhotoDO.setHandleStatus(ComActEasyPhotoDO.handleStatus.yes); |
| | | easyPhotoDO.setFeedbackAt(new Date()); |
| | | //关联随手拍类型 |
| | | if(!photoHandleDTO.getEasyTypeIds().isEmpty()){ |
| | | List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-分页查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | @Override |
| | | public R easyListByAdmin(PageEasyAdminDTO easyAppDTO){ |
| | | IPage<ComActEasyPhotoAdminVO> photoAdminVOIPage = this.baseMapper.easyListByAdmin(new Page(easyAppDTO.getPageNum(),easyAppDTO.getPageSize()), easyAppDTO); |
| | | if(!photoAdminVOIPage.getRecords().isEmpty()){ |
| | | photoAdminVOIPage.getRecords().forEach(photoAdmin -> { |
| | | //随手拍已处理,查询随手拍类型 |
| | | List<String> photoTypeList = comActEasyPhotoTypeRelationMapper.getEasyPhotoTypeRelationByEasyId(photoAdmin.getId()); |
| | | if(!photoTypeList.isEmpty()){ |
| | | photoAdmin.setPhotoTypeList(photoTypeList); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(photoAdminVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-随手拍详情 |
| | | * @param easyId 随手拍id |
| | | * @return 随手拍详情 |
| | | */ |
| | | @Override |
| | | public R easyDetailByAdmin(Long easyId){ |
| | | ComActEasyPhotoAdminVO photoAdminVO = this.baseMapper.easyDetailByAdmin(easyId); |
| | | if(photoAdminVO == null){ |
| | | return R.fail("随手拍不存在"); |
| | | } |
| | | if(photoAdminVO.getHandleStatus().equals(ComActEasyPhotoDO.handleStatus.yes)){ |
| | | //随手拍已处理,查询随手拍类型 |
| | | List<String> photoTypeList = comActEasyPhotoTypeRelationMapper.getEasyPhotoTypeRelationByEasyId(photoAdminVO.getId()); |
| | | if(!photoTypeList.isEmpty()){ |
| | | photoAdminVO.setPhotoTypeList(photoTypeList); |
| | | } |
| | | } |
| | | return R.ok(photoAdminVO); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-随手拍处理 |
| | | * @param photoHandleDTO 请求参数 |
| | | * @return 处理结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R easyHandleByAdmin(ComActEasyPhotoHandleDTO photoHandleDTO){ |
| | | ComActEasyPhotoDO easyPhotoDO = this.baseMapper.selectById(photoHandleDTO.getId()); |
| | | if(easyPhotoDO == null){ |
| | | return R.fail("随手拍不存在"); |
| | | } |
| | | if(easyPhotoDO.getIsReport().equals(ComActEasyPhotoDO.isReport.no)){ |
| | | return R.fail("该随手拍未上报,不可处理"); |
| | | } |
| | | if(easyPhotoDO.getHandleStatus().equals(ComActEasyPhotoDO.handleStatus.yes)){ |
| | | return R.fail("该随手拍已处理"); |
| | | } |
| | | BeanUtils.copyProperties(photoHandleDTO,easyPhotoDO); |
| | | easyPhotoDO.setHandleStatus(ComActEasyPhotoDO.handleStatus.yes); |
| | | //关联随手拍类型 |
| | | if(!photoHandleDTO.getEasyTypeIds().isEmpty()){ |
| | | List<ComActEasyPhotoTypeRelationDO> typeRelationDOList = new ArrayList<>(); |
| | | photoHandleDTO.getEasyTypeIds().forEach(typeId -> { |
| | | ComActEasyPhotoTypeRelationDO typeRelationDO = new ComActEasyPhotoTypeRelationDO(); |
| | | typeRelationDO.setEasyId(easyPhotoDO.getId()); |
| | | typeRelationDO.setEasyTypeId(typeId); |
| | | typeRelationDO.setCreateAt(new Date()); |
| | | typeRelationDOList.add(typeRelationDO); |
| | | }); |
| | | comActEasyPhotoTypeRelationService.saveBatch(typeRelationDOList); |
| | | } |
| | | if(this.baseMapper.updateById(easyPhotoDO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-批量修改随手拍公示状态/删除随手拍 |
| | | * @param photoEditDTO 请求参数 |
| | | * @return 修改/删除结果 |
| | | */ |
| | | @Override |
| | | public R easyPublicityByAdmin(ComActEasyPhotoEditAdminDTO photoEditDTO){ |
| | | if(this.baseMapper.easyPublicityByAdmin(photoEditDTO) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.google.common.base.Joiner; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridDataEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.ComMapGridDetailVO; |
| | | import com.panzhihua.common.model.vos.grid.ComMapGridEventVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridDataVO; |
| | | import com.panzhihua.common.model.vos.grid.*; |
| | | import com.panzhihua.service_grid.dao.*; |
| | | import com.panzhihua.service_grid.model.dos.*; |
| | | import com.panzhihua.service_grid.service.EventGridDataService; |
| | | import com.panzhihua.service_grid.service.EventGridMemberRelationService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | |
| | | private EventGridDataMapper eventGridDataMapper; |
| | | @Resource |
| | | private EventMapper eventMapper; |
| | | @Resource |
| | | private EventGridMemberRelationService eventGridMemberRelationService; |
| | | /** |
| | | * 新增区县/街道/社区/网格员网格数据管理 |
| | | * @param eventGridDataAddDTO |
| | |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 分页查找区县/街道/社区/网格员网格数据管理 |
| | | * @param pageEventGridDataDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R<IPage<EventGridDataVO>> query(PageEventGridDataDTO pageEventGridDataDTO){ |
| | | Page page = new Page(1,10); |
| | | if(pageEventGridDataDTO.getPageNum()!=null) { |
| | | page.setCurrent(pageEventGridDataDTO.getPageNum()); |
| | | } |
| | | if(pageEventGridDataDTO.getPageSize()!=null) { |
| | | page.setSize(pageEventGridDataDTO.getPageSize()); |
| | | } |
| | | return R.ok(eventGridDataMapper.findByPage(page, pageEventGridDataDTO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.ok(gridDetailVO); |
| | | } |
| | | |
| | | @Override |
| | | public R getGridTodoData(EventGridTodoDataDTO eventGridTodoDataDTO) { |
| | | List<UserEventGridDataVO> userEventGridDataVO = eventGridDataMapper.getGridTodoData(eventGridTodoDataDTO); |
| | | return R.ok(userEventGridDataVO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 网格列表 |
| | | */ |
| | | @Override |
| | | public R getGridMemberList(PageEventGridDataAdminDTO eventGridDataDTO){ |
| | | IPage<EventGridAdminVO> gridAdminVOIPage = this.baseMapper.findByPage(new Page(eventGridDataDTO.getPageNum(),eventGridDataDTO.getPageSize()),eventGridDataDTO); |
| | | if(!gridAdminVOIPage.getRecords().isEmpty()){ |
| | | gridAdminVOIPage.getRecords().forEach(gridMember -> { |
| | | List<GridMemberAdminVO> members = this.baseMapper.getGridMember(gridMember.getId()); |
| | | if(!members.isEmpty()){ |
| | | gridMember.setGridMembers(members); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(gridAdminVOIPage); |
| | | } |
| | | |
| | | /** |
| | | * 查询社区下所有网格员 |
| | | * @param communityId 社区id |
| | | * @return 网格员列表 |
| | | */ |
| | | @Override |
| | | public R getGridMemberLists(Long communityId){ |
| | | return R.ok(this.baseMapper.getGridMemberLists(communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 后台新增网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R addGridDataByAdmin(EventGridDataAddAdminDTO eventGridDataDTO){ |
| | | //查询社区信息 |
| | | ComGridActVO gridAct = this.baseMapper.getComActByActId(eventGridDataDTO.getGridCommunityId()); |
| | | if(gridAct != null){ |
| | | EventGridDataDO gridDataDO = new EventGridDataDO(); |
| | | BeanUtils.copyProperties(eventGridDataDTO,gridDataDO); |
| | | gridDataDO.setType(EventGridDataDO.type.sq); |
| | | gridDataDO.setGridStreetId(gridAct.getStreetId()); |
| | | gridDataDO.setGridCommunityId(gridAct.getCommunityId()); |
| | | gridDataDO.setZoneId(Long.parseLong(gridAct.getAreaCode())); |
| | | gridDataDO.setCreateBy(eventGridDataDTO.getUserId()); |
| | | if(this.baseMapper.insert(gridDataDO) > 0){ |
| | | if(!eventGridDataDTO.getMemberIds().isEmpty()){ |
| | | List<EventGridMemberRelationDO> memberRelationDOList = new ArrayList<>(); |
| | | //新增网格成功 绑定网格与网格员关系 |
| | | eventGridDataDTO.getMemberIds().forEach(memberId -> { |
| | | EventGridMemberRelationDO memberRelationDO = new EventGridMemberRelationDO(); |
| | | memberRelationDO.setGridId(gridDataDO.getId()); |
| | | memberRelationDO.setGridCommunityId(gridDataDO.getGridCommunityId()); |
| | | memberRelationDO.setGridStreetId(gridDataDO.getGridStreetId()); |
| | | memberRelationDO.setGridName(gridDataDO.getGridName()); |
| | | memberRelationDO.setGridMemberId(memberId); |
| | | memberRelationDOList.add(memberRelationDO); |
| | | }); |
| | | if(!memberRelationDOList.isEmpty()){ |
| | | //添加网格与网格员关联关系 |
| | | eventGridMemberRelationService.saveBatch(memberRelationDOList); |
| | | } |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 后台修改网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R editGridDataByAdmin(EventGridDataEditAdminDTO eventGridDataDTO){ |
| | | |
| | | EventGridDataDO gridDataDO = this.baseMapper.selectById(eventGridDataDTO.getGridId()); |
| | | if(gridDataDO != null){ |
| | | BeanUtils.copyProperties(eventGridDataDTO,gridDataDO); |
| | | gridDataDO.setUpdateBy(eventGridDataDTO.getUserId()); |
| | | if(this.baseMapper.updateById(gridDataDO) > 0){ |
| | | //移除网格员和网格关系 |
| | | this.baseMapper.removeGridRelationByGridId(gridDataDO.getId()); |
| | | |
| | | if(!eventGridDataDTO.getMemberIds().isEmpty()){ |
| | | List<EventGridMemberRelationDO> memberRelationDOList = new ArrayList<>(); |
| | | //绑定网格与网格员关系 |
| | | eventGridDataDTO.getMemberIds().forEach(memberId -> { |
| | | EventGridMemberRelationDO memberRelationDO = new EventGridMemberRelationDO(); |
| | | memberRelationDO.setGridId(gridDataDO.getId()); |
| | | memberRelationDO.setGridCommunityId(gridDataDO.getGridCommunityId()); |
| | | memberRelationDO.setGridStreetId(gridDataDO.getGridStreetId()); |
| | | memberRelationDO.setGridName(gridDataDO.getGridName()); |
| | | memberRelationDO.setGridMemberId(memberId); |
| | | memberRelationDOList.add(memberRelationDO); |
| | | }); |
| | | if(!memberRelationDOList.isEmpty()){ |
| | | //添加网格与网格员关联关系 |
| | | eventGridMemberRelationService.saveBatch(memberRelationDOList); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R getGridMemberListsByGrid(Long gridId) { |
| | | List<EventGridMemberAdminVO> eventGridMemberAdminVOList = this.getBaseMapper().getGridMemberListsByGrid(gridId); |
| | | return R.ok(eventGridMemberAdminVOList); |
| | | } |
| | | |
| | | @Override |
| | | public R getGridDataListByCommunity(Long communityId) { |
| | | List<EventGridDataAreaVO> eventGridDataAreaVOList = this.getBaseMapper().getGridDataListByCommunity(communityId); |
| | | return R.ok(eventGridDataAreaVOList); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteGridDataByAdmin(List<Long> Ids){ |
| | | Integer count = eventMapper.getEventCountByGridIds(Ids); |
| | | if(count > 0){ |
| | | return R.fail("您选择的网格已发布过事件,不可删除"); |
| | | } |
| | | if(this.baseMapper.deleteBatchIds(Ids) > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberGpsLogAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberGpsLogDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberGpsLogEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberGpsLogDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberGpsLogDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberGpsLogVO; |
| | |
| | | import org.springframework.beans.BeanUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | return R.ok(this.baseMapper.getTrajectoryByApp(userId)); |
| | | } |
| | | |
| | | /** |
| | | * 后台获取网格员运动轨迹 |
| | | * @param workTrajectoryDTO 请求参数 |
| | | * @return 运动轨迹 |
| | | */ |
| | | @Override |
| | | public R gridMemberWorkTrajectory(EventGridMemberWorkTrajectoryDTO workTrajectoryDTO){ |
| | | List<String> workTrajectorys = new ArrayList<>(); |
| | | workTrajectorys = this.baseMapper.gridMemberWorkTrajectory(workTrajectoryDTO); |
| | | return R.ok(workTrajectorys); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberRelationEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberRelationDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_grid.dao.*; |
| | | import com.panzhihua.service_grid.model.dos.*; |
| | | import com.panzhihua.service_grid.service.EventGridMemberRelationService; |
| | |
| | | |
| | | @Resource |
| | | private EventGridMemberRelationMapper eventGridMemberRelationMapper; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 新增网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationAddDTO |
| | | * @param eventGridMemberAddDTO |
| | | * @return 新增结果 |
| | | */ |
| | | public R add(EventGridMemberRelationAddDTO eventGridMemberRelationAddDTO){ |
| | | public R add(EventGridMemberAddDTO eventGridMemberAddDTO){ |
| | | |
| | | userService.addGridUser(eventGridMemberAddDTO); |
| | | |
| | | |
| | | |
| | | EventGridMemberRelationDO eventGridMemberRelationDO = new EventGridMemberRelationDO(); |
| | | BeanUtils.copyProperties(eventGridMemberRelationAddDTO, eventGridMemberRelationDO); |
| | | eventGridMemberRelationDO.setCreateAt(new Date()); |
| | | eventGridMemberRelationDO.setCreateBy(eventGridMemberAddDTO.getUserId()); |
| | | if(eventGridMemberRelationMapper.insert(eventGridMemberRelationDO)>0){ |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 修改网格和网格员的关联关系 |
| | | * @param eventGridMemberRelationEditDTO |
| | | * @param eventGridMemberEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R edit(EventGridMemberRelationEditDTO eventGridMemberRelationEditDTO){ |
| | | public R edit(EventGridMemberEditDTO eventGridMemberEditDTO){ |
| | | EventGridMemberRelationDO eventGridMemberRelationDO = new EventGridMemberRelationDO(); |
| | | BeanUtils.copyProperties(eventGridMemberRelationEditDTO, eventGridMemberRelationDO); |
| | | BeanUtils.copyProperties(eventGridMemberEditDTO, eventGridMemberRelationDO); |
| | | //eventGridMemberRelationDO.setUpdateAt(new Date()); |
| | | if(eventGridMemberRelationMapper.updateById(eventGridMemberRelationDO)>0){ |
| | | return R.ok(); |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWarnLogAddDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWarnLogDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberWarnLogEditDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberWarnLogDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogDetailsVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogVO; |
| | |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 后台获取网格员预警记录 |
| | | * @param gridMemberWainDTO 请求参数 |
| | | * @return 预警记录 |
| | | */ |
| | | @Override |
| | | public R gridMemberWorkWarning(EventGridMemberWainDTO gridMemberWainDTO){ |
| | | return R.ok(this.baseMapper.gridMemberWorkWarning(new Page(gridMemberWainDTO.getPageNum(),gridMemberWainDTO.getPageSize()),gridMemberWainDTO)); |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | private EventTransferRecordService eventTransferRecordService; |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 新增事件 |
| | | * @param eventAddDTO 事件新增DTO |
| | | * @return 新增结果 |
| | | */ |
| | | public R add(EventAddDTO eventAddDTO){ |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(eventAddDTO, eventDO); |
| | | eventDO.setCreateAt(new Date()); |
| | | if(eventMapper.insert(eventDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 修改事件 |
| | | * @param eventEditDTO |
| | | * @return 维护结果 |
| | | */ |
| | | public R edit(EventEditDTO eventEditDTO){ |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(eventEditDTO, eventDO); |
| | | //eventDO.setUpdateAt(new Date()); |
| | | if(eventMapper.updateById(eventDO)>0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | @Resource |
| | | private EventGridDataMapper eventGridDataMapper; |
| | | @Resource |
| | | private EventGridMemberRelationMapper eventGridMemberRelationMapper; |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | | * @param pageEventDTO |
| | | * @return 维护结果 |
| | | */ |
| | | @Override |
| | | public R<IPage<EventVO>> query(PageEventDTO pageEventDTO){ |
| | | Page page = new Page(1,10); |
| | | if(pageEventDTO.getPageNum()!=null) { |
| | |
| | | eventVO.setAudios(audioList); |
| | | eventVO.setPics(picList); |
| | | eventVO.setVideos(videoList); |
| | | |
| | | //查询网格员头像 |
| | | String imageUrl = eventMapper.getGridMemberImageUrl(eventVO.getGridMemberId()); |
| | | if(StringUtils.isNotEmpty(imageUrl)){ |
| | | eventVO.setGridMemberImageUrl(imageUrl); |
| | | } |
| | | }); |
| | | return R.ok(ipage); |
| | | } |
| | |
| | | * @param commonEventDeleteDTO |
| | | * @return 平台用户信息 |
| | | */ |
| | | @Override |
| | | public R delete(CommonEventDeleteDTO commonEventDeleteDTO){ |
| | | EventDO eventDO = eventMapper.selectById(commonEventDeleteDTO.getId()); |
| | | if(eventDO==null){ |
| | |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | return updated==1?R.ok():R.fail(); |
| | | } |
| | | return R.fail("事件不是草稿/已撤销状态, 不允许删除"); |
| | | return R.fail("事件不是草稿/已撤销/无效状态, 不允许删除"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param id 事件 id |
| | | * @return 查找结果 |
| | | */ |
| | | @Override |
| | | public R<EventDetailsVO> eventDetails(Long id){ |
| | | EventDO eventDO = eventMapper.selectById(id); |
| | | if(eventDO!=null) { |
| | | EventDetailsVO eventDetailsVO = new EventDetailsVO(); |
| | | BeanUtils.copyProperties(eventDO, eventDetailsVO); |
| | | EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(eventDO.getGridId()); |
| | | if(eventGridDataDO!=null) { |
| | | eventDetailsVO.setGridName(eventGridDataDO.getGridName()); |
| | | } |
| | | |
| | | //查询事件关联附件 |
| | | List<EventResourceDO> eventResourceDOList = |
| | | eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>() |
| | |
| | | eventTransferRecordVOS.add(eventTransferRecordVO); |
| | | } |
| | | eventDetailsVO.setTrans(eventTransferRecordVOS); |
| | | |
| | | //查询事件发布人头像 |
| | | String imageUrl = eventMapper.getGridMemberImageUrl(eventDO.getGridMemberId()); |
| | | if(StringUtils.isNotEmpty(imageUrl)){ |
| | | eventDetailsVO.setGridMemberImageUrl(imageUrl); |
| | | } |
| | | |
| | | return R.ok(eventDetailsVO); |
| | | } |
| | | return R.fail(); |
| | | return R.fail("事件不存在"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public R addCommon(CommonEventAddDTO commonEventAddDTO) { |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(commonEventAddDTO, eventDO); |
| | | eventDO.setGridMemberId(commonEventAddDTO.getUserId()); |
| | | if(commonEventAddDTO instanceof CommonEventCommunityAddDTO) { |
| | | CommonEventCommunityAddDTO commonEventCommunityAddDTO = (CommonEventCommunityAddDTO)commonEventAddDTO; |
| | | eventDO.setGridMemberId(commonEventCommunityAddDTO.getGridMemberId()); |
| | | }else{ |
| | | eventDO.setGridMemberId(commonEventAddDTO.getUserId()); |
| | | } |
| | | EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(commonEventAddDTO.getGridId()); |
| | | if(eventGridDataDO==null){ |
| | | return R.fail("网格不存在"); |
| | | } |
| | | eventDO.setEventCategory(1l);//办件事件 |
| | | eventDO.setEventStatus(2);//事件状态 2发布 |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setEventProcessStatus(1); |
| | | eventDO.setGridMemberId(commonEventAddDTO.getUserId()); |
| | | eventDO.setGridMemberName(commonEventAddDTO.getUserName()); |
| | | eventDO.setGridMemberTelephone(commonEventAddDTO.getPhone()); |
| | | eventDO.setCreateBy(commonEventAddDTO.getUserId()); |
| | | eventDO.setSubmitDate(new Date()); |
| | | eventDO.setOrderSn(getEventOrderSn(eventDO.getEventType())); |
| | | if(eventMapper.insert(eventDO)==1){ |
| | | //添加音频 |
| | | if(StringUtils.isNotEmpty(commonEventAddDTO.getAudio())){ |
| | |
| | | eventResourceDO.setUrl(commonEventAddDTO.getAudio()); |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setCreateBy(commonEventAddDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventAddDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(audioAdd!=1){ |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setUrl(commonEventAddDTO.getVideo()); |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setCreateBy(commonEventAddDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventAddDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(videoAdd!=1){ |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R saveDraft(CommonEventEditDTO commonEventEditDTO) { |
| | | EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(commonEventEditDTO.getGridId()); |
| | | if(eventGridDataDO==null){ |
| | | return R.fail("网格不存在"); |
| | | } |
| | | if(commonEventEditDTO.getId()==null) { |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(commonEventEditDTO, eventDO); |
| | |
| | | eventDO.setGridMemberId(commonEventEditDTO.getUserId()); |
| | | eventDO.setGridMemberName(commonEventEditDTO.getUserName()); |
| | | eventDO.setGridMemberTelephone(commonEventEditDTO.getPhone()); |
| | | eventDO.setEventDealStatus(5); |
| | | if (eventMapper.insert(eventDO) > 0) { |
| | | //添加音频 |
| | | if (StringUtils.isNotEmpty(commonEventEditDTO.getAudio())) { |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(commonEventEditDTO.getAudio()); |
| | | eventResourceDO.setCreateBy(commonEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventEditDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (audioAdd != 1) { |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(commonEventEditDTO.getVideo()); |
| | | eventResourceDO.setCreateBy(commonEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventEditDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (videoAdd != 1) { |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | }else{ |
| | | //编辑原来的 |
| | | EventDO eventDO = eventMapper.selectById(commonEventEditDTO.getId()); |
| | | if(eventDO.getEventStatus()!=null && eventDO.getEventStatus()!=1 && eventDO.getEventDealStatus()!=6){ |
| | | return R.fail("保存草稿失败,事件不是草稿/已撤销状态"); |
| | | } |
| | | BeanUtils.copyProperties(commonEventEditDTO, eventDO); |
| | | eventDO.setGridMemberId(commonEventEditDTO.getUserId()); |
| | | eventDO.setEventCategory(1l);//办件事件 |
| | |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setUpdateBy(commonEventEditDTO.getUserId()); |
| | | eventDO.setEventDealStatus(5); |
| | | if (eventMapper.updateById(eventDO) > 0) { |
| | | int deleted = eventResourceService.getBaseMapper() |
| | | .delete(new LambdaQueryWrapper<EventResourceDO>() |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(commonEventEditDTO.getAudio()); |
| | | eventResourceDO.setCreateBy(commonEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventEditDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (audioAdd != 1) { |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(commonEventEditDTO.getVideo()); |
| | | eventResourceDO.setCreateBy(commonEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventEditDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (videoAdd != 1) { |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | |
| | | R r = communityService.detailCommunity(commonEventReportDTO.getToId()); |
| | | if(!R.isOk(r)){ |
| | | return R.fail("查询社区错误"); |
| | | return R.fail("社区不存在"); |
| | | } |
| | | ComActVO comActVO= JSONObject.parseObject(JSONObject.toJSONString(r.getData()),ComActVO.class); |
| | | if(comActVO!=null){ |
| | | if(comActVO==null){ |
| | | return R.fail("社区不存在"); |
| | | } |
| | | eventDO.setCommunityProcess(1); //社区处理 |
| | |
| | | if(updated!=1){ |
| | | throw new ServiceException("更新突发事件状态更新失败"); |
| | | } |
| | | addTransferRecord(eventDO.getId(), commonEventReportDTO.getToId(), comActVO.getName(), 2, "上报社区成功"); |
| | | addTransferRecord(eventDO.getId(), commonEventReportDTO.getToId(), comActVO.getName(), 2, commonEventReportDTO.getProcessResult(), |
| | | commonEventReportDTO.getUserId(), commonEventReportDTO.getUserName(), 2); |
| | | return R.ok(); |
| | | |
| | | } |
| | |
| | | } |
| | | boolean canRevoke = eventDO.getEventStatus()==2; //发布状态 |
| | | if(!canRevoke){ |
| | | return R.fail("当前事件不允许撤销"); |
| | | return R.fail("当前事件不允许·"); |
| | | } |
| | | if(eventDO.getEventCategory()!=null && eventDO.getEventCategory().intValue()==2){//宣传教育事件 |
| | | //不做验证 |
| | | }else if(eventDO.getEventProcessStatus()==2 ||eventDO.getEventProcessStatus()==3) { //已解决 或者 待验证 不允许撤销 |
| | | Integer eventProcessStatus = eventDO.getEventProcessStatus()!=null?eventDO.getEventProcessStatus():-1; |
| | | if(eventProcessStatus==2 ||eventProcessStatus==3) { //已解决 或者 待验证 不允许撤销 |
| | | return R.fail("当前事件不允许撤销"); |
| | | } |
| | | eventDO.setEventStatus(4); |
| | |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if(updated == 1){ |
| | | addTransferRecord(eventDO.getId(), eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(), 1,"撤销成功"); |
| | | addTransferRecord(eventDO.getId(), eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(), |
| | | 1,"撤销成功", eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(), 7); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R dealEvent(CommonEventDealDTO commonEventDealDTO) { |
| | | EventDO eventDO = this.getBaseMapper().selectById(commonEventDealDTO.getId()); |
| | | if (eventDO == null) { |
| | | return R.fail("事件不存在"); |
| | | } |
| | | boolean canDealByUser = eventDO.getEventStatus()==2 && eventDO.getEventProcessStatus()==1; |
| | | if(!canDealByUser){ |
| | | if(eventDO.getEventStatus()!=2){ |
| | |
| | | eventDO.setEventProcessStatus(2);//2已解决 |
| | | eventDO.setUpdateBy(commonEventDealDTO.getUserId()); |
| | | |
| | | //更新出利润信息 |
| | | //更新处理信息 |
| | | eventDO.setProcessUserId(commonEventDealDTO.getUserId()); |
| | | eventDO.setProcessUserName(commonEventDealDTO.getUserName()); |
| | | eventDO.setProcessDate(new Date()); |
| | |
| | | if(updated!=1){ |
| | | return R.fail("更新事件状态失败"); |
| | | } |
| | | Integer processType = -1; |
| | | if(eventDO.getInvalid()!=null){ |
| | | processType = 5; |
| | | }else{ |
| | | processType = 1; |
| | | } |
| | | EventTransferRecordDO transferRecordDO = |
| | | addTransferRecord(eventDO.getId(), commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(),1, "网格员自处理完成"); |
| | | addTransferRecord(eventDO.getId(), commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(),1, "网格员自处理完成", commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(), processType); |
| | | if(transferRecordDO!=null && transferRecordDO.getId()!=null){ |
| | | //添加音频 |
| | | if(StringUtils.isNotEmpty(commonEventDealDTO.getAudio())){ |
| | |
| | | eventResourceDO.setUrl(commonEventDealDTO.getAudio()); |
| | | eventResourceDO.setRefId(transferRecordDO.getId()); |
| | | eventResourceDO.setCreateBy(commonEventDealDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventDealDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(audioAdd!=1){ |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setUrl(commonEventDealDTO.getVideo()); |
| | | eventResourceDO.setRefId(transferRecordDO.getId()); |
| | | eventResourceDO.setCreateBy(commonEventDealDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventDealDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(videoAdd!=1){ |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | Long transferRecordId = transferRecordDO.getId(); |
| | | EventDO eventDOToUpdate = this.getBaseMapper().selectById(commonEventDealDTO.getId()); |
| | | eventDOToUpdate.setProcessRecordId(transferRecordId); |
| | | int transferRecordUpdated = this.getBaseMapper().updateById(eventDOToUpdate); |
| | | if(transferRecordUpdated!=1){ |
| | | throw new ServiceException("更新事件处理流程失败"); |
| | | } |
| | | |
| | | return R.ok(); |
| | | }else{ |
| | | throw new ServiceException("处理事件记录出错"); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R verifyEvent(CommonEventVerifyDTO commonEventVerifyDTO) { |
| | |
| | | if(updated!=1){ |
| | | return R.fail("更新事件状态失败"); |
| | | } |
| | | addTransferRecord(eventDO.getId(), commonEventVerifyDTO.getUserId(), commonEventVerifyDTO.getUserName(), 1, "事件验证完成"); |
| | | addTransferRecord(eventDO.getId(), commonEventVerifyDTO.getUserId(), commonEventVerifyDTO.getUserName(), 1, commonEventVerifyDTO.getProcessResult(), |
| | | commonEventVerifyDTO.getUserId(), commonEventVerifyDTO.getUserName(), 6); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R republishEvent(CommonEventRepublicDTO commonEventRepublicDTO) { |
| | | EventDO eventDO = this.getBaseMapper().selectById(commonEventRepublicDTO.getId()); |
| | | public R republishEvent(CommonEventRepublishDTO commonEventRepublishDTO) { |
| | | EventDO eventDO = this.getBaseMapper().selectById(commonEventRepublishDTO.getId()); |
| | | boolean canRepublishByUser = eventDO.getEventStatus()==4; |
| | | if(!canRepublishByUser){ |
| | | return R.fail("当前不是撤销状态"); |
| | |
| | | eventDO.setEventStatus(2);//2 发布 |
| | | eventDO.setEventProcessStatus(1); //待解决 |
| | | eventDO.setProcessType(1); //网格员处理 |
| | | eventDO.setUpdateBy(commonEventRepublicDTO.getUserId()); |
| | | eventDO.setUpdateBy(commonEventRepublishDTO.getUserId()); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if(updated!=1){ |
| | | return R.fail("更新事件状态失败"); |
| | | } |
| | | addTransferRecord(eventDO.getId(), commonEventRepublicDTO.getUserId(), commonEventRepublicDTO.getUserName(), 1, "重新发布已撤销事件"); |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 1, |
| | | "重新发布已撤销事件", commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 8); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | if(!draftCanRelease){ |
| | | return R.fail("当前不是草稿状态"); |
| | | } |
| | | eventDO.setOrderSn(getEventOrderSn(eventDO.getEventType())); |
| | | eventDO.setEventStatus(2);//事件状态 2发布 |
| | | eventDO.setProcessType(1);//当前处理对象类型:网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 生成服务单号 |
| | | * @param eventType 事件类型,宣传事件默认为20 |
| | | * @return |
| | | */ |
| | | private String getEventOrderSn(Integer eventType) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | | if(eventType==null){ |
| | | eventType = 20; |
| | | } |
| | | String pre = String.format(simpleDateFormat.format(new Date()) + "%02d", eventType); |
| | | Integer todayCount = this.getBaseMapper().selectCount(new LambdaQueryWrapper<EventDO>().likeRight(EventDO::getOrderSn, pre)); |
| | | String orderSn = String.format(pre + "%04d", todayCount+1); |
| | | return orderSn; |
| | | } |
| | | |
| | | @Override |
| | | public R saveSpecialDraft(SpecialEventEditDTO specialEventEditDTO) { |
| | | EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(specialEventEditDTO.getGridId()); |
| | | if(eventGridDataDO==null){ |
| | | return R.fail("网格不存在"); |
| | | } |
| | | R rtVal = R.fail(); |
| | | if(specialEventEditDTO.getId()==null) { |
| | | EventDO eventDO = new EventDO(); |
| | |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setCreateBy(specialEventEditDTO.getUserId()); |
| | | eventDO.setEventDealStatus(5);//草稿状态 |
| | | if (eventMapper.insert(eventDO) > 0) { |
| | | //添加音频 |
| | | if (StringUtils.isNotEmpty(specialEventEditDTO.getAudio())) { |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(specialEventEditDTO.getAudio()); |
| | | eventResourceDO.setCreateBy(specialEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(specialEventEditDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (audioAdd != 1) { |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(specialEventEditDTO.getVideo()); |
| | | eventResourceDO.setCreateBy(specialEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(specialEventEditDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (videoAdd != 1) { |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | BeanUtils.copyProperties(specialEventEditDTO, eventDO); |
| | | eventDO.setGridMemberId(specialEventEditDTO.getUserId()); |
| | | eventDO.setEventCategory(1l);//办件事件 |
| | | eventDO.setEventStatus(1);//事件状态 2发布 |
| | | eventDO.setEventStatus(1);//事件状态 1草稿 |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setUpdateBy(specialEventEditDTO.getUserId()); |
| | | eventDO.setEventDealStatus(5);//草稿状态 |
| | | if (eventMapper.updateById(eventDO) > 0) { |
| | | int deleted = eventResourceService.getBaseMapper() |
| | | .delete(new LambdaQueryWrapper<EventResourceDO>() |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(specialEventEditDTO.getAudio()); |
| | | eventResourceDO.setCreateBy(specialEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(specialEventEditDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (audioAdd != 1) { |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(specialEventEditDTO.getVideo()); |
| | | eventResourceDO.setCreateBy(specialEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(specialEventEditDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (videoAdd != 1) { |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | |
| | | @Override |
| | | public R addSpecial(SpecialEventAddDTO specialEventAddDTO) { |
| | | EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(specialEventAddDTO.getGridId()); |
| | | if(eventGridDataDO==null){ |
| | | return R.fail("网格不存在"); |
| | | } |
| | | R rtVal = R.fail(); |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(specialEventAddDTO, eventDO); |
| | | eventDO.setGridMemberId(specialEventAddDTO.getUserId()); |
| | | eventDO.setEventCategory(1l);//办件事件 |
| | | eventDO.setEventType(EventType.SPECIAL);//特殊人群信息上报-事件分类 |
| | | eventDO.setEventStatus(1);//事件状态 1草稿 |
| | | eventDO.setEventStatus(2);//事件状态 2发布 |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setCreateBy(specialEventAddDTO.getUserId()); |
| | | eventDO.setOrderSn(getEventOrderSn(eventDO.getEventType())); |
| | | if (eventMapper.insert(eventDO) > 0) { |
| | | //添加音频 |
| | | if (StringUtils.isNotEmpty(specialEventAddDTO.getAudio())) { |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(specialEventAddDTO.getAudio()); |
| | | eventResourceDO.setCreateBy(specialEventAddDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(specialEventAddDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (audioAdd != 1) { |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(specialEventAddDTO.getVideo()); |
| | | eventResourceDO.setCreateBy(specialEventAddDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(specialEventAddDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (videoAdd != 1) { |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | |
| | | @Override |
| | | public R addPublicity(PublicityEventAddDTO publicityEventAddDTO) { |
| | | EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(publicityEventAddDTO.getGridId()); |
| | | if(eventGridDataDO==null){ |
| | | return R.fail("网格不存在"); |
| | | } |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(publicityEventAddDTO, eventDO); |
| | | eventDO.setGridMemberId(publicityEventAddDTO.getUserId()); |
| | |
| | | eventDO.setGridMemberName(publicityEventAddDTO.getUserName()); |
| | | eventDO.setGridMemberTelephone(publicityEventAddDTO.getPhone()); |
| | | eventDO.setCreateBy(publicityEventAddDTO.getUserId()); |
| | | eventDO.setOrderSn(getEventOrderSn(eventDO.getEventType())); |
| | | if(eventMapper.insert(eventDO)==1){ |
| | | //添加音频 |
| | | if(StringUtils.isNotEmpty(publicityEventAddDTO.getAudio())){ |
| | |
| | | eventResourceDO.setUrl(publicityEventAddDTO.getAudio()); |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setCreateBy(publicityEventAddDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(publicityEventAddDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(audioAdd!=1){ |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setUrl(publicityEventAddDTO.getVideo()); |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setCreateBy(publicityEventAddDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(publicityEventAddDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(videoAdd!=1){ |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | |
| | | @Override |
| | | public R savePublicityDraft(PublicityEventEditDTO publicityEventEditDTO) { |
| | | EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(publicityEventEditDTO.getGridId()); |
| | | if(eventGridDataDO==null){ |
| | | return R.fail("网格不存在"); |
| | | } |
| | | if(publicityEventEditDTO.getId()==null) { |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(publicityEventEditDTO, eventDO); |
| | |
| | | eventDO.setGridMemberId(publicityEventEditDTO.getUserId()); |
| | | eventDO.setGridMemberName(publicityEventEditDTO.getUserName()); |
| | | eventDO.setGridMemberTelephone(publicityEventEditDTO.getPhone()); |
| | | eventDO.setEventDealStatus(5);//草稿状态 |
| | | if (eventMapper.insert(eventDO) > 0) { |
| | | //添加音频 |
| | | if (StringUtils.isNotEmpty(publicityEventEditDTO.getAudio())) { |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(publicityEventEditDTO.getAudio()); |
| | | eventResourceDO.setCreateBy(publicityEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(publicityEventEditDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (audioAdd != 1) { |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(publicityEventEditDTO.getVideo()); |
| | | eventResourceDO.setCreateBy(publicityEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(publicityEventEditDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (videoAdd != 1) { |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | }else{ |
| | | //编辑原来的 |
| | | EventDO eventDO = eventMapper.selectById(publicityEventEditDTO.getId()); |
| | | if(eventDO.getEventStatus()!=null && eventDO.getEventStatus()!=1 && eventDO.getEventDealStatus()!=6){ |
| | | return R.fail("保存草稿失败,事件不是草稿/撤销状态"); |
| | | } |
| | | BeanUtils.copyProperties(publicityEventEditDTO, eventDO); |
| | | eventDO.setGridMemberId(publicityEventEditDTO.getUserId()); |
| | | eventDO.setEventCategory(2L);//宣传事件 |
| | | eventDO.setEventStatus(1);//事件状态 2发布 |
| | | eventDO.setEventStatus(1);//事件状态 1草稿 |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setUpdateBy(publicityEventEditDTO.getUserId()); |
| | | eventDO.setEventDealStatus(5);//草稿状态 |
| | | if (eventMapper.updateById(eventDO) > 0) { |
| | | int deleted = eventResourceService.getBaseMapper() |
| | | .delete(new LambdaQueryWrapper<EventResourceDO>() |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(publicityEventEditDTO.getAudio()); |
| | | eventResourceDO.setCreateBy(publicityEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(publicityEventEditDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (audioAdd != 1) { |
| | | throw new ServiceException("添加音频失败"); |
| | |
| | | eventResourceDO.setRefId(eventDO.getId()); |
| | | eventResourceDO.setUrl(publicityEventEditDTO.getVideo()); |
| | | eventResourceDO.setCreateBy(publicityEventEditDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(publicityEventEditDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if (videoAdd != 1) { |
| | | throw new ServiceException("添加视频失败"); |
| | |
| | | return communityService.listCommunityAll(); |
| | | } |
| | | |
| | | @Override |
| | | public R eventToManage(PageEventManageDTO pageEventManageDTO) { |
| | | //查询管理事件 |
| | | Page page = new Page(1,10); |
| | | if(pageEventManageDTO.getPageNum()!=null) { |
| | | page.setCurrent(pageEventManageDTO.getPageNum()); |
| | | } |
| | | if(pageEventManageDTO.getPageSize()!=null) { |
| | | page.setSize(pageEventManageDTO.getPageSize()); |
| | | } |
| | | IPage<EventVO> ipage = eventMapper.findToManageByPage(page, pageEventManageDTO); |
| | | if(ipage!=null){ |
| | | List<EventVO> eventVOList = ipage.getRecords(); |
| | | eventVOList.forEach(eventVO -> { |
| | | List<EventResourceDO> eventResourceDOList = |
| | | eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>() |
| | | .eq(EventResourceDO::getClassification, 1) |
| | | .eq(EventResourceDO::getRefId, eventVO.getId()) |
| | | ); |
| | | List<EventResourceVO> picList = new ArrayList<>(); |
| | | List<EventResourceVO> audioList = new ArrayList<>(); |
| | | List<EventResourceVO> videoList = new ArrayList<>(); |
| | | eventResourceDOList.forEach(eventResourceDO -> { |
| | | switch (eventResourceDO.getType()){ |
| | | case 1: |
| | | EventResourceVO picEventResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, picEventResourceVO); |
| | | picList.add(picEventResourceVO); |
| | | break; |
| | | case 2: |
| | | EventResourceVO audioResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, audioResourceVO); |
| | | audioList.add(audioResourceVO); |
| | | break; |
| | | case 3: |
| | | EventResourceVO videoResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, videoResourceVO); |
| | | videoList.add(videoResourceVO); |
| | | break; |
| | | } |
| | | }); |
| | | eventVO.setAudios(audioList); |
| | | eventVO.setPics(picList); |
| | | eventVO.setVideos(videoList); |
| | | |
| | | //查询网格员头像 |
| | | String imageUrl = eventMapper.getGridMemberImageUrl(eventVO.getGridMemberId()); |
| | | if(StringUtils.isNotEmpty(imageUrl)){ |
| | | eventVO.setGridMemberImageUrl(imageUrl); |
| | | } |
| | | }); |
| | | return R.ok(ipage); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R markEventInvalid(EventRevokeDTO eventRevokeDTO) { |
| | | EventDO eventDO = this.getBaseMapper().selectById(eventRevokeDTO.getId()); |
| | | if(eventDO==null){ |
| | | return R.fail("事件不存在"); |
| | | } |
| | | if(eventDO.getEventCategory()!=null) { |
| | | if (eventDO.getEventCategory() == 1) { |
| | | boolean canRevoke = eventDO.getEventDealStatus() == 3; //上报状态 |
| | | if (!canRevoke) { |
| | | return R.fail("当前事件不是上报状态,不允许标为无效"); |
| | | } |
| | | }else if (eventDO.getEventCategory() == 2) { |
| | | boolean canRevoke = eventDO.getEventDealStatus() == 8; //发布状态 |
| | | if (!canRevoke) { |
| | | return R.fail("当前事件不是发布状态,不允许标为无效"); |
| | | } |
| | | }else{ |
| | | return R.fail(""); |
| | | } |
| | | }else{ |
| | | return R.fail("事件所属错误"); |
| | | } |
| | | eventDO.setInvalid(false); |
| | | //标为无效后, 交给网格员处理 |
| | | eventDO.setUpdateBy(eventRevokeDTO.getUserId()); |
| | | eventDO.setEventStatus(4);//4、撤销 |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if(updated == 1){ |
| | | addTransferRecord(eventDO.getId(), eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(), 1,"标为无效", eventRevokeDTO.getCommunityId(), eventRevokeDTO.getCommunityName(), 4); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R republishInvalidEvent(CommonEventRepublishDTO commonEventRepublishDTO) { |
| | | EventDO eventDO = this.getBaseMapper().selectById(commonEventRepublishDTO.getId()); |
| | | if(eventDO==null){ |
| | | return R.fail("事件不存在"); |
| | | } |
| | | boolean canRepulish = eventDO.getEventDealStatus()==7; //已失效状态 |
| | | if(!canRepulish){ |
| | | return R.fail("当前事件不是已失效状态,不能重新发布"); |
| | | } |
| | | eventDO.setInvalid(true); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if(updated == 1){ |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 1,"重新发布事件成功", |
| | | commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 9 ); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | @Override |
| | | public R communityDealEvent(CommonEventDealDTO commonEventDealDTO) { |
| | | EventDO eventDO = this.getBaseMapper().selectById(commonEventDealDTO.getId()); |
| | | if (eventDO == null) { |
| | | return R.fail("事件不存在"); |
| | | } |
| | | boolean canDealByCommunity = eventDO.getEventDealStatus() == 3; |
| | | if(!canDealByCommunity){ |
| | | return R.fail("事件当前不是上报状态"); |
| | | } |
| | | |
| | | List<EventTransferRecordDO> list = eventTransferRecordService.getBaseMapper().selectList(new LambdaQueryWrapper<EventTransferRecordDO>() |
| | | .eq(EventTransferRecordDO::getEventId, eventDO.getId()) |
| | | .orderByDesc(EventTransferRecordDO::getCreateAt) |
| | | ); |
| | | |
| | | Long reportToInDB = -1L; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | EventTransferRecordDO eventTransferRecordDO = list.get(i); |
| | | if(eventTransferRecordDO.getProcessType()!=null && eventTransferRecordDO.getProcessType()==2){ |
| | | reportToInDB = eventTransferRecordDO.getToId(); |
| | | } |
| | | } |
| | | if(commonEventDealDTO.getCommunityId()==null){ |
| | | return R.fail("当前用户社区获取失败"); |
| | | } |
| | | if(reportToInDB.longValue() != commonEventDealDTO.getCommunityId().longValue()){ |
| | | return R.fail("用户上报的社区不是当前社区"); |
| | | } |
| | | if(commonEventDealDTO.getNeedVerify()){ |
| | | eventDO.setEventProcessStatus(3);//待验证状态 |
| | | eventDO.setProcessType(1);//交给网格员处理-验证 |
| | | }else { |
| | | eventDO.setEventProcessStatus(2);//2已解决 |
| | | } |
| | | eventDO.setUpdateBy(commonEventDealDTO.getUserId()); |
| | | |
| | | //更新处理信息 |
| | | eventDO.setProcessUserId(commonEventDealDTO.getUserId()); |
| | | eventDO.setProcessUserName(commonEventDealDTO.getUserName()); |
| | | eventDO.setProcessDate(new Date()); |
| | | eventDO.setProcessDesc(commonEventDealDTO.getProcessResult()); |
| | | |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if(updated!=1){ |
| | | return R.fail("更新事件状态失败"); |
| | | } |
| | | EventTransferRecordDO transferRecordDO = |
| | | addTransferRecord(eventDO.getId(), commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(),1, |
| | | "社区处理完成", commonEventDealDTO.getCommunityId(), commonEventDealDTO.getCommunityName(), 3); |
| | | if(transferRecordDO!=null && transferRecordDO.getId()!=null){ |
| | | //添加音频 |
| | | if(StringUtils.isNotEmpty(commonEventDealDTO.getAudio())){ |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | eventResourceDO.setClassification(3); |
| | | eventResourceDO.setType(2); |
| | | eventResourceDO.setUrl(commonEventDealDTO.getAudio()); |
| | | eventResourceDO.setRefId(transferRecordDO.getId()); |
| | | eventResourceDO.setCreateBy(commonEventDealDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventDealDTO.getAudioTime()); |
| | | int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(audioAdd!=1){ |
| | | throw new ServiceException("添加音频失败"); |
| | | } |
| | | } |
| | | //添加视频 |
| | | if(StringUtils.isNotEmpty(commonEventDealDTO.getVideo())){ |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | eventResourceDO.setClassification(3); |
| | | eventResourceDO.setType(3); |
| | | eventResourceDO.setUrl(commonEventDealDTO.getVideo()); |
| | | eventResourceDO.setRefId(transferRecordDO.getId()); |
| | | eventResourceDO.setCreateBy(commonEventDealDTO.getUserId()); |
| | | eventResourceDO.setResourceTime(commonEventDealDTO.getVideoTime()); |
| | | int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(videoAdd!=1){ |
| | | throw new ServiceException("添加视频失败"); |
| | | } |
| | | } |
| | | //添加图片 |
| | | if(StringUtils.isNotEmpty(commonEventDealDTO.getPics())){ |
| | | String[] pica = commonEventDealDTO.getPics().split(","); |
| | | for (int i = 0; i < pica.length; i++) { |
| | | EventResourceDO eventResourceDO = new EventResourceDO(); |
| | | eventResourceDO.setClassification(3); |
| | | eventResourceDO.setType(1); |
| | | eventResourceDO.setUrl(pica[i]); |
| | | eventResourceDO.setRefId(transferRecordDO.getId()); |
| | | eventResourceDO.setCreateBy(commonEventDealDTO.getUserId()); |
| | | int picAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); |
| | | if(picAdd!=1){ |
| | | throw new ServiceException("添加图片失败"); |
| | | } |
| | | } |
| | | } |
| | | Long transferRecordId = transferRecordDO.getId(); |
| | | EventDO eventDOToUpdate = this.getBaseMapper().selectById(commonEventDealDTO.getId()); |
| | | eventDOToUpdate.setProcessRecordId(transferRecordId); |
| | | int transferRecordUpdated = this.getBaseMapper().updateById(eventDOToUpdate); |
| | | if(transferRecordUpdated!=1){ |
| | | throw new ServiceException("更新事件处理流程失败"); |
| | | } |
| | | return R.ok(); |
| | | }else{ |
| | | throw new ServiceException("处理事件记录出错"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public R selectCommunityPublicity(PagePublicityEventCommunityDTO pagePublicityEventDTO) { |
| | | Page page = new Page(1,10); |
| | | if(pagePublicityEventDTO.getPageNum()!=null) { |
| | | page.setCurrent(pagePublicityEventDTO.getPageNum()); |
| | | } |
| | | if(pagePublicityEventDTO.getPageSize()!=null) { |
| | | page.setSize(pagePublicityEventDTO.getPageSize()); |
| | | } |
| | | IPage<EventVO> ipage = eventMapper.findCommunityPublicityByPage(page, pagePublicityEventDTO); |
| | | if(ipage!=null){ |
| | | List<EventVO> eventVOList = ipage.getRecords(); |
| | | eventVOList.forEach(eventVO -> { |
| | | List<EventResourceDO> eventResourceDOList = |
| | | eventResourceService.getBaseMapper().selectList(new LambdaQueryWrapper<EventResourceDO>() |
| | | .eq(EventResourceDO::getClassification, 1) |
| | | .eq(EventResourceDO::getRefId, eventVO.getId()) |
| | | ); |
| | | List<EventResourceVO> picList = new ArrayList<>(); |
| | | List<EventResourceVO> audioList = new ArrayList<>(); |
| | | List<EventResourceVO> videoList = new ArrayList<>(); |
| | | eventResourceDOList.forEach(eventResourceDO -> { |
| | | switch (eventResourceDO.getType()){ |
| | | case 1: |
| | | EventResourceVO picEventResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, picEventResourceVO); |
| | | picList.add(picEventResourceVO); |
| | | break; |
| | | case 2: |
| | | EventResourceVO audioResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, audioResourceVO); |
| | | audioList.add(audioResourceVO); |
| | | break; |
| | | case 3: |
| | | EventResourceVO videoResourceVO = new EventResourceVO(); |
| | | BeanUtils.copyProperties(eventResourceDO, videoResourceVO); |
| | | videoList.add(videoResourceVO); |
| | | break; |
| | | } |
| | | }); |
| | | eventVO.setAudios(audioList); |
| | | eventVO.setPics(picList); |
| | | eventVO.setVideos(videoList); |
| | | }); |
| | | return R.ok(ipage); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 添加发布事件流转记录 |
| | | * @param eventId 事件ID |
| | |
| | | eventTransferRecordDO.setProcessDate(new Date()); |
| | | eventTransferRecordDO.setEventId(eventId); |
| | | eventTransferRecordDO.setProcessResult("发布成功"); |
| | | eventTransferRecordDO.setProcessType(0);//初始状态 |
| | | int inserted = eventTransferRecordService.getBaseMapper().insert(eventTransferRecordDO); |
| | | if(inserted!=1){ |
| | | throw new ServiceException("事件流转记录添加失败"); |
| | | } |
| | | this.updateEventDealStatus(eventId); |
| | | return eventTransferRecordDO; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询最后的流转记录,并添加事件流转记录 |
| | |
| | | * @param msg 流转消息 |
| | | * @return |
| | | */ |
| | | private EventTransferRecordDO addTransferRecord(Long eventId, Long toId, String toName, Integer toType, String msg){ |
| | | private EventTransferRecordDO addTransferRecord(Long eventId, Long toId, String toName, Integer toType, String msg, Long processBy, String processByName, Integer processType){ |
| | | List<EventTransferRecordDO> list = eventTransferRecordService.getBaseMapper().selectList(new LambdaQueryWrapper<EventTransferRecordDO>() |
| | | .eq(EventTransferRecordDO::getEventId, eventId) |
| | | .orderByDesc(EventTransferRecordDO::getCreateAt) |
| | |
| | | eventTransferRecordDO.setToName(toName); |
| | | eventTransferRecordDO.setEventId(eventId); |
| | | eventTransferRecordDO.setProcessResult(msg); |
| | | eventTransferRecordDO.setProcessBy(processBy); |
| | | eventTransferRecordDO.setProcessByName(processByName); |
| | | eventTransferRecordDO.setProcessType(processType); |
| | | int inserted = eventTransferRecordService.getBaseMapper().insert(eventTransferRecordDO); |
| | | if(inserted==1) { |
| | | this.updateEventDealStatus(eventId); |
| | | return eventTransferRecordDO; |
| | | }else{ |
| | | throw new ServiceException("事件流转记录添加失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询最后的流转记录,并添加事件流转记录 |
| | | * @param eventId 事件ID |
| | | * @param toId 流转到 ID |
| | | * @param toName 流转到 名称 |
| | | * @param toType 发送类型 |
| | | * @param msg 流转消息 |
| | | * @return |
| | | */ |
| | | /* private EventTransferRecordDO addTransferRecord(Long eventId, Long toId, String toName, Integer toType, String msg,Integer processType){ |
| | | return addTransferRecord(eventId, toId, toName, toType, msg, null, null, processType); |
| | | }*/ |
| | | |
| | | /** |
| | | * 根据子状态 查询用户事件处理状态 |
| | | * @param eventId 事件ID |
| | | */ |
| | | private EventDO updateEventDealStatus(Long eventId){ |
| | | EventDO eventDO = this.getBaseMapper().selectById(eventId); |
| | | Integer eventDealStatus = getEventDealStatus(eventDO); |
| | | eventDO.setEventDealStatus(eventDealStatus); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if(updated == 1){ |
| | | return eventDO; |
| | | }else{ |
| | | throw new ServiceException("更新事件处理状态错误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据子状态 查询用户事件处理状态 |
| | | * @param eventDO 事件 |
| | | */ |
| | | private Integer getEventDealStatus(EventDO eventDO){ |
| | | //1 待处理、2 待验证、3 已上报、4 已解决、5 草稿箱、6已撤销、7已失效、8已发布 |
| | | if(eventDO.getEventCategory()!=null) { |
| | | if (eventDO.getEventCategory() == 1) { |
| | | Integer event_status = eventDO.getEventStatus()!=null?eventDO.getEventStatus():-1; |
| | | Integer event_process_status = eventDO.getEventProcessStatus()!=null?eventDO.getEventProcessStatus():-1; |
| | | Integer process_type = eventDO.getProcessType()!=null?eventDO.getProcessType():-1; |
| | | Integer community_process = eventDO.getCommunityProcess()!=null?eventDO.getCommunityProcess():-1; |
| | | |
| | | Integer eventDealStatus = -1; |
| | | if (eventDO.getInvalid() != null && eventDO.getInvalid() == false) { |
| | | eventDealStatus = 7; |
| | | //7已失效 |
| | | } else if (event_status == 1) { |
| | | eventDealStatus = 5; |
| | | //"草稿箱" |
| | | } else if ( event_status == 4) { |
| | | eventDealStatus = 6; |
| | | //"已撤销" |
| | | } else if (event_status ==2){ |
| | | if (event_process_status == 3) { |
| | | eventDealStatus = 2; |
| | | //"待验证" |
| | | }else if (event_process_status == 2) { |
| | | eventDealStatus = 4; |
| | | //"已解决" |
| | | }else if ( community_process == 1 && process_type == 2) { |
| | | eventDealStatus = 3; |
| | | //"已上报" |
| | | }else if ( event_process_status == 1 && process_type == 1) { |
| | | eventDealStatus = 1; |
| | | //"待处理" |
| | | } |
| | | } |
| | | return eventDealStatus; |
| | | } else if (eventDO.getEventCategory() == 2) { |
| | | Integer event_status = eventDO.getEventStatus(); |
| | | if (event_status != null && event_status == 1) { |
| | | return 5; |
| | | //"草稿箱" |
| | | } else if (event_status != null && event_status == 2) { |
| | | return 8; |
| | | //已发布 |
| | | } else if (event_status != null && event_status == 4) { |
| | | return 6; |
| | | //"已撤销" |
| | | } |
| | | } |
| | | } |
| | | return -1; |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-统计模块 |
| | | * @param communityId 社区id |
| | | * @return 统计信息 |
| | | */ |
| | | @Override |
| | | public R eventStatistics(Long communityId){ |
| | | return R.ok(this.baseMapper.eventStatistics(communityId)); |
| | | } |
| | | /** |
| | | * 后台管理-网格员统计 |
| | | * @param statisticsAdminDTO 请求参数 |
| | | * @return 网格员统计信息 |
| | | */ |
| | | @Override |
| | | public R gridMemberStatistics(MemberStatisticsAdminDTO statisticsAdminDTO){ |
| | | return R.ok(eventGridMemberRelationMapper.gridMemberStatistics(new Page(statisticsAdminDTO.getPageNum(),statisticsAdminDTO.getPageSize()),statisticsAdminDTO)); |
| | | } |
| | | } |
| | |
| | | caep.is_publicity, |
| | | caep.photo_path_list, |
| | | caep.happen_addr, |
| | | caep.handle_status, |
| | | caep.is_report |
| | | FROM |
| | | com_act_easy_photo AS caep |
| | | LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id |
| | | <where> |
| | | AND caep.delTag = 0 |
| | | AND caep.del_tag = 0 |
| | | <if test="easyAppDTO.communityId!=null"> |
| | | AND caep.community_id = #{easyAppDTO.communityId} |
| | | </if> |
| | |
| | | caep.is_publicity, |
| | | caep.photo_path_list, |
| | | caep.happen_addr, |
| | | caep.handle_status, |
| | | caep.handle_result, |
| | | caep.handle_photo_list, |
| | | caep.feedback_at, |
| | |
| | | </where> |
| | | ORDER BY caep.create_at desc |
| | | </select> |
| | | |
| | | <select id="easyListByAdmin" parameterType="com.panzhihua.common.model.dtos.grid.PageEasyAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.grid.ComActEasyPhotoAdminVO"> |
| | | SELECT DISTINCT |
| | | caep.id, |
| | | caep.detail, |
| | | su.nick_name as userNickName, |
| | | caep.create_at, |
| | | caep.is_report, |
| | | caep.is_publicity, |
| | | caep.handle_status |
| | | FROM |
| | | com_act_easy_photo AS caep |
| | | LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id |
| | | LEFT JOIN com_act_easy_photo_type_relation AS caeptr ON caeptr.easy_id = caep.id |
| | | LEFT JOIN com_act_easy_photo_type AS caept ON caept.id = caeptr.easy_type_id |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = caep.handler_id |
| | | LEFT JOIN com_act AS ca ON ca.community_id = caep.community_id |
| | | <where> |
| | | AND caep.del_tag = 0 |
| | | <if test="easyAppDTO.communityId!=null"> |
| | | AND caep.community_id = #{easyAppDTO.communityId} |
| | | </if> |
| | | <if test="easyAppDTO.streetId!=null"> |
| | | and ca.street_id = #{easyAppDTO.streetId} |
| | | </if> |
| | | <if test="easyAppDTO.isReport!=null"> |
| | | AND caep.is_report = #{easyAppDTO.isReport} |
| | | </if> |
| | | <if test="easyAppDTO.isPublicity!=null"> |
| | | AND caep.is_publicity = #{easyAppDTO.isPublicity} |
| | | </if> |
| | | <if test="easyAppDTO.handleStatus!=null"> |
| | | AND caep.handle_status = #{easyAppDTO.handleStatus} |
| | | </if> |
| | | <if test="easyAppDTO.easyPhotoTypeId!=null"> |
| | | AND caept.id = #{easyAppDTO.easyPhotoTypeId} |
| | | </if> |
| | | <if test="easyAppDTO.keyWord != null and easyAppDTO.keyWord != """> |
| | | AND (caept.`name` LIKE concat (#{easyAppDTO.keyWord},'%') or |
| | | caep.detail LIKE concat (#{easyAppDTO.keyWord},'%') or |
| | | su.nick_name LIKE concat (#{easyAppDTO.keyWord},'%') or |
| | | caep.happen_addr LIKE concat (#{easyAppDTO.keyWord},'%') or |
| | | (caep.is_report = 0 and su1.nick_name LIKE concat (#{easyAppDTO.keyWord},'%'))) |
| | | </if> |
| | | </where> |
| | | ORDER BY |
| | | caep.create_at DESC |
| | | </select> |
| | | |
| | | <select id="easyDetailByAdmin" resultType="com.panzhihua.common.model.vos.grid.ComActEasyPhotoAdminVO"> |
| | | SELECT DISTINCT |
| | | caep.id, |
| | | caep.detail, |
| | | su.nick_name AS userNickName, |
| | | su.image_url AS imageUrl, |
| | | caep.create_at, |
| | | caep.is_report, |
| | | caep.is_publicity, |
| | | caep.handle_status, |
| | | caep.detail, |
| | | caep.photo_path_list, |
| | | caep.addr_remark, |
| | | caep.happen_addr, |
| | | caep.lng_lat, |
| | | caep.handle_result, |
| | | caep.handle_photo_list, |
| | | su1.nick_name as handlerName, |
| | | caep.feedback_at as feedbackAt |
| | | FROM |
| | | com_act_easy_photo AS caep |
| | | LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = caep.handler_id |
| | | <where> |
| | | <if test="easyId!=null"> |
| | | AND caep.id = #{easyId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <update id="easyPublicityByAdmin" parameterType="com.panzhihua.common.model.dtos.grid.ComActEasyPhotoEditAdminDTO"> |
| | | update com_act_easy_photo |
| | | <if test="photoEditDTO.type!=null and photoEditDTO.type == 1"> |
| | | set is_publicity = #{photoEditDTO.isPublicity} |
| | | </if> |
| | | <if test="photoEditDTO.type!=null and photoEditDTO.type == 2"> |
| | | set del_tag = 1 |
| | | </if> |
| | | <if test="photoEditDTO.ids!=null and photoEditDTO.ids.size > 0"> |
| | | where id in |
| | | <foreach collection='photoEditDTO.ids' item='id' index='index' open='(' close=')' separator=',' > |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </update> |
| | | </mapper> |
| | |
| | | </sql> |
| | | |
| | | |
| | | <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventGridDataVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO"> |
| | | SELECT <include refid="columns" /> |
| | | FROM event_grid_data |
| | | <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventGridAdminVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataAdminDTO"> |
| | | SELECT DISTINCT |
| | | egd.id, |
| | | egd.grid_name, |
| | | egd.remarks, |
| | | egd.area, |
| | | egd.line_color, |
| | | egd.line_broadband, |
| | | egd.fill_color, |
| | | egd.data, |
| | | egd.create_at, |
| | | egd.create_by, |
| | | ca.`name` AS communityName |
| | | FROM |
| | | event_grid_data AS egd |
| | | LEFT JOIN com_act AS ca ON ca.community_id = egd.grid_community_id |
| | | LEFT JOIN event_grid_member_relation AS egmr ON egmr.grid_id = egd.id |
| | | left join sys_user as su on su.user_id = egmr.grid_member_id |
| | | <where> |
| | | <if test="pageEventGridDataDTO.id!=null"> |
| | | AND id = #{pageEventGridDataDTO.id} |
| | | <if test="pageEventGridDataDTO.gridStreetId!=null"> |
| | | AND egd.grid_street_id = #{pageEventGridDataDTO.gridStreetId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.type!=null"> |
| | | AND type = #{pageEventGridDataDTO.type} |
| | | <if test="pageEventGridDataDTO.gridCommunityId!=null"> |
| | | AND egd.grid_community_id = #{pageEventGridDataDTO.gridCommunityId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.zoneId!=null"> |
| | | AND zone_id = #{pageEventGridDataDTO.zoneId} |
| | | |
| | | <if test="pageEventGridDataDTO.keyWord != null and pageEventGridDataDTO.keyWord != """> |
| | | AND (egd.grid_name like concat(#{pageEventGridDataDTO.keyWord},'%') or su.nick_name like concat(#{pageEventGridDataDTO.keyWord},'%')) |
| | | </if> |
| | | <if test="pageEventGridDataDTO.gridStreetId!=null"> |
| | | AND grid_street_id = #{pageEventGridDataDTO.gridStreetId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.gridCommunityId!=null"> |
| | | AND grid_community_id = #{pageEventGridDataDTO.gridCommunityId} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.gridName!=null"> |
| | | AND grid_name = #{pageEventGridDataDTO.gridName} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.mapLevel!=null"> |
| | | AND map_level = #{pageEventGridDataDTO.mapLevel} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.area!=null"> |
| | | AND area = #{pageEventGridDataDTO.area} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.lineColor!=null"> |
| | | AND line_color = #{pageEventGridDataDTO.lineColor} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.lineBroadband!=null"> |
| | | AND line_broadband = #{pageEventGridDataDTO.lineBroadband} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.fillColor!=null"> |
| | | AND fill_color = #{pageEventGridDataDTO.fillColor} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.remarks!=null"> |
| | | AND remarks = #{pageEventGridDataDTO.remarks} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.data!=null"> |
| | | AND data = #{pageEventGridDataDTO.data} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.createBy!=null"> |
| | | AND create_by = #{pageEventGridDataDTO.createBy} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.createAtBegin!=null"> |
| | | AND create_at >= #{pageEventGridDataDTO.createAtBegin} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.createAtEnd!=null"> |
| | | AND create_at <= #{pageEventGridDataDTO.createAtEnd} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.updateBy!=null"> |
| | | AND update_by = #{pageEventGridDataDTO.updateBy} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.updateAtBegin!=null"> |
| | | AND update_at >= #{pageEventGridDataDTO.updateAtBegin} |
| | | </if> |
| | | <if test="pageEventGridDataDTO.updateAtEnd!=null"> |
| | | AND update_at <= #{pageEventGridDataDTO.updateAtEnd} |
| | | </if> |
| | | </where> |
| | | <if test="pageEventGridDataDTO.sortColumns!=null"> |
| | | ORDER BY ${pageEventGridDataDTO.sortColumns} ${pageEventGridDataDTO.sortType} |
| | | </if> |
| | | ORDER BY create_at desc |
| | | </select> |
| | | <select id="selectUserGrid" resultType="com.panzhihua.common.model.vos.grid.EventGridDataVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getGridMemberLists" resultType="com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO"> |
| | | select user_id,nick_name from sys_user where community_id = #{communityId} and `type` = 6 |
| | | </select> |
| | | |
| | | <select id="getGridMember" resultType="com.panzhihua.common.model.vos.grid.GridMemberAdminVO"> |
| | | SELECT |
| | | su.user_id, |
| | | su.nick_name |
| | | FROM |
| | | event_grid_member_relation AS egmr |
| | | LEFT JOIN sys_user AS su ON su.user_id = egmr.grid_member_id |
| | | WHERE |
| | | egmr.grid_id = #{gridId} |
| | | </select> |
| | | |
| | | <select id="getGridTodoData" resultType="com.panzhihua.common.model.vos.grid.UserEventGridDataVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.EventGridTodoDataDTO"> |
| | | SELECT IFNULL(SUM(t.todoNums), 0) todoNums, 1 event_type |
| | | FROM ( |
| | | SELECT IFNULL(count(e.id), 0) as todoNums |
| | | FROM EVENT e |
| | | WHERE e.event_category = 1 AND event_status = 2 |
| | | AND event_process_status = 1 AND process_type = 1 |
| | | AND grid_id = #{eventGridTodoDataDTO.gridId} |
| | | AND e.event_type = 1 |
| | | GROUP BY e.event_type |
| | | ) t |
| | | UNION ALL |
| | | SELECT IFNULL(SUM(t.todoNums), 0) todoNums, 2 event_type |
| | | FROM ( |
| | | SELECT IFNULL(count(e.id), 0) as todoNums |
| | | FROM EVENT e |
| | | WHERE e.event_category = 1 AND event_status = 2 |
| | | AND event_process_status = 1 AND process_type = 1 |
| | | AND grid_id = #{eventGridTodoDataDTO.gridId} |
| | | AND e.event_type =2 |
| | | GROUP BY e.event_type |
| | | ) t |
| | | UNION ALL |
| | | SELECT IFNULL(SUM(t.todoNums), 0) todoNums, 3 event_type |
| | | FROM ( |
| | | SELECT IFNULL(count(e.id), 0) as todoNums |
| | | FROM EVENT e |
| | | WHERE e.event_category = 1 AND event_status = 2 |
| | | AND event_process_status = 1 AND process_type = 1 |
| | | AND grid_id = #{eventGridTodoDataDTO.gridId} |
| | | AND e.event_type =3 |
| | | GROUP BY e.event_type |
| | | ) t |
| | | UNION ALL |
| | | SELECT IFNULL(SUM(t.todoNums), 0) todoNums, 4 event_type |
| | | FROM ( |
| | | SELECT IFNULL(count(e.id), 0) as todoNums |
| | | FROM EVENT e |
| | | WHERE e.event_category = 1 AND event_status = 2 |
| | | AND event_process_status = 1 AND process_type = 1 |
| | | AND grid_id = #{eventGridTodoDataDTO.gridId} |
| | | AND e.event_type =4 |
| | | GROUP BY e.event_type |
| | | ) t |
| | | UNION ALL |
| | | SELECT IFNULL(SUM(t.todoNums), 0) todoNums, 5 event_type |
| | | FROM ( |
| | | SELECT IFNULL(count(e.id), 0) as todoNums |
| | | FROM EVENT e |
| | | WHERE e.event_category = 1 AND event_status = 2 |
| | | AND event_process_status = 1 AND process_type = 1 |
| | | AND grid_id = #{eventGridTodoDataDTO.gridId} |
| | | AND e.event_type =5 |
| | | GROUP BY e.event_type |
| | | ) t |
| | | |
| | | </select> |
| | | |
| | | <select id="getComActByActId" resultType="com.panzhihua.common.model.vos.grid.ComGridActVO"> |
| | | select community_id,street_id,name,address,province_code,city_code,area_code from com_act where community_id = #{communityId} |
| | | </select> |
| | | <select id="getGridMemberListsByGrid" resultType="com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO"> |
| | | SELECT |
| | | su.user_id, |
| | | su.nick_name |
| | | FROM |
| | | event_grid_member_relation AS egmr |
| | | LEFT JOIN sys_user AS su ON su.user_id = egmr.grid_member_id |
| | | WHERE |
| | | egmr.grid_id = #{gridId} |
| | | </select> |
| | | <select id="getGridDataListByCommunity" |
| | | resultType="com.panzhihua.common.model.vos.grid.EventGridDataAreaVO" parameterType="long"> |
| | | SELECT |
| | | gd.id, gd.grid_name , ad.district_name AS zoneName, st.name AS gridStreetName, act.name AS gridCommunityName |
| | | FROM event_grid_data gd LEFT JOIN com_mng_struct_area_district ad ON gd.zone_id = ad.district_adcode |
| | | LEFT JOIN com_street st ON gd.grid_street_id = st.street_id |
| | | LEFT JOIN com_act act ON gd.grid_community_id = act.community_id |
| | | WHERE gd.grid_community_id = #{communityId} |
| | | </select> |
| | | |
| | | <delete id="removeGridRelationByGridId"> |
| | | delete from event_grid_member_relation where grid_id = #{gridId} |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | create_at ASC |
| | | </select> |
| | | |
| | | <select id="gridMemberWorkTrajectory" resultType="String" parameterType="com.panzhihua.common.model.dtos.grid.EventGridMemberWorkTrajectoryDTO"> |
| | | SELECT |
| | | lng_lat |
| | | FROM |
| | | event_grid_member_gps_log |
| | | WHERE |
| | | create_at BETWEEN #{workTrajectoryDTO.startTime} |
| | | AND #{workTrajectoryDTO.endTime} |
| | | AND grid_member_id = #{workTrajectoryDTO.gridMemberId} |
| | | ORDER BY |
| | | create_at ASC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | WHERE |
| | | grid_member_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="gridMemberStatistics" resultType="com.panzhihua.common.model.vos.grid.EventStatisticsMemberAdminVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.MemberStatisticsAdminDTO"> |
| | | SELECT DISTINCT |
| | | su.nick_name,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 5 |
| | | AND event_status = 2 |
| | | AND grid_member_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS addTFTotal, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 5 |
| | | AND event_status = 2 |
| | | AND event_process_status = 2 |
| | | AND process_user_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS handleTFTotal,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 3 |
| | | AND event_status = 2 |
| | | AND grid_member_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS addMDTotal, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 3 |
| | | AND event_status = 2 |
| | | AND event_process_status = 2 |
| | | AND process_user_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS handleMDTotal,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 1 |
| | | AND event_status = 2 |
| | | AND grid_member_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS addZATotal, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 1 |
| | | AND event_status = 2 |
| | | AND event_process_status = 2 |
| | | AND process_user_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS handleZATotal,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 4 |
| | | AND event_status = 2 |
| | | AND grid_member_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS addBWDTotal, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 4 |
| | | AND event_status = 2 |
| | | AND event_process_status = 2 |
| | | AND process_user_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS handleBWDTotal,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 2 |
| | | AND event_status = 2 |
| | | AND grid_member_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS addGGTotal, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 2 |
| | | AND event_status = 2 |
| | | AND event_process_status = 2 |
| | | AND process_user_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS handleGGTotal,( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 6 |
| | | AND event_status = 2 |
| | | AND grid_member_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS addTSTotal, |
| | | ( |
| | | SELECT |
| | | count( id ) |
| | | FROM |
| | | `event` |
| | | WHERE |
| | | event_category = 1 |
| | | AND event_type = 6 |
| | | AND event_status = 2 |
| | | AND event_process_status = 2 |
| | | AND process_user_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS handleTSTotal, |
| | | ( SELECT count( id ) FROM event_visiting_tasks WHERE dell_user_id = su.user_id AND event_status = 2 |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(dell_date,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(dell_date,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS handleZFTotal, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 AND handler_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(feedback_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(feedback_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS easyPhotoTotal, |
| | | ( SELECT count( id ) FROM `event` WHERE event_category = 2 AND event_status = 2 AND grid_member_id = su.user_id |
| | | <if test="statisticsAdminDTO.startTime!=null and statisticsAdminDTO.startTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{statisticsAdminDTO.startTime} |
| | | </if> |
| | | <if test="statisticsAdminDTO.endTime!=null and statisticsAdminDTO.endTime != """> |
| | | AND DATE_FORMAT(create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{statisticsAdminDTO.endTime} |
| | | </if> |
| | | ) AS propagandaEducationTotal |
| | | FROM |
| | | sys_user AS su |
| | | LEFT JOIN `event` AS e ON su.user_id = e.grid_member_id |
| | | WHERE |
| | | su.type = 6 |
| | | <if test="statisticsAdminDTO.communityId!=null"> |
| | | AND su.community_id = #{statisticsAdminDTO.communityId} |
| | | </if> |
| | | <if test="statisticsAdminDTO.nickName!=null and statisticsAdminDTO.nickName != """> |
| | | AND su.nick_name like concat (#{statisticsAdminDTO.nickName},'%') |
| | | </if> |
| | | ORDER BY su.create_at desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="gridMemberWorkWarning" parameterType="com.panzhihua.common.model.dtos.grid.EventGridMemberWainDTO" resultType="com.panzhihua.common.model.vos.grid.EventGridMemberWarnLogAdminVO"> |
| | | SELECT |
| | | id, |
| | | position_address, |
| | | content, |
| | | happen_at |
| | | FROM |
| | | event_grid_member_warn_log |
| | | WHERE |
| | | grid_member_id = #{gridMemberWainDTO.gridMemberId} |
| | | <if test="gridMemberWainDTO.keyWord!=null and gridMemberWainDTO.keyWord!= """> |
| | | AND (content like concat(#{gridMemberWainDTO.keyWord},'%') or position_address like concat(#{gridMemberWainDTO.keyWord},'%')) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result property="communityProcess" column="community_process"/> |
| | | <result property="happenTime" column="happen_time"/> |
| | | <result property="happentAddress" column="happent_address"/> |
| | | <result property="happenAddress" column="happen_address"/> |
| | | <result property="happentLatLng" column="happent_lat_lng"/> |
| | | <result property="eventStatus" column="event_status"/> |
| | | <result property="eventProcessStatus" column="event_process_status"/> |
| | |
| | | <result property="createAt" column="create_at"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateAt" column="update_at"/> |
| | | <result property="eventClazz" column="event_clazz"/> |
| | | <result property="eventDealStatus" column="event_deal_status"/> |
| | | </resultMap> |
| | | |
| | | <sql id="columns"> |
| | | <![CDATA[ |
| | | id,order_sn,event_category,grid_member_street,grid_member_community,grid_id,grid_member_id,grid_member_name,grid_member_telephone,event_title,propaganda_type,propaganda_time,event_type,event_des,propaganda_object,propaganda_num,community_process,happen_time,happent_address,happent_lat_lng,event_status,event_process_status,process_type,process_user_id,process_user_name,process_date,process_desc,event_resource,danger_level,red_card,yellow_card,invalid,major,deaths_number,injuries_number,difficult,urgent,urgent_dell,submit_date,create_by,create_at,update_by,update_at |
| | | id,order_sn,event_category,grid_member_street,happen_address,grid_member_community,event_clazz,grid_id,grid_member_id,grid_member_name,grid_member_telephone, |
| | | event_title,propaganda_type,propaganda_time,event_type,event_des,propaganda_object,propaganda_num,community_process,happen_time,happent_address,happent_lat_lng, |
| | | event_status,event_process_status,process_type,process_user_id,process_user_name,process_date,process_desc,event_resource,danger_level,red_card,yellow_card,invalid, |
| | | major,deaths_number,injuries_number,difficult,urgent,urgent_dell,submit_date,create_by,create_at,update_by,update_at,event_deal_status |
| | | ]]> |
| | | </sql> |
| | | |
| | |
| | | SELECT <include refid="columns" /> |
| | | FROM event |
| | | <where> |
| | | event_status != 3 |
| | | event_status != 3 AND event_category = 1 |
| | | <if test="pageEventDTO.eventDealStatus!=null"> |
| | | <choose> |
| | | <!-- 待处理、待验证、已上报、已解决、草稿箱、已撤销 --> |
| | | <when test="pageEventDTO.eventDealStatus==1"> <!--待处理--> |
| | | AND event_status =2 AND event_process_status = 1 AND process_type = 1 |
| | | </when> |
| | | <when test="pageEventDTO.eventDealStatus==2"> <!--待验证--> |
| | | AND event_process_status = 3 |
| | | </when> |
| | | <when test="pageEventDTO.eventDealStatus==3"> <!--已上报--> |
| | | AND event_status = 1 AND community_process = 1 |
| | | </when> |
| | | <when test="pageEventDTO.eventDealStatus==4"> <!--已解决--> |
| | | AND event_process_status = 2 |
| | | </when> |
| | | <when test="pageEventDTO.eventDealStatus==5"> <!--草稿箱--> |
| | | AND event_status = 1 |
| | | </when> |
| | | <when test="pageEventDTO.eventDealStatus==6"> <!--已撤销--> |
| | | AND event_status = 4 |
| | | </when> |
| | | <otherwise> |
| | | </otherwise> |
| | | </choose> |
| | | AND event_deal_status = #{pageEventDTO.eventDealStatus} |
| | | </if> |
| | | <if test="pageEventDTO.id!=null"> |
| | | AND id = #{pageEventDTO.id} |
| | |
| | | </select> |
| | | <select id="findPublicityByPage" resultType="com.panzhihua.common.model.vos.grid.EventVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PagePublicityEventDTO"> |
| | | SELECT <include refid="columns" /> |
| | | FROM event |
| | | SELECT |
| | | e.id,e.order_sn,e.event_category,e.grid_member_street,e.happen_address,e.grid_member_community,e.event_clazz,e.grid_id,e.grid_member_id,e.grid_member_name,e.grid_member_telephone, |
| | | e.event_title,e.propaganda_type,e.propaganda_time,e.event_type,e.event_des,e.propaganda_object,e.propaganda_num,e.community_process,e.happen_time,e.happent_address,e.happent_lat_lng, |
| | | e.event_status,e.event_process_status,e.process_type,e.process_user_id,e.process_user_name,e.process_date,e.process_desc,e.event_resource,e.danger_level,e.red_card,e.yellow_card,e.invalid, |
| | | e.major,e.deaths_number,e.injuries_number,e.difficult,e.urgent,e.urgent_dell,e.submit_date,e.create_by,e.create_at,e.update_by,e.update_at,e.event_deal_status |
| | | FROM |
| | | event e left join event_grid_data egd on e.grid_id = egd.id |
| | | <where> |
| | | event_status != 3 AND event_category = 2 |
| | | e.event_status != 3 AND e.event_category = 2 |
| | | <if test="pagePublicityEventDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pageEventManageDTO.communityId} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventDealStatus!=null"> |
| | | <choose> |
| | | <!-- 待处理、待验证、已上报、已解决、草稿箱、已撤销 --> |
| | | <when test="pagePublicityEventDTO.eventDealStatus==1"> <!--已发布--> |
| | | AND event_status =2 |
| | | </when> |
| | | <when test="pagePublicityEventDTO.eventDealStatus==5"> <!--草稿箱--> |
| | | AND event_status = 1 |
| | | </when> |
| | | <when test="pagePublicityEventDTO.eventDealStatus==6"> <!--已撤销--> |
| | | AND event_status = 4 |
| | | </when> |
| | | <otherwise> |
| | | </otherwise> |
| | | </choose> |
| | | AND e.event_deal_status = #{pagePublicityEventDTO.eventDealStatus} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.id!=null"> |
| | | AND id = #{pagePublicityEventDTO.id} |
| | | AND e.id = #{pagePublicityEventDTO.id} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.orderSn!=null"> |
| | | AND order_sn = #{pagePublicityEventDTO.orderSn} |
| | | AND e.order_sn = #{pagePublicityEventDTO.orderSn} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventCategory!=null"> |
| | | AND event_category = #{pagePublicityEventDTO.eventCategory} |
| | | AND e.event_category = #{pagePublicityEventDTO.eventCategory} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.gridMemberStreet!=null"> |
| | | AND grid_member_street = #{pagePublicityEventDTO.gridMemberStreet} |
| | | AND e.grid_member_street = #{pagePublicityEventDTO.gridMemberStreet} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.gridMemberCommunity!=null"> |
| | | AND grid_member_community = #{pagePublicityEventDTO.gridMemberCommunity} |
| | | AND e.grid_member_community = #{pagePublicityEventDTO.gridMemberCommunity} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.gridId!=null"> |
| | | AND grid_id = #{pagePublicityEventDTO.gridId} |
| | | AND e.grid_id = #{pagePublicityEventDTO.gridId} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.gridMemberId!=null"> |
| | | AND grid_member_id = #{pagePublicityEventDTO.gridMemberId} |
| | | AND e.grid_member_id = #{pagePublicityEventDTO.gridMemberId} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.gridMemberName!=null"> |
| | | AND grid_member_name = #{pagePublicityEventDTO.gridMemberName} |
| | | AND e.grid_member_name = #{pagePublicityEventDTO.gridMemberName} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.gridMemberTelephone!=null"> |
| | | AND grid_member_telephone = #{pagePublicityEventDTO.gridMemberTelephone} |
| | | AND e.grid_member_telephone = #{pagePublicityEventDTO.gridMemberTelephone} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventTitle!=null"> |
| | | AND event_title = #{pagePublicityEventDTO.eventTitle} |
| | | AND e.event_title = #{pagePublicityEventDTO.eventTitle} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.propagandaType!=null"> |
| | | AND propaganda_type = #{pagePublicityEventDTO.propagandaType} |
| | | AND e.propaganda_type = #{pagePublicityEventDTO.propagandaType} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.propagandaTimeBegin!=null"> |
| | | AND propaganda_time <![CDATA[>=]]> #{pagePublicityEventDTO.propagandaTimeBegin} |
| | | AND e.propaganda_time <![CDATA[>=]]> #{pagePublicityEventDTO.propagandaTimeBegin} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.propagandaTimeEnd!=null"> |
| | | AND propaganda_time <![CDATA[<=]]> #{pagePublicityEventDTO.propagandaTimeEnd} |
| | | AND e.propaganda_time <![CDATA[<=]]> #{pagePublicityEventDTO.propagandaTimeEnd} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventDes!=null"> |
| | | AND event_des = #{pagePublicityEventDTO.eventDes} |
| | | AND e.event_des = #{pagePublicityEventDTO.eventDes} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.propagandaObject!=null"> |
| | | AND propaganda_object = #{pagePublicityEventDTO.propagandaObject} |
| | | AND e.propaganda_object = #{pagePublicityEventDTO.propagandaObject} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.propagandaNum!=null"> |
| | | AND propaganda_num = #{pagePublicityEventDTO.propagandaNum} |
| | | AND e.propaganda_num = #{pagePublicityEventDTO.propagandaNum} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.communityProcess!=null"> |
| | | AND community_process = #{pagePublicityEventDTO.communityProcess} |
| | | AND e.community_process = #{pagePublicityEventDTO.communityProcess} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.happenTimeBegin!=null"> |
| | | AND happen_time <![CDATA[>=]]> #{pagePublicityEventDTO.happenTimeBegin} |
| | | AND e.happen_time <![CDATA[>=]]> #{pagePublicityEventDTO.happenTimeBegin} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.happenTimeEnd!=null"> |
| | | AND happen_time <![CDATA[<=]]> #{pagePublicityEventDTO.happenTimeEnd} |
| | | AND e.happen_time <![CDATA[<=]]> #{pagePublicityEventDTO.happenTimeEnd} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.happentAddress!=null"> |
| | | AND happent_address = #{pagePublicityEventDTO.happentAddress} |
| | | AND e.happent_address = #{pagePublicityEventDTO.happentAddress} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.happentLatLng!=null"> |
| | | AND happent_lat_lng = #{pagePublicityEventDTO.happentLatLng} |
| | | AND e.happent_lat_lng = #{pagePublicityEventDTO.happentLatLng} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventStatus!=null"> |
| | | AND event_status = #{pagePublicityEventDTO.eventStatus} |
| | | AND e.event_status = #{pagePublicityEventDTO.eventStatus} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventProcessStatus!=null"> |
| | | AND event_process_status = #{pagePublicityEventDTO.eventProcessStatus} |
| | | AND e.event_process_status = #{pagePublicityEventDTO.eventProcessStatus} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.processType!=null"> |
| | | AND process_type = #{pagePublicityEventDTO.processType} |
| | | AND e.process_type = #{pagePublicityEventDTO.processType} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.processUserId!=null"> |
| | | AND process_user_id = #{pagePublicityEventDTO.processUserId} |
| | | AND e.process_user_id = #{pagePublicityEventDTO.processUserId} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.processUserName!=null"> |
| | | AND process_user_name = #{pagePublicityEventDTO.processUserName} |
| | | AND e.process_user_name = #{pagePublicityEventDTO.processUserName} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.processDateBegin!=null"> |
| | | AND process_date <![CDATA[>=]]> #{pagePublicityEventDTO.processDateBegin} |
| | | AND e.process_date <![CDATA[>=]]> #{pagePublicityEventDTO.processDateBegin} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.processDateEnd!=null"> |
| | | AND process_date <![CDATA[<=]]> #{pagePublicityEventDTO.processDateEnd} |
| | | AND e.process_date <![CDATA[<=]]> #{pagePublicityEventDTO.processDateEnd} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.processDesc!=null"> |
| | | AND process_desc = #{pagePublicityEventDTO.processDesc} |
| | | AND e.process_desc = #{pagePublicityEventDTO.processDesc} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventResource!=null"> |
| | | AND event_resource = #{pagePublicityEventDTO.eventResource} |
| | | AND e.event_resource = #{pagePublicityEventDTO.eventResource} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.dangerLevel!=null"> |
| | | AND danger_level = #{pagePublicityEventDTO.dangerLevel} |
| | | AND e.danger_level = #{pagePublicityEventDTO.dangerLevel} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.redCard!=null"> |
| | | AND red_card = #{pagePublicityEventDTO.redCard} |
| | | AND e.red_card = #{pagePublicityEventDTO.redCard} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.yellowCard!=null"> |
| | | AND yellow_card = #{pagePublicityEventDTO.yellowCard} |
| | | AND e.yellow_card = #{pagePublicityEventDTO.yellowCard} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.invalid!=null"> |
| | | AND invalid = #{pagePublicityEventDTO.invalid} |
| | | AND e.invalid = #{pagePublicityEventDTO.invalid} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.major!=null"> |
| | | AND major = #{pagePublicityEventDTO.major} |
| | | AND e.major = #{pagePublicityEventDTO.major} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.deathsNumber!=null"> |
| | | AND deaths_number = #{pagePublicityEventDTO.deathsNumber} |
| | | AND e.deaths_number = #{pagePublicityEventDTO.deathsNumber} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.injuriesNumber!=null"> |
| | | AND injuries_number = #{pagePublicityEventDTO.injuriesNumber} |
| | | AND e.injuries_number = #{pagePublicityEventDTO.injuriesNumber} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.difficult!=null"> |
| | | AND difficult = #{pagePublicityEventDTO.difficult} |
| | | AND e.difficult = #{pagePublicityEventDTO.difficult} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.urgent!=null"> |
| | | AND urgent = #{pagePublicityEventDTO.urgent} |
| | | AND e.urgent = #{pagePublicityEventDTO.urgent} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.urgentDell!=null"> |
| | | AND urgent_dell = #{pagePublicityEventDTO.urgentDell} |
| | | AND e.urgent_dell = #{pagePublicityEventDTO.urgentDell} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.submitDateBegin!=null"> |
| | | AND submit_date <![CDATA[>=]]> #{pagePublicityEventDTO.submitDateBegin} |
| | | AND e.submit_date <![CDATA[>=]]> #{pagePublicityEventDTO.submitDateBegin} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.submitDateEnd!=null"> |
| | | AND submit_date <![CDATA[<=]]> #{pagePublicityEventDTO.submitDateEnd} |
| | | AND e.submit_date <![CDATA[<=]]> #{pagePublicityEventDTO.submitDateEnd} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.createBy!=null"> |
| | | AND create_by = #{pagePublicityEventDTO.createBy} |
| | | AND e.create_by = #{pagePublicityEventDTO.createBy} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.createAtBegin!=null"> |
| | | AND create_at <![CDATA[>=]]> #{pagePublicityEventDTO.createAtBegin} |
| | | AND e.create_at <![CDATA[>=]]> #{pagePublicityEventDTO.createAtBegin} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.createAtEnd!=null"> |
| | | AND create_at <![CDATA[<=]]> #{pagePublicityEventDTO.createAtEnd} |
| | | AND e.create_at <![CDATA[<=]]> #{pagePublicityEventDTO.createAtEnd} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.updateBy!=null"> |
| | | AND update_by = #{pagePublicityEventDTO.updateBy} |
| | | AND e.update_by = #{pagePublicityEventDTO.updateBy} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.updateAtBegin!=null"> |
| | | AND update_at <![CDATA[>=]]> #{pagePublicityEventDTO.updateAtBegin} |
| | | AND e.update_at <![CDATA[>=]]> #{pagePublicityEventDTO.updateAtBegin} |
| | | </if> |
| | | <if test="pagePublicityEventDTO.updateAtEnd!=null"> |
| | | AND update_at <![CDATA[<=]]> #{pagePublicityEventDTO.updateAtEnd} |
| | | AND e.update_at <![CDATA[<=]]> #{pagePublicityEventDTO.updateAtEnd} |
| | | </if> |
| | | </where> |
| | | <if test="pagePublicityEventDTO.sortColumns!=null"> |
| | | ORDER BY ${pagePublicityEventDTO.sortColumns} ${pagePublicityEventDTO.sortType} |
| | | ORDER BY e.${pagePublicityEventDTO.sortColumns} ${pagePublicityEventDTO.sortType} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | AND grid_id = #{gridId} |
| | | </select> |
| | | |
| | | <select id="getGridMemberImageUrl" resultType="String"> |
| | | select image_url from sys_user where user_id = #{gridMemberId} |
| | | </select> |
| | | <select id="findToManageByPage" resultType="com.panzhihua.common.model.vos.grid.EventVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventManageDTO"> |
| | | SELECT |
| | | e.id,e.order_sn,e.event_category,e.grid_member_street,e.happen_address,e.grid_member_community,e.event_clazz,e.grid_id,e.grid_member_id,e.grid_member_name,e.grid_member_telephone, |
| | | e.event_title,e.propaganda_type,e.propaganda_time,e.event_type,e.event_des,e.propaganda_object,e.propaganda_num,e.community_process,e.happen_time,e.happent_address,e.happent_lat_lng, |
| | | e.event_status,e.event_process_status,e.process_type,e.process_user_id,e.process_user_name,e.process_date,e.process_desc,e.event_resource,e.danger_level,e.red_card,e.yellow_card,e.invalid, |
| | | e.major,e.deaths_number,e.injuries_number,e.difficult,e.urgent,e.urgent_dell,e.submit_date,e.create_by,e.create_at,e.update_by,e.update_at,e.event_deal_status |
| | | FROM |
| | | event e left join event_grid_data egd on e.grid_id = egd.id |
| | | <where> |
| | | e.event_status != 3 AND e.event_category = 1 |
| | | <if test="pageEventManageDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pageEventManageDTO.communityId} |
| | | </if> |
| | | <if test='pageEventManageDTO.keyWord != null and pageEventManageDTO.keyWord != ""'> |
| | | AND ( |
| | | e.grid_member_name like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.event_title like concat('%', #{pageEventManageDTO.keyWord},'%') OR |
| | | e.happen_address like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pageEventManageDTO.eventDealStatus!=null"> |
| | | AND e.event_deal_status = #{pageEventManageDTO.eventDealStatus} |
| | | </if> |
| | | <if test="pageEventManageDTO.communityProcess!=null"> |
| | | AND e.community_process = #{pageEventManageDTO.communityProcess} |
| | | </if> |
| | | <if test="pageEventManageDTO.eventType!=null"> |
| | | AND e.event_type = #{pageEventManageDTO.eventType} |
| | | </if> |
| | | <if test="pageEventManageDTO.dangerLevel!=null"> |
| | | AND e.danger_level = #{pageEventManageDTO.dangerLevel} |
| | | </if> |
| | | <if test="pageEventManageDTO.redCard!=null"> |
| | | AND e.red_card = #{pageEventManageDTO.redCard} |
| | | </if> |
| | | <if test="pageEventManageDTO.yellowCard!=null"> |
| | | AND e.yellow_card = #{pageEventManageDTO.yellowCard} |
| | | </if> |
| | | <if test="pageEventManageDTO.urgent!=null"> |
| | | AND e.urgent = #{pageEventManageDTO.urgent} |
| | | </if> |
| | | <if test="pageEventManageDTO.major!=null"> |
| | | AND e.major = #{pageEventManageDTO.major} |
| | | </if> |
| | | <if test="pageEventManageDTO.invalid!=null"> |
| | | AND e.invalid = #{pageEventManageDTO.invalid} |
| | | </if> |
| | | </where> |
| | | <if test="pageEventManageDTO.sortColumns!=null"> |
| | | ORDER BY e.${pageEventManageDTO.sortColumns} ${pageEventManageDTO.sortType} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="findCommunityPublicityByPage" resultType="com.panzhihua.common.model.vos.grid.EventVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PagePublicityEventCommunityDTO"> |
| | | SELECT |
| | | e.id,e.order_sn,e.event_category,e.grid_member_street,e.happen_address,e.grid_member_community,e.event_clazz,e.grid_id,e.grid_member_id,e.grid_member_name,e.grid_member_telephone, |
| | | e.event_title,e.propaganda_type,e.propaganda_time,e.event_type,e.event_des,e.propaganda_object,e.propaganda_num,e.community_process,e.happen_time,e.happent_address,e.happent_lat_lng, |
| | | e.event_status,e.event_process_status,e.process_type,e.process_user_id,e.process_user_name,e.process_date,e.process_desc,e.event_resource,e.danger_level,e.red_card,e.yellow_card,e.invalid, |
| | | e.major,e.deaths_number,e.injuries_number,e.difficult,e.urgent,e.urgent_dell,e.submit_date,e.create_by,e.create_at,e.update_by,e.update_at,e.event_deal_status |
| | | FROM |
| | | event e left join event_grid_data egd on e.grid_id = egd.id |
| | | <where> |
| | | e.event_status != 3 AND e.event_category = 2 |
| | | <if test='pagePublicityEventCommunityDTO.keyWord != null and pagePublicityEventCommunityDTO.keyWord != ""'> |
| | | AND ( |
| | | e.grid_member_name like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.event_title like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') OR |
| | | e.happen_address like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') |
| | | e.order_sn like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pageEventManageDTO.communityId} |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.eventDealStatus!=null"> |
| | | AND e.event_deal_status = #{pagePublicityEventCommunityDTO.eventDealStatus} |
| | | </if> |
| | | </where> |
| | | <if test="pagePublicityEventCommunityDTO.sortColumns!=null"> |
| | | ORDER BY e.${pagePublicityEventCommunityDTO.sortColumns} ${pagePublicityEventCommunityDTO.sortType} |
| | | </if> |
| | | </select> |
| | | <select id="eventStatistics" resultType="com.panzhihua.common.model.vos.grid.EventStatisticsAllAdminVO"> |
| | | SELECT |
| | | count( e.id ) AS eventTotal,( |
| | | SELECT |
| | | count( e.id ) |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_status = 2 |
| | | AND e.event_process_status = 2 |
| | | ) AS handleEventTotal, |
| | | ( |
| | | SELECT |
| | | count( e.id ) |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_category = 2 |
| | | AND e.event_status = 2 |
| | | ) AS propagandaEducationTotal, |
| | | ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 AND community_id = #{communityId} ) AS easyPhotoTotal |
| | | FROM |
| | | `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | | WHERE |
| | | egd.grid_community_id = #{communityId} |
| | | AND e.event_status = 2 |
| | | </select> |
| | | |
| | | <select id="getEventCountByGridIds" resultType="Integer"> |
| | | select count(id) from event where grid_id in |
| | | <foreach item="item" collection="ids" separator="," open="(" close=")" index=""> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result property="type" column="type"/> |
| | | <result property="resourceName" column="resource_name"/> |
| | | <result property="resourceSize" column="resource_size"/> |
| | | <result property="resourceTime" column="resource_time"/> |
| | | <result property="url" column="url"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createAt" column="create_at"/> |
| | |
| | | |
| | | <sql id="columns"> |
| | | <![CDATA[ |
| | | id,classification,ref_id,type,resource_name,resource_size,url,create_by,create_at |
| | | id,classification,ref_id,type,resource_name,resource_size,resource_time, url,create_by,create_at |
| | | ]]> |
| | | </sql> |
| | | |
New file |
| | |
| | | //package com.panzhihua.service_user.api; |
| | | // |
| | | //import com.panzhihua.common.model.dtos.grid.PageEventGridMemberRelationDTO; |
| | | //import com.panzhihua.common.model.vos.R; |
| | | //import com.panzhihua.service_user.service.UserService; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //import org.springframework.web.bind.annotation.PostMapping; |
| | | //import org.springframework.web.bind.annotation.RequestBody; |
| | | //import org.springframework.web.bind.annotation.RestController; |
| | | // |
| | | //import javax.annotation.Resource; |
| | | // |
| | | ///** |
| | | // * 网格员管理 |
| | | // */ |
| | | // |
| | | //@Slf4j |
| | | //@RestController("/grid/") |
| | | //public class GridMemberApi { |
| | | // |
| | | // @Resource |
| | | // private UserService userService; |
| | | // |
| | | // /** |
| | | // * 网格员管理 |
| | | // * @param memberRelationDTO 请求参数 |
| | | // * @return 网格员列表 |
| | | // */ |
| | | // @PostMapping("/member/list") |
| | | // public R getGridMemberList(@RequestBody PageEventGridMemberRelationDTO memberRelationDTO){ |
| | | // return userService.getGridMemberList(memberRelationDTO); |
| | | // } |
| | | // |
| | | // |
| | | // |
| | | //} |
| | |
| | | import com.panzhihua.common.model.dtos.community.ExportSpecialUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.NoticeReadDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.*; |
| | | import com.panzhihua.common.model.vos.EditUserInfoPassAppDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.utlis.ClazzUtils; |
| | | import com.panzhihua.service_user.service.SysUserInputService; |
| | | import com.panzhihua.service_user.service.UserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | public R updateUserPassByApp(@RequestBody EditUserInfoPassAppDTO userInfoAppDTO){ |
| | | return userService.updateUserPassByApp(userInfoAppDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加网格员 |
| | | * @param eventGridMemberAddDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @PostMapping("addGridUser") |
| | | R addGridUser(@RequestBody EventGridMemberAddDTO eventGridMemberAddDTO){ |
| | | return userService.addGridUser(eventGridMemberAddDTO); |
| | | } |
| | | |
| | | /** |
| | | * 网格员管理 |
| | | * @param memberRelationDTO 请求参数 |
| | | * @return 网格员列表 |
| | | */ |
| | | @PostMapping("member/list") |
| | | public R getGridMemberList(@RequestBody PageEventGridMemberRelationDTO memberRelationDTO){ |
| | | return userService.getGridMemberList(memberRelationDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改网格员信息 |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("editGridUser") |
| | | public R gridMemberEdit(@RequestBody EventGridMemberEditAdminDTO gridMemberDTO){ |
| | | return userService.editGridUser(gridMemberDTO); |
| | | } |
| | | |
| | | /** |
| | | * 重置网格员密码 |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 重置结果 |
| | | */ |
| | | @PostMapping("passResetUser") |
| | | public R passResetUser(@RequestBody EventGridMemberPassResetDTO gridMemberDTO){ |
| | | return userService.passResetUser(gridMemberDTO); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除网格员 |
| | | * @param Ids 网格员id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("deleteMembers") |
| | | public R deleteMembers(@RequestBody List<Long> Ids){ |
| | | return userService.deleteMembers(Ids); |
| | | } |
| | | |
| | | @PostMapping("gridMemberEditStatus") |
| | | public R gridMemberEditStatus(@RequestBody EventGridMemberEditStatusDTO gridMemberEditDTO){ |
| | | return userService.gridMemberEditStatus(gridMemberEditDTO); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberEditStatusDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberPassResetDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridMemberRelationDTO; |
| | | import com.panzhihua.common.model.dtos.user.EexcelUserDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO; |
| | | import com.panzhihua.common.model.vos.IndexDataKanbanVO; |
| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.grid.GridMemberVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | |
| | | @Select("select id from com_pb_member where audit_result = 1 and id_card = #{idCard}") |
| | | Long getPartyBuildingByIdCard(@Param("idCard")String idCard); |
| | | |
| | | @Select("<script>" + |
| | | "select su.user_id,su.image_url,su.nick_name,su.account,su.phone,su.work_status,su.`status`" + |
| | | ",ca.name as communityName,su.work_start_time,su.work_end_time from sys_user su" + |
| | | " left join com_act as ca on ca.community_id = su.community_id" + |
| | | " where su.type = 6 " + |
| | | "<if test='memberRelationDTO.status != null'>" + |
| | | "AND su.status = #{memberRelationDTO.status} " + |
| | | " </if> " + |
| | | "<if test='memberRelationDTO.gridCommunityId != null'>" + |
| | | "AND ca.community_id = #{memberRelationDTO.gridCommunityId} " + |
| | | " </if> " + |
| | | "<if test='memberRelationDTO.gridStreetId != null'>" + |
| | | "AND ca.street_id = #{memberRelationDTO.gridStreetId} " + |
| | | " </if> " + |
| | | "<if test='memberRelationDTO.workStatus != null'>" + |
| | | "AND su.work_status = #{memberRelationDTO.workStatus} " + |
| | | " </if> " + |
| | | "<if test='memberRelationDTO.keyWord != null and memberRelationDTO.keyWord != ""'>" + |
| | | "and (su.nick_name like concat(#{memberRelationDTO.keyWord},'%') OR su.user_id = #{memberRelationDTO.keyWord} OR su.account like concat(#{memberRelationDTO.keyWord},'%') OR su.phone like concat(#{memberRelationDTO.keyWord},'%'))" + |
| | | " </if> " + |
| | | " order by su.create_at desc" + |
| | | "</script>") |
| | | IPage<GridMemberVO> getGridMemberList(Page page, @Param("memberRelationDTO") PageEventGridMemberRelationDTO memberRelationDTO); |
| | | |
| | | @Select("<script>" + |
| | | "update sys_user" + |
| | | " set status = #{gridMemberEditDTO.status}" + |
| | | " where user_id in " + |
| | | "<foreach item=\"item\" collection=\"gridMemberEditDTO.ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n" + |
| | | "#{item}\n" + |
| | | "</foreach>\n" + |
| | | "</script>") |
| | | void gridMemberEditStatus(@Param("gridMemberEditDTO") EventGridMemberEditStatusDTO gridMemberEditDTO); |
| | | |
| | | @Select("<script>" + |
| | | "update sys_user" + |
| | | " set password = #{gridMemberDTO.password}" + |
| | | " where user_id in " + |
| | | "<foreach item=\"item\" collection=\"gridMemberDTO.ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n" + |
| | | "#{item}\n" + |
| | | "</foreach>\n" + |
| | | "</script>") |
| | | void passResetUser(@Param("gridMemberDTO") EventGridMemberPassResetDTO gridMemberDTO); |
| | | |
| | | } |
| | |
| | | * 户口本照片 逗号隔开 |
| | | */ |
| | | private String familyBook; |
| | | /** |
| | | * 网格员工作状态(1.在岗 2.脱岗 3.已下班) |
| | | */ |
| | | private Integer workStatus; |
| | | /** |
| | | * 网格员上班开始时间 |
| | | */ |
| | | private Integer workStartTime; |
| | | /** |
| | | * 网格员上班结束时间 |
| | | */ |
| | | private Integer workEndTime; |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.NoticeReadDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.PageFeedBackDTO; |
| | | import com.panzhihua.common.model.dtos.user.PageUserAppletsBackstageDTO; |
| | | import com.panzhihua.common.model.dtos.user.SysUserEditTipsDTO; |
| | |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | R updateUserPassByApp(EditUserInfoPassAppDTO userInfoAppDTO); |
| | | |
| | | /** |
| | | * 添加网格员 |
| | | * @param eventGridMemberAddDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | R addGridUser(EventGridMemberAddDTO eventGridMemberAddDTO); |
| | | |
| | | /** |
| | | * 网格员管理 |
| | | * @param memberRelationDTO 请求参数 |
| | | * @return 网格员列表 |
| | | */ |
| | | R getGridMemberList(PageEventGridMemberRelationDTO memberRelationDTO); |
| | | |
| | | /** |
| | | * 网格员编辑 |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | R editGridUser(EventGridMemberEditAdminDTO gridMemberDTO); |
| | | |
| | | /** |
| | | * 网格员重置密码 |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 重置结果 |
| | | */ |
| | | R passResetUser(EventGridMemberPassResetDTO gridMemberDTO); |
| | | |
| | | R deleteMembers(List<Long> Ids); |
| | | |
| | | R gridMemberEditStatus(EventGridMemberEditStatusDTO gridMemberEditDTO); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.NoticeReadDTO; |
| | | import com.panzhihua.common.model.dtos.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.*; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVolunteerMngVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberRelationVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.ActivityManagerVO; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | //import com.panzhihua.common.service.grid.GridService; |
| | | import com.panzhihua.common.service.partybuilding.PartyBuildingService; |
| | | import com.panzhihua.common.utlis.IdCard; |
| | | import com.panzhihua.common.utlis.RealNameUtil; |
| | |
| | | private SysMenuDAO sysMenuDAO; |
| | | @Resource |
| | | private SysUserInputDAO sysUserInputDAO; |
| | | |
| | | // @Resource |
| | | // private GridService gridService; |
| | | |
| | | /** |
| | | * 小程序微信用户信息更新 |
| | |
| | | // 志愿者状态 |
| | | String phone = sysUserDO.getPhone(); |
| | | Long userCommunityId = sysUserDO.getCommunityId(); |
| | | if(userCommunityId!=null){ |
| | | ComActVO comActVO = userDao.selectCommunity(userCommunityId); |
| | | if(comActVO!=null) { |
| | | loginUserInfoVO.setCommunityName(comActVO.getName()); |
| | | } |
| | | } |
| | | if (!ObjectUtils.isEmpty(phone)) { |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO = userDao.selectVolunteerMngByPhone(phone); |
| | | if (ObjectUtils.isEmpty(comMngVolunteerMngVO)) { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | if(insert>0 && sysUserDO.getType()==3){//添加的用户是社区账号时 |
| | | //添加网格综合治理管理后台用户 |
| | | SysUserDO sysUserDOWangGe = new SysUserDO(); |
| | | BeanUtils.copyProperties(sysUserDO, sysUserDOWangGe); |
| | | sysUserDOWangGe.setUserId(null); |
| | | sysUserDOWangGe.setType(7);//网格综治后台 |
| | | try { |
| | | int addWange = userDao.insert(sysUserDOWangGe); |
| | | if(addWange!=1){ |
| | | throw new ServiceException("新增网格综合治理管理后台用户失败"); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("网格综合治理管理后台用户报错【{}】", e.getMessage()); |
| | | if (e.getMessage().contains("union_phone_type")) { |
| | | throw new ServiceException("手机号已经存在"); |
| | | } else if (e.getMessage().contains("union_account_type")) { |
| | | throw new ServiceException("账户已经存在"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (insert > 0) { |
| | | SysUserDO sysUserDO1 = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, administratorsUserVO.getType()).eq(SysUserDO::getAccount, administratorsUserVO.getAccount())); |
| | | Long userId = sysUserDO1.getUserId(); |
| | |
| | | |
| | | // 获取所有权限id |
| | | List<SysMenuDO> menuDOList = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, 2l).orderByAsc(SysMenuDO::getOrderNum)); |
| | | menuIds = menuDOList.stream().map(sysMenuDO -> sysMenuDO.getMenuId()).collect(Collectors.toList()); |
| | | for (int i = 0; i < menuIds.size(); i++) { |
| | | SysRoleMenuDO sysRoleMenuDO = new SysRoleMenuDO(); |
| | | sysRoleMenuDO.setMenuId(menuIds.get(i)); |
| | | sysRoleMenuDO.setRoleId(roleId); |
| | | sysRoleMenuDAO.insert(sysRoleMenuDO); |
| | | if(!menuDOList.isEmpty()){ |
| | | menuIds = menuDOList.stream().map(sysMenuDO -> sysMenuDO.getMenuId()).collect(Collectors.toList()); |
| | | for (int i = 0; i < menuIds.size(); i++) { |
| | | SysRoleMenuDO sysRoleMenuDO = sysRoleMenuDAO.selectOne(new QueryWrapper<SysRoleMenuDO>().lambda().eq(SysRoleMenuDO::getMenuId,menuIds.get(i)) |
| | | .eq(SysRoleMenuDO::getRoleId,roleId)); |
| | | if(sysRoleMenuDO == null){ |
| | | sysRoleMenuDO = new SysRoleMenuDO(); |
| | | sysRoleMenuDO.setMenuId(menuIds.get(i)); |
| | | sysRoleMenuDO.setRoleId(roleId); |
| | | sysRoleMenuDAO.insert(sysRoleMenuDO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加网格员 |
| | | * @param eventGridMemberAddDTO 请求参数 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addGridUser(EventGridMemberAddDTO eventGridMemberAddDTO) { |
| | | |
| | | SysRoleDO gridMemberDefaultRole = roleDAO.selectOne(new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getRoleKey, Constants.GRID_DEFAULT_ROLE_KEY)); |
| | | if(gridMemberDefaultRole==null) { |
| | | //添加默认网格员角色 |
| | | gridMemberDefaultRole = new SysRoleDO(); |
| | | gridMemberDefaultRole.setCommunityId(0L); |
| | | gridMemberDefaultRole.setRoleName("网格员默认角色"); |
| | | gridMemberDefaultRole.setRoleKey(Constants.GRID_DEFAULT_ROLE_KEY); |
| | | gridMemberDefaultRole.setRoleSort(0); |
| | | gridMemberDefaultRole.setCreateBy(eventGridMemberAddDTO.getUserId()); |
| | | int insert = roleDAO.insert(gridMemberDefaultRole); |
| | | if (insert!=1) { |
| | | throw new ServiceException("网格员默认角色添加失败"); |
| | | } |
| | | } |
| | | Long roleId = gridMemberDefaultRole.getRoleId(); |
| | | //新角色设置所有权限 |
| | | MenuRoleVO menuRoleVO = new MenuRoleVO(); |
| | | menuRoleVO.setIsAll(1); |
| | | menuRoleVO.setCommunityId(eventGridMemberAddDTO.getCommunityId()); |
| | | menuRoleVO.setRoleId(roleId); |
| | | this.putMenuRole(menuRoleVO); |
| | | |
| | | //参数校验 |
| | | SysUserDO oldUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType,6) |
| | | .eq(SysUserDO::getNickName,eventGridMemberAddDTO.getNickName())); |
| | | if(oldUserDO != null){ |
| | | return R.fail("昵称已使用"); |
| | | } |
| | | |
| | | SysUserDO sysUserDO = new SysUserDO(); |
| | | String encode = new BCryptPasswordEncoder().encode(eventGridMemberAddDTO.getPassword()); |
| | | eventGridMemberAddDTO.setPassword(encode); |
| | | BeanUtils.copyProperties(eventGridMemberAddDTO, sysUserDO); |
| | | sysUserDO.setType(6); |
| | | int insert = 0; |
| | | try { |
| | | insert = userDao.insert(sysUserDO); |
| | | SysUserRoleDO sysUserRoleDO = new SysUserRoleDO(); |
| | | sysUserRoleDO.setUserId(sysUserDO.getUserId()); |
| | | sysUserRoleDO.setRoleId(roleId); |
| | | sysUserRoleDAO.insert(sysUserRoleDO); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("新增后台用户报错【{}】", e.getMessage()); |
| | | if (e.getMessage().contains("union_phone_type")) { |
| | | throw new ServiceException("手机号已经存在"); |
| | | } else if (e.getMessage().contains("union_account_type")) { |
| | | throw new ServiceException("账户已经存在"); |
| | | } |
| | | } |
| | | if(insert > 0){ |
| | | return R.ok(); |
| | | }else{ |
| | | return R.fail("添加失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 网格员管理 |
| | | * @param memberRelationDTO 请求参数 |
| | | * @return 网格员列表 |
| | | */ |
| | | @Override |
| | | public R getGridMemberList(PageEventGridMemberRelationDTO memberRelationDTO){ |
| | | return R.ok(userDao.getGridMemberList(new Page(memberRelationDTO.getPageNum(),memberRelationDTO.getPageSize()),memberRelationDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 修改网格员信息 |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | @Override |
| | | public R editGridUser(EventGridMemberEditAdminDTO gridMemberDTO){ |
| | | |
| | | if(gridMemberDTO.getGridMemberId() == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | SysUserDO sysUserDO = userDao.selectById(gridMemberDTO.getGridMemberId()); |
| | | if(sysUserDO == null){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | gridMemberDTO.setUserId(gridMemberDTO.getGridMemberId()); |
| | | |
| | | //参数校验 |
| | | SysUserDO oldUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType,6) |
| | | .eq(SysUserDO::getNickName,gridMemberDTO.getNickName())); |
| | | if(oldUserDO != null && !oldUserDO.getUserId().equals(gridMemberDTO.getGridMemberId())){ |
| | | return R.fail("昵称已使用"); |
| | | } |
| | | |
| | | BeanUtils.copyProperties(gridMemberDTO,sysUserDO); |
| | | |
| | | int insert = 0; |
| | | try { |
| | | insert = userDao.updateById(sysUserDO); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("修改网格员用户报错【{}】", e.getMessage()); |
| | | if (e.getMessage().contains("union_phone_type")) { |
| | | throw new ServiceException("手机号已经存在"); |
| | | } else if (e.getMessage().contains("union_account_type")) { |
| | | throw new ServiceException("账户已经存在"); |
| | | } |
| | | } |
| | | if(insert > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 重置网格员密码 |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 重置结果 |
| | | */ |
| | | @Override |
| | | public R passResetUser(EventGridMemberPassResetDTO gridMemberDTO){ |
| | | if(gridMemberDTO.getIds().isEmpty() || StringUtils.isEmpty(gridMemberDTO.getPassword())){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | String encode = new BCryptPasswordEncoder().encode(gridMemberDTO.getPassword()); |
| | | gridMemberDTO.setPassword(encode); |
| | | userDao.passResetUser(gridMemberDTO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除网格员 |
| | | * @param Ids 网格员id集合 |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public R deleteMembers(List<Long> Ids){ |
| | | if(Ids.isEmpty()){ |
| | | return R.fail("参数有误"); |
| | | } |
| | | if(userDao.deleteBatchIds(Ids) > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail("删除失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R gridMemberEditStatus(EventGridMemberEditStatusDTO gridMemberEditDTO){ |
| | | if(gridMemberEditDTO.getIds().isEmpty()){ |
| | | return R.fail("参数有误"); |
| | | } |
| | | userDao.gridMemberEditStatus(gridMemberEditDTO); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | active: ${ENV:dev} |
| | | servlet: |
| | | multipart: |
| | | max-file-size: 20MB |
| | | max-request-size: 22MB |
| | | max-file-size: 200MB |
| | | max-request-size: 220MB |
| | | |
| | | eureka: |
| | | client: |