debug:数据点获取、归零间隔调整到5秒
This commit is contained in:
parent
f0bccd86a6
commit
dab9f0c143
|
@ -401,8 +401,8 @@ public class IotServiceImpl implements IotService {
|
||||||
// 构造返回数据
|
// 构造返回数据
|
||||||
List<IotDeviceInfo> result = new ArrayList<>();
|
List<IotDeviceInfo> result = new ArrayList<>();
|
||||||
for (IotDevice device : deviceList) {
|
for (IotDevice device : deviceList) {
|
||||||
CurrentDeviceData data1 = dataList.stream().filter(item -> device.iotMac1().equals(item.getTitle())).findFirst().orElse(null);
|
CurrentDeviceData data1 = dataList.stream().filter(item -> Objects.equals(device.iotMac1(), item.getTitle())).findFirst().orElse(null);
|
||||||
CurrentDeviceData data2 = dataList.stream().filter(item -> device.iotMac2().equals(item.getTitle())).findFirst().orElse(null);
|
CurrentDeviceData data2 = dataList.stream().filter(item -> Objects.equals(device.iotMac2(), item.getTitle())).findFirst().orElse(null);
|
||||||
IotDeviceInfo iotDeviceInfo = iotConverter.toIotDeviceInfo(data1, data2);
|
IotDeviceInfo iotDeviceInfo = iotConverter.toIotDeviceInfo(data1, data2);
|
||||||
if (iotDeviceInfo != null) {
|
if (iotDeviceInfo != null) {
|
||||||
result.add(iotDeviceInfo);
|
result.add(iotDeviceInfo);
|
||||||
|
|
|
@ -1274,7 +1274,7 @@ public class DeviceServiceImpl implements DeviceService
|
||||||
CommandResponse res1 = iotService.setTime(device, 0L);
|
CommandResponse res1 = iotService.setTime(device, 0L);
|
||||||
ServiceUtil.assertion(!res1.isSuccess(), "设备时长归零失败:" + res1.getMsg());
|
ServiceUtil.assertion(!res1.isSuccess(), "设备时长归零失败:" + res1.getMsg());
|
||||||
try {
|
try {
|
||||||
Thread.sleep(1000);
|
Thread.sleep(5000);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("设备归零等待时间异常:{}", e.getMessage());
|
log.error("设备归零等待时间异常:{}", e.getMessage());
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user