From 43676f28d712e816412f4c5265ddb794ef21b542 Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Fri, 26 Jul 2024 11:53:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=89=8B=E6=9C=BA=E5=AF=B9=E8=B4=A6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=89=A3=E9=99=A4=E5=B9=B3=E5=8F=B0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/domain/EtOperatingArea.java | 3 ++ .../system/domain/vo/ReconciliationVo.java | 3 ++ .../system/mapper/EtCapitalFlowMapper.java | 4 +-- .../ruoyi/system/mapper/EtOrderMapper.java | 8 ++--- .../service/impl/EtOrderServiceImpl.java | 31 +++++++++---------- .../mapper/system/EtCapitalFlowMapper.xml | 28 ++++++++++++----- .../mapper/system/EtOperatingAreaMapper.xml | 8 +++-- .../resources/mapper/system/EtOrderMapper.xml | 1 - 8 files changed, 53 insertions(+), 33 deletions(-) diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/EtOperatingArea.java b/electripper-system/src/main/java/com/ruoyi/system/domain/EtOperatingArea.java index 1cf78a7..3932bcd 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/domain/EtOperatingArea.java +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/EtOperatingArea.java @@ -223,4 +223,7 @@ public class EtOperatingArea extends BaseEntityPlus implements Serializable /** 图片路径*/ private String guideMap; + + /** 导览开关*/ + private String guideSwitch; } diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/vo/ReconciliationVo.java b/electripper-system/src/main/java/com/ruoyi/system/domain/vo/ReconciliationVo.java index bf6ccbd..3b83849 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/domain/vo/ReconciliationVo.java +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/vo/ReconciliationVo.java @@ -25,6 +25,9 @@ public class ReconciliationVo { //总手续费 private BigDecimal totalServiceFee; + //总平台服务费额 + private BigDecimal totalPlatformServiceFee; + //总收入 private BigDecimal totalIncome; diff --git a/electripper-system/src/main/java/com/ruoyi/system/mapper/EtCapitalFlowMapper.java b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtCapitalFlowMapper.java index afd62b2..31ecfc1 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/mapper/EtCapitalFlowMapper.java +++ b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtCapitalFlowMapper.java @@ -71,7 +71,7 @@ public interface EtCapitalFlowMapper */ BigDecimal getWithdrawnFee(@Param("areaId") Long areaId, @Param("status") String status); - BigDecimal getHandlingFee(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("areaId") Long areaId); + BigDecimal getHandlingFee(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("sn") String sn, @Param("areaId") Long areaId); - BigDecimal getServiceFee(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("areaId") Long areaId); + BigDecimal getServiceFee(@Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("sn") String sn, @Param("areaId") Long areaId); } diff --git a/electripper-system/src/main/java/com/ruoyi/system/mapper/EtOrderMapper.java b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtOrderMapper.java index 0e788cb..2eb7d23 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/mapper/EtOrderMapper.java +++ b/electripper-system/src/main/java/com/ruoyi/system/mapper/EtOrderMapper.java @@ -274,10 +274,10 @@ public interface EtOrderMapper */ BigDecimal getPartnerFee(@Param("startDateStr") String startDateStr , @Param("endDateStr") String endDateStr, @Param("areaId") Long areaId); - /** - * 平台服务费 - */ - BigDecimal getPlatformServiceFee(@Param("startDateStr") String startDateStr , @Param("endDateStr") String endDateStr, @Param("areaId") Long areaId); +// /** +// * 平台服务费 +// */ +// BigDecimal getPlatformServiceFee(@Param("startDateStr") String startDateStr , @Param("endDateStr") String endDateStr, @Param("areaId") Long areaId); Integer getAppCount(); diff --git a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java index 738291d..7f047a9 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java +++ b/electripper-system/src/main/java/com/ruoyi/system/service/impl/EtOrderServiceImpl.java @@ -818,11 +818,11 @@ public class EtOrderServiceImpl implements IEtOrderService indexAdminVo.setReturnOrderCount(etOrderMapper.getAuditOrderNum(null,null,null));//还车待审核订单 indexAdminVo.setReturnOrderDeductFee(etOrderMapper.getReturnOrderDeductFee(null,null,null));// 待审核还车押金扣款 - indexAdminVo.setTodayHandlingFee(etCapitalFlowMapper.getHandlingFee(startDateStr, endDateStr, null));// 今日支付手续费 - indexAdminVo.setTotalHandlingFee(etCapitalFlowMapper.getHandlingFee(null, null, null));// 总手续费 + indexAdminVo.setTodayHandlingFee(etCapitalFlowMapper.getHandlingFee(startDateStr, endDateStr, null,null));// 今日支付手续费 + indexAdminVo.setTotalHandlingFee(etCapitalFlowMapper.getHandlingFee(null, null, null,null));// 总手续费 - indexAdminVo.setTodayServiceFee(etCapitalFlowMapper.getServiceFee(startDateStr, endDateStr, null));//今日服务费 - indexAdminVo.setTotalServiceFee(etCapitalFlowMapper.getServiceFee(null, null, null));// 总服务费 + indexAdminVo.setTodayServiceFee(etCapitalFlowMapper.getServiceFee(startDateStr, endDateStr, null,null));//今日服务费 + indexAdminVo.setTotalServiceFee(etCapitalFlowMapper.getServiceFee(null, null, null,null));// 总服务费 return indexAdminVo; } @@ -1320,32 +1320,31 @@ public class EtOrderServiceImpl implements IEtOrderService SysDept deptObjByAreaId = wxPayService.getDeptObjByAreaId(areaId); reconciliation.setDeptName(deptObjByAreaId.getDeptName()); reconciliation.setDay(formattedDate); - SysDept sysDept = wxPayService.getDeptObjByAreaId(areaId); - String handlingCharge = sysDept.getHandlingCharge(); BigDecimal payFee = defaultIfNull(etOrderMapper.getPayFee(startDateStr, endDateStr, null, areaId), BigDecimal.ZERO);//新增 BigDecimal refundFee = defaultIfNull(etOrderMapper.getRefundFee(startDateStr, endDateStr, null, areaId), BigDecimal.ZERO);//退款 - BigDecimal divide = new BigDecimal(handlingCharge).divide(new BigDecimal(1000), 4, RoundingMode.HALF_UP); - BigDecimal serviceFee = payFee.multiply(divide).setScale(2, RoundingMode.HALF_UP);//手续费 - BigDecimal incomeFee = defaultIfNull(payFee.subtract(serviceFee).subtract(refundFee), BigDecimal.ZERO);//营收 + BigDecimal serviceFee = etCapitalFlowMapper.getHandlingFee(startDateStr, endDateStr, null, areaId);//手续费,扣除掉退款部分的 + BigDecimal platformServiceFee = etCapitalFlowMapper.getServiceFee(startDateStr, endDateStr, null,areaId);//平台服务费 ,扣除掉退款部分的 + BigDecimal incomeFee = defaultIfNull(payFee.subtract(serviceFee).subtract(refundFee).subtract(platformServiceFee), BigDecimal.ZERO);//营收 = 新增 - 手续费 - 退款 - 平台服务费 reconciliation.setPayFee(payFee); reconciliation.setRefundFee(refundFee); reconciliation.setIncome(incomeFee); reconciliation.setServiceFee(serviceFee); - reconciliation.setPartnerFee(etOrderMapper.getPartnerFee(startDateStr, endDateStr, areaId)); - reconciliation.setPlatformServiceFee(etOrderMapper.getPlatformServiceFee(startDateStr, endDateStr, areaId)); + reconciliation.setPlatformServiceFee(platformServiceFee); ridingFee.append("营收:"+incomeFee +"元").append(System.lineSeparator()); ridingFee.append("新增:"+payFee +"元").append(System.lineSeparator()); ridingFee.append("退款:"+refundFee +"元").append(System.lineSeparator()); ridingFee.append("手续费:"+serviceFee +"元").append(System.lineSeparator()); + ridingFee.append("平台服务费:"+platformServiceFee +"元").append(System.lineSeparator()); reconciliation.setRidingFee(ridingFee.toString()); dispatchFee.append("营收:"+incomeFee +"元").append(System.lineSeparator()); dispatchFee.append("新增:"+payFee +"元").append(System.lineSeparator()); dispatchFee.append("退款:"+refundFee +"元").append(System.lineSeparator()); dispatchFee.append("手续费:"+serviceFee +"元").append(System.lineSeparator()); + dispatchFee.append("平台服务费:"+platformServiceFee +"元").append(System.lineSeparator()); reconciliation.setDispatchFee(dispatchFee.toString()); return reconciliation; @@ -1358,12 +1357,11 @@ public class EtOrderServiceImpl implements IEtOrderService reconciliation.setPayFee(payFee); BigDecimal refundFee = etOrderMapper.getRefundFee(timeStart, timeEnd, sn, null); reconciliation.setRefundFee(refundFee); - SysDept sysDept = wxPayService.getDeptObjByAreaId(areaId); - String handlingCharge = sysDept.getHandlingCharge(); - BigDecimal divide = new BigDecimal(handlingCharge).divide(new BigDecimal(1000), 4, RoundingMode.HALF_UP); - BigDecimal serviceFee = payFee.multiply(divide).setScale(2, RoundingMode.HALF_UP);//手续费 - reconciliation.setIncome(payFee.subtract(refundFee).subtract(serviceFee)); + BigDecimal serviceFee = etCapitalFlowMapper.getHandlingFee(timeStart, timeEnd, sn, areaId);//手续费 + BigDecimal platformServiceFee = etCapitalFlowMapper.getServiceFee(timeStart, timeEnd, sn, areaId);//平台服务费 + reconciliation.setIncome(payFee.subtract(refundFee).subtract(serviceFee).subtract(platformServiceFee)); reconciliation.setServiceFee(serviceFee); + reconciliation.setPlatformServiceFee(platformServiceFee); return reconciliation; } @@ -1377,6 +1375,7 @@ public class EtOrderServiceImpl implements IEtOrderService reconciliationVo.setTotalRefundFee(calculateTotalField(reconciliations, ReconciliationVo.Reconciliation::getRefundFee)); reconciliationVo.setTotalServiceFee(calculateTotalField(reconciliations, ReconciliationVo.Reconciliation::getServiceFee)); reconciliationVo.setTotalIncome(calculateTotalField(reconciliations, ReconciliationVo.Reconciliation::getIncome)); + reconciliationVo.setTotalPlatformServiceFee(calculateTotalField(reconciliations, ReconciliationVo.Reconciliation::getPlatformServiceFee)); } private BigDecimal calculateTotalField(List reconciliations, java.util.function.Function getter) { diff --git a/electripper-system/src/main/resources/mapper/system/EtCapitalFlowMapper.xml b/electripper-system/src/main/resources/mapper/system/EtCapitalFlowMapper.xml index 0d8d2f5..c46f9e8 100644 --- a/electripper-system/src/main/resources/mapper/system/EtCapitalFlowMapper.xml +++ b/electripper-system/src/main/resources/mapper/system/EtCapitalFlowMapper.xml @@ -104,25 +104,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/electripper-system/src/main/resources/mapper/system/EtOperatingAreaMapper.xml b/electripper-system/src/main/resources/mapper/system/EtOperatingAreaMapper.xml index 90d55b3..829da60 100644 --- a/electripper-system/src/main/resources/mapper/system/EtOperatingAreaMapper.xml +++ b/electripper-system/src/main/resources/mapper/system/EtOperatingAreaMapper.xml @@ -52,6 +52,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + @@ -62,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" no_riding_outage, authentication, msg_switch, undercharge, error, cast(agreement as char) as agreement, deposit, outage, appointment_service_fee, dispatch_fee, vehicle_management_fee, timeout_minutes, auto_replacement_order, area_time_start, area_time_end, area_out_return, parking_return, service_name1, service_name2, - service_name3, service_phone1, service_phone2, service_phone3, custom_service, is_deposit_deduction, return_verify from et_operating_area + service_name3, service_phone1, service_phone2, service_phone3, custom_service, is_deposit_deduction, return_verify, upper_right, lower_left, guide_map,guide_switch from et_operating_area -