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; |
| | | |
| | | } |
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; |
| | | |
| | | } |
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; |
| | | |
| | | } |
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; |
| | | |
| | | |
| | | /** |
| | | * 随手拍列表请求参数 |
| | | * |
| | | * @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; |
| | | |
| | | } |
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; |
| | | |
| | | } |
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; |
| | | |
| | | } |
| | |
| | | @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; |
| | | |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("管理后台-网格返回参数") |
| | |
| | | @ApiModelProperty(value = "网格名称") |
| | | private String gridName; |
| | | @ApiModelProperty(value = "网格员") |
| | | private String gridMemberName; |
| | | private List<GridMemberAdminVO> gridMembers; |
| | | @ApiModelProperty(value = "网格描述") |
| | | private String remarks; |
| | | @ApiModelProperty(value = "网格面积") |
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; |
| | | |
| | | } |
| | |
| | | * @return 网格列表 |
| | | */ |
| | | @PostMapping("/eventgriddata/data/list") |
| | | R getGridDataList(PageEventGridDataDTO eventGridDataDTO); |
| | | R getGridDataList(PageEventGridDataAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 查询社区下所有网格员 |
| | |
| | | */ |
| | | @PostMapping("/eventgriddata/member/list") |
| | | R getGridMemberLists(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 后台新增网格 |
| | | * @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); |
| | | } |
| | |
| | | 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.EventGridMemberAddDTO; |
| | | 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.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.*; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("editGridUser") |
| | | R editGridUser(@RequestBody EventGridMemberAddDTO eventGridMemberAddDTO); |
| | | R editGridUser(@RequestBody EventGridMemberEditAdminDTO eventGridMemberAddDTO); |
| | | |
| | | /** |
| | | * 重置网格员密码 |
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); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "网格员修改") |
| | | @PostMapping("/member/edit") |
| | | public R gridMemberEdit(@Validated @RequestBody EventGridMemberAddDTO gridMemberDTO){ |
| | | public R gridMemberEdit(@Validated @RequestBody EventGridMemberEditAdminDTO gridMemberDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(gridMemberDTO); |
| | | return userService.editGridUser(gridMemberDTO); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "网格分页查询", response = EventGridAdminVO.class) |
| | | @PostMapping("/event/list") |
| | | public R getGridDataList(@Validated @RequestBody PageEventGridDataDTO eventGridDataDTO){ |
| | | public R getGridDataList(@Validated @RequestBody PageEventGridDataAdminDTO eventGridDataDTO){ |
| | | ClazzUtils.setIfStringIsEmpty(eventGridDataDTO); |
| | | Long communityId = this.getCommunityId(); |
| | | if(communityId == null){ |
| | |
| | | return gridService.getGridMemberLists(communityId); |
| | | } |
| | | |
| | | @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); |
| | | } |
| | | |
| | | @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); |
| | | } |
| | | |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | * @return 网格列表 |
| | | */ |
| | | @PostMapping("/data/list") |
| | | public R getGridMemberList(@RequestBody PageEventGridDataDTO eventGridDataDTO){ |
| | | public R getGridMemberList(@RequestBody PageEventGridDataAdminDTO eventGridDataDTO){ |
| | | return eventGridDataService.getGridMemberList(eventGridDataDTO); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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.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.UserEventGridDataVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO; |
| | | 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; |
| | | |
| | |
| | | * @param eventGridDataDTO |
| | | * @return |
| | | */ |
| | | IPage<EventGridAdminVO> findByPage(Page page, @Param("eventGridDataDTO") PageEventGridDataDTO eventGridDataDTO); |
| | | IPage<EventGridAdminVO> findByPage(Page page, @Param("pageEventGridDataDTO") PageEventGridDataAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 分页查询网格员所在网格 |
| | |
| | | */ |
| | | List<EventGridMemberAdminVO> getGridMemberLists(@Param("communityId") Long communityId); |
| | | |
| | | List<String> getGridMember(@Param("gridId") Long gridId); |
| | | List<GridMemberAdminVO> getGridMember(@Param("gridId") Long gridId); |
| | | |
| | | ComGridActVO getComActByActId(@Param("communityId") Long communityId); |
| | | |
| | | void removeGridRelationByGridId(@Param("gridId") Long gridId); |
| | | |
| | | } |
| | |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 类型,1、区县网格2街道网格3社区网格 |
| | | */ |
| | | public interface type{ |
| | | Long qx = 1L; |
| | | Long jd = 2L; |
| | | Long sq = 3L; |
| | | } |
| | | } |
| | |
| | | */ |
| | | 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); |
| | | |
| | | |
| | | } |
| | |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 网格列表 |
| | | */ |
| | | R getGridMemberList(PageEventGridDataDTO eventGridDataDTO); |
| | | R getGridMemberList(PageEventGridDataAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 查询社区下所有网格员 |
| | |
| | | * @return 网格员列表 |
| | | */ |
| | | R getGridMemberLists(Long communityId); |
| | | |
| | | /** |
| | | * 后台新增网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 新增结果 |
| | | */ |
| | | R addGridDataByAdmin(EventGridDataAddAdminDTO eventGridDataDTO); |
| | | |
| | | /** |
| | | * 后台修改网格 |
| | | * @param eventGridDataDTO 请求参数 |
| | | * @return 修改结果 |
| | | */ |
| | | R editGridDataByAdmin(EventGridDataEditAdminDTO eventGridDataDTO); |
| | | } |
| | |
| | | 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){ |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-分页查询随手拍列表 |
| | | * @param easyAppDTO 请求参数 |
| | | * @return 随手拍列表 |
| | | */ |
| | | @Override |
| | | public R easyListByAdmin(PageEasyAdminDTO easyAppDTO){ |
| | | return R.ok(this.baseMapper.easyListByAdmin(new Page(easyAppDTO.getPageNum(),easyAppDTO.getPageSize()), easyAppDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 后台管理-随手拍详情 |
| | | * @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.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 网格列表 |
| | | */ |
| | | @Override |
| | | public R getGridMemberList(PageEventGridDataDTO eventGridDataDTO){ |
| | | 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<String> members = this.baseMapper.getGridMember(gridMember.getId()); |
| | | List<GridMemberAdminVO> members = this.baseMapper.getGridMember(gridMember.getId()); |
| | | if(!members.isEmpty()){ |
| | | String memberNames = Joiner.on(",").join(members); |
| | | gridMember.setGridMemberName(memberNames); |
| | | gridMember.setGridMembers(members); |
| | | } |
| | | }); |
| | | } |
| | |
| | | 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(); |
| | | } |
| | | |
| | | } |
| | |
| | | </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> |
| | |
| | | |
| | | |
| | | <select id="findByPage" resultType="com.panzhihua.common.model.vos.grid.EventGridAdminVO" |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataDTO"> |
| | | parameterType="com.panzhihua.common.model.dtos.grid.PageEventGridDataAdminDTO"> |
| | | SELECT DISTINCT |
| | | egd.id, |
| | | egd.grid_name, |
| | |
| | | </select> |
| | | |
| | | <select id="getGridMemberLists" resultType="com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO"> |
| | | select user_id,nick_name from sys_user where act_id = #{communityId} |
| | | select user_id,nick_name from sys_user where community_id = #{communityId} and `type` = 6 |
| | | </select> |
| | | |
| | | <select id="getGridMember" resultType="String"> |
| | | <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 |
| | |
| | | |
| | | </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> |
| | | |
| | | <delete id="removeGridRelationByGridId"> |
| | | delete from event_grid_member_relation where grid_id = #{gridId} |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | 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.EventGridMemberAddDTO; |
| | | 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.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.*; |
| | | import com.panzhihua.common.model.vos.EditUserInfoPassAppDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("editGridUser") |
| | | public R gridMemberEdit(@RequestBody EventGridMemberAddDTO gridMemberDTO){ |
| | | public R gridMemberEdit(@RequestBody EventGridMemberEditAdminDTO gridMemberDTO){ |
| | | return userService.editGridUser(gridMemberDTO); |
| | | } |
| | | |
| | |
| | | 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.EventGridMemberAddDTO; |
| | | 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.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; |
| | |
| | | * @param gridMemberDTO 请求参数 |
| | | * @return 编辑结果 |
| | | */ |
| | | R editGridUser(EventGridMemberAddDTO gridMemberDTO); |
| | | R editGridUser(EventGridMemberEditAdminDTO gridMemberDTO); |
| | | |
| | | /** |
| | | * 网格员重置密码 |
| | |
| | | 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.EventGridMemberAddDTO; |
| | | 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.grid.*; |
| | | import com.panzhihua.common.model.dtos.user.*; |
| | | import com.panzhihua.common.model.vos.*; |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | @Override |
| | | public R editGridUser(EventGridMemberAddDTO gridMemberDTO){ |
| | | public R editGridUser(EventGridMemberEditAdminDTO gridMemberDTO){ |
| | | |
| | | if(gridMemberDTO.getGridMemberId() == null){ |
| | | return R.fail("参数错误"); |
| | |
| | | return R.fail("昵称已使用"); |
| | | } |
| | | |
| | | String encode = new BCryptPasswordEncoder().encode(gridMemberDTO.getPassword()); |
| | | gridMemberDTO.setPassword(encode); |
| | | BeanUtils.copyProperties(gridMemberDTO,sysUserDO); |
| | | |
| | | int insert = 0; |