Commit 0cbaea6c authored by libin's avatar libin

Merge remote-tracking branch 'origin/master' into master-walletdetail

parents ace42392 0a0bec02
...@@ -384,6 +384,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> { ...@@ -384,6 +384,12 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章预备金:"+ illegalReserve.toString(); String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章预备金:"+ illegalReserve.toString();
refundDesc += handleDedRefundDesc; refundDesc += handleDedRefundDesc;
refundDesc += ")"; refundDesc += ")";
//还车扣除款 剩余的 钱,再减去违章预备金
oad.getDeductions().add(
initDeduction(illegalReserve, "违章保证金", DeductionTypeEnum.VIOLATE_TRAFFIC_KEEP, OrderAccountDeduction.ORIGIN_DEPOSIT)
);
refundTrigger(orderMQDTO, orderMQDTO.getOrderRentVehicleDetail(), illegalReserve, originalRefundAmount, refundAmont, refundDesc, RefundStatusEnum.RESIDUE_ILLEGAL.getCode(), AccountTypeEnum.OUT_PART_DEPOSIT, oad); refundTrigger(orderMQDTO, orderMQDTO.getOrderRentVehicleDetail(), illegalReserve, originalRefundAmount, refundAmont, refundDesc, RefundStatusEnum.RESIDUE_ILLEGAL.getCode(), AccountTypeEnum.OUT_PART_DEPOSIT, oad);
//修改押金退还记录状态 //修改押金退还记录状态
...@@ -417,11 +423,6 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> { ...@@ -417,11 +423,6 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
updateBaseOrder.setExtraAmount(inProgressVO.getExtraAmount()); updateBaseOrder.setExtraAmount(inProgressVO.getExtraAmount());
baseOrderBiz.updateSelectiveByIdReT(updateBaseOrder, Boolean.TRUE); baseOrderBiz.updateSelectiveByIdReT(updateBaseOrder, Boolean.TRUE);
//还车扣除款 剩余的 钱,再减去违章预备金
oad.getDeductions().add(
initDeduction(illegalReserve, "违章保证金", DeductionTypeEnum.VIOLATE_TRAFFIC_KEEP, OrderAccountDeduction.ORIGIN_DEPOSIT)
);
//生成额外的费用明细 //生成额外的费用明细
csv.setConsumeAmount(inProgressVO.getConsumeAmount()); csv.setConsumeAmount(inProgressVO.getConsumeAmount());
csv.setModelAmount(orderItem.getUnitPrice()); csv.setModelAmount(orderItem.getUnitPrice());
......
package com.xxfc.platform.order.biz.inner; package com.xxfc.platform.order.biz.inner;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO; import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
...@@ -10,11 +12,10 @@ import com.xxfc.platform.app.entity.Cofig; ...@@ -10,11 +12,10 @@ import com.xxfc.platform.app.entity.Cofig;
import com.xxfc.platform.app.feign.ConfigFeign; import com.xxfc.platform.app.feign.ConfigFeign;
import com.xxfc.platform.order.biz.OrderAccountBiz; import com.xxfc.platform.order.biz.OrderAccountBiz;
import com.xxfc.platform.order.biz.OrderRefundBiz; import com.xxfc.platform.order.biz.OrderRefundBiz;
import com.xxfc.platform.order.contant.enumerate.AccountTypeEnum; import com.xxfc.platform.order.contant.enumerate.*;
import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum;
import com.xxfc.platform.order.contant.enumerate.RefundTypeEnum;
import com.xxfc.platform.order.entity.*; import com.xxfc.platform.order.entity.*;
import com.xxfc.platform.order.pojo.account.OrderAccountDeduction;
import com.xxfc.platform.order.pojo.account.OrderAccountDetail;
import com.xxfc.platform.universal.constant.DictionaryKey; import com.xxfc.platform.universal.constant.DictionaryKey;
import com.xxfc.platform.universal.dto.SmsTemplateDTO; import com.xxfc.platform.universal.dto.SmsTemplateDTO;
import com.xxfc.platform.universal.entity.Dictionary; import com.xxfc.platform.universal.entity.Dictionary;
...@@ -425,9 +426,24 @@ public class OrderMsgBiz { ...@@ -425,9 +426,24 @@ public class OrderMsgBiz {
setOrderId(baseOrder.getId()); setOrderId(baseOrder.getId());
setAccountType(AccountTypeEnum.OUT_PART_DEPOSIT.getCode()); setAccountType(AccountTypeEnum.OUT_PART_DEPOSIT.getCode());
}}); }});
originalAmount = orvd.getDeposit();
violateAmount = orderAccount.getDeductAmount(); OrderAccountDetail oad = JSONUtil.toBean(orderAccount.getAccountDetail(), OrderAccountDetail.class);
//BeanUtil.toBean(orderAccount.getAccountDetail(), OrderAccountDetail.class);
OrderAccountDeduction trafficDeduction = new OrderAccountDeduction() {{
setAmount(BigDecimal.ZERO);
}};
//违章保证金
for(OrderAccountDeduction deductionTemp : oad.getDeductions()) {
if(deductionTemp.getType().equals(DeductionTypeEnum.VIOLATE_TRAFFIC_KEEP.getCode())) {
trafficDeduction = deductionTemp;
}
}
//(原押金 - 违章保证金 )+ 订单退款金额
originalAmount = oad.getOriginDepositAmount().subtract(trafficDeduction.getAmount()).add(oad.getOrderAmount());
//退款金额
refundAmount = orderAccount.getAccountAmount(); refundAmount = orderAccount.getAccountAmount();
// 扣款 = originalAmount - refundAmount
violateAmount = originalAmount.subtract(refundAmount);
residueAmount = orvd.getReturnPayResidue(); residueAmount = orvd.getReturnPayResidue();
}else if(RefundStatusEnum.REFUND_DEPOSIT.getCode().equals(baseOrder.getRefundStatus())){ }else if(RefundStatusEnum.REFUND_DEPOSIT.getCode().equals(baseOrder.getRefundStatus())){
smstype = SmsTemplateDTO.REFUND_B; smstype = SmsTemplateDTO.REFUND_B;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment