#
Junjie
10 小时以前 26784989e73fc36c6315e54939d1b13a50eb5020
src/main/java/com/zy/core/utils/StationOperateProcessUtils.java
@@ -382,10 +382,11 @@
                boolean complete = false;
                Integer targetDeviceNo = null;
                StationThread stationThread = null;
                BasStation basStation = basStationService.getOne(new QueryWrapper<BasStation>().eq("station_id", targetStaNo));
                if (basStation != null) {
                    targetDeviceNo = basStation.getDeviceNo();
                    StationThread stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basStation.getDeviceNo());
                    stationThread = (StationThread) SlaveConnection.get(SlaveType.Devp, basStation.getDeviceNo());
                    if (stationThread != null) {
                        Map<Integer, StationProtocol> statusMap = stationThread.getStatusMap();
                        StationProtocol stationProtocol = statusMap.get(basStation.getStationId());
@@ -396,6 +397,7 @@
                }
                if (complete) {
                    attemptClearTaskPath(stationThread, wrkNo);
                    completeStationRunTask(wrkMast, targetDeviceNo);
                }
            }
@@ -404,6 +406,20 @@
        }
    }
    private void attemptClearTaskPath(StationThread stationThread, Integer taskNo) {
        if (stationThread == null || taskNo == null || taskNo <= 0) {
            return;
        }
        try {
            boolean cleared = stationThread.clearPath(taskNo);
            if (cleared) {
                News.info("输送站点任务运行完成后清理残留路径,工作号={}", taskNo);
            }
        } catch (Exception e) {
            News.error("输送站点任务运行完成后清理残留路径异常,工作号={}", taskNo, e);
        }
    }
    private void completeStationRunTask(WrkMast wrkMast, Integer deviceNo) {
        if (wrkMast == null || wrkMast.getWrkNo() == null) {
            return;