From 517966d4dbed6ef6e5d591720b971af427e6b63a Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期四, 04 十二月 2025 15:25:47 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/plugin/FakeProcess.java | 38 ++++++++++++++++++++++----------------
1 files changed, 22 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/zy/core/plugin/FakeProcess.java b/src/main/java/com/zy/core/plugin/FakeProcess.java
index dec9d60..24fb8c8 100644
--- a/src/main/java/com/zy/core/plugin/FakeProcess.java
+++ b/src/main/java/com/zy/core/plugin/FakeProcess.java
@@ -5,14 +5,8 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.zy.asrs.domain.param.CreateInTaskParam;
import com.zy.asrs.domain.param.CreateOutTaskParam;
-import com.zy.asrs.entity.BasCrnp;
-import com.zy.asrs.entity.BasDevp;
-import com.zy.asrs.entity.LocMast;
-import com.zy.asrs.entity.WrkMast;
-import com.zy.asrs.service.BasCrnpService;
-import com.zy.asrs.service.BasDevpService;
-import com.zy.asrs.service.LocMastService;
-import com.zy.asrs.service.WrkMastService;
+import com.zy.asrs.entity.*;
+import com.zy.asrs.service.*;
import com.zy.asrs.utils.Utils;
import com.zy.common.model.StartupDto;
import com.zy.common.service.CommonService;
@@ -66,6 +60,8 @@
private CrnOperateProcessUtils crnOperateUtils;
@Autowired
private StationOperateProcessUtils stationOperateProcessUtils;
+ @Autowired
+ private HttpRequestLogService httpRequestLogService;
@Override
public void run() {
@@ -362,17 +358,18 @@
continue;
}
+ HashMap<String, Object> requestParam = new HashMap<>();
+ String response = null;
try {
- HashMap<String, Object> param = new HashMap<>();
- param.put("barcode", stationProtocol.getBarcode());
- param.put("sourceStaNo", stationProtocol.getStationId());
- param.put("locType1", stationProtocol.getPalletHeight());
- param.put("row", Utils.getInTaskEnableRow());
+ requestParam.put("barcode", stationProtocol.getBarcode());
+ requestParam.put("sourceStaNo", stationProtocol.getStationId());
+ requestParam.put("locType1", stationProtocol.getPalletHeight());
+ requestParam.put("row", Utils.getInTaskEnableRow());
- String response = new HttpHandler.Builder()
+ response = new HttpHandler.Builder()
.setUri(wmsUrl)
.setPath(wmsSystemInUrl)
- .setJson(JSON.toJSONString(param))
+ .setJson(JSON.toJSONString(requestParam))
.build()
.doPost();
JSONObject jsonObject = JSON.parseObject(response);
@@ -385,13 +382,22 @@
taskParam.setTaskPri(dto.getTaskPri());
taskParam.setBarcode(stationProtocol.getBarcode());
boolean result = commonService.createInTask(taskParam);
+
+ News.info("璇锋眰WMS鎺ュ彛鎴愬姛锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + wmsSystemInUrl, JSON.toJSONString(requestParam), response);
} else {
- News.error("璇锋眰WMS鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
+ News.error("璇锋眰WMS鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + wmsSystemInUrl, JSON.toJSONString(requestParam), response);
}
redisUtil.set(RedisKeyType.GENERATE_IN_TASK_LIMIT.key + stationId, "lock", 10);
} catch (Exception e) {
e.printStackTrace();
+ } finally {
+ HttpRequestLog httpRequestLog = new HttpRequestLog();
+ httpRequestLog.setName(wmsUrl + wmsSystemInUrl);
+ httpRequestLog.setRequest(JSON.toJSONString(requestParam));
+ httpRequestLog.setResponse(response);
+ httpRequestLog.setCreateTime(new Date());
+ httpRequestLogService.insert(httpRequestLog);
}
}
}
--
Gitblit v1.9.1