| @@ -552,6 +552,23 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| return new ResultData(Result.ERROR,e.getMessage()); | return new ResultData(Result.ERROR,e.getMessage()); | ||||
| } | } | ||||
| //如果是租金+物业合同,如果没有物业合同或者物业合同不是草稿状态,不能提交审核 | |||||
| if (wxRentContract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { | |||||
| if (null == wxRentContract.getPropertyId()) { | |||||
| return new ResultData(Result.ERROR,"未创建物业合同,请先完善。"); | |||||
| } | |||||
| WxPropertyContract property = wxPropertyContractService.getSimpleDetail(wxRentContract.getPropertyId()); | |||||
| if (null == property) { | |||||
| return new ResultData(Result.ERROR,"未创建物业合同,请先完善。"); | |||||
| } | |||||
| if (property.getStatus().intValue() == EnumRentContractStatus.UNWRITE.getCode().intValue()) { | |||||
| return new ResultData(Result.ERROR,"物业合同未完善,请先完善。"); | |||||
| } | |||||
| if (property.getStatus().intValue() != EnumRentContractStatus.DRAFT.getCode().intValue()) { | |||||
| return new ResultData(Result.ERROR,"物业合同当前状态不能直接生效。"); | |||||
| } | |||||
| } | |||||
| wxRentContractService.updateRentContractStatus(wxRentContract.getId(),false); | wxRentContractService.updateRentContractStatus(wxRentContract.getId(),false); | ||||
| if(contract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { | if(contract.getOperationType().intValue() == EnumContractOperationType.WHOLE.getCode().intValue()) { | ||||
| wxPropertyContractService.updatePropertyContractStatus(wxRentContract.getPropertyId()); | wxPropertyContractService.updatePropertyContractStatus(wxRentContract.getPropertyId()); | ||||
| @@ -634,12 +651,6 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| if (property.getStatus().intValue() != EnumRentContractStatus.DRAFT.getCode().intValue()) { | if (property.getStatus().intValue() != EnumRentContractStatus.DRAFT.getCode().intValue()) { | ||||
| return new ResultData(Result.ERROR,"物业合同当前状态不能提交审批。"); | return new ResultData(Result.ERROR,"物业合同当前状态不能提交审批。"); | ||||
| } | } | ||||
| WxPropertyContract wpc = new WxPropertyContract(); | |||||
| wpc.setStatus(EnumRentContractStatus.DRAFT.getCode()); | |||||
| wpc.setRentContractId(rentContract.getId()); | |||||
| wpc.setOperationType(EnumRentShopType.SHOP.getCode()); | |||||
| List<WxPropertyContract> list = wxPropertyContractService.findList(wpc); | |||||
| } | } | ||||
| if(rentContract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue()) { | if(rentContract.getOperationType().intValue() == EnumContractOperationType.PART.getCode().intValue()) { | ||||