| | |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | } |
| | | if (!task.getTaskStatus().equals(TaskStsType.WAVE_SEED.id)) { |
| | | return R.error("任务状态不是等待确认"); |
| | | // 允许WAVE_SEED(199,等待确认/盘点中)和AWAIT(196,等待确认)两种状态 |
| | | if (!task.getTaskStatus().equals(TaskStsType.WAVE_SEED.id) |
| | | && !task.getTaskStatus().equals(TaskStsType.AWAIT.id)) { |
| | | return R.error("任务状态不是等待确认,当前状态:" + task.getTaskStatus()); |
| | | } |
| | | List<TaskItem> taskItems = taskItemService.list(new LambdaQueryWrapper<TaskItem>().eq(TaskItem::getTaskId, task.getId())); |
| | | if (Cools.isEmpty(taskItems)) { |
| | |
| | | if (null == task) { |
| | | throw new CoolException("未找到容器号对应任务"); |
| | | } |
| | | if (!task.getTaskStatus().equals(TaskStsType.WAVE_SEED.id)) { |
| | | return R.error("任务状态不是等待确认"); |
| | | // 允许WAVE_SEED(199,等待确认/盘点中)和AWAIT(196,等待确认)两种状态 |
| | | if (!task.getTaskStatus().equals(TaskStsType.WAVE_SEED.id) |
| | | && !task.getTaskStatus().equals(TaskStsType.AWAIT.id)) { |
| | | return R.error("任务状态不是等待确认,当前状态:" + task.getTaskStatus()); |
| | | } |
| | | //任务号不能重复,生成新任务号下发至RCS |
| | | String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_TASK_CODE, null); |