linwei
2024-01-31 b3b566ebdfed4005aaa513da3d5d2fd3924903cc
src/main/java/org/springblade/modules/house/service/impl/HouseRentalServiceImpl.java
@@ -21,6 +21,7 @@
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.logging.log4j.util.Strings;
import org.springblade.common.cache.SysCache;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.modules.grid.service.IGridService;
@@ -63,9 +64,6 @@
   @Autowired
   private IGridService gridService;
   @Autowired
   private IDeptService deptService;
   /**
    * 自定义分页查询
    * @param page
@@ -74,10 +72,8 @@
    */
   @Override
   public IPage<HouseRentalTenantVO> selectHouseRentalPage(IPage<HouseRentalTenantVO> page, HouseRentalTenantVO houseRental) {
      Dept dept = deptService.getById(AuthUtil.getDeptId());
      if (null!=dept){
         houseRental.setRegionCode(dept.getRegionCode());
      }
      List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
      Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2;
      List<String> list = new ArrayList<>();
      if (null!=houseRental.getRoleName() && !houseRental.getRoleName().equals("")){
         if (houseRental.getRoleName().equals("网格员")){
@@ -90,7 +86,7 @@
            houseRental.setAuditStatus(2);
         }
      }
      List<HouseRentalTenantVO> houseRentalTenantVOS = baseMapper.selectHouseRentalPage(page, houseRental, list);
      List<HouseRentalTenantVO> houseRentalTenantVOS = baseMapper.selectHouseRentalPage(page, houseRental, list,regionChildCodesList,isAdministrator);
      for (HouseRentalTenantVO houseRentalTenantVO : houseRentalTenantVOS) {
         if(houseRentalTenantVO.getStatus().equals(1)){
            houseRentalTenantVO.setStatus(30);