springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/CommonEventDirectReportDTO.java
New file @@ -0,0 +1,132 @@ 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 CommonEventDirectReportDTO { @Max(9223372036854775807L) @ApiModelProperty(value = "事件ID", hidden = false, example = "1",required = true) private Long eventId; @Length(max=255) @ApiModelProperty(value = "办理意见", hidden = false, example = "",required = true) @NotNull(message = "办理意见不能为空") private String processResult; //事件下游机构或网格员 @Max(9223372036854775807L) @ApiModelProperty(value = "社区ID", hidden = false, example = "1",required = true) @NotNull(message = "社区ID不能为空") private Long toId; @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; @Max(127) @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件", hidden = false, example = "1", required = true) @NotNull(message = "事件分类不能为空") private Integer eventType; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @ApiModelProperty(value = "发生时间", hidden = false, example = "2021-05-01 18:05:50", required = true) @NotNull(message = "发生时间不能为空") private Date happenTime; @Length(max=255) @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)", hidden = false, example = "41.40338,2.17403", required = true) @NotNull(message = "发生的精度纬度信息不能为空") private String happentLatLng; @Length(max=255) @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=500) @ApiModelProperty(value = "事件描述", hidden = false, example = "", required = true) @NotNull(message = "事件描述不能为空") private String eventDes; @Length(max=255) @ApiModelProperty(value = "事件类型,逗号隔开", hidden = false, example = "邻里纠纷,土地承包租赁", required = true) @NotNull(message = "事件类型不能为空") private String eventClazz; @Max(127) @ApiModelProperty(value = "危险级别:1(特别重大)、2(重大)、3(较大)、4(一般)", hidden = false, example = "1", required = true) @NotNull(message = "危险级别不能为空") private Integer dangerLevel; @Max(9999999999L) @ApiModelProperty(value = "死亡人数", hidden = false, example = "1", required = true) @NotNull(message = "死亡人数不能为空") private Integer deathsNumber; @Max(9999999999L) @ApiModelProperty(value = "受伤人数", hidden = false, example = "1", required = true) @NotNull(message = "受伤人数不能为空") private Integer injuriesNumber; @ApiModelProperty(value = "是否紧急", hidden = false, example = "true", required = true) @NotNull(message = "是否紧急不能为空") private Boolean urgent; @ApiModelProperty(value = "是否重大", hidden = false, example = "true", required = true) @NotNull(message = "是否重大不能为空") private Boolean major; @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 = "18888888888") @Length(max = 11) private String phone; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/grid/PageEventGridNearbyDTO.java
@@ -43,7 +43,7 @@ } @Length(max=255) @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)", hidden = false, example = "", required = true) @ApiModelProperty(value = "发生的精度纬度信息(逗号隔开)", hidden = false, example = "30.65769,104.060748", required = true) @NotNull private String happentLatLng; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventDetailsVO.java
@@ -1,6 +1,9 @@ package com.panzhihua.common.model.vos.grid; import java.util.*; 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; @@ -19,6 +22,7 @@ public class EventDetailsVO { @ApiModelProperty(value = "id") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty(value = "事件处理状态") @@ -40,12 +44,14 @@ private Long gridMemberCommunity; @ApiModelProperty(value = "网格ID") @JsonSerialize(using = ToStringSerializer.class) private Long gridId; @ApiModelProperty(value = "网格名称") private String gridName; @ApiModelProperty(value = "网格员") @JsonSerialize(using = ToStringSerializer.class) private Long gridMemberId; @ApiModelProperty(value = "网格员名字") @@ -108,6 +114,7 @@ private Long processUserId; @ApiModelProperty(value = "处理流程记录ID") @JsonSerialize(using = ToStringSerializer.class) private Long processRecordId; @ApiModelProperty(value = "处理人名称") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridDataAreaVO.java
@@ -1,6 +1,8 @@ package com.panzhihua.common.model.vos.grid; import com.fasterxml.jackson.annotation.JsonFormat; 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; @@ -19,6 +21,7 @@ public class EventGridDataAreaVO { @ApiModelProperty(value = "主键ID") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty(value = "类型,1、区县网格2街道网格3社区网格") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventResourceVO.java
@@ -1,6 +1,9 @@ package com.panzhihua.common.model.vos.grid; import java.util.*; 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; @@ -22,6 +25,7 @@ private Integer classification; @ApiModelProperty(value = "事件或者走访任务关联ID") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty(value = "事件上传的资源类型(1是图片2是音频3是是视频)") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventTransferRecordVO.java
@@ -1,6 +1,9 @@ package com.panzhihua.common.model.vos.grid; import java.util.*; 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; @@ -19,9 +22,11 @@ public class EventTransferRecordVO { @ApiModelProperty(value = "id") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty(value = "事件ID") @JsonSerialize(using = ToStringSerializer.class) private Long eventId; @ApiModelProperty(value = "来源类型(1、网格员2、社区3、是街道)") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/grid/EventVO.java
@@ -1,6 +1,9 @@ package com.panzhihua.common.model.vos.grid; import java.util.*; 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; @@ -19,6 +22,7 @@ public class EventVO { @ApiModelProperty(value = "id") @JsonSerialize(using = ToStringSerializer.class) private Long id; @ApiModelProperty(value = "事件处理状态") @@ -37,9 +41,11 @@ private Long gridMemberCommunity; @ApiModelProperty(value = "网格ID") @JsonSerialize(using = ToStringSerializer.class) private Long gridId; @ApiModelProperty(value = "网格员") @JsonSerialize(using = ToStringSerializer.class) private Long gridMemberId; @ApiModelProperty(value = "网格员名字") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/grid/GridService.java
@@ -879,6 +879,14 @@ R gridReportPosition(@RequestBody GridMemberPositionDTO memberPositionDTO); /** * 直接上报社区 * @param commonEventDirectReportDTO * @return */ @PostMapping("/event/reportDirect") R reportDirect(@RequestBody CommonEventDirectReportDTO commonEventDirectReportDTO); /** * 定时任务扫描网格员工作状态 * @return 定时任务扫描结果 */ springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/CommonEventApi.java
@@ -149,6 +149,22 @@ } /** * 直接上报社区 * @param commonEventDirectReportDTO 上报社区传递对象 * @return 上报结果 */ @PostMapping("/reportDirect") @ApiOperation(value = "直接上报社区", response = R.class) R reportDirect(@Validated @RequestBody CommonEventDirectReportDTO commonEventDirectReportDTO){ LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); ClazzUtils.setIfStringIsEmpty(commonEventDirectReportDTO); commonEventDirectReportDTO.setUserId(loginUserInfoVO.getUserId()); commonEventDirectReportDTO.setUserName(loginUserInfoVO.getNickName()); commonEventDirectReportDTO.setCommunityId(loginUserInfoVO.getCommunityId()); return gridService.reportDirect(commonEventDirectReportDTO); } } springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java
@@ -6,6 +6,7 @@ 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.EventGridDataAreaVO; import com.panzhihua.common.utlis.ClazzUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -111,4 +112,16 @@ R actList(){ return gridService.actList(); } /** * 查询距离当前事件最近的网格数据 * @param pageEventGridNearbyDTO * @return */ @PostMapping("/grid/nearby") @ApiOperation(value = "查询经纬度所在的网格", response = EventGridDataAreaVO.class) R getNearByGrid(@Validated @RequestBody PageEventGridNearbyDTO pageEventGridNearbyDTO){ return gridService.getNearByGrid(pageEventGridNearbyDTO); } } springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/PublicityEventApi.java
@@ -7,6 +7,7 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngPopulationVO; import com.panzhihua.common.model.vos.grid.EventDetailsVO; import com.panzhihua.common.model.vos.grid.EventGridDataAreaVO; import com.panzhihua.common.model.vos.grid.EventVO; import com.panzhihua.common.service.grid.GridService; import com.panzhihua.common.utlis.ClazzUtils; @@ -81,4 +82,15 @@ return gridService.savePublicityDraft(publicityEventEditDTO); } /** * 查询距离当前事件最近的网格数据 * @param pageEventGridNearbyDTO * @return */ @PostMapping("/grid/nearby") @ApiOperation(value = "查询经纬度所在的网格", response = EventGridDataAreaVO.class) R getNearByGrid(@Validated @RequestBody PageEventGridNearbyDTO pageEventGridNearbyDTO){ return gridService.getNearByGrid(pageEventGridNearbyDTO); } } springcloud_k8s_panzhihuazhihuishequ/grid_backstage/src/main/java/com/panzhihua/grid_backstage/api/EventApi.java
@@ -7,6 +7,7 @@ import com.panzhihua.common.model.dtos.grid.PageEventGridNearbyDTO; import com.panzhihua.common.model.vos.LoginUserInfoVO; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.grid.EventGridDataAreaVO; import com.panzhihua.common.service.grid.GridService; import com.panzhihua.common.utlis.ClazzUtils; import io.swagger.annotations.Api; @@ -91,7 +92,7 @@ * @return */ @PostMapping("/grid/nearby") @ApiOperation(value = "查询距离当前事件最近的网格数据", response = R.class) @ApiOperation(value = "查询经纬度所在的网格", response = EventGridDataAreaVO.class) R getNearByGrid(@Validated @RequestBody PageEventGridNearbyDTO pageEventGridNearbyDTO){ return gridService.getNearByGrid(pageEventGridNearbyDTO); } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/EventApi.java
@@ -293,4 +293,13 @@ return eventService.getNearByGrid(pageEventGridNearbyDTO); } /** * 直接上报社区 * @param commonEventDirectReportDTO * @return */ @PostMapping("/event/reportDirect") R reportDirect(@RequestBody CommonEventDirectReportDTO commonEventDirectReportDTO){ return eventService.reportDirect(commonEventDirectReportDTO); } } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventService.java
@@ -233,4 +233,11 @@ * @return 网格事件统计数据 */ R getGridEventDetailStatisticsByApp(GridEventStatisticsDTO statisticsDTO); /** * 直接上报社区 * @param commonEventDirectReportDTO * @return */ R reportDirect(CommonEventDirectReportDTO commonEventDirectReportDTO); } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -1836,4 +1836,188 @@ statisticsDetailVO.setNoSum(noSum); return R.ok(statisticsDetailVO); } @Override public R reportDirect(CommonEventDirectReportDTO commonEventDirectReportDTO) { if(commonEventDirectReportDTO.getEventId()!=null){ //编辑原来的 EventDO eventDO = eventMapper.selectById(commonEventDirectReportDTO.getEventId()); if (eventDO.getEventStatus() != null && eventDO.getEventStatus() != 1 && eventDO.getEventDealStatus() != 6) { return R.fail("保存草稿失败,事件不是草稿/已撤销状态"); } BeanUtils.copyProperties(commonEventDirectReportDTO, eventDO); eventDO.setGridMemberId(commonEventDirectReportDTO.getUserId()); eventDO.setEventCategory(1l);//办件事件 eventDO.setEventStatus(1);//事件状态 2发布 eventDO.setProcessType(1);//网格员处理 eventDO.setCommunityProcess(0);//非 社区处理 eventDO.setUpdateBy(commonEventDirectReportDTO.getUserId()); eventDO.setEventDealStatus(5); if (eventMapper.updateById(eventDO) > 0) { int deleted = eventResourceService.getBaseMapper() .delete(new LambdaQueryWrapper<EventResourceDO>() .eq(EventResourceDO::getClassification, 1) .eq(EventResourceDO::getRefId, eventDO.getId())); //添加音频 if (StringUtils.isNotEmpty(commonEventDirectReportDTO.getAudio())) { EventResourceDO eventResourceDO = new EventResourceDO(); eventResourceDO.setClassification(1); eventResourceDO.setType(2); eventResourceDO.setRefId(eventDO.getId()); eventResourceDO.setUrl(commonEventDirectReportDTO.getAudio()); eventResourceDO.setCreateBy(commonEventDirectReportDTO.getUserId()); eventResourceDO.setResourceTime(commonEventDirectReportDTO.getAudioTime()); int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); if (audioAdd != 1) { throw new ServiceException("添加音频失败"); } } //添加视频 if (StringUtils.isNotEmpty(commonEventDirectReportDTO.getVideo())) { EventResourceDO eventResourceDO = new EventResourceDO(); eventResourceDO.setClassification(1); eventResourceDO.setType(3); eventResourceDO.setRefId(eventDO.getId()); eventResourceDO.setUrl(commonEventDirectReportDTO.getVideo()); eventResourceDO.setCreateBy(commonEventDirectReportDTO.getUserId()); eventResourceDO.setResourceTime(commonEventDirectReportDTO.getVideoTime()); int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); if (videoAdd != 1) { throw new ServiceException("添加视频失败"); } } //添加图片 if (StringUtils.isNotEmpty(commonEventDirectReportDTO.getPics())) { String[] pica = commonEventDirectReportDTO.getPics().split(","); for (int i = 0; i < pica.length; i++) { EventResourceDO eventResourceDO = new EventResourceDO(); eventResourceDO.setClassification(1); eventResourceDO.setType(1); eventResourceDO.setRefId(eventDO.getId()); eventResourceDO.setUrl(pica[i]); eventResourceDO.setCreateBy(commonEventDirectReportDTO.getUserId()); int picAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); if (picAdd != 1) { throw new ServiceException("添加图片失败"); } } } R r = communityService.detailCommunity(commonEventDirectReportDTO.getToId()); if (!R.isOk(r)) { return R.fail("社区不存在"); } ComActVO comActVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ComActVO.class); if (comActVO == null) { return R.fail("社区不存在"); } EventDO eventDOInDB = this.getBaseMapper().selectById(commonEventDirectReportDTO.getEventId()); eventDOInDB.setCommunityProcess(1); //社区处理 eventDOInDB.setProcessType(2); //当前处理对象: 社区处理 eventDOInDB.setCommunityProcess(1); eventDOInDB.setEventProcessStatus(1); //待处理 eventDOInDB.setUpdateBy(commonEventDirectReportDTO.getUserId()); eventDOInDB.setSubmitDate(new Date()); int updated = this.getBaseMapper().updateById(eventDO); if (updated != 1) { throw new ServiceException("事件状态更新失败"); } addTransferRecord(eventDO.getId(), commonEventDirectReportDTO.getToId(), comActVO.getName(), 2, commonEventDirectReportDTO.getProcessResult(), commonEventDirectReportDTO.getUserId(), commonEventDirectReportDTO.getUserName(), 2); return R.ok(); } }else{ EventDO eventDO = new EventDO(); BeanUtils.copyProperties(commonEventDirectReportDTO, eventDO); eventDO.setGridMemberId(commonEventDirectReportDTO.getUserId()); EventGridDataDO eventGridDataDO = eventGridDataMapper.selectById(commonEventDirectReportDTO.getGridId()); if (eventGridDataDO == null) { return R.fail("网格不存在"); } eventDO.setEventCategory(1l);//办件事件 eventDO.setEventStatus(2);//事件状态 2发布 eventDO.setProcessType(1);//网格员处理 eventDO.setCommunityProcess(0);//非 社区处理 eventDO.setEventProcessStatus(1); eventDO.setGridMemberName(commonEventDirectReportDTO.getUserName()); eventDO.setGridMemberTelephone(commonEventDirectReportDTO.getPhone()); eventDO.setCreateBy(commonEventDirectReportDTO.getUserId()); eventDO.setSubmitDate(new Date()); eventDO.setOrderSn(getEventOrderSn(eventDO.getEventType())); if (eventMapper.insert(eventDO) == 1) { //添加音频 if (StringUtils.isNotEmpty(commonEventDirectReportDTO.getAudio())) { EventResourceDO eventResourceDO = new EventResourceDO(); eventResourceDO.setClassification(1); eventResourceDO.setType(2); eventResourceDO.setUrl(commonEventDirectReportDTO.getAudio()); eventResourceDO.setRefId(eventDO.getId()); eventResourceDO.setCreateBy(commonEventDirectReportDTO.getUserId()); eventResourceDO.setResourceTime(commonEventDirectReportDTO.getAudioTime()); int audioAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); if (audioAdd != 1) { throw new ServiceException("添加音频失败"); } } //添加视频 if (StringUtils.isNotEmpty(commonEventDirectReportDTO.getVideo())) { EventResourceDO eventResourceDO = new EventResourceDO(); eventResourceDO.setClassification(1); eventResourceDO.setType(3); eventResourceDO.setUrl(commonEventDirectReportDTO.getVideo()); eventResourceDO.setRefId(eventDO.getId()); eventResourceDO.setCreateBy(commonEventDirectReportDTO.getUserId()); eventResourceDO.setResourceTime(commonEventDirectReportDTO.getVideoTime()); int videoAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); if (videoAdd != 1) { throw new ServiceException("添加视频失败"); } } //添加图片 if (StringUtils.isNotEmpty(commonEventDirectReportDTO.getPics())) { String[] pica = commonEventDirectReportDTO.getPics().split(","); for (int i = 0; i < pica.length; i++) { EventResourceDO eventResourceDO = new EventResourceDO(); eventResourceDO.setClassification(1); eventResourceDO.setType(1); eventResourceDO.setUrl(pica[i]); eventResourceDO.setRefId(eventDO.getId()); eventResourceDO.setCreateBy(commonEventDirectReportDTO.getUserId()); int picAdd = eventResourceService.getBaseMapper().insert(eventResourceDO); if (picAdd != 1) { throw new ServiceException("添加图片失败"); } } } addReleaseRecord(eventDO.getId(), commonEventDirectReportDTO.getUserId(), commonEventDirectReportDTO.getUserName()); R r = communityService.detailCommunity(commonEventDirectReportDTO.getToId()); if (!R.isOk(r)) { return R.fail("社区不存在"); } ComActVO comActVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), ComActVO.class); if (comActVO == null) { return R.fail("社区不存在"); } EventDO eventDOInDB = this.getBaseMapper().selectById(eventDO.getId()); eventDOInDB.setCommunityProcess(1); //社区处理 eventDOInDB.setProcessType(2); //当前处理对象: 社区处理 eventDOInDB.setCommunityProcess(1); eventDOInDB.setEventProcessStatus(1); //待处理 eventDOInDB.setUpdateBy(commonEventDirectReportDTO.getUserId()); eventDOInDB.setSubmitDate(new Date()); int updated = this.getBaseMapper().updateById(eventDO); if (updated != 1) { throw new ServiceException("更新突发事件状态更新失败"); } addTransferRecord(eventDO.getId(), commonEventDirectReportDTO.getToId(), comActVO.getName(), 2, commonEventDirectReportDTO.getProcessResult(), commonEventDirectReportDTO.getUserId(), commonEventDirectReportDTO.getUserName(), 2); return R.ok(eventDO.getId()); } } return R.fail(); } } springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridDataMapper.xml
@@ -158,7 +158,7 @@ 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 (event_process_status = 1 OR event_process_status=3) AND process_type = 1 AND grid_id = #{eventGridTodoDataDTO.gridId} AND e.event_type = 1 GROUP BY e.event_type @@ -169,7 +169,7 @@ 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 (event_process_status = 1 OR event_process_status=3) AND process_type = 1 AND grid_id = #{eventGridTodoDataDTO.gridId} AND e.event_type =2 GROUP BY e.event_type @@ -180,7 +180,7 @@ 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 (event_process_status = 1 OR event_process_status=3) AND process_type = 1 AND grid_id = #{eventGridTodoDataDTO.gridId} AND e.event_type =3 GROUP BY e.event_type @@ -191,7 +191,7 @@ 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 (event_process_status = 1 OR event_process_status=3) AND process_type = 1 AND grid_id = #{eventGridTodoDataDTO.gridId} AND e.event_type =4 GROUP BY e.event_type @@ -202,7 +202,7 @@ 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 (event_process_status = 1 OR event_process_status=3) AND process_type = 1 AND grid_id = #{eventGridTodoDataDTO.gridId} AND e.event_type =5 GROUP BY e.event_type