| @@ -147,10 +147,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| //手续费 = 合同应收+手续费+滞纳金 | //手续费 = 合同应收+手续费+滞纳金 | ||||
| pageInfo.getList().stream().forEach(e -> { | pageInfo.getList().stream().forEach(e -> { | ||||
| //手续费 = 合同应收+手续费+滞纳金 | //手续费 = 合同应收+手续费+滞纳金 | ||||
| if (!e.getBillTypeValue().equals(EnumBillTypeParam.RENT_DEPOSIT.getCode()) | |||||
| && !e.getBillTypeValue().equals(EnumBillTypeParam.PROPERTY_DEPOSIT.getCode())) { | |||||
| cmputeTotalMoney(wxPayAccountBill, e); | |||||
| } | |||||
| cmputeTotalMoney(wxPayAccountBill, e); | |||||
| }); | }); | ||||
| Map<String, Object> result = new HashMap<>(); | Map<String, Object> result = new HashMap<>(); | ||||
| @@ -159,22 +156,28 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| } | } | ||||
| public void cmputeTotalMoney(WxPayAccountBill wxPayAccountBill, WxBillAllVo e) { | public void cmputeTotalMoney(WxPayAccountBill wxPayAccountBill, WxBillAllVo e) { | ||||
| if (e.getReceivePay() != null) { | |||||
| if (e.getLatePayPrice() == null) { | |||||
| e.setLatePayPrice(0L); | |||||
| } | |||||
| BigDecimal servicePay; | |||||
| if (e.getServiceChargePay() != null) { | |||||
| servicePay = new BigDecimal(e.getServiceChargePay()); | |||||
| } else { | |||||
| servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | |||||
| } | |||||
| Long realReceivePay = servicePay.longValue() + e.getLatePayPrice() + e.getReceivePay(); | |||||
| e.setRealReceivePay(realReceivePay); | |||||
| e.setServiceChargePay(servicePay.intValue()); | |||||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode())) { | |||||
| e.setOwe(0L); | |||||
| if (!e.getBillTypeValue().equals(EnumBillTypeParam.RENT_DEPOSIT.getCode()) | |||||
| && !e.getBillTypeValue().equals(EnumBillTypeParam.PROPERTY_DEPOSIT.getCode())) { | |||||
| if (e.getReceivePay() != null) { | |||||
| if (e.getLatePayPrice() == null) { | |||||
| e.setLatePayPrice(0L); | |||||
| } | |||||
| BigDecimal servicePay; | |||||
| if (e.getServiceChargePay() != null) { | |||||
| servicePay = new BigDecimal(e.getServiceChargePay()); | |||||
| } else { | |||||
| servicePay = new BigDecimal(e.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); | |||||
| } | |||||
| Long realReceivePay = servicePay.longValue() + e.getLatePayPrice() + e.getReceivePay(); | |||||
| e.setRealReceivePay(realReceivePay); | |||||
| e.setServiceChargePay(servicePay.intValue()); | |||||
| if (!e.getStatus().equals(EnumBillRentStatus.NOT_PAID.getCode()) && | |||||
| !e.getStatus().equals(EnumBillRentStatus.WAIT_PAY.getCode())) { | |||||
| e.setOwe(0L); | |||||
| } | |||||
| } | } | ||||
| } else { | |||||
| e.setRealReceivePay(e.getReceivePay()); | |||||
| } | } | ||||
| } | } | ||||