|
|
@ -6,8 +6,10 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
import com.epmet.commons.tools.utils.PidUtils; |
|
|
|
import com.epmet.constant.LevelConstant; |
|
|
|
import com.epmet.constant.OrgInfoConstant; |
|
|
|
import com.epmet.dao.*; |
|
|
|
import com.epmet.dto.result.SubOrgResDTO; |
|
|
|
import com.epmet.dto.result.lingshan.LingShanSpecialCrowdStatsByOrgResultDTO; |
|
|
@ -52,14 +54,25 @@ public class LingShanScreenServiceImpl implements LingShanScreenService, ResultD |
|
|
|
|
|
|
|
List<LingShanSpecialCrowdStatsByOrgResultDTO> rl = subOrgs.stream().map(sub -> { |
|
|
|
LingShanSpecialCrowdStatsByOrgResultDTO t = new LingShanSpecialCrowdStatsByOrgResultDTO(); |
|
|
|
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(sub.getOrgId()); |
|
|
|
|
|
|
|
String longitude = null; |
|
|
|
String latitude = null; |
|
|
|
|
|
|
|
if (OrgInfoConstant.AGENCY.equals(sub.getOrgType())) { |
|
|
|
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(sub.getOrgId()); |
|
|
|
longitude = agencyInfo.getLongitude(); |
|
|
|
latitude = agencyInfo.getLatitude(); |
|
|
|
} else if (OrgInfoConstant.GRID.equals(sub.getOrgType())) { |
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(sub.getOrgId()); |
|
|
|
longitude = gridInfo.getLongitude(); |
|
|
|
latitude = gridInfo.getLatitude(); |
|
|
|
} |
|
|
|
|
|
|
|
t.setOrgId(sub.getOrgId()); |
|
|
|
t.setOrgName(sub.getOrgName()); |
|
|
|
t.setOrgType(sub.getOrgType()); |
|
|
|
if (agencyInfo != null) { |
|
|
|
t.setLongitude(agencyInfo.getLongitude()); |
|
|
|
t.setLatitude(agencyInfo.getLatitude()); |
|
|
|
} |
|
|
|
t.setLongitude(longitude); |
|
|
|
t.setLatitude(latitude); |
|
|
|
t.setOrgIdPath(PidUtils.convertPid2OrgIdPath(sub.getOrgId(), sub.getPids())); |
|
|
|
return t; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|