|
|
|
@@ -217,6 +217,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<WxBillRent> findByRentContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) { |
|
|
|
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(tenantId); |
|
|
|
WxBillRent record = new WxBillRent(); |
|
|
|
record.setRentContractId(id); |
|
|
|
record.setTenantId(tenantId); |
|
|
|
@@ -227,6 +228,19 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
|
if(e.getPayRatio() == null){ |
|
|
|
e.setPayRatio(0l); |
|
|
|
} |
|
|
|
//手续费 = 合同应收+手续费+滞纳金 |
|
|
|
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()); |
|
|
|
} |
|
|
|
}); |
|
|
|
PageInfo<WxBillRent> pageInfo = new PageInfo<>(billRentList); |
|
|
|
return pageInfo; |
|
|
|
@@ -264,6 +278,22 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
|
if (!billDepositList.isEmpty()) { |
|
|
|
deposit = billDepositList.get(0); |
|
|
|
} |
|
|
|
|
|
|
|
//手续费 = 合同应收+手续费+滞纳金 |
|
|
|
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(rent.getTenantId()); |
|
|
|
if(rent.getReceivePay() != null){ |
|
|
|
if(rent.getLatePayPrice() == null) rent.setLatePayPrice(0l); |
|
|
|
BigDecimal servicePay; |
|
|
|
if(rent.getServiceChargePay() != null){ |
|
|
|
servicePay = new BigDecimal(rent.getServiceChargePay()); |
|
|
|
}else{ |
|
|
|
servicePay = new BigDecimal(rent.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP); |
|
|
|
} |
|
|
|
Long realReceivePay = servicePay.longValue() + rent.getLatePayPrice() + rent.getReceivePay(); |
|
|
|
rent.setRealReceivePay(realReceivePay); |
|
|
|
rent.setServiceChargePay(servicePay.intValue()); |
|
|
|
} |
|
|
|
|
|
|
|
//周期 |
|
|
|
Map<String, Object> result = new HashMap<>(3); |
|
|
|
result.put("rent", rent); |
|
|
|
@@ -278,6 +308,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { |
|
|
|
merchantTradeDaily.setEndTime(sd.format(billRent.getEndtime())); |
|
|
|
String money = wxMerchantTradeDailyMapper.findSumMoney(merchantTradeDaily); |
|
|
|
result.put("solutionBillMoney", StringUtils.isBlank(money)?0:money); |
|
|
|
|
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|