From db3cf3601913415454b77e4e1fd8603172248d13 Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期一, 14 十月 2024 08:37:48 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/task/GhlnWcsScheduler.java | 5 +++--
src/main/java/com/zy/service/impl/MainServiceImpl.java | 2 +-
src/main/java/com/zy/enums/AgvApi.java | 42 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/common/task/GhlnWcsScheduler.java b/src/main/java/com/zy/common/task/GhlnWcsScheduler.java
index 049777e..2fb4b71 100644
--- a/src/main/java/com/zy/common/task/GhlnWcsScheduler.java
+++ b/src/main/java/com/zy/common/task/GhlnWcsScheduler.java
@@ -12,6 +12,7 @@
import com.zy.entity.BasDevp;
import com.zy.entity.WrkDetl;
import com.zy.entity.WrkMast;
+import com.zy.enums.AgvApi;
import com.zy.service.BasDevpService;
import com.zy.service.WrkDetlService;
import com.zy.service.WrkMastService;
@@ -75,8 +76,8 @@
String response = "";
try {
response = new HttpHandler.Builder()
- .setUri("http://192.168.204.44:8010")
- .setPath("/api/TaskCreat/AllowEntry")
+ .setUri(AgvApi.OPEN_COMPLETE_PUSH.getURI())
+ .setPath(AgvApi.OPEN_COMPLETE_PUSH.getPath())
.setHeaders(headers)
.setJson(body)
.build()
diff --git a/src/main/java/com/zy/enums/AgvApi.java b/src/main/java/com/zy/enums/AgvApi.java
new file mode 100644
index 0000000..b4b15b9
--- /dev/null
+++ b/src/main/java/com/zy/enums/AgvApi.java
@@ -0,0 +1,42 @@
+package com.zy.enums;
+
+/**
+ * agv鐩稿叧瀵规帴鎺ュ彛
+ */
+public enum AgvApi {
+
+ // wcs寮�闂ㄥ畬鎴愶紝閫氱煡agv鍙栬揣鏀捐揣
+ OPEN_COMPLETE_PUSH("http://192.168.204.44:8010","/api/TaskCreat/AllowEntry");
+
+ private String URI;
+ private String path;
+
+ public String getURI() {
+ return URI;
+ }
+
+ public void setURI(String URI) {
+ this.URI = URI;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ @Override
+ public String toString() {
+ return "AgvApi{" +
+ "URI='" + URI + '\'' +
+ ", path='" + path + '\'' +
+ '}';
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ AgvApi(String URI, String path) {
+ this.URI = URI;
+ this.path = path;
+ }
+}
diff --git a/src/main/java/com/zy/service/impl/MainServiceImpl.java b/src/main/java/com/zy/service/impl/MainServiceImpl.java
index 0027a2a..2d8be40 100644
--- a/src/main/java/com/zy/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/service/impl/MainServiceImpl.java
@@ -227,8 +227,8 @@
.setJson(JSON.toJSONString(param))
.build()
.doPost();
+ log.info("鍏ュ簱璇锋眰wms鍘熷杩斿洖锛�" + response);
JSONObject jsonObject = JSON.parseObject(response);
- log.info("缁勬墭wms杩斿洖锛�" + jsonObject);
if (jsonObject.getInteger("code").equals(200)) {
StartupDto dto = jsonObject.getObject("data", StartupDto.class);
barcodeThread.setBarcode("");
--
Gitblit v1.9.1