From 20031fdd98affacbb4368f95dce7b927f1b36edb Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sun, 27 Jan 2019 22:18:50 +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][=E5=88=A4=E6=96=AD=E8=AE=A1=E7=A7=9F?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E5=8F=8A=E7=94=9F=E6=88=90=E8=B4=A6=E5=8D=95?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxPropertyContractServiceImpl.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 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 91adec163..8762b74da 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -104,7 +104,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService public ResultData saveOrUpdate(WxPropertyContract record, Long userId,String userName) { if (null == record.getShopId()) { - return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "shopId不能为空"); + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "shopId不能为空"); } WxRentContract wxRentContract = wxRentContractMapper.selectByPrimaryKey(record.getRentContractId()); @@ -117,7 +117,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService } } if (null == record.getMerchantId()) { - return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL, "merchantId不能为空"); + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "merchantId不能为空"); } WxMerchant merchant = wxMerchantMapper.selectByPrimaryKey(record.getMerchantId()); if (merchant == null) { @@ -152,7 +152,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService if (count > 0) { return new ResultData(ErrorCode.RENT_CONTRACT_WITH_SHOP_IS_FOUND); } - + int dayType = record.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode()) ? Calendar.DAY_OF_MONTH : Calendar.MONTH; //保存物业合同信息 String message = ""; if (record.getId() == null) { @@ -161,7 +161,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService //计租开始时间 Calendar instance = Calendar.getInstance(); instance.setTime(record.getRentalStartDate()); - instance.add(Calendar.MONTH, record.getLease()); + instance.add(dayType, record.getLease()); instance.add(Calendar.DAY_OF_MONTH, -1); record.setRentalEndDate(instance.getTime()); //起租结束时间 @@ -191,7 +191,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService } Calendar instance = Calendar.getInstance(); instance.setTime(record.getRentalStartDate()); - instance.add(Calendar.MONTH, record.getLease()); + instance.add(dayType, record.getLease()); instance.add(Calendar.DAY_OF_MONTH, -1); record.setRentalEndDate(instance.getTime()); //起租结束时间 @@ -247,10 +247,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService WxPropertyContract record = wxPropertyContractMapper.selectByPrimaryKey(id); if (record.getMerchantId() != null && record.getStatus().equals(EnumRentContractStatus.SIGNED_RENT_UNPAID.getCode()) && record.getReceivePeriod() != null && record.getDeposit() > 0 && record.getPrice() > 0) { - WxBillProperty wxBillProperty = new WxBillProperty(); - wxBillProperty.setMerchantId(record.getMerchantId()); - List> billPropertyList = wxBillPropertyMapper.queryBillPropertyList(wxBillProperty); - if (billPropertyList.size() == 0) { + //WxBillProperty wxBillProperty = new WxBillProperty(); + //wxBillProperty.setMerchantId(record.getMerchantId()); + //List> billPropertyList = wxBillPropertyMapper.queryBillPropertyList(wxBillProperty); + //if (billPropertyList.size() == 0) { WxMerchant wxMerchant = new WxMerchant(); wxMerchant.setId(record.getMerchantId()); wxMerchant.setTenantId(record.getTenantId()); @@ -258,7 +258,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService buildProperty(wxMerchant); //物业押金账单 buildDeposit(wxMerchant); - } + //} } return new ResultData(Result.SUCCESS, "操作成功"); }