From afd2cfd8d63a243405d49d889e4fe1084e455b3f Mon Sep 17 00:00:00 2001
From: 1 <1@123>
Date: 星期一, 12 一月 2026 12:41:40 +0800
Subject: [PATCH] lsh#

---
 rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java
index 5f368f8..2fc6416 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/api/controller/pda/MobileController.java
@@ -20,6 +20,7 @@
 import io.swagger.annotations.ApiOperation;
 import org.apache.tika.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
@@ -171,7 +172,28 @@
         if (Objects.isNull(waitPakin.getItems()) || waitPakin.getItems().isEmpty()) {
             return R.error("璺熻釜鐮佷笉鑳戒负绌猴紒锛�");
         }
-        return R.ok(mobileService.mergeItems(waitPakin, userId));
+//        return R.ok(mobileService.mergeItems(waitPakin, userId));
+        try{
+            mobileService.mergeItems(waitPakin, userId);
+            if (waitPakin.getAgvSign()==1) {
+                asyncProcessAfterValidation(waitPakin,userId);
+            }
+        } catch (Exception e){
+            return R.error(e.getMessage());
+        }
+        return R.ok();
+    }
+
+    @Async
+    public void asyncProcessAfterValidation(WaitPakinParam waitPakinPda,Long userId) {
+        try {
+            Thread.sleep(500);
+            WaitPakin waitPakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, waitPakinPda.getBarcode()));
+            taskService.generateFlatWarehouseTasks(waitPakin, waitPakinPda.getStaNo(), userId);
+//            mobileService.mergeItemsWcs(waitPakin,userId);
+        } catch (Exception e) {
+//            log.error("寮傛澶勭悊AGV鍚庣画閫昏緫澶辫触", e);
+        }
     }
 
     @PreAuthorize("hasAuthority('manager:waitPakin:update')")

--
Gitblit v1.9.1