|
@@ -596,22 +596,24 @@ public class DriverApiController {
|
|
|
String recordTime = requestBody.getString("recordTime");
|
|
|
String localImageUrl = requestBody.getString("localImageUrl");
|
|
|
|
|
|
- //同一辆车相同乘客上下车登记间隔1分钟
|
|
|
- String key = subject + "_" + personId;
|
|
|
- boolean absent = valueOperations.setIfAbsent(key,true,1,TimeUnit.MINUTES);
|
|
|
+ VehicleInfo vehicleInfo = vehicleInfoService.get(subject);
|
|
|
+ if (vehicleInfo == null){
|
|
|
+ throw new Exception("当前车辆不存在");
|
|
|
+ }
|
|
|
|
|
|
- if(absent) {
|
|
|
- VehicleInfo vehicleInfo = vehicleInfoService.get(subject);
|
|
|
- if (vehicleInfo == null){
|
|
|
- throw new Exception("当前车辆不存在");
|
|
|
- }
|
|
|
+ List<ShiftInfo> shiftInfoList = shiftInfoService.findByVehicleIdAndStatus(vehicleInfo.getId(),"1");
|
|
|
+ if (shiftInfoList.size() == 0){
|
|
|
+ throw new Exception("车辆没有相关班次信息");
|
|
|
+ }
|
|
|
|
|
|
- List<ShiftInfo> shiftInfoList = shiftInfoService.findByVehicleIdAndStatus(vehicleInfo.getId(),"1");
|
|
|
- if (shiftInfoList.size() == 0){
|
|
|
- throw new Exception("车辆没有相关班次信息");
|
|
|
- }
|
|
|
+ ShiftInfo shiftInfo = shiftInfoList.get(0);
|
|
|
|
|
|
- ShiftInfo shiftInfo = shiftInfoList.get(0);
|
|
|
+ //同一辆车、相同班次下、相同乘客上下车登记间隔1分钟
|
|
|
+ String key = subject + "_" + shiftInfo.getId() + "_" + personId;
|
|
|
+
|
|
|
+ boolean absent = valueOperations.setIfAbsent(key,true,1,TimeUnit.MINUTES);
|
|
|
+
|
|
|
+ if(absent) {
|
|
|
String retFileUrl = "";
|
|
|
|
|
|
//只有第一次上车时返回登记照
|