From 086ca2cc802acb8a4228bd664c86a6bb0c623d95 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Fri, 21 Jun 2019 11:20:33 +0800 Subject: [PATCH] =?UTF-8?q?[BUG][=E4=BF=AE=E6=94=B9][=E4=BA=91=E7=AB=AF?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=9Aversion:.1528.1959=EF=BC=9A=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E6=B5=81=E9=97=AE=E9=A2=98-=E8=80=81=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E6=95=B0=E6=8D=AE=E8=BF=9B=E8=A1=8C=E9=A9=B3=E5=9B=9E?= =?UTF-8?q?=EF=BC=8C=E5=9C=A8=E8=BF=9B=E8=A1=8C=E6=8F=90=E4=BA=A4=E6=AD=A4?= =?UTF-8?q?=E6=97=B6=E5=AE=A1=E6=89=B9=E6=B5=81=E6=B2=A1=E6=9C=89=E6=A8=A1?= =?UTF-8?q?=E7=89=88=E5=BA=94=E8=AF=A5=E7=9B=B4=E6=8E=A5=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E8=BF=87]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxPropertyContractServiceImpl.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 8188c4997..b33d919ff 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -268,7 +268,9 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService } //保存物业合同信息 String message; + boolean hasFlow = true; if (record.getId() == null) { + hasFlow = false; final IdWorker idWorker = IdWorker.get(); record.setId(idWorker.nextId()); record.setRentalStartDate(wxRentContract.getRentalStartDate()); @@ -330,6 +332,10 @@ 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 (CollectionUtils.isEmpty(record.getFlowParams())) { + hasFlow = false; + record.setApplyStatus(EnumRentContractAppStatus.DEFAULT.getCode()); + } try { wxPropertyContractMapper.updateByPrimaryKeySelective(record); } catch (Exception e) { @@ -340,8 +346,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService message = "更新物业合同信息成功"; } - if (record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { - if (!CollectionUtils.isEmpty(record.getFlowParams())) { + if (hasFlow) { + if (record.getOperationType().equals(EnumContractOperationType.PART.getCode())) { if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null) { updatePropertyContractStatus(record.getId()); } else { @@ -355,10 +361,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService wxPropertyContractMapper.updateStatus(updateRentContract); logger.info("id:{},启动审批流成功", record.getId().toString()); } - } - } else { - //有模板,启动审批流,没有,直接生产账单 - if (!CollectionUtils.isEmpty(record.getFlowParams())) { + } else { if (wxFlowService.getModelByType((Integer) record.getFlowParams().get("businessType"), record.getTenantId()) == null && record.getMerchantId() != null) { wxRentContractService.updateRentContractStatus(record.getId());