增加mqt的查询发送延迟

This commit is contained in:
zhangyue 2026-08-17 18:40:50 +08:00
parent 33bc756e3d
commit 4b9c188e7b
2 changed files with 23 additions and 8 deletions

View File

@ -16,6 +16,7 @@ import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.constant.IotConstants; import org.jeecg.common.constant.IotConstants;
import org.jeecg.common.constant.PollutionConstants; import org.jeecg.common.constant.PollutionConstants;
import org.jeecg.common.dto.DeviceFilterDTO; import org.jeecg.common.dto.DeviceFilterDTO;
import org.jeecg.common.dto.RelayQueryDTO;
import org.jeecg.common.entity.*; import org.jeecg.common.entity.*;
import org.jeecg.common.iot.common.DTOCamControl; import org.jeecg.common.iot.common.DTOCamControl;
import org.jeecg.common.iot.common.IotDeviceCtlResult; import org.jeecg.common.iot.common.IotDeviceCtlResult;
@ -459,14 +460,17 @@ public class SurvDeviceDeployController extends JeecgController<SurvDeviceDeploy
return Result.OK(deviceRelayVo); return Result.OK(deviceRelayVo);
} }
// @GetMapping(value = "/queryRelay") @PostMapping(value = "/queryRelay")
// public Result<Boolean> queryRelay(@RequestParam String deployId) { public Result<Boolean> queryRelay(@RequestBody RelayQueryDTO relayQueryDTO) {
// SurvDeviceDeploy deploy = deviceDeployService.getById(deployId); SurvDeviceDeploy deploy = deviceDeployService.getById(relayQueryDTO.getDeployId());
// Assert.notNull(deploy,"无效设备"); Assert.notNull(deploy,"无效设备");
// List<String> fianlVariables = new ArrayList<>();
// if(!relayQueryDTO.getRelayKeys().isEmpty()){
// p3Service.sendMqttDeviceQuery(deploy, fianlVariables); fianlVariables.addAll(relayQueryDTO.getRelayKeys());
// } }
p3Service.sendMqttDeviceQuery(deploy, fianlVariables);
return Result.OK(true);
}

View File

@ -0,0 +1,11 @@
package org.jeecg.common.dto;
import lombok.Data;
import java.util.List;
@Data
public class RelayQueryDTO {
private List<String> relayKeys;
private String deployId;
}