From 5c0622d48c825ca4b75f63dda78d51ed75bc7a2f Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 12 四月 2024 11:04:19 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/utils/Utils.java | 13 ++----------- 1 files changed, 2 insertions(+), 11 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 1a3efdc..d308757 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 @@ -6,15 +6,14 @@ import com.zy.asrs.framework.exception.CoolException; import com.zy.asrs.wcs.core.entity.Task; import com.zy.asrs.wcs.core.entity.TaskSerialNo; +import com.zy.asrs.wcs.core.model.enums.DeviceCtgType; import com.zy.asrs.wcs.core.service.TaskSerialNoService; import com.zy.asrs.wcs.core.service.TaskService; import com.zy.asrs.wcs.rcs.cache.SlaveConnection; import com.zy.asrs.wcs.rcs.entity.Device; -import com.zy.asrs.wcs.rcs.entity.DeviceType; 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.service.DeviceTypeService; import com.zy.asrs.wcs.rcs.thread.ShuttleThread; import java.util.ArrayList; @@ -110,18 +109,10 @@ } public static boolean hasShuttleInLoc(String locNo, Long deviceId) { - DeviceTypeService deviceTypeService = SpringUtils.getBean(DeviceTypeService.class); DeviceService deviceService = SpringUtils.getBean(DeviceService.class); - DeviceType deviceType = deviceTypeService.getOne(new LambdaQueryWrapper<DeviceType>() - .eq(DeviceType::getFlag, String.valueOf(SlaveType.Shuttle)) - .eq(DeviceType::getStatus, 1)); - if (deviceType == null) { - return false; - } - List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>() - .eq(Device::getDeviceType, deviceType.getId()) + .eq(Device::getDeviceType, DeviceCtgType.SHUTTLE.val()) .eq(Device::getStatus, 1)); for (Device device : list) { -- Gitblit v1.9.1