自动化立体仓库 - WCS系统
#
Junjie
2025-04-12 3be5c88fbc583d17a932ca937d8e293d28b5c974
src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java
@@ -68,7 +68,7 @@
    /**
     * 调度车辆
     */
    public boolean dispatchShuttle(Integer wrkNo, String locNo) {
    public boolean searchDispatchShuttle(Integer wrkNo, String sourceLocNo, String locNo, String flag) {
        ArrayList<ShuttleThread> sameLev = new ArrayList<>();//相同楼层的穿梭车
        ArrayList<ShuttleThread> diffLev = new ArrayList<>();//不同楼层的穿梭车
@@ -128,6 +128,11 @@
                Integer shuttleNo = shuttleProtocol.getShuttleNo();
                //当前穿梭车库位号
                String currentLocNo = shuttleProtocol.getCurrentLocNo();
                if (currentLocNo.equals(locNo)) {
                    sameShuttles.put(-1, shuttleThread);
                    continue;
                }
                //当前穿梭车线程到目标地点距离
                List<NavigateNode> currentShuttlePath = navigateUtils.calc(currentLocNo, locNo, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(currentLocNo)), null);//搜索空闲穿梭车,使用正常通道地图
                if (currentShuttlePath == null) {
@@ -143,7 +148,7 @@
                ShuttleProtocol shuttleProtocol = shuttleThread.getStatus();
                Integer shuttleNo = shuttleProtocol.getShuttleNo();
                //尝试调度小车
                boolean result = shuttleMoveGenerate(wrkNo, locNo, shuttleNo);
                boolean result = shuttleMoveGenerate(wrkNo, sourceLocNo, locNo, shuttleNo, flag, false);
                if (result) {
                    return true;//调度成功
                }
@@ -190,7 +195,7 @@
                    ShuttleProtocol shuttleProtocol = shuttleThread.getStatus();
                    Integer shuttleNo = shuttleProtocol.getShuttleNo();
                    //尝试调度小车
                    boolean result = shuttleMoveGenerate(wrkNo, locNo, shuttleNo);
                    boolean result = shuttleMoveGenerate(wrkNo, sourceLocNo, locNo, shuttleNo, flag, false);
                    if (result) {
                        return true;//调度成功
                    }
@@ -279,6 +284,11 @@
        wrkMast.setAppeTime(now);
        wrkMast.setModiTime(now);
        wrkMast.setMainWrkNo(mainWrkMast.getWrkNo());
        if ("TRANSPORT_LIFT".equals(flag)) {
            wrkMast.setMainWrkNo(wrkNo);
        }
        boolean res = wrkMastService.insert(wrkMast);
        if (!res) {
            News.error("小车迁移 --- 保存工作档失败! 穿梭车号:" + shuttleNo);