From 7aad95c1e8c51da713e630aa1bed0bbfa1078484 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 10 七月 2025 16:51:26 +0800
Subject: [PATCH] no message

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java
index 1d48eb5..7d7c5e2 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/apis/wcs/controller/OutStockController.java
@@ -11,10 +11,13 @@
 import com.zy.asrs.wms.apis.wcs.services.WcsApiService;
 import com.zy.asrs.wms.asrs.entity.CacheSite;
 import com.zy.asrs.wms.asrs.entity.Task;
+import com.zy.asrs.wms.asrs.entity.WaveSeed;
 import com.zy.asrs.wms.asrs.entity.param.BindPlatformParam;
 import com.zy.asrs.wms.asrs.service.CacheSiteService;
 import com.zy.asrs.wms.asrs.service.PlatformService;
 import com.zy.asrs.wms.asrs.service.TaskService;
+import com.zy.asrs.wms.asrs.service.WaveSeedService;
+import com.zy.asrs.wms.asrs.service.impl.WaveSeedServiceImpl;
 import com.zy.asrs.wms.system.controller.BaseController;
 import io.netty.util.internal.StringUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -23,8 +26,10 @@
 
 import javax.annotation.Resource;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.stream.Collectors;
 
 @Slf4j
 @RestController
@@ -42,6 +47,9 @@
 
     @Resource
     private TaskService taskService;
+
+    @Autowired
+    private WaveSeedService waveSeedService;
 
 
     /**
@@ -108,14 +116,24 @@
         if (Objects.isNull(cacheSite)) {
             throw new CoolException("褰撳墠绔欑偣涓嶅瓨鍦紒锛�");
         }
+
+        List<WaveSeed> waveSeed = waveSeedService.list(new LambdaQueryWrapper<WaveSeed>().eq(WaveSeed::getSiteNo, request.get("tagCode").toString()));
+        if (Objects.isNull(waveSeed)) {
+            throw new CoolException("鎾澧欏湴鏍囨湭缁戝畾锛侊紒");
+        }
+
+        List<Long> taskIds = waveSeed.stream().map(WaveSeed::getTaskId).collect(Collectors.toList());
+
         // 鏍规嵁鎾绔欑偣淇℃伅鏉$爜锛屾煡浠诲姟
-        Task task = taskService.getOne(new LambdaQueryWrapper<Task>().eq(Task::getBarcode, cacheSite.getBarcode()));
-        if (Objects.isNull(task)) {
+        List<Task> tasks = taskService.list(new LambdaQueryWrapper<Task>().in(Task::getId, taskIds));
+        if (tasks.isEmpty()) {
             throw new CoolException("褰撳墠绔欑偣浠诲姟涓嶅瓨鍦紒锛�");
         }
 
+        List<String> taskNos = tasks.stream().map(Task::getTaskNo).collect(Collectors.toList());
+
         Map<String, Object> param = new HashMap<>();
-        param.put("taskNo", task.getTaskNo());
+        param.put("taskNo", taskNos);
         param.put("siteNo", cacheSite.getSiteNo());
         param.put("orderNo",cacheSite.getOrderNo());
 

--
Gitblit v1.9.1