Commit e3ffbf32 LN

api002超时时返回msg

1 个父辈 0439ca63
......@@ -262,6 +262,7 @@ public class MicronApi {
String jobId=operationId+"_"+rfid;
String url = config.getUrl(config.api_name_002);
Map<String, String> resultMap = new HashMap<>();
try {
......@@ -313,7 +314,7 @@ public class MicronApi {
objMap.put("slot", pos.getPosName());
objMap.put("materialStatus", "Available");
Barcode barcode = pos.getBarcode();
Map<String, Object> resultMap = new HashMap<>();
// Map<String, Object> resultMap = new HashMap<>();
if (barcode != null) {
AMaterialBean bean = AMaterialBean.toBean(barcode);
objMap.put("material", bean.toMap());
......@@ -325,7 +326,6 @@ public class MicronApi {
paramsMap.put("loadedMaterials", resultMapList);
Map<String, String> resultMap = new HashMap<>();
String paramStr = JsonUtil.toJsonStr(paramsMap);
log.info("调用MES接口 API002: url=" + url + ",body=" + paramStr + "");
MicronResult result = HttpHelper.postMicronJson(url, paramsMap);
......@@ -370,9 +370,12 @@ public class MicronApi {
}
catch (Exception e) {
//超时返回:API002 interface time out
log.error(url + "出错", e);
resultMap.put("msg", "API002 interface time out");
return resultMap;
}
return new HashMap<>();
// return new HashMap<>();
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!