Commit dd34682c by 杨林龙

优化报表查询逻辑

1 parent cbc0896b
......@@ -105,6 +105,10 @@ public class VehicleMonitorSevice {
log.info("调用ICE接口查询历史轨迹数据");
List<TrackModelExport> trackModelList = new ArrayList<>();
VehicleDevice vehicleDevice = vehicleDeviceMapper.getVehicleDeviceBySn(monitorQueryVo.getSn());
if (vehicleDevice == null) {
// 没有查询到历史轨迹数据
throw new AdminException(ResultEnum.TRACKHISTORY_HAS_NO_DATA);
}
Vehicle vehicle = vehicleMapper.selectById(vehicleDevice.getVehicleId());
R gpsHistory = gpsBsService.getLastGpsBsHistoryBySn(monitorQueryVo.getSn(), DeviceTypeRelationEnum.GPS.getDeviceCode(), monitorQueryVo.getStartTime(), monitorQueryVo.getEndTime());
if (gpsHistory.getData() == null) {
......@@ -215,6 +219,7 @@ public class VehicleMonitorSevice {
/**
* 查找最外层的基础信息
*
* @param retLocation
*/
private void buildBaseInfo(DeviceLocationBo retLocation, String sn) {
......@@ -231,6 +236,7 @@ public class VehicleMonitorSevice {
/**
* 构建断电报警信息
*
* @param location
* @param sn
*/
......@@ -257,6 +263,7 @@ public class VehicleMonitorSevice {
/**
* 设置基站或gps的信息
*
* @param location
* @param locatType
* @return
......@@ -275,6 +282,7 @@ public class VehicleMonitorSevice {
/**
* 解析设备的状态
*
* @param gpsLocation
* @param bsLocation
* @param location
......@@ -317,7 +325,6 @@ public class VehicleMonitorSevice {
}
/**
*
* @param location
* @param speed
* @param trackTime
......@@ -342,6 +349,7 @@ public class VehicleMonitorSevice {
/**
* 解析有源设备的状态
*
* @param location
* @param speed
* @param trackTime
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!