Просмотр исходного кода

Merge branch 'develop' of https://git.youlane.cn/server/formallProject into develop

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
17e0e982c3
2 измененных файлов: 63 добавлений и 0 удалений
  1. +32
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  2. +31
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java

+ 32
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java Просмотреть файл

@@ -214,6 +214,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {


@Override @Override
public PageInfo<WxBillProperty> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) { public PageInfo<WxBillProperty> findByPropertyContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(tenantId);
WxBillProperty record = new WxBillProperty(); WxBillProperty record = new WxBillProperty();
record.setPropertyContractId(id); record.setPropertyContractId(id);
record.setTenantId(tenantId); record.setTenantId(tenantId);
@@ -221,6 +222,22 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
updateBillStatus(record); updateBillStatus(record);
PageHelper.startPage(pageIndex, pageSize); PageHelper.startPage(pageIndex, pageSize);
List<WxBillProperty> billRentList = wxBillPropertyMapper.queryBillPropertyList(record); List<WxBillProperty> billRentList = wxBillPropertyMapper.queryBillPropertyList(record);
billRentList.stream().forEach(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());
}
});

PageInfo<WxBillProperty> pageInfo = new PageInfo<>(billRentList); PageInfo<WxBillProperty> pageInfo = new PageInfo<>(billRentList);
return pageInfo; return pageInfo;
} }
@@ -258,6 +275,21 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
if (!billDepositList.isEmpty()) { if (!billDepositList.isEmpty()) {
deposit = billDepositList.get(0); deposit = billDepositList.get(0);
} }
//手续费 = 合同应收+手续费+滞纳金
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(property.getTenantId());
if(property.getReceivePay() != null){
if(property.getLatePayPrice() == null) property.setLatePayPrice(0l);
BigDecimal servicePay;
if(property.getServiceChargePay() != null){
servicePay = new BigDecimal(property.getServiceChargePay());
}else{
servicePay = new BigDecimal(property.getReceivePay()).multiply(new BigDecimal(wxPayAccountBill.getServiceChargeRate())).divide(new BigDecimal(10000), 2, BigDecimal.ROUND_HALF_UP);
}
Long realReceivePay = servicePay.longValue() + property.getLatePayPrice() + property.getReceivePay();
property.setRealReceivePay(realReceivePay);
property.setServiceChargePay(servicePay.intValue());
}

Map<String, Object> result = new HashMap<>(2); Map<String, Object> result = new HashMap<>(2);
result.put("property", property); result.put("property", property);
result.put("deposit", deposit); result.put("deposit", deposit);


+ 31
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java Просмотреть файл

@@ -217,6 +217,7 @@ public class WxBillRentServiceImpl implements WxBillRentService {


@Override @Override
public PageInfo<WxBillRent> findByRentContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) { public PageInfo<WxBillRent> findByRentContractId(Long id, String tenantId, Integer pageIndex, Integer pageSize) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(tenantId);
WxBillRent record = new WxBillRent(); WxBillRent record = new WxBillRent();
record.setRentContractId(id); record.setRentContractId(id);
record.setTenantId(tenantId); record.setTenantId(tenantId);
@@ -227,6 +228,19 @@ public class WxBillRentServiceImpl implements WxBillRentService {
if(e.getPayRatio() == null){ if(e.getPayRatio() == null){
e.setPayRatio(0l); 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); PageInfo<WxBillRent> pageInfo = new PageInfo<>(billRentList);
return pageInfo; return pageInfo;
@@ -264,6 +278,22 @@ public class WxBillRentServiceImpl implements WxBillRentService {
if (!billDepositList.isEmpty()) { if (!billDepositList.isEmpty()) {
deposit = billDepositList.get(0); 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); Map<String, Object> result = new HashMap<>(3);
result.put("rent", rent); result.put("rent", rent);
@@ -278,6 +308,7 @@ public class WxBillRentServiceImpl implements WxBillRentService {
merchantTradeDaily.setEndTime(sd.format(billRent.getEndtime())); merchantTradeDaily.setEndTime(sd.format(billRent.getEndtime()));
String money = wxMerchantTradeDailyMapper.findSumMoney(merchantTradeDaily); String money = wxMerchantTradeDailyMapper.findSumMoney(merchantTradeDaily);
result.put("solutionBillMoney", StringUtils.isBlank(money)?0:money); result.put("solutionBillMoney", StringUtils.isBlank(money)?0:money);

return result; return result;
} }




Загрузка…
Отмена
Сохранить