From da8521bb6d0119d6a0822007ea5329b21f2c41a0 Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Fri, 31 May 2024 17:38:24 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E9=A2=84=E7=BA=A6=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/service/impl/AsDeviceServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java index c8d84ef..aea11a2 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/AsDeviceServiceImpl.java @@ -425,6 +425,7 @@ public class AsDeviceServiceImpl extends ServiceImpl i order.setAppointmentEndTime(DateUtils.getNowDate()); //计算预约费 calculateAppointmentFee(order); + order.setTotalFee(order.getAppointmentFee()); int update = etOrderService.updateEtOrder(order); if(update==0){ log.info("【扫码/编号开锁骑行】更新订单失败"); @@ -772,6 +773,11 @@ public class AsDeviceServiceImpl extends ServiceImpl i order.setStatus(ServiceConstants.ORDER_STATUS_CANCEL_APPOINTMENT); order.setAppointmentEndTime(new Date()); order.setAppointmentTimeout("1"); + //计算预约费 + BigDecimal appointmentServiceFee = area.getAppointmentServiceFee(); + BigDecimal fee = appointmentServiceFee.multiply(new BigDecimal(area.getTimeoutMinutes()).divide(new BigDecimal(10))); + order.setAppointmentFee(fee); + order.setTotalFee(fee); int update = etOrderService.updateEtOrder(order); if(update==0){ throw new ServiceException("【车辆预约】:更新订单状态失败");