From b936dcdc85e19315937b07fc624ff63281ef771a Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 26 五月 2023 10:21:38 +0800
Subject: [PATCH] 高频入库,检测当前库位内侧其他库位是否为R或S(出入库预约状态)

---
 src/main/java/com/zy/common/service/CommonService.java |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 37b6c9c..4cc9e8a 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -134,9 +134,9 @@
                 start = 12;
                 end = 21;
 
-                //203绔欏垎閰�3锛�4鍫嗗灈鏈�
+                //203绔欏垎閰�2锛�3鍫嗗灈鏈�
+                crnNos.add(2);
                 crnNos.add(3);
-                crnNos.add(4);
 
                 //鍒嗛厤14锛�15锛�21鎺�
                 rows.add(14);
@@ -267,8 +267,18 @@
     private LocMast getLocNoStep3(LocTypeDto locTypeDto, List<Integer> crnNos) {
         LocMast locMast = null;
         //鎵炬渶澶栦晶绌哄簱浣�
-        LocMast locMast0 = locMastService.findOutMast(locTypeDto.getLocType1(), crnNos);
-        if (locMast0 != null) {
+        List<LocMast> locMasts = locMastService.findOutMast(locTypeDto.getLocType1(), crnNos);
+        for (LocMast locMast0 : locMasts) {
+            //妫�娴嬪綋鍓嶅簱浣嶅唴渚у叾浠栧簱浣嶆槸鍚︿负R鎴朣(鍑哄叆搴撻绾︾姸鎬�)
+            List<String> insideLoc = Utils.getGroupInsideLoc(locMast0.getLocNo());
+            List<LocMast> insideLocMast = locMastService.selectByLocNos(insideLoc);
+            for (LocMast mast : insideLocMast) {
+                if (mast.getLocSts().equals("R") || mast.getLocSts().equals("S")) {
+                    //R鎴朣(鍑哄叆搴撻绾︾姸鎬侊紝涓嶈兘閫夊畾杩欎釜澶栦晶搴撲綅)
+                    continue;
+                }
+            }
+
             // 娴呭簱浣嶇鍚堝昂瀵告娴�
             if (VersionUtils.locMoveCheckLocType(locMast0, locTypeDto)) {
                 // 娴呭簱浣嶅搴斿爢鍨涙満蹇呴』鍙敤涓旀棤寮傚父

--
Gitblit v1.9.1