|
|
@ -40,6 +40,7 @@ import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.constant.CustomerGridConstant; |
|
|
@ -49,6 +50,7 @@ import com.epmet.dto.*; |
|
|
|
import com.epmet.dto.form.IcNeighborHoodAddFormDTO; |
|
|
|
import com.epmet.dto.form.ImportInfoFormDTO; |
|
|
|
import com.epmet.dto.form.ImportTaskCommonFormDTO; |
|
|
|
import com.epmet.dto.result.BuildingResultDTO; |
|
|
|
import com.epmet.dto.result.ImportTaskCommonResultDTO; |
|
|
|
import com.epmet.dto.result.InfoByNamesResultDTO; |
|
|
|
import com.epmet.dto.result.UploadImgResultDTO; |
|
|
@ -210,6 +212,20 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
public List<BuildingResultDTO> getNeighborhoodList(TokenDto tokenDto, IcNeighborHoodDTO dto) { |
|
|
|
dto.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
if (StringUtils.isBlank(dto.getAgencyId()) && StringUtils.isEmpty(dto.getGridId())) { |
|
|
|
log.info("agencyId与gridId都为空时,默认查询当前工作人员所属组织下的小区"); |
|
|
|
CustomerStaffInfoCacheResult result= CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
|
if (null == result || StringUtils.isBlank(result.getAgencyId())) { |
|
|
|
log.error(String.format("staffId:%s,工作人员缓存信息查询异常")); |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
dto.setAgencyId(result.getAgencyId()); |
|
|
|
} |
|
|
|
return icBuildingDao.listBuildingInfo(dto); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param ids |
|
|
|
* @Description 通过ID查询小区信息 |
|
|
|