From 37733cc39c04b863a0b997c7fa3d9ac6a24e08be Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期三, 19 六月 2024 15:58:19 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java index 85004c5..3f2c412 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/ShuttleDispatcher.java @@ -20,6 +20,7 @@ import com.zy.asrs.wcs.rcs.model.enums.SlaveType; import com.zy.asrs.wcs.rcs.model.protocol.ShuttleProtocol; import com.zy.asrs.wcs.rcs.service.DeviceService; +import com.zy.asrs.wcs.rcs.thread.LiftThread; import com.zy.asrs.wcs.rcs.thread.ShuttleThread; import com.zy.asrs.wcs.system.entity.Dict; import com.zy.asrs.wcs.system.service.DictService; @@ -86,6 +87,21 @@ continue; } + BasShuttle basShuttle = basShuttleService.getOne(new LambdaQueryWrapper<BasShuttle>() + .eq(BasShuttle::getShuttleNo, device.getDeviceNo()) + .eq(BasShuttle::getHostId, device.getHostId())); + if (basShuttle == null) { + continue;//灏忚溅鍩虹鏁版嵁涓嶅瓨鍦� + } + + if (!Cools.isEmpty(basShuttle.getDisableLev())) { + List<Integer> disableLev = JSON.parseArray(basShuttle.getDisableLev(), Integer.class); + //妫�鏌ュ皬杞︽槸鍚︾鐢ㄨ妤煎眰 + if (disableLev.contains(Utils.getLev(locNo))) { + continue;//灏忚溅绂佺敤璇ユゼ灞傝烦杩囪杞� + } + } + //妫�娴嬫槸鍚﹀瓨鍦ㄥ厖鐢典换鍔� Task taskCharge = taskService.selectChargeWorking(Integer.valueOf(device.getDeviceNo())); if (taskCharge != null) { @@ -111,10 +127,12 @@ continue; } - Device recentTransferLift = Utils.getRecentTransferLift(locNo, Integer.parseInt(device.getDeviceNo())); - if (recentTransferLift == null) { + //鑾峰彇璺濈鐩爣浣嶇疆鏈�杩戠殑绌洪棽鍙崲灞傛彁鍗囨満 + LiftThread liftThread = liftDispatcher.searchIdleLift(locNo, task.getHostId(), true); + if (liftThread == null) { continue; } + Device recentTransferLift = liftThread.getDevice(); //鑾峰彇灏忚溅妤煎眰鎻愬崌鏈哄緟鏈轰綅 ShuttleStandby shuttleStandby = shuttleStandbyService.getOne(new LambdaQueryWrapper<ShuttleStandby>() -- Gitblit v1.9.1