|
@@ -218,7 +218,7 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
QueryWrapper<ParkingRecord> parkingRecordQueryWrapper = new QueryWrapper<>();
|
|
|
parkingRecordQueryWrapper.eq("park_id",parkingChannel.getParkId());
|
|
|
parkingRecordQueryWrapper.eq("out_channel_id",channelId);
|
|
|
- parkingRecordQueryWrapper.eq("release_status","0");
|
|
|
+ // parkingRecordQueryWrapper.eq("release_status","0");
|
|
|
parkingRecordQueryWrapper.orderByDesc("create_time");
|
|
|
|
|
|
parkingRecordQueryWrapper.last("LIMIT 1");
|
|
@@ -226,6 +226,9 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
if (parkingRecord == null){
|
|
|
throw new Exception("未查询到停车数据");
|
|
|
}
|
|
|
+ if ("1".equals(parkingRecord.getReleaseStatus())){
|
|
|
+ throw new Exception("无停车数据");
|
|
|
+ }
|
|
|
BigDecimal parkCost = parkingFeeService.parkingCost(parkingRecord);
|
|
|
if (parkCost.compareTo(BigDecimal.ZERO) ==0){
|
|
|
throw new Exception("请直接离场");
|
|
@@ -256,7 +259,7 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
QueryWrapper<ParkingRecord> parkingRecordQueryWrapper = new QueryWrapper<>();
|
|
|
parkingRecordQueryWrapper.eq("park_id",parkId);
|
|
|
parkingRecordQueryWrapper.eq("car_num",carNum);
|
|
|
- parkingRecordQueryWrapper.eq("release_status","0");
|
|
|
+ // parkingRecordQueryWrapper.eq("release_status","0");
|
|
|
// parkingRecordQueryWrapper.eq("pay_status",10);
|
|
|
parkingRecordQueryWrapper.orderByDesc("create_time");
|
|
|
|
|
@@ -265,6 +268,9 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
if (parkingRecord == null){
|
|
|
throw new Exception("未查询到停车数据");
|
|
|
}
|
|
|
+ if ("1".equals(parkingRecord.getReleaseStatus())){
|
|
|
+ throw new Exception("无停车数据");
|
|
|
+ }
|
|
|
|
|
|
long parkingTimeLong = DateUtil.between(parkingRecord.getInParkingTime(),new Date(),DateUnit.MINUTE);
|
|
|
parkingRecord.setParkingTime(Convert.toInt(parkingTimeLong));
|