From 3ca9c0654a81f0670e8005e405615da9f84edcc4 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期一, 24 六月 2024 10:36:47 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/Utils.java | 40 ++--------------------------------------
1 files changed, 2 insertions(+), 38 deletions(-)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/Utils.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/Utils.java
index 6c3b59b..7da2faa 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/Utils.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/Utils.java
@@ -186,9 +186,9 @@
/**
* 妫�娴嬬┛姊溅鏄惁鏈変换鍔$粦瀹�
*/
- public static boolean checkShuttleHasBinding(Device device) {
+ public static boolean checkShuttleHasBinding(Device device, String taskNo) {
TaskService taskService = SpringUtils.getBean(TaskService.class);
- List<Task> tasks = taskService.selectWorkingByShuttle(Integer.parseInt(device.getDeviceNo()));
+ List<Task> tasks = taskService.selectWorkingByShuttle(Integer.parseInt(device.getDeviceNo()), taskNo);
if (tasks.isEmpty()) {
return false;//鏃犱换鍔$粦瀹�
}
@@ -205,42 +205,6 @@
return false;//鏃犱换鍔$粦瀹�
}
return true;//鏈変换鍔$粦瀹�
- }
-
- /**
- * 鑾峰彇璺濈鐩爣搴撲綅鏈�杩戠殑鎻愬崌鏈�
- */
- public static Device getRecentTransferLift(String locNo, Integer shuttleNo) {
- BasLiftService basLiftService = SpringUtils.getBean(BasLiftService.class);
- DeviceService deviceService = SpringUtils.getBean(DeviceService.class);
- if (basLiftService == null) {
- return null;
- }
-
- Integer distance = Integer.MAX_VALUE;
- Long liftDeviceId = null;
- for (BasLift basLift : basLiftService.list(new LambdaQueryWrapper<BasLift>()
- .eq(BasLift::getStatus, 1)
- .eq(BasLift::getTransfer, 1))) {
- int lev = Utils.getLev(locNo);
- String liftLocNo = Utils.getLocNo(basLift.getRow(), basLift.getBay(), lev);
- List<NavigateNode> nodeList = NavigateUtils.calc(locNo, liftLocNo, NavigationMapType.NONE.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(locNo)));
- Integer originPathAllDistance = NavigateUtils.getOriginPathAllDistance(nodeList);//鎬昏窛绂�
- if (originPathAllDistance < distance) {
- distance = originPathAllDistance;
- liftDeviceId = basLift.getDeviceId();
- }
- }
-
- if (liftDeviceId == null) {
- return null;
- }
-
- Device device = deviceService.getById(liftDeviceId);
- if (device == null) {
- return null;
- }
- return device;
}
}
--
Gitblit v1.9.1