|
@@ -435,10 +435,10 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
BigDecimal basePrice = businessCar ? partConfig.getBasePrice() : new BigDecimal("0");
|
|
|
BigDecimal p = partConfig.getBasePrice();//乘积因子
|
|
|
BigDecimal extraPrice = partConfig.getExtraPrice();
|
|
|
- BigDecimal unit= new BigDecimal(hour / 24);
|
|
|
- if (minutes>partConfig.getFreeMinutes()&&minutes<24*60){
|
|
|
- unit=new BigDecimal("1");
|
|
|
- }
|
|
|
+ BigDecimal unit = new BigDecimal(hour / 24);
|
|
|
+ if (minutes > partConfig.getFreeMinutes() && minutes < 24 * 60) {
|
|
|
+ unit = new BigDecimal("1");
|
|
|
+ }
|
|
|
return basePrice.add(p.multiply(unit)).add(new BigDecimal(days).multiply(extraPrice));
|
|
|
}
|
|
|
|
|
@@ -493,6 +493,10 @@ public class TbBusinessService extends ServiceImpl<TbBusinessMapper, TbBusiness>
|
|
|
carMap.put("id", tbBusinessCar.getId());
|
|
|
carMap.put("carNo", tbBusinessCar.getCarNo());
|
|
|
carMap.put("pay", tbBusinessCar.getPay());
|
|
|
+ TbCar tbCar = tbCarService.findByCardNo(tbBusinessCar.getCarNo());
|
|
|
+ if (tbCar != null && !TbCar.CarTypeEnum.BUSINESS_CAR.getType().equals(tbCar.getCarType())) {
|
|
|
+ carMap.put("price", 0);
|
|
|
+ }
|
|
|
carsList.add(carMap);
|
|
|
}
|
|
|
result.put("carList", carsList);
|