|
@@ -332,47 +332,72 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
ParkingRecord parkingRecord0 = findParkingRecord(parkingChannel, license);
|
|
|
//荆鹏停车场:车辆出场时没有进场时间就采用上次的进场时间
|
|
|
if (parkingRecord0 == null && "1".equals(parkingInfo.getId())) {
|
|
|
- QueryWrapper<ParkingRecord> parkingRecordQueryWrapper1 = new QueryWrapper<>();
|
|
|
- parkingRecordQueryWrapper1.eq("park_id", parkingChannel.getParkId());
|
|
|
- parkingRecordQueryWrapper1.eq("car_num", license);
|
|
|
- parkingRecordQueryWrapper1.eq("release_status", "1");
|
|
|
- parkingRecordQueryWrapper1.gt("in_parking_time",DateUtil.offsetDay(new Date(),-30));
|
|
|
- parkingRecordQueryWrapper1.orderByDesc("create_time");
|
|
|
- parkingRecordQueryWrapper1.last("LIMIT 1");
|
|
|
- ParkingRecord parkingRecord1 = getOne(parkingRecordQueryWrapper1);
|
|
|
- if (parkingRecord1 != null) {
|
|
|
- //todo 加入充电会员的一条记录,如果开始时间小于此条记录,就以这个时间为准
|
|
|
- Date inParkTime =parkingRecord1.getOutParkingTime();
|
|
|
- QueryWrapper<EcCoupon> ecCouponQueryWrapper = new QueryWrapper<>();
|
|
|
- ecCouponQueryWrapper.eq("car_num", license);
|
|
|
- ecCouponQueryWrapper.eq("park_id", parkingInfo.getId());
|
|
|
- ecCouponQueryWrapper.orderByDesc("create_time");
|
|
|
- EcCoupon ecCoupon = ecCouponService.getOne(ecCouponQueryWrapper);
|
|
|
- if(ecCoupon!=null&&ecCoupon.getStartTime()!=null){
|
|
|
- if(inParkTime.before(ecCoupon.getStartTime())){
|
|
|
- inParkTime =ecCoupon.getStartTime();
|
|
|
+ //add by hbjzws 2025-2-14 先判断车牌号是否识别错误,然后再取充电记录
|
|
|
+ String licenseZh=license.substring(1);
|
|
|
+ QueryWrapper<ParkingRecord> parkingRecordQueryWrapper1Zh = new QueryWrapper<>();
|
|
|
+ parkingRecordQueryWrapper1Zh.eq("park_id", parkingChannel.getParkId());
|
|
|
+ parkingRecordQueryWrapper1Zh.ne("car_num", license);
|
|
|
+ parkingRecordQueryWrapper1Zh.like("car_num","%"+licenseZh+"%");
|
|
|
+ parkingRecordQueryWrapper1Zh.eq("release_status", "0");
|
|
|
+ parkingRecordQueryWrapper1Zh.gt("in_parking_time", DateUtil.offsetDay(new Date(), -3));
|
|
|
+ parkingRecordQueryWrapper1Zh.orderByDesc("create_time");
|
|
|
+
|
|
|
+ List<ParkingRecord> parkingRecordListZh = list(parkingRecordQueryWrapper1Zh);
|
|
|
+ if (parkingRecordListZh.size() > 0) {
|
|
|
+ ParkingRecord parkingRecordZh =parkingRecordListZh.get(0);
|
|
|
+ parkingRecordZh.setRemark(parkingRecordZh.getRemark()+"车牌号识别错误,由"+parkingRecordZh.getCarNum()+"修改为"+license);
|
|
|
+ parkingRecordZh.setCarNum(license);
|
|
|
+ parkingRecordZh.setUpdateTime(new Date());
|
|
|
+ parkingRecordZh.setUpdateBy("admin");
|
|
|
+ updateById(parkingRecordZh);
|
|
|
+ parkingRecord0 = parkingRecordZh;
|
|
|
+ //
|
|
|
+ }else{
|
|
|
+ QueryWrapper<ParkingRecord> parkingRecordQueryWrapper1 = new QueryWrapper<>();
|
|
|
+ parkingRecordQueryWrapper1.eq("park_id", parkingChannel.getParkId());
|
|
|
+ parkingRecordQueryWrapper1.eq("car_num", license);
|
|
|
+ parkingRecordQueryWrapper1.eq("release_status", "1");
|
|
|
+ parkingRecordQueryWrapper1.gt("in_parking_time",DateUtil.offsetDay(new Date(),-30));
|
|
|
+ parkingRecordQueryWrapper1.orderByDesc("create_time");
|
|
|
+ parkingRecordQueryWrapper1.last("LIMIT 1");
|
|
|
+ ParkingRecord parkingRecord1 = getOne(parkingRecordQueryWrapper1);
|
|
|
+ if (parkingRecord1 != null) {
|
|
|
+ //todo 加入充电会员的一条记录,如果开始时间小于此条记录,就以这个时间为准
|
|
|
+ Date inParkTime =parkingRecord1.getOutParkingTime();
|
|
|
+ QueryWrapper<EcCoupon> ecCouponQueryWrapper = new QueryWrapper<>();
|
|
|
+ ecCouponQueryWrapper.eq("car_num", license);
|
|
|
+ ecCouponQueryWrapper.eq("park_id", parkingInfo.getId());
|
|
|
+ ecCouponQueryWrapper.orderByDesc("create_time");
|
|
|
+ EcCoupon ecCoupon = ecCouponService.getOne(ecCouponQueryWrapper);
|
|
|
+ if(ecCoupon!=null&&ecCoupon.getStartTime()!=null){
|
|
|
+ if(inParkTime.before(ecCoupon.getStartTime())){
|
|
|
+ inParkTime =ecCoupon.getStartTime();
|
|
|
+ }
|
|
|
}
|
|
|
+ ParkingRecord parkingRecord = new ParkingRecord();
|
|
|
+ parkingRecord.setParkId(parkingRecord1.getParkId());
|
|
|
+ parkingRecord.setCarNum(license);
|
|
|
+ parkingRecord.setOutPlateId(plateId);
|
|
|
+ parkingRecord.setInParkingTime(inParkTime);
|
|
|
+ parkingRecord.setProductTheme("停车费");
|
|
|
+ parkingRecord.setCarType(parkingRecord1.getCarType());
|
|
|
+ parkingRecord.setCType(parkingRecord1.getCType());
|
|
|
+ parkingRecord.setCreateTime(new Date());
|
|
|
+ parkingRecord.setInChannel(parkingRecord1.getInChannel());
|
|
|
+ parkingRecord.setInChannelId(parkingRecord1.getInChannelId());
|
|
|
+ parkingRecord.setMemberType(memberType);
|
|
|
+ if (StrUtil.isBlank(parkingRecord.getParkingNumLog())) {
|
|
|
+ parkingRecord.setParkingNumLog(StrUtil.format("剩余车位数:{},时间:{}", parkingInfo.getSurplusParkingNumber(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
|
|
|
+ } else {
|
|
|
+ parkingRecord.setParkingNumLog(parkingRecord.getParkingNumLog() + ";" + StrUtil.format("剩余车位数:{},时间:{}", parkingInfo.getSurplusParkingNumber(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
|
|
|
+ }
|
|
|
+ save(parkingRecord);
|
|
|
+ parkingRecord0 = parkingRecord;
|
|
|
}
|
|
|
- ParkingRecord parkingRecord = new ParkingRecord();
|
|
|
- parkingRecord.setParkId(parkingRecord1.getParkId());
|
|
|
- parkingRecord.setCarNum(license);
|
|
|
- parkingRecord.setOutPlateId(plateId);
|
|
|
- parkingRecord.setInParkingTime(inParkTime);
|
|
|
- parkingRecord.setProductTheme("停车费");
|
|
|
- parkingRecord.setCarType(parkingRecord1.getCarType());
|
|
|
- parkingRecord.setCType(parkingRecord1.getCType());
|
|
|
- parkingRecord.setCreateTime(new Date());
|
|
|
- parkingRecord.setInChannel(parkingRecord1.getInChannel());
|
|
|
- parkingRecord.setInChannelId(parkingRecord1.getInChannelId());
|
|
|
- parkingRecord.setMemberType(memberType);
|
|
|
- if (StrUtil.isBlank(parkingRecord.getParkingNumLog())) {
|
|
|
- parkingRecord.setParkingNumLog(StrUtil.format("剩余车位数:{},时间:{}", parkingInfo.getSurplusParkingNumber(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
|
|
|
- } else {
|
|
|
- parkingRecord.setParkingNumLog(parkingRecord.getParkingNumLog() + ";" + StrUtil.format("剩余车位数:{},时间:{}", parkingInfo.getSurplusParkingNumber(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss")));
|
|
|
- }
|
|
|
- save(parkingRecord);
|
|
|
- parkingRecord0 = parkingRecord;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if (parkingRecord0 == null) {
|