skyouc
5 天以前 3cea95e98c16b2fe15dec2820c3e714b8ce6b926
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/WcsServiceImpl.java
@@ -455,7 +455,35 @@
        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));
    }
@@ -524,7 +552,7 @@
        }
    }
    private InTaskMsgDto getLocNoCrn(String orgLoc, DeviceBind deviceBind, Long area, Integer sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) {
    private InTaskMsgDto getLocNoCrn(String orgLoc, DeviceBind deviceBind, Long area, String sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) {
        if (Cools.isEmpty(matnr)) {  //物料号
            matnr = "";
        }
@@ -777,7 +805,7 @@
        return inTaskMsgDto;
    }
    private InTaskMsgDto getLocNoCtu(DeviceBind deviceBind, Long area, Integer sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) {
    private InTaskMsgDto getLocNoCtu(DeviceBind deviceBind, Long area, String sourceStaNo, String matnr, String batch, LocTypeDto locTypeDto, int times, Integer ioType) {
        if (Cools.isEmpty(matnr)) {  //物料号
            matnr = "";
        }