| | |
| | | if (taskResult == null || (taskResult.getIsDeleted() != null && taskResult.getIsDeleted() != 0)) { |
| | | throw new RuntimeException("成果不存在"); |
| | | } |
| | | // 判断是否已分发, 不为空,并且不能是退回状态,则不能分发 |
| | | if (taskResult.getDistributeStatus() != null && !EventStatusEnum.RETURNED.getCode().equals(taskResult.getDistributeStatus())) { |
| | | // 判断是否已分发,只有"已退回(2)"和"待确认(0)"状态才允许分发,其他状态均不能分发 |
| | | if (!EventStatusEnum.RETURNED.getCode().equals(taskResult.getDistributeStatus()) |
| | | && !EventStatusEnum.PENDING_CONFIRM.getCode().equals(taskResult.getDistributeStatus())) { |
| | | throw new RuntimeException("成果已分发,无法再次分发"); |
| | | } |
| | | |
| | | // 查看事件直接是否分发过 |
| | | GdClueEventEntity clueEvent = getOne(Wrappers.<GdClueEventEntity>query().lambda() |
| | | .eq(GdClueEventEntity::getResultId, distributeParam.getResultId()) |