From 78067a1c03707766f3d6561c22e165af68ad36b9 Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期四, 18 十二月 2025 14:38:35 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/controller/OutController.java |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/OutController.java b/src/main/java/com/zy/asrs/controller/OutController.java
index eea546a..3067a4b 100644
--- a/src/main/java/com/zy/asrs/controller/OutController.java
+++ b/src/main/java/com/zy/asrs/controller/OutController.java
@@ -5,6 +5,7 @@
 import com.core.common.BaseRes;
 import com.core.common.Cools;
 import com.core.common.R;
+import com.core.exception.CoolException;
 import com.zy.asrs.entity.BasDevp;
 import com.zy.asrs.entity.LocDetl;
 import com.zy.asrs.entity.LocMast;
@@ -12,11 +13,13 @@
 import com.zy.asrs.service.*;
 import com.zy.asrs.utils.Utils;
 import com.zy.common.model.LocDto;
+import com.zy.common.model.OutLocDto;
 import com.zy.common.model.TaskDto;
 import com.zy.common.properties.SlaveProperties;
 import com.zy.common.web.BaseController;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -80,10 +83,14 @@
                 }
 
                 //鑾峰彇閫氶亾缁�
-                List<Integer> locRowGroupAsc = Utils.getLocRowGroupAsc(slaveProperties, Utils.getRow(locNo));
+                List<Integer> locRowGroupAsc = Utils.getLocGroupAsc(slaveProperties, locNo);
                 for (Integer row : locRowGroupAsc) {
                     String shallow = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                     LocMast shallowLoc = locMastService.selectById(shallow);
+                    if (shallowLoc == null) {
+                        continue;
+                    }
+
                     if (shallowLoc.getLocSts().equals("F")) {
                         LocDetl locDetl1 = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", shallowLoc.getLocNo()));
                         if (locDetl1 == null) {
@@ -101,7 +108,8 @@
                             LocDto locDto = new LocDto(locDetl1.getLocNo(), locDetl1.getMatnr(), locDetl1.getMaktx(), locDetl1.getBatch(), orderDetl.getOrderNo(),
                                     issued >= locDetl1.getAnfme() ? locDetl1.getAnfme() : issued);
                             int ioType = (issued >= locDetl1.getAnfme() && locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("loc_no", locDto.getLocNo())) == 1) ? 101 : 103;
-                            List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl1.getLocNo(), ioType);
+//                            List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl1.getLocNo(), ioType);
+                            List<Integer> staNos = Utils.getOutStaNoList();
                             locDto.setStaNos(staNos);
                             locDtos.add(locDto);
                             exist.add(locDetl1.getLocNo());
@@ -154,11 +162,7 @@
                 taskDtos.add(taskDto);
             }
         }
-        // -----------------------------------------------------------------------------------------------
-        for (TaskDto taskDto : taskDtos) {
-            BasDevp staNo = basDevpService.checkSiteStatus(taskDto.getStaNo());
-            workService.stockOut(staNo, taskDto, getUserId());
-        }
+        workService.stockOut(taskDtos, getUserId());
         return R.ok();
     }
 

--
Gitblit v1.9.1