| | |
| | | private String eventClazz; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "危险级别:1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @ApiModelProperty(value = "危险级别:0 (无) 1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "危险级别不能为空") |
| | | private Integer dangerLevel; |
| | | |
| | |
| | | private String eventClazz; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "危险级别:1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @ApiModelProperty(value = "危险级别:0 (无) 1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "危险级别不能为空") |
| | | private Integer dangerLevel; |
| | | |
| | |
| | | private String eventClazz; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "危险级别:1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @ApiModelProperty(value = "危险级别:0 (无) 1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "危险级别不能为空") |
| | | private Integer dangerLevel; |
| | | |
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.NotNull; |
| | | |
| | | |
| | | /** |
| | | * 事件重新发布请求参表单 |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @ApiModel("事件重新发布请求参数") |
| | | public class CommunityRepublishEventDTO { |
| | | |
| | | @Max(9223372036854775807L) |
| | | @ApiModelProperty(value = "事件id", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "事件id不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户姓名", hidden = true, example = "张三") |
| | | private String userName; |
| | | } |
| | |
| | | @ApiModelProperty(value = "操作人所属社区", hidden = true, example = "学院社区") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "撤销类型 1 网格员 2 社区", hidden = true, example = "1") |
| | | private Integer revokeType; |
| | | |
| | | @ApiModelProperty(value = "撤销人/社区ID", hidden = true, example = "1") |
| | | private Long revokeId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "操作人所属社区", hidden = true, example = "学院社区") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "撤销类型 1 网格员 2 社区", hidden = true, example = "1") |
| | | private Integer revokeType; |
| | | |
| | | @ApiModelProperty(value = "撤销人/社区ID", hidden = true, example = "1") |
| | | private Long revokeId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "修改人", hidden = false, example = "1") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "撤销类型 1 网格员 2 社区", hidden = true, example = "1") |
| | | private Integer revokeType; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "修改时间-开始时间", hidden = false, example = "2021-05-01 18:05:50") |
| | |
| | | return dbColumn; |
| | | } |
| | | |
| | | @ApiModelProperty(value = "撤销类型 1 网格员 2 社区", hidden = true, example = "1") |
| | | private Integer revokeType; |
| | | |
| | | @ApiModelProperty(value = "搜索关键词", hidden = false, example = "1", required = true) |
| | | private String keyWord; |
| | |
| | | return dbColumn; |
| | | } |
| | | |
| | | @ApiModelProperty(value = "撤销类型 1 网格员 2 社区", hidden = true, example = "1") |
| | | private Integer revokeType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1") |
| | |
| | | @ApiModelProperty(value = "修改人", hidden = false, example = "1") |
| | | private Long updateBy; |
| | | |
| | | @ApiModelProperty(value = "撤销类型 1 网格员 2 社区", hidden = true, example = "1") |
| | | private Integer revokeType; |
| | | |
| | | @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 = "社区ID", hidden = true, example = "1") |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.dtos.grid; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.enums.EventType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private String eventClazz; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "危险级别:1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @ApiModelProperty(value = "危险级别:0 (无) 1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "危险级别不能为空") |
| | | private Integer dangerLevel; |
| | | |
| | |
| | | private String eventClazz; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "危险级别:1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @ApiModelProperty(value = "危险级别:0 (无) 1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "危险级别不能为空") |
| | | private Integer dangerLevel; |
| | | |
| | |
| | | } |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pageEventDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pageEventDTO.setRevokeType(1); |
| | | return gridService.query(pageEventDTO); |
| | | } |
| | | |
| | |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | eventRevokeDTO.setRevokeType(1); |
| | | eventRevokeDTO.setRevokeId(loginUserInfoVO.getUserId()); |
| | | return gridService.emergenciesRevoke(eventRevokeDTO); |
| | | } |
| | | |
| | |
| | | ClazzUtils.setIfStringIsEmpty(pagePublicityEventDTO); |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pagePublicityEventDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pagePublicityEventDTO.setRevokeType(1); |
| | | return gridService.queryPublicity(pagePublicityEventDTO); |
| | | } |
| | | /** |
| | |
| | | package com.panzhihua.grid_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.grid.CommonEventBatchRepublishDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventBatchRevokeDTO; |
| | | import com.panzhihua.common.model.dtos.grid.EventDeleteDTO; |
| | | import com.panzhihua.common.model.dtos.grid.PageEventGridNearbyDTO; |
| | | 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.EventGridDataAreaVO; |
| | |
| | | eventBatchRevokeDTO.setUserName(loginUserInfoVO.getName()); |
| | | eventBatchRevokeDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | eventBatchRevokeDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | eventBatchRevokeDTO.setRevokeType(2); |
| | | eventBatchRevokeDTO.setRevokeId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.batchMarkEventInvalid(eventBatchRevokeDTO); |
| | | } |
| | | |
| | |
| | | return gridService.getNearByGrid(pageEventGridNearbyDTO); |
| | | } |
| | | |
| | | /** |
| | | * 重新发布事件 |
| | | * @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.republishEvent(commonEventRepublishDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pageEventManageDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pageEventManageDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | pageEventManageDTO.setRevokeType(1); |
| | | return gridService.queryEventToManage(pageEventManageDTO); |
| | | } |
| | | |
| | |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getNickName()); |
| | | eventRevokeDTO.setCommunityName(loginUserInfoVO.getCommunityName()); |
| | | eventRevokeDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | eventRevokeDTO.setRevokeId(loginUserInfoVO.getCommunityId()); |
| | | eventRevokeDTO.setRevokeType(2); |
| | | return gridService.markEventInvalid(eventRevokeDTO); |
| | | } |
| | | /** |
| | |
| | | LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); |
| | | pagePublicityEventDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | pagePublicityEventDTO.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | pagePublicityEventDTO.setRevokeType(2); |
| | | return gridService.queryPublicityCommunity(pagePublicityEventDTO); |
| | | } |
| | | |
| | |
| | | LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); |
| | | eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); |
| | | eventRevokeDTO.setUserName(loginUserInfoVO.getName()); |
| | | eventRevokeDTO.setRevokeType(2); |
| | | eventRevokeDTO.setRevokeId(loginUserInfoVO.getCommunityId()); |
| | | return gridService.emergenciesRevoke(eventRevokeDTO); |
| | | } |
| | | |
| | |
| | | |
| | | import java.util.*; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | */ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 撤销人/社区ID 列: revoke_id |
| | | */ |
| | | private Long revokeID; |
| | | /** |
| | | * 修改时间 列: revoke_type |
| | | */ |
| | | private Integer revokeType; |
| | | } |
| | |
| | | eventDO.setUpdateBy(eventRevokeDTO.getUserId()); |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setRevokeType(eventRevokeDTO.getRevokeType()); |
| | | eventDO.setRevokeID(eventRevokeDTO.getRevokeId()); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if (updated == 1) { |
| | | addTransferRecord(eventDO.getId(), eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(), |
| | |
| | | if (eventDO.getEventCategory() == 1) { |
| | | boolean canRevoke = eventDO.getEventDealStatus() == 3; //上报状态 |
| | | if (!canRevoke) { |
| | | return R.fail("当前事件不是上报状态,不允许标为无效"); |
| | | return R.fail("当前事件不是上报状态,不允许撤销"); |
| | | } |
| | | } else if (eventDO.getEventCategory() == 2) { |
| | | boolean canRevoke = eventDO.getEventDealStatus() == 8; //发布状态 |
| | | if (!canRevoke) { |
| | | return R.fail("当前事件不是发布状态,不允许标为无效"); |
| | | return R.fail("当前事件不是发布状态,不允许撤销"); |
| | | } |
| | | } else { |
| | | return R.fail(""); |
| | |
| | | eventDO.setEventStatus(4);//4、撤销 |
| | | eventDO.setProcessType(1);//网格员处理 |
| | | eventDO.setCommunityProcess(0);//非 社区处理 |
| | | eventDO.setRevokeID(eventRevokeDTO.getRevokeId()); |
| | | eventDO.setRevokeType(eventRevokeDTO.getRevokeType()); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if (updated == 1) { |
| | | addTransferRecord(eventDO.getId(), eventRevokeDTO.getUserId(), eventRevokeDTO.getUserName(), 1, "标为无效", eventRevokeDTO.getCommunityId(), eventRevokeDTO.getCommunityName(), 4); |
| | |
| | | throw new ServiceException("id为" + id + "的事件不存在"); |
| | | } |
| | | if (eventDO.getEventCategory() != null) { |
| | | if (eventDO.getEventCategory() == 1) { |
| | | if (eventDO.getEventCategory() == 1) {// |
| | | boolean canRevoke = eventDO.getEventDealStatus() == 3; //上报状态 |
| | | if (!canRevoke) { |
| | | throw new ServiceException("当前事件不是上报状态,不允许标为无效"); |
| | | throw new ServiceException("当前事件不是上报状态,不允许撤销"); |
| | | } |
| | | } else if (eventDO.getEventCategory() == 2) { |
| | | } else if (eventDO.getEventCategory() == 2) {//宣传教育 |
| | | boolean canRevoke = eventDO.getEventDealStatus() == 8; //发布状态 |
| | | if (!canRevoke) { |
| | | throw new ServiceException("当前事件不是发布状态,不允许标为无效"); |
| | | throw new ServiceException("当前事件不是发布状态,不允许撤销"); |
| | | } |
| | | } else { |
| | | throw new ServiceException("事件分类错误"); |
| | |
| | | <if test="pageEventDTO.eventDealStatus!=null"> |
| | | AND event_deal_status = #{pageEventDTO.eventDealStatus} |
| | | </if> |
| | | <if test="pageEventDTO.revokeType!=null"> |
| | | AND ( revoke_type = #{pageEventDTO.revokeType} OR revoke_type is null ) |
| | | </if> |
| | | <if test="pageEventDTO.id!=null"> |
| | | AND id = #{pageEventDTO.id} |
| | | </if> |
| | |
| | | e.event_status != 3 AND e.event_category = 2 |
| | | <if test="pagePublicityEventDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pagePublicityEventDTO.communityId} |
| | | </if> |
| | | |
| | | <if test="pagePublicityEventDTO.revokeType!=null"> |
| | | AND ( e.revoke_type = #{pagePublicityEventDTO.revokeType} OR e.revoke_type is null ) |
| | | </if> |
| | | <if test="pagePublicityEventDTO.eventDealStatus!=null"> |
| | | AND e.event_deal_status = #{pagePublicityEventDTO.eventDealStatus} |
| | |
| | | e.order_sn like concat('%', #{pageEventManageDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pageEventManageDTO.revokeType!=null"> |
| | | AND ( e.revoke_type = #{pageEventManageDTO.revokeType} OR e.revoke_type is null ) |
| | | </if> |
| | | <if test="pageEventManageDTO.eventDealStatus!=null"> |
| | | AND e.event_deal_status = #{pageEventManageDTO.eventDealStatus} |
| | | </if> |
| | |
| | | e.order_sn like concat('%', #{pagePublicityEventCommunityDTO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.revokeType!=null"> |
| | | AND ( e.revoke_type = #{pagePublicityEventCommunityDTO.revokeType} OR e.revoke_type is null ) |
| | | </if> |
| | | <if test="pagePublicityEventCommunityDTO.communityId!=null"> |
| | | AND egd.grid_community_id = #{pagePublicityEventCommunityDTO.communityId} |
| | | </if> |