From 62678caf87b69efc0fa847a770eed3390337e5ec Mon Sep 17 00:00:00 2001 From: luozukai Date: Fri, 14 Jun 2019 16:36:52 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=A1=E6=89=B9][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=88=E6=AD=A2=E5=AE=A1=E6=89=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxFlowServiceImpl.java | 21 +++---------------- .../impl/WxRentContractServiceImpl.java | 3 +++ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 1368e80f8..111ea1364 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -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){ diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 72613ad53..62b9e4864 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -2020,6 +2020,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { @Override public void endContract(WxRentContract wxRentContract) { + wxRentContract.setStatus(EnumRentContractStatus.CONTRACT_TERMINATE.getCode()); + wxRentContractMapper.updateStatus(wxRentContract); + //终止租赁合同,同时终止物业合同 if(EnumEndProperty.END_RENT_AND_PROPERTY.getCode().equals(wxRentContract.getEndProperty())){ WxPropertyContract wxPropertyContract = new WxPropertyContract();