| | |
| | | |
| | | if (eventMapper.insert(eventDO) == 1) { |
| | | // 如果是特殊人群,则新增特殊人群与事件关系 |
| | | if (commonEventAddDTO.getEventType().equals(6)) { |
| | | if (commonEventAddDTO.getEventType().equals(6) |
| | | && commonEventAddDTO.getPopulationIds() != null |
| | | && commonEventAddDTO.getPopulationIds().size() > 0) { |
| | | if (commonEventAddDTO.getPopulationIds() != null && commonEventAddDTO.getPopulationIds().size() > 0) { |
| | | List<EventSpecialCrowdRecordDO> crowdRecordList = new ArrayList<>(); |
| | | commonEventAddDTO.getPopulationIds().forEach(populationId -> { |
| | |
| | | |
| | | if (commonEventEditDTO.getId() == null) { |
| | | // 检查特殊人群上报时参数 |
| | | if (commonEventEditDTO.getEventType().equals(6)) { |
| | | if (commonEventEditDTO.getPopulationIds().isEmpty()) { |
| | | return R.fail("上报人员为空"); |
| | | } |
| | | } |
| | | // if (commonEventEditDTO.getEventType().equals(6)) { |
| | | // if (commonEventEditDTO.getPopulationIds().isEmpty()) { |
| | | // return R.fail("上报人员为空"); |
| | | // } |
| | | // } |
| | | |
| | | EventDO eventDO = new EventDO(); |
| | | BeanUtils.copyProperties(commonEventEditDTO, eventDO); |
| | |
| | | if (eventMapper.insert(eventDO) > 0) { |
| | | |
| | | // 如果是特殊人群,则新增特殊人群与事件关系 |
| | | if (commonEventEditDTO.getEventType().equals(6)) { |
| | | if (commonEventEditDTO.getEventType().equals(6) && commonEventEditDTO.getPopulationIds() != null |
| | | && commonEventEditDTO.getPopulationIds().size() > 0) { |
| | | List<EventSpecialCrowdRecordDO> crowdRecordList = new ArrayList<>(); |
| | | commonEventEditDTO.getPopulationIds().forEach(populationId -> { |
| | | EventSpecialCrowdRecordDO specialCrowdRecordDO = new EventSpecialCrowdRecordDO(); |
| | |
| | | } else { |
| | | return R.fail("事件所属错误"); |
| | | } |
| | | eventDO.setInvalid(false); |
| | | // eventDO.setInvalid(false); |
| | | // 标为无效后, 交给网格员处理 |
| | | eventDO.setUpdateBy(eventRevokeDTO.getUserId()); |
| | | eventDO.setEventStatus(4);// 4、撤销 |
| | | eventDO.setEventDealStatus(6);// 4、撤销 |
| | | eventDO.setProcessType(1);// 网格员处理 |
| | | eventDO.setCommunityProcess(0);// 非 社区处理 |
| | | eventDO.setRevokeId(eventRevokeDTO.getRevokeId()); |
| | |
| | | if (eventDO == null) { |
| | | return R.fail("事件不存在"); |
| | | } |
| | | boolean canRepulish = eventDO.getEventDealStatus() == 7 | eventDO.getEventDealStatus() == 5; // 已失效状态 |
| | | boolean canRepulish = eventDO.getEventDealStatus() == 7 || eventDO.getEventDealStatus() == 5 || eventDO.getEventDealStatus() == 6; // 已失效状态 |
| | | if (!canRepulish) { |
| | | return R.fail("当前事件不是已失效状态/草稿状态,不能重新发布"); |
| | | return R.fail("当前事件不是已失效状态/草稿状态/撤销状态,不能重新发布"); |
| | | } |
| | | eventDO.setInvalid(true); |
| | | eventDO.setEventStatus(2); |
| | | eventDO.setEventDealStatus(1); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |
| | | if (updated == 1) { |
| | | addTransferRecord(eventDO.getId(), commonEventRepublishDTO.getUserId(), |
| | |
| | | if (eventDO == null) { |
| | | throw new ServiceException("id为" + id + "的事件不存在"); |
| | | } |
| | | if (eventDO.getEventStatus() != null |
| | | && (eventDO.getEventStatus().intValue() == 1 || eventDO.getEventStatus().intValue() == 4)) {// 草稿 |
| | | // 或者 |
| | | // 已撤销 |
| | | // 的事件可以删除 |
| | | if (eventDO.getEventStatus() != null) { |
| | | eventDO.setEventStatus(3);// 逻辑删除 |
| | | eventDO.setUpdateBy(userId); |
| | | int updated = this.getBaseMapper().updateById(eventDO); |