|
@@ -586,6 +586,7 @@ public class AutomaticPay {
|
|
|
|
|
|
/**
|
|
|
* 支付停车费
|
|
|
+ *
|
|
|
* @param tbBusinessCar
|
|
|
* @param partMoney
|
|
|
* @param now
|
|
@@ -623,6 +624,7 @@ public class AutomaticPay {
|
|
|
|
|
|
/**
|
|
|
* 支付停车费和业务费
|
|
|
+ *
|
|
|
* @param businessList
|
|
|
* @param businessMoney
|
|
|
* @param tbBusinessCar
|
|
@@ -636,8 +638,17 @@ public class AutomaticPay {
|
|
|
BigDecimal chinaCarMoney,
|
|
|
BigDecimal yueCarMoney) {
|
|
|
Date now = new Date();
|
|
|
- String carNo = tbBusinessCar.getCarNo();
|
|
|
- TbDeductionBind bind = tbDeductionBindService.getBindCarByPlate(carNo);
|
|
|
+ TbDeductionBind bind = null;
|
|
|
+ for (TbBusiness tbBusiness : businessList) {
|
|
|
+ List<TbBusinessCar> cars = tbBusinessCarService.findOtherBusinessCar(tbBusiness.getId());
|
|
|
+ for (TbBusinessCar car : cars) {
|
|
|
+ String carNo = car.getCarNo();
|
|
|
+ bind = tbDeductionBindService.getBindCarByPlate(carNo);
|
|
|
+ if (bind != null) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//未绑定
|
|
|
if (bind == null) {
|
|
|
return false;
|
|
@@ -667,11 +678,11 @@ public class AutomaticPay {
|
|
|
List<PriceBO> priceBOList = new ArrayList<PriceBO>() {{
|
|
|
add(new PriceBO(tbBusinessCar.getId(), tbBusinessCar.getMoney()));
|
|
|
}};
|
|
|
- String plate=tbBusinessCar.getCarNo();
|
|
|
+ String plate = tbBusinessCar.getCarNo();
|
|
|
String no = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + RandomUtil.randomNumbers(4);
|
|
|
List<TbFeeDetails> parkFeeDetailsList = tbFeeDetailsService.chargeParkFee(priceBOList, null, null, now, TbBusiness.PayType.PER_PAY);
|
|
|
this.createTbDeductionRecord(parkFeeDetailsList, tbAccount, plate, bind.getCustomerName(), no);
|
|
|
- List<TbFeeDetails> tbFeeDetails = tbFeeDetailsService.chargeBusinessFee(tbBusinessItems, null, null, now, TbBusiness.PayType.PER_PAY);
|
|
|
+ List<TbFeeDetails> tbFeeDetails = tbFeeDetailsService.chargeBusinessFee(tbBusinessItems, null, null, now, TbBusiness.PayType.PER_PAY);
|
|
|
createTbDeductionRecord(tbFeeDetails, tbAccount, plate, bind.getCustomerName(), no);
|
|
|
tbFeeStatisticsService.addOrUpdateStatistic(now);//更新当前日期的日统计
|
|
|
return true;
|