|
@@ -170,7 +170,7 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //是否开闸
|
|
|
+ //是否开闸,验证黑白名单和道闸权限
|
|
|
ParkingEnableVo parkingEnableVo = parkingMemberService.parkingMemberStatus(license, parkingChannel);
|
|
|
|
|
|
if (!parkingEnableVo.getOpen()) {
|
|
@@ -357,7 +357,6 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if (parkingRecord0 == null) {
|
|
|
|
|
|
QueryWrapper<ParkingRecord> parkingRecordQueryWrapper1 = new QueryWrapper<>();
|
|
@@ -374,46 +373,55 @@ public class ParkingRecordServiceImpl extends ServiceImpl<ParkingRecordMapper, P
|
|
|
throw new Exception(StrUtil.format("摄像头重复拍摄{}", license));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- //无记录默认放行,数据库记录
|
|
|
- ParkingRecord parkingRecord = new ParkingRecord();
|
|
|
- parkingRecord.setParkId(parkingChannel.getParkId());
|
|
|
- parkingRecord.setCarNum(license);
|
|
|
- parkingRecord.setOutPlateId(plateId);
|
|
|
- parkingRecord.setOutParkingTime(DateUtil.parse(dataStr));
|
|
|
- parkingRecord.setProductTheme("停车费");
|
|
|
- parkingRecord.setCarType(alarmInfoPlate.getResult().getPlateResult().getType().toString());
|
|
|
- parkingRecord.setCType(alarmInfoPlate.getResult().getPlateResult().getTriggerType().toString());
|
|
|
- parkingRecord.setCreateTime(new Date());
|
|
|
- parkingRecord.setOutChannelId(parkingChannel.getId());
|
|
|
- parkingRecord.setOutChannel(parkingChannel.getChannelName());
|
|
|
- if (StrUtil.isNotBlank(imageFragmentFile)) {
|
|
|
- String fileUrl = fileUtil.uploadBase64(license + "出.png", imageFragmentFile);
|
|
|
- parkingRecord.setOutFragmentImage(fileUrl);
|
|
|
- }
|
|
|
- if (StrUtil.isNotBlank(imageFile)) {
|
|
|
- String fileUrl = fileUtil.uploadBase64(license + "(大)出.png", imageFile);
|
|
|
- parkingRecord.setOutImage(fileUrl);
|
|
|
+ //默认放行策略
|
|
|
+ if ("1".equals(parkingInfo.getNoInParkingOutPolicy())){
|
|
|
+ //无记录放行,数据库记录
|
|
|
+ ParkingRecord parkingRecord = new ParkingRecord();
|
|
|
+ parkingRecord.setParkId(parkingChannel.getParkId());
|
|
|
+ parkingRecord.setCarNum(license);
|
|
|
+ parkingRecord.setOutPlateId(plateId);
|
|
|
+ parkingRecord.setOutParkingTime(DateUtil.parse(dataStr));
|
|
|
+ parkingRecord.setProductTheme("停车费");
|
|
|
+ parkingRecord.setCarType(alarmInfoPlate.getResult().getPlateResult().getType().toString());
|
|
|
+ parkingRecord.setCType(alarmInfoPlate.getResult().getPlateResult().getTriggerType().toString());
|
|
|
+ parkingRecord.setCreateTime(new Date());
|
|
|
+ parkingRecord.setOutChannelId(parkingChannel.getId());
|
|
|
+ parkingRecord.setOutChannel(parkingChannel.getChannelName());
|
|
|
+ if (StrUtil.isNotBlank(imageFragmentFile)) {
|
|
|
+ String fileUrl = fileUtil.uploadBase64(license + "出.png", imageFragmentFile);
|
|
|
+ parkingRecord.setOutFragmentImage(fileUrl);
|
|
|
+ }
|
|
|
+ if (StrUtil.isNotBlank(imageFile)) {
|
|
|
+ String fileUrl = fileUtil.uploadBase64(license + "(大)出.png", imageFile);
|
|
|
+ parkingRecord.setOutImage(fileUrl);
|
|
|
+ }
|
|
|
+ parkingRecord.setReleaseStatus("1");
|
|
|
+ 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);
|
|
|
+ CarTypeVo carType = parkingMemberService.getCarType(license, parkingChannel.getParkId());
|
|
|
+ jsonObject.put("info", ParkingConstant.OK);
|
|
|
+ responseAlarmInfoPlate.setInfo(ParkingConstant.OK);
|
|
|
+ responseAlarmInfoPlate.setPlateid(plateId);
|
|
|
+ responseAlarmInfoPlate.setSerialData(stringUtils.getSerialData(carType.getCarType() + license + ParkingConstant.OUTMESSAGE, null, null, carType.getCarType() + license + ParkingConstant.OUTMESSAGE, parkingChannel.getId(), true, true, 10L));
|
|
|
+ map.put(ParkingConstant.RESPONSEKEY, responseAlarmInfoPlate);
|
|
|
}
|
|
|
- parkingRecord.setReleaseStatus("1");
|
|
|
- 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")));
|
|
|
+ //策略为不放行,语音播报联系停车场管理员
|
|
|
+ if ("2".equals(parkingInfo.getNoInParkingOutPolicy())){
|
|
|
+ responseAlarmInfoPlate.setInfo("");
|
|
|
+ responseAlarmInfoPlate.setPlateid(plateId);
|
|
|
+ List<SerialData> serialDataList = stringUtils.getSerialData(license + ParkingConstant.OUTPOLICY, null, null, license + ParkingConstant.OUTPOLICY, parkingChannel.getId(), true, true, 15L);
|
|
|
+ responseAlarmInfoPlate.setSerialData(serialDataList);
|
|
|
+ map.put(ParkingConstant.RESPONSEKEY, responseAlarmInfoPlate);
|
|
|
}
|
|
|
- save(parkingRecord);
|
|
|
- /*//车辆进场修改停车场剩余车位
|
|
|
- parkingInfoService.updateSurplusParkingNumber(null, parkingChannel);*/
|
|
|
|
|
|
|
|
|
- CarTypeVo carType = parkingMemberService.getCarType(license, parkingChannel.getParkId());
|
|
|
|
|
|
- jsonObject.put("info", ParkingConstant.OK);
|
|
|
- responseAlarmInfoPlate.setInfo(ParkingConstant.OK);
|
|
|
- responseAlarmInfoPlate.setPlateid(plateId);
|
|
|
- responseAlarmInfoPlate.setSerialData(stringUtils.getSerialData(carType.getCarType() + license + ParkingConstant.OUTMESSAGE, null, null, carType.getCarType() + license + ParkingConstant.OUTMESSAGE, parkingChannel.getId(), true, true, 10L));
|
|
|
- map.put(ParkingConstant.RESPONSEKEY, responseAlarmInfoPlate);
|
|
|
+
|
|
|
}
|
|
|
//已存在记录,计算缴费金额
|
|
|
else {
|