From 0d04bc5d8080b82338302fba0a59fccff2eaedfc Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 06 七月 2025 11:28:29 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/service/impl/ShuttleServiceImpl.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/service/impl/ShuttleServiceImpl.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/service/impl/ShuttleServiceImpl.java
index 50bac03..d15f663 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/service/impl/ShuttleServiceImpl.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/service/impl/ShuttleServiceImpl.java
@@ -26,7 +26,6 @@
 
     @Override
     public List<ShuttleProtocol> getShuttleStatusList(Long hostId) {
-
         ArrayList<ShuttleProtocol> data = new ArrayList<>();
         List<Device> list = deviceService.list(new LambdaQueryWrapper<Device>()
                 .eq(Device::getHostId, hostId)
@@ -34,6 +33,9 @@
                 .eq(Device::getDeviceType, DeviceCtgType.SHUTTLE.val()));
         for (Device device : list) {
             ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, device.getId().intValue());
+            if (shuttleThread == null) {
+                continue;
+            }
             ShuttleProtocol status = shuttleThread.getStatus();
             data.add(status);
         }

--
Gitblit v1.9.1