|
|
|
@@ -366,10 +366,17 @@ public class WxRentContractController extends WxContractBaseController { |
|
|
|
@SystemControllerLog(description = "租赁合同-终止合同") |
|
|
|
public ResultData endContract(@RequestBody WxRentContract wxRentContract) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::endContract"); |
|
|
|
wxRentContract.updateTenantInfo(getTenantInfo()); |
|
|
|
WxRentContract contract = wxRentContractMapper.selectById(wxRentContract.getId()); |
|
|
|
if (contract == null) { |
|
|
|
return new ResultData(ErrorCode.RENT_CONTRACT_IS_NOT_FOUND); |
|
|
|
} |
|
|
|
wxRentContract.updateTenantInfo(contract); |
|
|
|
wxRentContractService.endContract(wxRentContract); |
|
|
|
if(wxRentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { |
|
|
|
wxPropertyContractService.updatePropertyContractStatus(wxRentContract.getPropertyId()); |
|
|
|
//租金+物业的终止 |
|
|
|
if(contract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { |
|
|
|
WxPropertyContract wpc = new WxPropertyContract(); |
|
|
|
wpc.setId(wxRentContract.getPropertyId()); |
|
|
|
wxPropertyContractService.endContract(wpc); |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
@@ -486,7 +493,23 @@ public class WxRentContractController extends WxContractBaseController { |
|
|
|
return new ResultData(wxRentContractService.getRentContractList(wxRentContract, pageNum, pageSize)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("getPayAccountInfo") |
|
|
|
@SystemControllerLog(description = "租赁合同-获取甲方账户") |
|
|
|
public ResultData getPayAccountInfo() { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentContractStatus"); |
|
|
|
WxPayAccountBill payAccountBill = payAccountBillService.getByTenantInfo(getTenantInfo()); |
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
if(StringUtils.isNotBlank(payAccountBill.getBankAccountName()) && StringUtils.isNotBlank(payAccountBill.getBankCardId())) { |
|
|
|
map.put("bankAccountName", payAccountBill.getBankAccountName()); |
|
|
|
map.put("bankCardId", payAccountBill.getBankCardId()); |
|
|
|
if(payAccountBill.getServiceChargeRate() == null){ |
|
|
|
map.put("serviceChargeRate", "0"); |
|
|
|
}else{ |
|
|
|
map.put("serviceChargeRate", payAccountBill.getServiceChargeRate()+""); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(map); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -619,24 +642,6 @@ public class WxRentContractController extends WxContractBaseController { |
|
|
|
return wxRentContractService.updateRentContractStatus(wxRentContract.getId()); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("getPayAccountInfo") |
|
|
|
@SystemControllerLog(description = "租赁合同-获取甲方账户") |
|
|
|
public ResultData getPayAccountInfo() { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentContractStatus"); |
|
|
|
WxPayAccountBill payAccountBill = payAccountBillService.getByTenantInfo(getTenantInfo()); |
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
if(StringUtils.isNotBlank(payAccountBill.getBankAccountName()) && StringUtils.isNotBlank(payAccountBill.getBankCardId())) { |
|
|
|
map.put("bankAccountName", payAccountBill.getBankAccountName()); |
|
|
|
map.put("bankCardId", payAccountBill.getBankCardId()); |
|
|
|
if(payAccountBill.getServiceChargeRate() == null){ |
|
|
|
map.put("serviceChargeRate", "0"); |
|
|
|
}else{ |
|
|
|
map.put("serviceChargeRate", payAccountBill.getServiceChargeRate()+""); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(map); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("savePayAccountInfo") |
|
|
|
@SystemControllerLog(description = "租赁合同-保存甲方账户") |
|
|
|
public ResultData savePayAccountInfo(@RequestBody WxPayAccountBill payAccountBill) { |
|
|
|
|