|
@@ -6,8 +6,10 @@ import com.platform.api.request.VehicleDataRequest;
|
|
|
import com.platform.api.request.VehicleDataSaveRequest;
|
|
import com.platform.api.request.VehicleDataSaveRequest;
|
|
|
import com.platform.api.response.VehicleDataResp;
|
|
import com.platform.api.response.VehicleDataResp;
|
|
|
import com.platform.exception.BaseResult;
|
|
import com.platform.exception.BaseResult;
|
|
|
|
|
+import jakarta.annotation.Resource;
|
|
|
import jakarta.validation.constraints.NotBlank;
|
|
import jakarta.validation.constraints.NotBlank;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -23,18 +25,18 @@ import java.util.List;
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
@RestController("api/transfer")
|
|
@RestController("api/transfer")
|
|
|
-@RequiredArgsConstructor
|
|
|
|
|
public class TransferController {
|
|
public class TransferController {
|
|
|
|
|
|
|
|
- private final TransferVehicleManage transferVehicleManage;
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private TransferVehicleManage transferVehicleManage;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 保存车辆数据
|
|
* 保存车辆数据
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/saveVehicleData")
|
|
@PostMapping("/saveVehicleData")
|
|
|
public BaseResult<Boolean> saveVehicleData(@RequestBody @Validated VehicleDataSaveRequest request) {
|
|
public BaseResult<Boolean> saveVehicleData(@RequestBody @Validated VehicleDataSaveRequest request) {
|
|
|
- transferVehicleManage.saveVehicleData(request);
|
|
|
|
|
- return BaseResult.success(true);
|
|
|
|
|
|
|
+ transferVehicleManage.saveVehicleData(request);
|
|
|
|
|
+ return BaseResult.success(true);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -49,7 +51,7 @@ public class TransferController {
|
|
|
* 通过车牌查询实时经纬度
|
|
* 通过车牌查询实时经纬度
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/queryRealTimeLocation")
|
|
@PostMapping("/queryRealTimeLocation")
|
|
|
- public BaseResult<VehicleDataResp> queryRealTimeLocation(@NotBlank(message = "车牌carNo不能为空") @Validated String carNo) {
|
|
|
|
|
|
|
+ public BaseResult<VehicleDataResp> queryRealTimeLocation(@NotBlank(message = "车牌carNo不能为空") @Validated String carNo) {
|
|
|
return BaseResult.success(transferVehicleManage.queryRealTimeLocation(carNo));
|
|
return BaseResult.success(transferVehicleManage.queryRealTimeLocation(carNo));
|
|
|
}
|
|
}
|
|
|
|
|
|