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

[合同收款账户设置][修改][手续率修改后更新租金及物业账单]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
31155e96ea
9 измененных файлов: 45 добавлений и 13 удалений
  1. +3
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java
  2. +4
    -4
      mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java
  3. +4
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java
  4. +6
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  5. +3
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  6. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java
  7. +12
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java
  8. +5
    -0
      mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml
  9. +5
    -0
      mallinkService/src/main/resources/mapper/WxBillRentMapper.xml

+ 3
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java Просмотреть файл

@@ -345,6 +345,9 @@ public class WxRentContractController extends BaseController {
if(StringUtils.isBlank(payAccountBill.getBankCardId())) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "甲方银行账户卡号未填写");
}
if (payAccountBill.getServiceChargeRate() == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "手续费费率未填写");
}
String tenantId = getTenantId();
WxPayAccountBill payAccountBillNew = payAccountBillService.getByTenantId(tenantId);
payAccountBillNew.setBankAccountName(payAccountBill.getBankAccountName());


+ 4
- 4
mallinkService/src/main/java/com/iformall/mapper/WxBillPropertyMapper.java Просмотреть файл

@@ -1,10 +1,7 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillProperty;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxPropertyContract;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.po.*;

import java.util.List;
import java.util.Map;
@@ -55,4 +52,7 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long>
* 保存billAction
*/
void insertBillAction();

void updateServiceCharge(WxPayAccountBill tenantId);

}

+ 4
- 0
mallinkService/src/main/java/com/iformall/mapper/WxBillRentMapper.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxBillRent;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.domain.po.WxRentContract;
import org.apache.ibatis.annotations.Param;

@@ -52,4 +53,7 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> {
* 保存billAction
*/
void insertBillAction();

void updateServiceCharge(WxPayAccountBill record);

}

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

@@ -363,12 +363,17 @@ public class WxBillAllServiceImpl implements WxBillAllService {

//status不是欠缴,都展示0,与前端保持一致
if (!EnumBillRentStatus.NOT_PAID.getCode().equals(wxBillAllVo.getStatus())) {
wxBillAllVo.setOwe(0l);
wxBillAllVo.setOwe(0L);
wxBillAllVo.setOweStr("0");
}
datalist.add(wxBillAllVo);
}
}
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxBillAll.getTenantId());
datalist.stream().forEach(e -> {
//手续费 = 合同应收+手续费+滞纳金
cmputeTotalMoney(wxPayAccountBill, e);
});
excelService.exportExcel(datalist, null, "账单数据", WxBillAllVo.class, "账单数据.xlsx", response, false);
}



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

@@ -289,11 +289,10 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
WxBillPropertyDeposit deposit = null;
List<WxBillPropertyDeposit> billDepositList = wxBillPropertyDepositMapper.queryBillDepositList(depositParam);
if (!billDepositList.isEmpty()) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(property.getTenantId());
deposit = billDepositList.get(0);
wxBillPropertyDepositService.computeTotalMoney(wxPayAccountBill, deposit);
deposit.setOwe(deposit.getRealReceivePay() - deposit.getPay());
//WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(property.getTenantId());
//wxBillPropertyDepositService.computeTotalMoney(wxPayAccountBill, deposit);
//deposit.setOwe(deposit.getRealReceivePay() - deposit.getPay());
}
Map<String, Object> result = new HashMap<>(2);
result.put("property", property);


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

@@ -289,10 +289,10 @@ public class WxBillRentServiceImpl implements WxBillRentService {
WxBillDeposit deposit = null;
List<WxBillDeposit> billDepositList = wxBillDepositMapper.queryBillDepositList(depositParam);
if (!billDepositList.isEmpty()) {
WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(rent.getTenantId());
deposit = billDepositList.get(0);
wxBillDepositService.computeTotalMoney(wxPayAccountBill, deposit);
deposit.setOwe(deposit.getRealReceivePay() - deposit.getPay());
//WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(rent.getTenantId());
//wxBillDepositService.computeTotalMoney(wxPayAccountBill, deposit);
//deposit.setOwe(deposit.getRealReceivePay() - deposit.getPay());
}
//周期
Map<String, Object> result = new HashMap<>(3);


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

@@ -5,6 +5,8 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
import com.iformall.domain.po.WxPayAccountBill;
import com.iformall.mapper.WxBillPropertyMapper;
import com.iformall.mapper.WxBillRentMapper;
import com.iformall.mapper.WxPayAccountBillMapper;
import com.iformall.service.WxPayAccountBillService;
import org.slf4j.Logger;
@@ -19,6 +21,11 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService {
@Autowired
WxPayAccountBillMapper wxPayAccountBillMapper;

@Autowired
WxBillRentMapper wxBillRentMapper;

@Autowired
WxBillPropertyMapper wxBillPropertyMapper;

@Override
public PageInfo<WxPayAccountBill> listAsPage(WxPayAccountBill record, Integer pageIndex, Integer pageSize) {
@@ -40,13 +47,17 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService {
@Override
public void saveOrUpdate(WxPayAccountBill record) {
if (record.getId() == null) {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
wxPayAccountBillMapper.insert(record);
} else {
wxPayAccountBillMapper.updateById(record);
}

//更新手续费
wxBillRentMapper.updateServiceCharge(record);
wxBillPropertyMapper.updateServiceCharge(record);

}

@Override


+ 5
- 0
mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml Просмотреть файл

@@ -268,5 +268,10 @@
and (select late_pay_ratio from wx_property_contract where id = b.`property_contract_id`) > 0
and DATEDIFF(now(), date_add(b.receive_date,interval(select late_pay_day from wx_property_contract where id = b.`property_contract_id`) day)) >0;
</update>
<update id="updateServiceCharge" parameterType="com.iformall.domain.po.WxPayAccountBill">
update wx_bill_property set service_charge_pay=round(receive_pay+receive_pay*#{serviceChargeRate}/100) where tenant_id=#{tenantId} and status in(1,2,4)
</update>

</mapper>


+ 5
- 0
mallinkService/src/main/resources/mapper/WxBillRentMapper.xml Просмотреть файл

@@ -274,5 +274,10 @@
and (select late_pay_ratio from wx_rent_contract where id = b.`rent_contract_id`) > 0
and DATEDIFF(now(), date_add(b.receive_date,interval(select late_pay_day from wx_rent_contract where id = b.`rent_contract_id`) day)) >0;
</update>
<update id="updateServiceCharge" parameterType="com.iformall.domain.po.WxPayAccountBill">
update wx_bill_rent set service_charge_pay=round(receive_pay+receive_pay*#{serviceChargeRate}/100) where tenant_id=#{tenantId} and status in(1,2,4)
</update>

</mapper>


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