Commit dd34682c by 杨林龙

优化报表查询逻辑

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