| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.constant.DictConstants; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.TContractMapper; |
| | | import com.ruoyi.system.mapper.THouseMapper; |
| | |
| | | import com.ruoyi.system.query.THouseQuery; |
| | | import com.ruoyi.system.query.TUserHistoryQuery; |
| | | import com.ruoyi.system.service.THouseService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.vo.HouseVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | private TContractMapper contractMapper; |
| | | @Override |
| | | public PageInfo<THouse> houseList(THouseQuery query) { |
| | | //查询当前登录用户所属部门 |
| | | String businessDeptId = SecurityUtils.getBusinessDeptId(); |
| | | query.setBusinessDeptId(businessDeptId); |
| | | PageInfo<THouse> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<THouse> list = this.baseMapper.houseList(query,pageInfo); |
| | | List<TContract> tContracts = contractMapper.selectList(new LambdaQueryWrapper<TContract>() |
| | |
| | | tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,"2")); |
| | | |
| | | }else{ |
| | | tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tHouse.getLeaseStatus())); |
| | | if (tHouse.getLeaseStatus().equals("3")){ |
| | | tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tHouse.getLeaseStatus())); |
| | | }else{ |
| | | tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,"1")); |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | /** |
| | | * 获取本季度已出租面积 |
| | | * |
| | | * @param businessDeptId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Double getRentedArea(String businessDeptId) { |
| | | return baseMapper.getRentedArea(businessDeptId); |
| | | } |
| | | } |