Commit 9ddec2cb by 向延琳

fix:设备激活时间作为截止目前起始时间

1 parent b1255bca
...@@ -475,10 +475,9 @@ public class VehicleMonitorService { ...@@ -475,10 +475,9 @@ public class VehicleMonitorService {
// 判断查询类型 // 判断查询类型
//2为无源设备查询基站;1为有源设备查询GPS //2为无源设备查询基站;1为有源设备查询GPS
Device device = deviceService.getDeviceBySn(search.getSn()); Device device = deviceService.getDeviceBySn(search.getSn());
VehicleDevice vehicleDevice = vehicleDeviceService.getByBindSn(search.getSn());
Date deviceCreateDate = Optional.ofNullable(vehicleDevice) Date deviceActivateTime = Optional.ofNullable(device)
.map(VehicleDevice::getCreatedDate) .map(Device::getActivateTime)
.orElse(new Date()); .orElse(new Date());
int lacType; int lacType;
if (Objects.isNull(device) || Objects.equals(device.getSource(), 1)) { if (Objects.isNull(device) || Objects.equals(device.getSource(), 1)) {
...@@ -487,7 +486,7 @@ public class VehicleMonitorService { ...@@ -487,7 +486,7 @@ public class VehicleMonitorService {
lacType = 2; lacType = 2;
} }
//转换前端时间 //转换前端时间
ImmutablePair<String, String> timeImmutablePair = convertTime(search, deviceCreateDate); ImmutablePair<String, String> timeImmutablePair = convertTime(search, deviceActivateTime);
//ICE接口查询常驻地列表 //ICE接口查询常驻地列表
return VehicleMonitorConvert.buildResidentRequest(search, timeImmutablePair.getLeft(), timeImmutablePair.getRight(), lacType); return VehicleMonitorConvert.buildResidentRequest(search, timeImmutablePair.getLeft(), timeImmutablePair.getRight(), lacType);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!