Browse Source

[结算管理][修改][查询]

release_toaliyun_real
gongbiao 6 years ago
parent
commit
8724f74403
1 changed files with 22 additions and 19 deletions
  1. +22
    -19
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java

+ 22
- 19
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java View File

@@ -147,10 +147,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
//手续费 = 合同应收+手续费+滞纳金
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<>();
@@ -159,22 +156,28 @@ public class WxBillAllServiceImpl implements WxBillAllService {
}

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());
}
}



Loading…
Cancel
Save