| @@ -407,7 +407,10 @@ public class WxRentContractController extends WxContractBaseController { | |||||
| public ResultData getRentContractList(@ModelAttribute WxRentContract wxRentContract) { | public ResultData getRentContractList(@ModelAttribute WxRentContract wxRentContract) { | ||||
| logger.debug("[" + getIpAddr() + "] WxRentContractController::getRentContractList"); | logger.debug("[" + getIpAddr() + "] WxRentContractController::getRentContractList"); | ||||
| wxRentContract.updateTenantInfo(getTenantInfo()); | 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()); | wxRentContract.setSortColumn(BaseEntity.SortField.Createtime_DESC.getValue()); | ||||
| PageInfo<WxRentContract> page = wxRentContractService.getRentContractList(wxRentContract, 1, 100000); | PageInfo<WxRentContract> page = wxRentContractService.getRentContractList(wxRentContract, 1, 100000); | ||||
| if (null != page && null != page.getList()) { | if (null != page && null != page.getList()) { | ||||
| @@ -827,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") | @PostMapping("savePayAccountInfo") | ||||
| @SystemControllerLog(description = "租赁合同-保存甲方账户") | @SystemControllerLog(description = "租赁合同-保存甲方账户") | ||||
| @@ -147,7 +147,7 @@ public class WxRentPropertyContractController extends WxContractBaseController { | |||||
| @ApiImplicitParam(name = "id", value = "租金合同编号(工作流用)", dataType = "String", paramType = "query", required = false)}) | @ApiImplicitParam(name = "id", value = "租金合同编号(工作流用)", dataType = "String", paramType = "query", required = false)}) | ||||
| public ResultData findById(Long rentId,Long propertyId,String id) { | public ResultData findById(Long rentId,Long propertyId,String id) { | ||||
| logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::findById"); | logger.debug("[" + getIpAddr() + "] wxRentPropertyContract::findById"); | ||||
| if (null != rentId && null != propertyId) { | |||||
| if (null != rentId || null != propertyId) { | |||||
| return wxRentPropertyContractService.getContractInfo(rentId,propertyId); | return wxRentPropertyContractService.getContractInfo(rentId,propertyId); | ||||
| }else if (!StringUtils.isBlank(id)) { | }else if (!StringUtils.isBlank(id)) { | ||||
| //租金+物业工作流查询会传此id | //租金+物业工作流查询会传此id | ||||
| @@ -54,16 +54,20 @@ public class WxRentPropertyContractServiceImpl implements WxRentPropertyContract | |||||
| @Override | @Override | ||||
| public ResultData getContractInfo(Long rentId,Long propertyId) { | public ResultData getContractInfo(Long rentId,Long propertyId) { | ||||
| Map<String, Object> data = new HashMap<>(2); | Map<String, Object> data = new HashMap<>(2); | ||||
| Map<String, Object> rent = wxRentContractService.getById(rentId); | |||||
| data.put("rent", rent); | |||||
| if (null != rentId) { | |||||
| Map<String, Object> rent = wxRentContractService.getById(rentId); | |||||
| data.put("rent", rent); | |||||
| } | |||||
| //WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | //WxPropertyContract wxPropertyContractQuery = new WxPropertyContract(); | ||||
| //wxPropertyContractQuery.setRentContractId(rentId); | //wxPropertyContractQuery.setRentContractId(rentId); | ||||
| //WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(new QueryWrapper(wxPropertyContractQuery)); | //WxPropertyContract propertyContract = wxPropertyContractMapper.selectOne(new QueryWrapper(wxPropertyContractQuery)); | ||||
| WxPropertyContract propertyContract = wxPropertyContractMapper.selectById(propertyId); | |||||
| if (propertyContract != null) { | |||||
| List<WxBillProperty> wxBillPropertyPreview = wxPropertyContractService.getWxBillPropertyPreview(propertyContract.getId()); | |||||
| propertyContract.setPreviewBillRentList(wxBillPropertyPreview); | |||||
| data.put("property", propertyContract); | |||||
| if (null != propertyId) { | |||||
| WxPropertyContract propertyContract = wxPropertyContractMapper.selectById(propertyId); | |||||
| if (propertyContract != null) { | |||||
| List<WxBillProperty> wxBillPropertyPreview = wxPropertyContractService.getWxBillPropertyPreview(propertyContract.getId()); | |||||
| propertyContract.setPreviewBillRentList(wxBillPropertyPreview); | |||||
| data.put("property", propertyContract); | |||||
| } | |||||
| } | } | ||||
| return new ResultData(data); | return new ResultData(data); | ||||
| } | } | ||||