zhongrj
2024-04-03 b42bdf8eb9baa28c6d2e363ffaebadfc62d2025a
src/main/java/org/springblade/modules/property/service/impl/PropertyCapitalApplyServiceImpl.java
@@ -27,6 +27,7 @@
import org.slf4j.LoggerFactory;
import org.springblade.common.cache.SysCache;
import org.springblade.common.constant.CommonConstant;
import org.springblade.common.param.CommonParamSet;
import org.springblade.common.utils.RoleUtil;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.log.exception.ServiceException;
@@ -44,6 +45,7 @@
import org.springblade.modules.district.service.IDistrictService;
import org.springblade.modules.ownersCommittee.entity.OwnersCommitteeEntity;
import org.springblade.modules.ownersCommittee.service.IOwnersCommitteeService;
import org.springblade.modules.partyOrganization.vo.PartyOrganizationVO;
import org.springblade.modules.property.entity.PropertyCapitalApplyEntity;
import org.springblade.modules.property.entity.PropertyCompanyDistrictEntity;
import org.springblade.modules.property.entity.PropertyCompanyEntity;
@@ -82,15 +84,13 @@
   @Override
   public IPage<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage<PropertyCapitalApplyVO> page, PropertyCapitalApplyVO propertyCapitalApply) {
      List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId());
      Integer isAdministrator = AuthUtil.isAdministrator() == true ? 1 : 2;
      CommonParamSet commonParamSet = new CommonParamSet<>().invoke(PropertyCapitalApplyVO.class, propertyCapitalApply);
      // 判断角色,物业角色只能查询当前小区的
      String userRole = AuthUtil.getUserRole();
      if (RoleUtil.isProperty(userRole)) {
         // 查询小区id
         IPropertyDistrictUserService propertyDistrictUserService = SpringUtils.getBean(IPropertyDistrictUserService.class);
         List<String> districtIds = propertyDistrictUserService.selectPropertyDistrictByUserId(AuthUtil.getUserId());
         // 通过用户机构查询用户的物业公司
         // 通过用户机构查询用户的物业公司
         IPropertyCompanyService bean = SpringUtil.getBean(IPropertyCompanyService.class);
         PropertyCompanyEntity one = bean.getOne(Wrappers.<PropertyCompanyEntity>lambdaQuery().eq(PropertyCompanyEntity::getDeptId, AuthUtil.getDeptId()));
@@ -109,7 +109,8 @@
            return page.setRecords(new ArrayList<>());
         }
      }
      return page.setRecords(baseMapper.selectPropertyCapitalApplyPage(page, propertyCapitalApply, regionChildCodesList, isAdministrator));
      return page.setRecords(baseMapper.selectPropertyCapitalApplyPage(page, propertyCapitalApply,
         commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator()));
   }
   @Autowired