From 9d3b9a88a3571d46d62acaebca6d4ef9c8ffd8a5 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Tue, 18 Feb 2020 16:34:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A7=9F=E9=87=91=E7=89=A9=E4=B8=9A=E5=90=88?= =?UTF-8?q?=E5=90=8C][=E4=BF=AE=E6=94=B9][=E9=A9=B3=E5=9B=9E=E5=90=8E?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E6=8F=90=E7=A4=BA=E5=AD=98=E5=9C=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxFlowServiceImpl.java | 12 +++++++++++- .../service/impl/WxPropertyContractServiceImpl.java | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) 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 c1b984516..b46126115 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -45,6 +45,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; + import java.lang.reflect.Field; import java.text.SimpleDateFormat; import java.util.*; @@ -151,11 +152,20 @@ public class WxFlowServiceImpl implements WxFlowService { rent.setBusinessType(flowType); wxRentContractService.updateApplyStatus(rent); - //如果审批完成,而且是补录直接改为已签约状态(普通需要绑定商户才是已签约) WxRentContract record = wxRentContractMapper.selectById(businessId); + //合并的合同-审批时 物业合同的状态肯定不在 签约中 避免更新物业合同时提示店铺存在 + if(record.getOperationType().equals(EnumContractOperationType.WHOLE.getCode())){ + WxPropertyContract wxPropertyContract = new WxPropertyContract(); + wxPropertyContract.setRentContractId(record.getId()); + wxPropertyContract.setStatus(EnumRentContractStatus.INTENTION.getCode()); + wxPropertyContractMapper.updateStatusByRentContractId(wxPropertyContract); + } + + //如果审批完成,而且是补录直接改为已签约状态(普通需要绑定商户才是已签约) if(record != null && record.getMerchantId()!=null && EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { wxRentContractService.updateRentContractStatus(businessId); } + }else if(EnumFlowContractType.PROPERTY.getCode().equals(contractType) || EnumFlowContractType.PROPERTY_POINT.getCode().equals(contractType)){ WxPropertyContract wxPropertyContract = new WxPropertyContract(); wxPropertyContract.setId(businessId); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index 05e38b2f9..a8a99c8fb 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -387,6 +387,12 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService record.setPrice(record.getPrice() != null ? record.getPrice() : 0); record.setDeposit(record.getDeposit() != null ? record.getDeposit() : 0); record.setUpdatetime(new Date()); + + //如果是合并合同 物业合同的状态为 意向 + if (record.getOperationType().equals(EnumContractOperationType.WHOLE.getCode())) { + record.setStatus(EnumRentContractStatus.INTENTION.getCode()); + } + if (CollectionUtils.isEmpty(record.getFlowParams())) { hasFlow = false; record.setApplyStatus(EnumRentContractAppStatus.DEFAULT.getCode());