From 7a2ce679e71f8ca970b48a65f08061412bbfe4a9 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期一, 25 三月 2024 16:49:54 +0800
Subject: [PATCH] #导入库位覆盖

---
 src/main/java/com/zy/common/web/WcsController.java |   40 +++++++++++++++++++++++-----------------
 1 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java
index 29030c7..fc8ca3a 100644
--- a/src/main/java/com/zy/common/web/WcsController.java
+++ b/src/main/java/com/zy/common/web/WcsController.java
@@ -21,7 +21,6 @@
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -591,8 +590,6 @@
         if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){
             throw new CoolException("褰撳墠绔欑偣涓嶅瓨鍦ㄦ垨鑰呯珯鐐逛笉涓虹┖");
         }
-
-        AgvWaitPakin agvWaitPakin = agvWaitPakinService.selectByContainerCode(containerCode);
         AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("barcode", containerCode));
 
         //鎷f枡銆佺洏鐐瑰畬鎴愪换鍔�
@@ -633,7 +630,8 @@
             currentContainerMap = new HashMap<>();
         }
 
-        String containerCode = param.getContainerCode();
+        String containerCode = param.getContainerCode().split(";")[0];
+
         if(Cools.isEmpty(containerCode)){
             throw new CoolException("鏂欑鐮佷负绌�");
         }
@@ -651,19 +649,22 @@
             //鏌ヨ鏃у鍣ㄧ殑宸ヤ綔妗�
             AgvWrkMast agvWrkMast = agvWrkMastService.selectByContainerCode(currentContainerCode);
             if(!Cools.isEmpty(agvWrkMast) && agvWrkMast.getIoType() == 101){
-                //鍙戦�佸鍣ㄧ珛鍦鸿姹傦紝瀹屾垚宸ヤ綔妗�
-                List<AgvWrkMast> agvWrkMastList = new ArrayList<>();
-                agvWrkMastList.add(agvWrkMast);
-                try {
-                    int code = agvWrkMastService.containerMoveOut(agvWrkMastList);
-                    if(code == 0){
-                        //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦�
-                        agvWrkMast.setWrkSts(206L);
-                        agvWrkMastService.updateById(agvWrkMast);
-                    }
-                } catch (IOException e) {
-                    log.error(e.getMessage());
-                }
+                //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦�
+                agvWrkMast.setWrkSts(206L);
+                agvWrkMastService.updateById(agvWrkMast);
+//                //鍙戦�佸鍣ㄧ珛鍦鸿姹傦紝瀹屾垚宸ヤ綔妗�
+//                List<AgvWrkMast> agvWrkMastList = new ArrayList<>();
+//                agvWrkMastList.add(agvWrkMast);
+//                try {
+//                    int code = agvWrkMastService.containerMoveOut(agvWrkMastList);
+//                    if(code == 0){
+//                        //灏嗗伐浣滃厷鐘舵�佹敼涓哄鍣ㄧ鍦�
+//                        agvWrkMast.setWrkSts(206L);
+//                        agvWrkMastService.updateById(agvWrkMast);
+//                    }
+//                } catch (IOException e) {
+//                    log.error(e.getMessage());
+//                }
             }
         }
 
@@ -717,6 +718,11 @@
             agvBasDevpDto.setAgvWaitPakins(agvWaitPakinList);
         }
 
+        System.out.println("currentContainerMap: " + currentContainerMap);
+
+
+        System.out.println("agvBasDevpDto: " + agvBasDevpDto);
+
         return R.ok(agvBasDevpDto);
     }
 

--
Gitblit v1.9.1