From 3c3ec87a6ac907d375f2fb78f0882ab9f30a1533 Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期一, 21 四月 2025 14:26:00 +0800
Subject: [PATCH] 999

---
 src/main/java/com/zy/common/utils/ForkLiftUtils.java |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/common/utils/ForkLiftUtils.java b/src/main/java/com/zy/common/utils/ForkLiftUtils.java
index 6ec5ac6..045054a 100644
--- a/src/main/java/com/zy/common/utils/ForkLiftUtils.java
+++ b/src/main/java/com/zy/common/utils/ForkLiftUtils.java
@@ -149,4 +149,53 @@
         return false;
     }
 
+    //璇锋眰涓婄骇绯荤粺锛屾槸鍚﹀厑璁稿叆搴�
+    //鏌ヨ鏄惁鏈夊叆搴撴潈闄�
+    public static boolean queryInMission(Integer sourceStaNo, Integer liftNo, String superTaskNo) {
+        ConfigService configService = SpringUtils.getBean(ConfigService.class);
+        if (configService == null) {
+            return false;
+        }
+
+        Config queryInMissionPathEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "queryInMissionPathEnable"));
+        if (queryInMissionPathEnableConfig != null) {
+            String queryInMissionPathEnable = queryInMissionPathEnableConfig.getValue();
+            if (!queryInMissionPathEnable.equals("Y")) {
+                return true;//鍏抽棴鏌ヨ鍏ュ簱鏉冮檺鍔熻兘
+            }
+        }
+
+        Config superSystemUriConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "superSystemUri"));
+        if (superSystemUriConfig == null) {
+            return false;
+        }
+        String superSystemUri = superSystemUriConfig.getValue();
+
+        Config queryInMissionPathConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "queryInMissionPath"));
+        if (queryInMissionPathConfig == null) {
+            return false;
+        }
+        String missionPath = queryInMissionPathConfig.getValue();
+
+        try {
+            HashMap<String, Object> data = new HashMap<>();
+            data.put("staNo", sourceStaNo);
+            data.put("liftNo", liftNo);
+            data.put("superTaskNo", superTaskNo);
+
+            String response = new HttpHandler.Builder()
+                    .setUri(superSystemUri)
+                    .setPath(missionPath)
+                    .setJson(JSON.toJSONString(data))
+                    .build()
+                    .doPost();
+            if (response.equals("ok")) {
+                return true;//鏈夊叆搴撴潈闄�
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return false;
+    }
+
 }

--
Gitblit v1.9.1