|
|
|
@@ -407,7 +407,10 @@ public class WxRentContractController extends WxContractBaseController { |
|
|
|
public ResultData getRentContractList(@ModelAttribute WxRentContract wxRentContract) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::getRentContractList"); |
|
|
|
wxRentContract.updateTenantInfo(getTenantInfo()); |
|
|
|
wxRentContract.setStatuss(EnumRentContractStatus.getValidStatus()); |
|
|
|
List<Integer> statss = new ArrayList<Integer>(); |
|
|
|
statss.add(EnumRentContractStatus.PAING.getCode()); |
|
|
|
statss.add(EnumRentContractStatus.OUT_DATE.getCode()); |
|
|
|
wxRentContract.setStatuss(statss); |
|
|
|
wxRentContract.setSortColumn(BaseEntity.SortField.Createtime_DESC.getValue()); |
|
|
|
PageInfo<WxRentContract> page = wxRentContractService.getRentContractList(wxRentContract, 1, 100000); |
|
|
|
if (null != page && null != page.getList()) { |
|
|
|
@@ -618,6 +621,28 @@ public class WxRentContractController extends WxContractBaseController { |
|
|
|
} catch (Exception e) { |
|
|
|
return new ResultData(Result.ERROR,e.getMessage()); |
|
|
|
} |
|
|
|
//如果是租金+物业合同,如果没有物业合同或者物业合同不是草稿状态,不能提交审核 |
|
|
|
if (rentContract.getRentShopType().intValue() == EnumRentShopType.SHOP.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,"物业合同当前状态不能提交审批。"); |
|
|
|
} |
|
|
|
|
|
|
|
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.getRentShopType().intValue() == EnumRentShopType.SHOP.getCode().intValue()) { |
|
|
|
@@ -805,12 +830,12 @@ public class WxRentContractController extends WxContractBaseController { |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("updateRentContractStatus") |
|
|
|
@SystemControllerLog(description = "租赁合同-更新合同状态") |
|
|
|
public ResultData updateRentContractStatus(@RequestBody WxRentContract wxRentContract) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentContractStatus"); |
|
|
|
return wxRentContractService.updateRentContractStatus(wxRentContract.getId()); |
|
|
|
} |
|
|
|
// @PostMapping("updateRentContractStatus") |
|
|
|
// @SystemControllerLog(description = "租赁合同-更新合同状态") |
|
|
|
// public ResultData updateRentContractStatus(@RequestBody WxRentContract wxRentContract) { |
|
|
|
// logger.debug("[" + getIpAddr() + "] WxRentContractController::updateRentContractStatus"); |
|
|
|
// return wxRentContractService.updateRentContractStatus(wxRentContract.getId()); |
|
|
|
// } |
|
|
|
|
|
|
|
@PostMapping("savePayAccountInfo") |
|
|
|
@SystemControllerLog(description = "租赁合同-保存甲方账户") |
|
|
|
|