From 48ece29f9d6fe8ae815b2d66ada74a08c22bc3df Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 27 Dec 2018 20:02:00 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=89=A9=E4=B8=9A=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E6=B7=BB=E5=8A=A0=E5=90=88=E5=90=8C?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=E5=88=A4=E6=96=AD]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxPropertyContractServiceImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 918c38bf4..6f84051c0 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -141,6 +141,17 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService return new ResultData(ErrorCode.SYS_PARAMETER_ERROR, "押金要大于0"); } + WxPropertyContract propertyContract = new WxPropertyContract(); + propertyContract.setTenantId(record.getTenantId()); + propertyContract.setRentContractId(record.getRentContractId()); + long count = wxPropertyContractMapper.findList(propertyContract) + .stream().filter(p -> p.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) || + p.getStatus().equals(EnumRentContractStatus.RENT_PAID.getCode()) || + p.getStatus().equals(EnumRentContractStatus.CONTRACT_END_SOON.getCode())).count(); + if (count > 0) { + return new ResultData(ErrorCode.RENT_CONTRACT_WITH_SHOP_IS_FOUND); + } + //保存物业合同信息 if (record.getId() == null) { final IdWorker idWorker = IdWorker.get();