From 50f2d8d80c3a73bb17c1d559e1c08d2e315d0add Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期日, 02 六月 2024 01:14:00 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
index e5afbb1..c12b79e 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -394,10 +394,14 @@
             }
         } else {
             if (agvLocMast.getFloor() != floor) {
-                if (agvLocMast.getFloor() == 1) {
-                    throw new CoolException("褰撳墠搴撲綅璇烽�夋嫨璋冩嫧鍗曡皟鎷紒");
-                } else {
-                    ioType = 12;
+                if (floor==1 && agvLocMast.getFloor()!=1){
+                    ioType = 121;
+                }else {
+                    if (agvLocMast.getFloor() == 1) {
+                        throw new CoolException("褰撳墠搴撲綅璇烽�夋嫨璋冩嫧鍗曡皟鎷紒");
+                    } else {
+                        ioType = 12;
+                    }
                 }
             } else {
                 ioType = 11;
@@ -417,7 +421,11 @@
         //鐢熸垚宸ヤ綔妗�
         AgvWrkMast mast = new AgvWrkMast();
         //宸ヤ綔鐘舵��
-        mast.setWrkSts(201L);
+        if (ioType==121) {
+            mast.setWrkSts(11L);
+        }else {
+            mast.setWrkSts(201L);
+        }
         //鍏ュ嚭搴撶被鍨�
         mast.setIoType(ioType);
         mast.setIoTime(now);
@@ -458,6 +466,7 @@
                 }
             });
         }
+
         // 濡傛灉褰撳墠浠诲姟鏄澹充簩涓夋ゼ鍥為��涓�妤肩殑 鍥炴粴璋冩嫧鍗�
         if (ioType == 12 && locMast.getFloor() == 1) {
             List<AgvLocDetl> agvLocDetls = agvLocDetlService.selectList(new EntityWrapper<AgvLocDetl>().eq("loc_no", agvLocMast.getLocNo()));
@@ -488,6 +497,9 @@
         if (Cools.isEmpty(agvWrkMast)) {
             throw new CoolException("宸ヤ綔妗d腑娌℃湁姝ょ珯鐐逛换鍔�");
         }
+        if (!agvWrkMast.getWrkSts().equals(207L)) {
+            throw new CoolException("宸ヤ綔鐘舵�佷笉绗﹀悎绂诲満鏉′欢");
+        }
 
         //鐢熸垚AGV宸ヤ綔鍘嗗彶妗� + 鐢熸垚AGV宸ヤ綔鏄庣粏鍘嗗彶妗�
         agvWrkMastLogService.save(agvWrkMast);

--
Gitblit v1.9.1