车辆信息

This commit is contained in:
attiya 2025-04-24 17:34:13 +08:00
parent 44c4525dbf
commit 20c3b8ce31

View File

@ -87,6 +87,13 @@ public class UserOrdersServiceImpl extends ServiceImpl<UserOrdersMapper, UserOrd
throw new RuntimeException("获取车辆信息失败"); throw new RuntimeException("获取车辆信息失败");
} }
FeignEbikeBikeInfoDto bikeInfoDto = jsonResult.getData(); FeignEbikeBikeInfoDto bikeInfoDto = jsonResult.getData();
// TODO:判断车辆状态
// if (bikeInfoDto.getUsageStatus() == 1) {
// throw new RuntimeException("车辆使用中");
// }
// if (bikeInfoDto.getUsageStatus() == 1) {
// throw new RuntimeException("车辆故障,暂不可用");
// }
FeignEbikeEcuInfo ecuInfo = bikeInfoDto.getEbikeEcuInfo(); FeignEbikeEcuInfo ecuInfo = bikeInfoDto.getEbikeEcuInfo();
JsonResult<FeignEbikeRegionDto> operationResult = operateFeignClient.getOperationById(bikeInfoDto.getReginId()); JsonResult<FeignEbikeRegionDto> operationResult = operateFeignClient.getOperationById(bikeInfoDto.getReginId());
if (operationResult.getCode() != Code.SUCCESS) { if (operationResult.getCode() != Code.SUCCESS) {
@ -134,12 +141,6 @@ public class UserOrdersServiceImpl extends ServiceImpl<UserOrdersMapper, UserOrd
throw new RuntimeException("获取车辆信息失败"); throw new RuntimeException("获取车辆信息失败");
} }
FeignEbikeBikeInfoDto bikeInfoDto = jsonResult.getData(); FeignEbikeBikeInfoDto bikeInfoDto = jsonResult.getData();
// if (bikeInfoDto.getUsageStatus() == 1) {
// throw new RuntimeException("车辆使用中");
// }
// if (bikeInfoDto.getUsageStatus() == 1) {
// throw new RuntimeException("车辆故障,暂不可用");
// }
FeignEbikeEcuInfo ecuInfo = bikeInfoDto.getEbikeEcuInfo(); FeignEbikeEcuInfo ecuInfo = bikeInfoDto.getEbikeEcuInfo();
String jsonString = JSONObject.toJSONString(redisUtil.get(ecuInfo.getEcuSn())); String jsonString = JSONObject.toJSONString(redisUtil.get(ecuInfo.getEcuSn()));
ResGPSDto resGpsDto = JSONObject.parseObject(jsonString, ResGPSDto.class); ResGPSDto resGpsDto = JSONObject.parseObject(jsonString, ResGPSDto.class);