Commit 79217c9f authored by 周健威's avatar 周健威

修改代码

parent 4d220554
......@@ -352,8 +352,14 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//剩余押金 = 押金 - 违章保证金 - 定损金额
oad.setDepositAmount(oad.getDepositAmount().subtract(illegalReserve).subtract(crosstown.getDeductionCost()));
handleCrosstownDetail(crosstown, oad);
BigDecimal refundAmont = crosstown.getRestDeposit().subtract(illegalReserve);
BigDecimal originalRefundAmount = crosstown.getRestDeposit().add(crosstown.getDeductionCost()).subtract(illegalReserve);
//退款
BigDecimal refundAmont = oad.getDepositAmount().add(oad.getOrderAmount());
//crosstown.getRestDeposit().subtract(illegalReserve);
//原退款的钱
BigDecimal originalRefundAmount = oad.getOriginDepositAmount().add(oad.getOriginOrderAmount());
//crosstown.getRestDeposit().add(crosstown.getDeductionCost()).subtract(illegalReserve);
String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章预备金:"+ illegalReserve.toString();
refundDesc = handleDed(crosstown, refundDesc);
refundDesc += ")";
......
......@@ -10,6 +10,7 @@ import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
import com.xxfc.platform.order.entity.OrderVehicleCrosstown;
import com.xxfc.platform.order.entity.OrderViolation;
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.entity.Dictionary;
......@@ -113,9 +114,16 @@ public class RentDepositJobHandler extends IJobHandler {
setIsDel(SYS_FALSE);
}});
OrderAccountDetail oad = new OrderAccountDetail();
String refundDesc = "退还押金:";
BigDecimal refundAmont;
if(null != orderViolation) {
//设置扣款项
oad.getDeductions().add(
orderAccountBiz.initDeduction(orderViolation.getPrice(), DeductionTypeEnum.VIOLATE_TRAFFIC_DEDUCT.getDesc(), DeductionTypeEnum.VIOLATE_TRAFFIC_DEDUCT, OrderAccountDeduction.ORIGIN_DEPOSIT)
);
//还车扣除款 剩余的 钱,再减去违章预备金
refundAmont = orvd.getReturnPayResidue().subtract(orderViolation.getPrice());
refundDesc += refundAmont.toString()+ "(已扣除 违章扣款:"+ refundAmont.toString();
......@@ -124,7 +132,8 @@ public class RentDepositJobHandler extends IJobHandler {
refundAmont = orvd.getReturnPayResidue();
refundDesc += refundAmont.toString();
}
OrderAccountDetail oad = new OrderAccountDetail();
oad.setOriginDepositAmount(orvd.getReturnPayResidue());
oad.setDepositAmount(refundAmont);
orderAccountBiz.refundTrigger(baseOrder, orvd, BigDecimal.ZERO, orvd.getReturnPayResidue(), refundAmont, refundDesc, RefundStatusEnum.REFUND_DEPOSIT.getCode(), AccountTypeEnum.OUT_RESIDUE_DEPOSIT, oad);
orderDepositRefundRecordBiz.completeRecordStatus(crosstown.getId(), DepositRefundStatus.VIOLATIONARRIVAL);
orderMsgBiz.handelMsgDeposit(orvd, baseOrder, userFeign.userDetailById(baseOrder.getUserId()).getData());
......
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