diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java index 69124d0459..1f2c910c1d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java @@ -62,5 +62,6 @@ public interface IcPropertyManagementDao extends BaseDao queryList(@Param("customerId") String customerId, @Param("name")String name, @Param("contactName") String contactName, - @Param("contactMobile") String contactMobile); + @Param("contactMobile") String contactMobile, + @Param("agencyId")String agencyId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java index 557692cc65..177075fbcb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java @@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.*; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcNeighborHoodPropertyDao; @@ -183,8 +185,9 @@ public class PropertyManagementServiceImpl implements PropertyManagementService */ @Override public PageData page(Integer pageNo, Integer pageSize, String name, String contactName, String contactMobile, String queryType) { + CustomerStaffInfoCacheResult staffInfoCacheResult= CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(),EpmetRequestHolder.getLoginUserId()); PageHelper.startPage(pageNo, pageSize); - List list = icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(), name, contactName, contactMobile); + List list = icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(), name, contactName, contactMobile,staffInfoCacheResult.getAgencyId()); PageInfo pageInfo = new PageInfo<>(list); // 导出时需要导出关联的小区名称 if ("export".equals(queryType)) { @@ -219,6 +222,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService .distinct().collect(Collectors.toList()); resultDto.setNeighborHoodNames(CollectionUtils.isNotEmpty(neighborHoodList) ? StringUtils.join(neighborHoodNames, StrConstant.COMMA_ZH) : StrConstant.EPMETY_STR); resultDto.setNeighborHoodList(neighborHoodList); + resultDto.setTotalNeighborHood(CollectionUtils.isNotEmpty(neighborHoodList)?neighborHoodList.size():NumConstant.ZERO); return resultDto; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml index 71046c4bb0..536808941e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml @@ -78,6 +78,7 @@ where pr.PROPERTY_ID=m.id and pr.del_flag='0' and h.del_flag='0' + and (pr.AGENCY_ID=#{agencyId} or pr.AGENCY_PIDS like concat('%',#{agencyId},'%') ) )as totalNeighborHood from ic_property_management m where m.del_flag='0'