增加mqt的查询发送延迟
This commit is contained in:
parent
33bc756e3d
commit
4b9c188e7b
|
|
@ -16,6 +16,7 @@ import org.jeecg.common.constant.CommonConstant;
|
|||
import org.jeecg.common.constant.IotConstants;
|
||||
import org.jeecg.common.constant.PollutionConstants;
|
||||
import org.jeecg.common.dto.DeviceFilterDTO;
|
||||
import org.jeecg.common.dto.RelayQueryDTO;
|
||||
import org.jeecg.common.entity.*;
|
||||
import org.jeecg.common.iot.common.DTOCamControl;
|
||||
import org.jeecg.common.iot.common.IotDeviceCtlResult;
|
||||
|
|
@ -459,14 +460,17 @@ public class SurvDeviceDeployController extends JeecgController<SurvDeviceDeploy
|
|||
return Result.OK(deviceRelayVo);
|
||||
}
|
||||
|
||||
// @GetMapping(value = "/queryRelay")
|
||||
// public Result<Boolean> queryRelay(@RequestParam String deployId) {
|
||||
// SurvDeviceDeploy deploy = deviceDeployService.getById(deployId);
|
||||
// Assert.notNull(deploy,"无效设备");
|
||||
//
|
||||
//
|
||||
// p3Service.sendMqttDeviceQuery(deploy, fianlVariables);
|
||||
// }
|
||||
@PostMapping(value = "/queryRelay")
|
||||
public Result<Boolean> queryRelay(@RequestBody RelayQueryDTO relayQueryDTO) {
|
||||
SurvDeviceDeploy deploy = deviceDeployService.getById(relayQueryDTO.getDeployId());
|
||||
Assert.notNull(deploy,"无效设备");
|
||||
List<String> fianlVariables = new ArrayList<>();
|
||||
if(!relayQueryDTO.getRelayKeys().isEmpty()){
|
||||
fianlVariables.addAll(relayQueryDTO.getRelayKeys());
|
||||
}
|
||||
p3Service.sendMqttDeviceQuery(deploy, fianlVariables);
|
||||
return Result.OK(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
Loading…
Reference in New Issue