| | |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | |
| | | Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getTaskCode, params.getSeqNum())); |
| | | if (Objects.isNull(task)) { |
| | | throw new CoolException("任务不存在!!"); |
| | | } |
| | | |
| | | if (params.getEventType().equals("END")) { |
| | | if (task.getTaskType().equals(TaskType.TASK_TYPE_IN.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_PICK_IN.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_IN.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_IN.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_IN.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_LOC_MOVE.type)) { |
| | | if (!taskService.update(new LambdaUpdateWrapper<Task>().eq(Task::getTaskCode, task.getTaskCode()) |
| | | .set(Task::getTaskStatus, TaskStsType.COMPLETE_IN.id))) { |
| | | throw new CoolException("任务状态修改失败!!"); |
| | | } |
| | | } else if (task.getTaskType().equals(TaskType.TASK_TYPE_OUT.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_PICK_AGAIN_OUT.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_MERGE_OUT.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_CHECK_OUT.type) |
| | | || task.getTaskType().equals(TaskType.TASK_TYPE_EMPITY_OUT.type)) { |
| | | if (!taskService.update(new LambdaUpdateWrapper<Task>().eq(Task::getTaskCode, task.getTaskCode()) |
| | | .set(Task::getTaskStatus, TaskStsType.COMPLETE_OUT.id))) { |
| | | throw new CoolException("任务状态修改失败!!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | log.info(JSONObject.toJSONString(params)); |
| | | return R.ok(JSONObject.toJSONString(params)); |
| | | } |