|
@@ -60,6 +60,9 @@ public class MesServiceImpl implements MesService {
|
|
|
@Value("${MES.tuiHuoShangLiaoUrl}")
|
|
|
private String tuiHuoShangLiaoUrl;
|
|
|
|
|
|
+ @Value("${MES.tuiHuoXiaLiaoUrl}")
|
|
|
+ private String tuiHuoXiaLiaoUrl;
|
|
|
+
|
|
|
@Autowired
|
|
|
private DeviceMessageSocket deviceMessageSocket;
|
|
|
|
|
@@ -176,7 +179,22 @@ public class MesServiceImpl implements MesService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ @Override
|
|
|
+ public JSONObject tuiHuoXiaLiao(String batchNo) {
|
|
|
+ JSONObject entries = new JSONObject();
|
|
|
+ entries.set("mat_no", batchNo);
|
|
|
+ entries.set("unit_code", "Z1TH01");
|
|
|
+ String body = HttpRequest.post(MESAddress + tuiHuoShangLiaoUrl).body(entries.toString()).execute().body();
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(body);
|
|
|
+ if ("0".equals(jsonObject.get("res_flag").toString())) {
|
|
|
+ retryTofeedback(MESAddress + tuiHuoShangLiaoUrl, entries, "tuiHuoDown");
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ return jsonObject;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* MES反馈重试
|
|
|
* @param URl
|
|
|
* @param body
|
|
@@ -223,6 +241,13 @@ public class MesServiceImpl implements MesService {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ if ("tuiHuoDown".equals(type)) {
|
|
|
+ if ("0".equals(jsonObject.get("res_flag").toString())) {
|
|
|
+ log.error("退火上料料架信息反馈失败,msg:{}", jsonObject.get("message"));
|
|
|
+ invokeAlarms("退货上料工序", "工序读码成功反馈MES失败!"+ jsonObject.get("message"));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
return true;
|
|
|
});
|
|
|
} catch (RetryException | ExecutionException e) {
|