1
zhang
1 天以前 3fa7cdec6ce44f07a0dc7e1910511ead606990f3
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -1502,11 +1502,11 @@
//                    }
//                }
                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
                for (Long taskId : taskIds) {
                    Task task = taskService.getById(taskId);
                    report(task, agv_11_up.getQrCode(), TaskReportStsType.END);
                }
//                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
//                for (Long taskId : taskIds) {
//                    Task task = taskService.getById(taskId);
//                    report(task, agv_11_up.getQrCode(), TaskReportStsType.END);
//                }
            }
            // 出库取货
@@ -1540,31 +1540,31 @@
//                        }
//                    }
//                }
                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
                for (Long taskId : taskIds) {
                    Task task = taskService.getById(taskId);
                    report(task, agv_11_up.getQrCode(), TaskReportStsType.OTBIN);
                }
//                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
//                for (Long taskId : taskIds) {
//                    Task task = taskService.getById(taskId);
//                    report(task, agv_11_up.getQrCode(), TaskReportStsType.OTBIN);
//                }
            }
            //从输送线取货完成
            if (agv_11_up.getCompleteType().equals(AgvCompleteType.TAKE_FROM_STA_COMPLETE)) {
                WebsocketServiceImpl.taskShelfBarcode = agv_11_up.getLocCode();
                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
                for (Long taskId : taskIds) {
                    Task task = taskService.getById(taskId);
                    report(task, agv_11_up.getQrCode(), TaskReportStsType.OTBIN);
                }
            }
//            if (agv_11_up.getCompleteType().equals(AgvCompleteType.TAKE_FROM_STA_COMPLETE)) {
//                WebsocketServiceImpl.taskShelfBarcode = agv_11_up.getLocCode();
//                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
//                for (Long taskId : taskIds) {
//                    Task task = taskService.getById(taskId);
//                    report(task, agv_11_up.getQrCode(), TaskReportStsType.OTBIN);
//                }
//            }
            //往输送线放货完成
            if (agv_11_up.getCompleteType().equals(AgvCompleteType.RELEASE_FROM_STA_COMPLETE)) {
                WebsocketServiceImpl.taskShelfBarcode = agv_11_up.getLocCode();
                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
                for (Long taskId : taskIds) {
                    Task task = taskService.getById(taskId);
                    report(task, agv_11_up.getQrCode(), TaskReportStsType.END);
                }
            }
//            if (agv_11_up.getCompleteType().equals(AgvCompleteType.RELEASE_FROM_STA_COMPLETE)) {
//                WebsocketServiceImpl.taskShelfBarcode = agv_11_up.getLocCode();
//                List<Long> taskIds = actionService.selectTaskIdsByGroupId(serialNo);
//                for (Long taskId : taskIds) {
//                    Task task = taskService.getById(taskId);
//                    report(task, agv_11_up.getQrCode(), TaskReportStsType.END);
//                }
//            }
            // 路径完成 || 充电完成
            if (agv_11_up.getCompleteType().equals(AgvCompleteType.ENTIRE_PATH_COMPLETE)
@@ -1604,6 +1604,8 @@
        // task
        for (Segment segment : segmentList) {
            boolean taskComplete = false;
            boolean otbin = false;
            Task task = taskService.getById(segment.getTaskId());
            assert null != task;
@@ -1614,6 +1616,7 @@
            switch (Objects.requireNonNull(posType)) {
                case ORI_STA:
                case ORI_LOC:
                    otbin = true;
                    break;
                case DEST_STA:
                case DEST_LOC:
@@ -1634,19 +1637,24 @@
                    break;
            }
            if (otbin) {
                locService.taskCallBackOtbin(task);
                report(task, null, TaskReportStsType.OTBIN);
            }
            if (taskComplete) {
                locService.taskCallBack(task);
                locService.taskCallBackEnd(task);
                task.setTaskSts(TaskStsType.COMPLETE.val());
                task.setEndTime(now);
                task.setUpdateTime(now);
                if (!taskService.updateById(task)) {
                    log.error("Task [{}] 更新失败 !!!", task.getSeqNum());
                } else {
                }
                    report(task, null, TaskReportStsType.END);
                    if (task.getSeqNum() != null && task.getSeqNum().contains("SSX-CK")) {
                        report(task, "1001", TaskReportStsType.COMPLETED);
                    }
                }
            }
        }