From 147fcf9b349bd7314f6488a2c197d91fe6eb86a8 Mon Sep 17 00:00:00 2001
From: 18516761980 <tqsxp@163.com>
Date: 星期五, 30 九月 2022 18:23:46 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 24 +++++++++++++-----------
src/main/java/com/zy/asrs/task/handler/StandingHandler.java | 5 +++--
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java | 4 ++--
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 6 +++---
src/main/resources/application.yml | 4 +++-
5 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index a2849a6..0dcd93f 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -86,11 +86,13 @@
@Value("${mes.url}")
private String mesUrl;
+ @Value("${ren.url}")
+ private String renUrl;
- @Value("${mes.startUpTestPACK}")
+ @Value("${ren.startUpTestPACK}")
private String startUpTestPACK;
- @Value("${mes.startUpTestPACK}")
+ @Value("${ren.startUpTestPACK}")
private String suspendTestPACK;
@Value("${mes.inPath}")
@@ -647,7 +649,7 @@
combParam.setLocNo(locMast.getLocNo());
combParam.setPackSts(1);
combParam.setRequestTime(DateUtils.convert(new Date()));
- postMesData(inpath,combParam);
+ postMesData(mesUrl,inpath,combParam);
if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", testMast.getLocNo()))){
throw new CoolException("鐢宠娴嬭瘯澶辫触");
@@ -669,7 +671,7 @@
combParam.setPackName(testMast.getUserId());
combParam.setLocNo(testMast.getBarcode());
combParam.setRequestTime(DateUtils.convert(new Date()));
- return postMesData(startUpTestPACK,combParam);
+ return postMesData(renUrl,startUpTestPACK,combParam);
}catch (Exception e) {
log.error("fail", e);
e.printStackTrace();
@@ -683,7 +685,7 @@
Review review=new Review();
review.setPause(true);
review.setRequestTime(DateUtils.convert(new Date()));
- return postMesData(suspendTestPACK,review);
+ return postMesData(renUrl,suspendTestPACK,review);
}catch (Exception e) {
log.error("fail", e);
e.printStackTrace();
@@ -692,7 +694,7 @@
}
}
- private ReturnT<String> postMesData(String mesPath,Object combParam){
+ private ReturnT<String> postMesData(String URL,String Path,Object combParam){
if(combParam != null){
String response = "";
boolean success = false;
@@ -701,8 +703,8 @@
// map.put("appkey","ea1f0459efc02a79f046f982767939ae");
response = new HttpHandler.Builder()
// .setHeaders(map)
- .setUri(mesUrl)
- .setPath(mesPath)
+ .setUri(URL)
+ .setPath(Path)
.setJson(JSON.toJSONString(combParam))
.build()
.doPost();
@@ -713,11 +715,11 @@
}else if (jsonObject.getDate("isComplete").equals(false)){
success = false;
}else {
- log.error("杩斿洖鍊煎嚭閿�!!!url锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
+ log.error("杩斿洖鍊煎嚭閿�!!!url锛歿}锛況equest锛歿}锛況esponse锛歿}", URL+Path, JSON.toJSONString(combParam), response);
throw new CoolException("杩斿洖鍊煎嚭閿�");
}
} else {
- log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
+ log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", URL+Path, JSON.toJSONString(combParam), response);
throw new CoolException("涓婃姤mes绯荤粺澶辫触");
}
} catch (Exception e) {
@@ -729,7 +731,7 @@
// 淇濆瓨鎺ュ彛鏃ュ織
apiLogService.save(
"鎴愬搧搴撳叆搴撲笂鎶�",
- MesConstant.URL + MesConstant.PAKIN_URL,
+ URL + Path,
null,
"127.0.0.1",
JSON.toJSONString(combParam),
diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
index b496292..5d3f5c3 100644
--- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -829,11 +829,11 @@
}else if (jsonObject.getDate("isComplete").equals(false)){
success = false;
}else {
- log.error("杩斿洖鍊煎嚭閿�!!!url锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
+ log.error("杩斿洖鍊煎嚭閿�!!!url锛歿}锛況equest锛歿}锛況esponse锛歿}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
throw new CoolException("杩斿洖鍊煎嚭閿�");
}
} else {
- log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
+ log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
throw new CoolException("涓婃姤mes绯荤粺澶辫触");
}
} catch (Exception e) {
@@ -845,7 +845,7 @@
// 淇濆瓨鎺ュ彛鏃ュ織
apiLogService.save(
"鎴愬搧搴撳叆搴撲笂鎶�",
- MesConstant.URL + MesConstant.PAKIN_URL,
+ mesUrl + mesPath,
null,
"127.0.0.1",
JSON.toJSONString(combParam),
diff --git a/src/main/java/com/zy/asrs/task/handler/StandingHandler.java b/src/main/java/com/zy/asrs/task/handler/StandingHandler.java
index 49b91c7..624665e 100644
--- a/src/main/java/com/zy/asrs/task/handler/StandingHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/StandingHandler.java
@@ -157,7 +157,7 @@
if (jsonObject.getInteger("code").equals(200)) {
success = true;
} else {
- log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
+ log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
throw new CoolException("涓婃姤mes绯荤粺澶辫触");
}
} catch (Exception e) {
@@ -167,9 +167,10 @@
} finally {
try {
// 淇濆瓨鎺ュ彛鏃ュ織
+ // MesConstant.URL + MesConstant.PAKIN_URL,
apiLogService.save(
"鎴愬搧搴撳叆搴撲笂鎶�",
- MesConstant.URL + MesConstant.PAKIN_URL,
+ mesUrl + mesPath,
null,
"127.0.0.1",
JSON.toJSONString(combParam),
diff --git a/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
index 2303def..dd40d38 100644
--- a/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
@@ -149,7 +149,7 @@
if (jsonObject.getInteger("code").equals(200)) {
success = true;
} else {
- log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", MesConstant.URL+MesConstant.PAKIN_URL, JSON.toJSONString(combParam), response);
+ log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", mesUrl+mesPath, JSON.toJSONString(combParam), response);
throw new CoolException("涓婃姤mes绯荤粺澶辫触");
}
} catch (Exception e) {
@@ -161,7 +161,7 @@
// 淇濆瓨鎺ュ彛鏃ュ織
apiLogService.save(
"鎴愬搧搴撳叆搴撲笂鎶�",
- MesConstant.URL + MesConstant.PAKIN_URL,
+ mesUrl + mesPath,
null,
"127.0.0.1",
JSON.toJSONString(combParam),
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 1af461d..bda09be 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -54,11 +54,13 @@
mes:
url: 172.28.15.251:7899
- url2: 172.28.15.251:7899
# 鍏ュ簱涓婃姤
inPath: mes-pm/in/stock/condition/warehousing
# 鍑哄簱涓婃姤
outPath: mes-pm/in/stock/condition/exWarehouse
+
+ren:
+ url: 172.28.15.251:7899
# 鍚姩娴嬭瘯璇锋眰
startUpTestPACK: 127.0.0.1:8080/ynwms/open/asrs/rpv/test/open/auth
#鏆傚仠娴嬭瘯
--
Gitblit v1.9.1