From 8257d89c461f6553d66fad1e5e3df3d172a00924 Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期六, 29 十一月 2025 18:10:18 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/OpenController.java | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/OpenController.java b/src/main/java/com/zy/asrs/controller/OpenController.java
index bcba859..e5847dc 100644
--- a/src/main/java/com/zy/asrs/controller/OpenController.java
+++ b/src/main/java/com/zy/asrs/controller/OpenController.java
@@ -11,6 +11,7 @@
import com.zy.common.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@@ -447,12 +448,9 @@
}
param.setTaskNo(Integer.parseInt(taskCode.substring(0, taskCode.indexOf("-"))));
-
-// if (Cools.isEmpty(param.getTimestamp())) {
-// return R.error("RGV浠诲姟鍙穂timestamp]涓嶈兘涓虹┖");
-// }
boolean taskAgvReport = openService.TaskAgvReport(param);
if (taskAgvReport){
+ agvBindAndBin(String.valueOf(param.getTaskNo()));
return R.ok();
}
return R.error("浠诲姟鍙蜂笉瀛樺湪");
@@ -541,9 +539,30 @@
}
}
if (bindCtnrAndBin) {
+ asyncProcessAfterValidation(param);
return new R(0,"鎴愬姛");
}
return R.error("搴撲綅涓嶅瓨鍦ㄦ垨鏃犳槑缁�");
}
+ @Async
+ public void agvBindAndBin(String taskNo) {
+ try {
+ Thread.sleep(500);
+ openService.agvBindAndBin(taskNo);
+ } catch (Exception e) {
+ log.error("寮傛澶勭悊AGV鍏夋爡鍚庣画閫昏緫澶辫触", e);
+ }
+ }
+
+ @Async
+ public void asyncProcessAfterValidation(AgvGoTheArnParam param) {
+ try {
+ Thread.sleep(500);
+ openService.agvApplicationPassedTheGrating(param);
+ } catch (Exception e) {
+ log.error("寮傛澶勭悊AGV鍏夋爡鍚庣画閫昏緫澶辫触", e);
+ }
+ }
+
}
--
Gitblit v1.9.1