|
|
@@ -166,9 +166,12 @@ public class TransferVehicleManage implements ApplicationContextAware {
|
|
|
/**
|
|
|
* 通过车牌查询实时经纬度
|
|
|
*/
|
|
|
- public VehicleDataResp queryRealTimeLocation(String carNo) {
|
|
|
- String subTableName = "vehicle_data_" + carNo.trim();
|
|
|
- VehicleTimeSeriesData realTimeLocation = taosService.selectRealTimeLocation(subTableName, carNo);
|
|
|
+ public VehicleDataResp queryRealTimeLocation(VehicleDataRequest request) {
|
|
|
+ if (request == null || (StringUtils.isEmpty(request.getCarNo()))) {
|
|
|
+ throw new IotException(ErrorCodeEnum.ILLEGAL_PARAM, "车牌carNo不能为空!");
|
|
|
+ }
|
|
|
+ String subTableName = "vehicle_data_" + request.getCarNo().trim();
|
|
|
+ VehicleTimeSeriesData realTimeLocation = taosService.selectRealTimeLocation(subTableName, request.getCarNo());
|
|
|
|
|
|
//参数转换
|
|
|
return VehicleDataResp.toIotPageResp(realTimeLocation);
|