opt:接口频率优化

This commit is contained in:
2026-01-26 13:41:07 +08:00
parent 78baf3be4f
commit d1fb8af637
2 changed files with 10 additions and 0 deletions

View File

@@ -704,6 +704,7 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
log.trace("触发时间因为小于{}毫秒,而被无视", this.require_apply_in_time_out);
return;
}
this.require_apply_in_time = date;
try {
JSONObject param = new JSONObject();
param.put("device_code", device_code);

View File

@@ -132,8 +132,11 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
private int instruction_update_time_out = 1000;
Integer heartbeat_tag;
private Date instruction_require_time = new Date();
private Date apply_feedback_require_time = new Date();
private int instruction_require_time_out = 3000;
private int apply_feedback_require_time_out = 3000;
//行架机械手申请任务成功标识
boolean requireSucess = false;
@@ -230,6 +233,12 @@ public class PullTailManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
//反馈重量
if (mode == 3 && action == 5 && move == 0 && weight > 0 && StrUtil.isNotEmpty(sub_volume_no) && !requireSucess) {
Date date = new Date();
if (date.getTime() - this.apply_feedback_require_time.getTime() < (long) this.apply_feedback_require_time_out) {
log.trace("触发时间因为小于{}毫秒,而被无视", this.apply_feedback_require_time_out);
return ;
}
this.apply_feedback_require_time = date;
logServer.deviceExecuteLog(this.device_code, "", "", "反馈重量");
ApplyfeedbackSubVolumeWeightRequest applyfeedbackSubVolumeWeightRequest = new ApplyfeedbackSubVolumeWeightRequest();
ApplyfeedbackSubVolumeWeightResponse applyfeedbackSubVolumeWeightResponse;