|
|
|
@@ -167,29 +167,14 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
rent.setId(businessId); |
|
|
|
rent.setApplyStatus(applyStatus); |
|
|
|
rent.setBusinessType(flowType); |
|
|
|
//合同状态改成提前终止 |
|
|
|
|
|
|
|
if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { |
|
|
|
rent.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); |
|
|
|
|
|
|
|
//终止租赁合同,同时终止物业合同 |
|
|
|
Integer endProperty = (Integer)getVariableByKey(variables,"endProperty"); |
|
|
|
if(endProperty!=null && EnumEndProperty.END_RENT_AND_PROPERTY.getCode().intValue() == endProperty.intValue()){ |
|
|
|
WxPropertyContract wxPropertyContract = new WxPropertyContract(); |
|
|
|
wxPropertyContract.setRentContractId(businessId); |
|
|
|
wxPropertyContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); |
|
|
|
wxPropertyContractMapper.updateStatusByRentContractId(wxPropertyContract); |
|
|
|
|
|
|
|
//物业账单失效 |
|
|
|
wxBillPropertyMapper.updateInvalidStatusByRent(rent); |
|
|
|
} |
|
|
|
//租赁账单失效 |
|
|
|
WxBillRent wxBillRent = new WxBillRent(); |
|
|
|
wxBillRent.setRentContractId(businessId); |
|
|
|
wxBillRentMapper.updateInvalidStatus(wxBillRent); |
|
|
|
|
|
|
|
wxRentContractService.updateApplyStatus(rent); |
|
|
|
//解绑商户和商铺关系 |
|
|
|
wxMerchantService.disable(wxRentContractMapper.selectByPrimaryKey(businessId).getMerchantId()); |
|
|
|
rent.setEndProperty(endProperty); |
|
|
|
wxRentContractService.endContract(rent); |
|
|
|
} |
|
|
|
wxRentContractService.updateApplyStatus(rent); |
|
|
|
}else if(contractType.intValue() == 3 || contractType.intValue() == 4){ |
|
|
|
|