| | |
| | | if(updated!=1){ |
| | | throw new ServiceException("更新突发事件状态更新失败"); |
| | | } |
| | | addTransferRecord(eventDO.getId(), commonEventReportDTO.getToId(), comActVO.getName(), 2, commonEventReportDTO.getProcessResult(),2); |
| | | addTransferRecord(eventDO.getId(), commonEventReportDTO.getToId(), comActVO.getName(), 2, commonEventReportDTO.getProcessResult(), |
| | | commonEventReportDTO.getUserId(), commonEventReportDTO.getUserName(), 2); |
| | | return R.ok(); |
| | | |
| | | } |
| | |
| | | processType = 1; |
| | | } |
| | | EventTransferRecordDO transferRecordDO = |
| | | addTransferRecord(eventDO.getId(), commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(),1, "网格员自处理完成", processType); |
| | | addTransferRecord(eventDO.getId(), commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(),1, "网格员自处理完成", commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(), processType); |
| | | if(transferRecordDO!=null && transferRecordDO.getId()!=null){ |
| | | //添加音频 |
| | | if(StringUtils.isNotEmpty(commonEventDealDTO.getAudio())){ |
| | |
| | | @Override |
| | | public R republishEvent(CommonEventRepublishDTO commonEventRepublishDTO) { |
| | | EventDO eventDO = this.getBaseMapper().selectById(commonEventRepublishDTO.getId()); |
| | | boolean canRepublishByUser = eventDO.getEventStatus()==4; |
| | | boolean canRepublishByUser = eventDO.getEventStatus()==4||eventDO.getEventStatus()==1; |
| | | if(!canRepublishByUser){ |
| | | return R.fail("当前不是撤销状态"); |
| | | return R.fail("当前不是撤销/草稿状态"); |
| | | } |
| | | |
| | | eventDO.setEventStatus(2);//2 发布 |
| | |
| | | if(updated!=1){ |
| | | return R.fail("更新事件状态失败"); |
| | | } |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 1, "重新发布已撤销事件", 8); |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 1, |
| | | "重新发布已撤销事件", commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 8); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | eventDO.setInvalid(true); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if(updated == 1){ |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 1,"重新发布事件成功", 9 ); |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 1,"重新发布事件成功", |
| | | commonEventRepublishDTO.getUserId(), commonEventRepublishDTO.getUserName(), 9 ); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | 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);//交给网格员处理-验证 |
| | |
| | | return R.fail("更新事件状态失败"); |
| | | } |
| | | EventTransferRecordDO transferRecordDO = |
| | | addTransferRecord(eventDO.getId(), commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(),1, "社区处理完成", 3); |
| | | addTransferRecord(eventDO.getId(), commonEventDealDTO.getUserId(), commonEventDealDTO.getUserName(),1, |
| | | "社区处理完成", commonEventDealDTO.getCommunityId(), commonEventDealDTO.getCommunityName(), 3); |
| | | if(transferRecordDO!=null && transferRecordDO.getId()!=null){ |
| | | //添加音频 |
| | | if(StringUtils.isNotEmpty(commonEventDealDTO.getAudio())){ |
| | |
| | | * @param msg 流转消息 |
| | | * @return |
| | | */ |
| | | private EventTransferRecordDO addTransferRecord(Long eventId, Long toId, String toName, Integer toType, String msg,Integer processType){ |
| | | /* 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); |
| | | } |
| | | }*/ |
| | | |
| | | /** |
| | | * 根据子状态 查询用户事件处理状态 |