From d75cbb1bbf53219034aeff3a27b0d1dd083c51ff Mon Sep 17 00:00:00 2001
From: ZY <zc857179121@qq.com>
Date: 星期一, 28 十月 2024 15:01:29 +0800
Subject: [PATCH] 1
---
src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java | 3 ++-
src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java | 3 ++-
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java | 14 +++++++++++---
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
index f7815d7..f87f60d 100644
--- a/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OrderServiceImpl.java
@@ -117,7 +117,7 @@
}
Integer pltType = null;
//浠撳簱缂栫爜
- if (Cools.isEmpty(order.getPltType())) {
+ if (Cools.isEmpty(order.getPltType()) && !Cools.isEmpty(locNo)) {
AgvLocMast locNo1 = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", locNo));
pltType = locNo1.getPltType();
}
@@ -230,6 +230,7 @@
int code = doHttpRequest(reportErpParam, "鍗曟嵁瀹℃牳", url, orderReportPath, null, "127.0.0.1");
//int code = doHttpRequest(param, "鍗曟嵁瀹℃牳", "localhost:8080", "/test/report", null, "127.0.0.1");
if (code == 0) {
+ log.info("鍗曟嵁瀹℃牳,{}", order);
order.setSettle(6L);
this.updateById(order);
}
diff --git a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
index 96ef1d5..4f5abc1 100644
--- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
@@ -503,7 +503,8 @@
}
return SUCCESS;
} catch (Exception e) {
- log.error("淇敼AGV鍏ュ簱閫氱煡妗g姸鎬佸叆鍑虹姸鎬佷负Y" + e.getMessage());
+ //TODO
+ //log.error("淇敼AGV鍏ュ簱閫氱煡妗g姸鎬佸叆鍑虹姸鎬佷负Y" + e.getMessage());
}
return FAIL;
}
diff --git a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
index 60683dd..98ff7af 100644
--- a/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -74,9 +74,13 @@
ReportErpParam param = new ReportErpParam();
mappingParam(order, param);
mappingParamChildren(orderDetlList, param);
+ if (Cools.isEmpty(order.getPltType())) {
+ return SUCCESS;
+ }
int code = doHttpRequest(param, "鍗曟嵁瀹℃牳", url, orderReportPath, null, "127.0.0.1");
if (code == 0) {
+ log.info("鍗曟嵁瀹℃牳,{}", order);
order.setSettle(6L);
orderService.updateById(order);
}
@@ -103,12 +107,15 @@
ReportErpParam param = new ReportErpParam();
mappingParam(order, param);
mappingParamChildren(report, param);
+ if (Cools.isEmpty(order.getPltType())) {
+ return;
+ }
int code = doHttpRequest(param, "鍗曟嵁瀹℃牳", url, orderReportPath, null, "127.0.0.1");
if (code == 0) {
for (OrderDetl orderDetl : orderDetlList) {
orderDetl.setReportQty(orderDetl.getQty());
- log.info("{}鍗曞瓙涓婃姤浜嗭細{}", order.getOrderNo(),orderDetl.getQty() - (orderDetl.getReportQty() == null ? 0D : orderDetl.getReportQty()));
+ log.info("{}鍗曟嵁瀹℃牳涓婃姤浜嗭細{}", order.getOrderNo(), orderDetl.getQty() - (orderDetl.getReportQty() == null ? 0D : orderDetl.getReportQty()));
orderDetlService.updateById(orderDetl);
}
}
@@ -118,7 +125,8 @@
}
public void mappingParam(Order order, ReportErpParam param) {
- param.set鎿嶄綔绯荤粺鍙�(order.getDefNumber());
+ //param.set鎿嶄綔绯荤粺鍙�(order.getDefNumber());
+ param.set鎿嶄綔绯荤粺鍙�("998");
param.set鎿嶄綔鍗曟嵁(order.getDocType$());
param.set鎿嶄綔绫诲瀷("add");
param.setDdate(order.getOrderTime());
@@ -127,7 +135,7 @@
param.setCOrderCode(order.getOrderNo());
param.setCMaker("");
param.setCHandler("");
- param.setCDefine14(order.getOrderNo()+"_"+DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss));
+ param.setCDefine14(order.getOrderNo() + "_" + DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmss + "_" + order.getPltType()));
}
public void mappingParamChildren(List<OrderDetl> orderDetlList, ReportErpParam param) {
--
Gitblit v1.9.1