| | |
| | | List<HouseRentalTenantVO> houseRentalTenantVOS = baseMapper.selectHouseRentalPage(page, houseRental, list); |
| | | for (HouseRentalTenantVO houseRentalTenantVO : houseRentalTenantVOS) { |
| | | if(houseRentalTenantVO.getStatus().equals(1)){ |
| | | houseRentalTenantVO.setAuditStatus(30); |
| | | houseRentalTenantVO.setStatus(30); |
| | | } |
| | | if(houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getAuditStatus().equals(0)){ |
| | | houseRentalTenantVO.setAuditStatus(0); |
| | | houseRentalTenantVO.setStatus(0); |
| | | } |
| | | if(houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getAuditStatus().equals(1)){ |
| | | houseRentalTenantVO.setAuditStatus(1); |
| | | houseRentalTenantVO.setStatus(1); |
| | | } |
| | | if(houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getDldType().equals(3)){ |
| | | houseRentalTenantVO.setAuditStatus(20); |
| | | houseRentalTenantVO.setStatus(20); |
| | | } |
| | | if(houseRentalTenantVO.getStatus().equals(0) && houseRentalTenantVO.getDldType().equals(2)){ |
| | | houseRentalTenantVO.setAuditStatus(10); |
| | | houseRentalTenantVO.setStatus(10); |
| | | } |
| | | } |
| | | return page.setRecords(houseRentalTenantVOS); |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean add(HouseRentalVO houseRentalVO) { |
| | | // 判断添加人是否房屋业主 |
| | | Long count = iHouseholdService.count(Wrappers.<HouseholdEntity>lambdaQuery() |
| | | .eq(HouseholdEntity::getHouseCode, houseRentalVO.getHouseCode()) |
| | | .eq(HouseholdEntity::getAssociatedUserId, AuthUtil.getUserId()) |
| | | .eq(HouseholdEntity::getRelationship, 1)); |
| | | if (count == 0) { |
| | | return false; |
| | | } |
| | | houseRentalVO.setCreateUser(AuthUtil.getUserId()); |
| | | houseRentalVO.setCreateTime(new Date()); |
| | | houseRentalVO.setUpdateUser(AuthUtil.getUserId()); |