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 |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/OpenController.java b/src/main/java/com/zy/asrs/controller/OpenController.java
index 7253df4..68f380c 100644
--- a/src/main/java/com/zy/asrs/controller/OpenController.java
+++ b/src/main/java/com/zy/asrs/controller/OpenController.java
@@ -439,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]涓嶈兘涓虹┖");
 //        }
@@ -480,9 +484,7 @@
                                         HttpServletRequest request) {
         auth(appkey, param, request);
 
-        if (Cools.isEmpty(param)) {
-            return R.parse(BaseRes.PARAM);
-        }
+
         List<AgvLocListDetlParam> list = openService.getAgvLocList(param);
         if (!list.isEmpty()) {
             return R.ok(list);

--
Gitblit v1.9.1