rev:限制向lms申请呼叫空托盘请求时间

This commit is contained in:
2025-02-25 16:39:41 +08:00
parent fb7f3d328e
commit 98343f1d89
2 changed files with 4 additions and 2 deletions

View File

@@ -97,6 +97,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
private Date instruction_finished_time = new Date();
private Date instruction_apply_time = new Date();
private int instruction_require_time_out = 3000;
private int require_apply_strangulation_time_out = 4000;
String notCreateInstMessage = "";
@@ -436,10 +437,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
private void applyEmptyTask(String type, int mode) {
Date date = new Date();
if (date.getTime() - this.require_apply_strangulation_time.getTime()
< (long) this.instruction_require_time_out) {
< (long) this.require_apply_strangulation_time_out) {
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
return;
} else {
this.require_apply_strangulation_time = date;
try {
JSONObject param = new JSONObject();
param.put("device_code", device_code);

View File

@@ -186,7 +186,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
log.info("applyTwo-----输出参数{}", result2.body());
LuceneLogDto luceneLogDto = new LuceneLogDto(4, "applyTwo", String.valueOf(result2.getStatus()),
JSON.toJSONString(param), String.valueOf(result2.body()), "ACS向LMS申请"
+ ("1".equals(param.getString("type")) ? "子卷装箱入库任务" : "2".equals(param.getString("type")) ? "空盘入库" : "5".equals(param.getString("type")) ? "木箱入库" :
+ ("1".equals(param.getString("type")) ? "子卷装箱入库任务" : "2".equals(param.getString("type")) ? "空盘入库" : "3".equals(param.getString("type")) ? "空盘出库" : "5".equals(param.getString("type")) ? "木箱入库" :
"6".equals(param.getString("type")) ? "退货入库" : "异常处理位"));
luceneLogService.interfaceExecuteLog(luceneLogDto);
return result2;