增加mqt的查询发送延迟
This commit is contained in:
parent
b35c9e2038
commit
1ce2d1a724
|
|
@ -441,7 +441,7 @@ public class SurvDeviceDeployController extends JeecgController<SurvDeviceDeploy
|
|||
List<String> fianlVariables = variables.stream()
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
boolean b = p3Service.sendMqttDeviceQuery(deploy, fianlVariables);
|
||||
p3Service.sendMqttDeviceQuery(deploy, fianlVariables);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import org.jeecg.modules.appmana.utils.Iotutils;
|
|||
import org.jeecg.modules.mqtt.service.MqttService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -32,6 +33,7 @@ import java.time.temporal.TemporalAdjusters;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
|
|
@ -733,9 +735,8 @@ public class IotCommonP3ServiceImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean sendMqttDeviceQuery(SurvDeviceDeploy deploy, List<String> variables) {
|
||||
boolean result = true;
|
||||
@Async
|
||||
public void sendMqttDeviceQuery(SurvDeviceDeploy deploy, List<String> variables) {
|
||||
try{
|
||||
log.error("===========预发送指令========={}============", variables.size());
|
||||
if (deploy != null && variables != null && !variables.isEmpty()) {
|
||||
|
|
@ -760,6 +761,5 @@ public class IotCommonP3ServiceImpl {
|
|||
//抛出未注入时的报错
|
||||
e.printStackTrace();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue