From 5b7ddbbd288579ccc54d1977803fcecab38e84aa Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期四, 27 十一月 2025 11:20:41 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/OpenController.java | 75 ++++++++++++++++++++++++++++++++++---
1 files changed, 69 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/OpenController.java b/src/main/java/com/zy/asrs/controller/OpenController.java
index 0a83790..68f380c 100644
--- a/src/main/java/com/zy/asrs/controller/OpenController.java
+++ b/src/main/java/com/zy/asrs/controller/OpenController.java
@@ -244,9 +244,12 @@
if (Cools.isEmpty(param.getUpc())) {
return R.error("UPC[upc]涓嶈兘涓虹┖");
}
- if (Cools.isEmpty(param.getSupplier())) {
- return R.error("璐ф簮[supplier]涓嶈兘涓虹┖");
+ if (Cools.isEmpty(param.getItem())) {
+ return R.error("UPC[item]涓嶈兘涓虹┖");
}
+// if (Cools.isEmpty(param.getSupplier())) {
+// return R.error("璐ф簮[supplier]涓嶈兘涓虹┖");
+// }
if (Cools.isEmpty(param.getStaNo())) {
return R.error("鍒嗘嫞鐐逛綅[staNo]涓嶈兘涓虹┖");
}
@@ -407,10 +410,10 @@
/**
- * 鍒嗘嫞绾夸笂鎶ユ帴鏀�
+ * AGV涓婃姤鎺ユ敹
*/
@PostMapping("/agv/task/v1/agvCallback")
- @AppAuth(memo = "AGV涓婃姤鎺ユ敹")
+// @AppAuth(memo = "AGV涓婃姤鎺ユ敹")
public synchronized R TaskAgvReport(@RequestHeader(required = false) String appkey,
@RequestBody TaskAgvReportParam param,
HttpServletRequest request) {
@@ -436,8 +439,12 @@
return R.error("WMS浠诲姟鍙穂reqCode]涓嶈兘涓虹┖");
}
String taskCode = param.getTaskCode();
- String[] split = taskCode.split("-");
- param.setTaskNo(Integer.parseInt(split[0]));
+ if (taskCode == null || !taskCode.matches("^\\d+-.*$")) {
+ throw new CoolException("taskCode 鏍煎紡閿欒锛岄渶涓� 鏁板瓧-xxx锛屼緥濡� 123-ABC");
+ }
+
+ param.setTaskNo(Integer.parseInt(taskCode.substring(0, taskCode.indexOf("-"))));
+
// if (Cools.isEmpty(param.getTimestamp())) {
// return R.error("RGV浠诲姟鍙穂timestamp]涓嶈兘涓虹┖");
// }
@@ -448,4 +455,60 @@
return R.error("浠诲姟鍙蜂笉瀛樺湪");
}
+ /**
+ * PDA鍒涘缓AGV浠诲姟
+ */
+ @PostMapping("/agv/task/v1/createTask")
+ @AppAuth(memo = "PDA鍒涘缓AGV浠诲姟")
+ public synchronized R TaskAgvCreate(@RequestHeader(required = false) String appkey,
+ @RequestBody TaskAgvCreateParam param,
+ HttpServletRequest request) {
+ auth(appkey, param, request);
+ if (Cools.isEmpty(param)) {
+ return R.parse(BaseRes.PARAM);
+ }
+ boolean taskAgvCreate = openService.taskAgvCreate(param);
+ if (taskAgvCreate){
+ return R.ok();
+ }
+ return R.error("浠诲姟鍙蜂笉瀛樺湪");
+ }
+
+ /**
+ * PDA鑾峰彇AGV搴撲綅
+ */
+ @PostMapping("/agv/loc/v1/getLocList")
+ @AppAuth(memo = "PDA妫�绱GV搴撲綅")
+ public synchronized R GetAgvLocList(@RequestHeader(required = false) String appkey,
+ @RequestBody AgvLocListParam param,
+ HttpServletRequest request) {
+ auth(appkey, param, request);
+
+
+ List<AgvLocListDetlParam> list = openService.getAgvLocList(param);
+ if (!list.isEmpty()) {
+ return R.ok(list);
+ }
+ return R.error("搴撲綅涓嶅瓨鍦ㄦ垨鏃犳槑缁�");
+ }
+
+ /**
+ * PDA缁戝畾瑙g粦
+ */
+ @PostMapping("/agv/bindCtnrAndBin/v1")
+ @AppAuth(memo = "PDA缁戝畾涓庤В缁�")
+ public synchronized R bindCtnrAndBin(@RequestHeader(required = false) String appkey,
+ @RequestBody bindCtnrAndBinParam param,
+ HttpServletRequest request) {
+ auth(appkey, param, request);
+ if (Cools.isEmpty(param)) {
+ return R.parse(BaseRes.PARAM);
+ }
+ boolean bindCtnrAndBin = openService.bindCtnrAndBin(param);
+ if (bindCtnrAndBin) {
+ return R.ok();
+ }
+ return R.error("搴撲綅涓嶅瓨鍦ㄦ垨鏃犳槑缁�");
+ }
+
}
--
Gitblit v1.9.1