Commit 502daff7 by 杨林龙

1.50.0 开发1.50.0需求版本 优化警情数据返回结果

1 parent 5837cb25
...@@ -243,11 +243,13 @@ public class RiskAssessmentService { ...@@ -243,11 +243,13 @@ public class RiskAssessmentService {
// 设置常住地 // 设置常住地
List<ResidentDTO> residentList = remoteFeignResidentService.getResidentList(buildResidentRequest(deviceDTO.getSn())); List<ResidentDTO> residentList = remoteFeignResidentService.getResidentList(buildResidentRequest(deviceDTO.getSn()));
log.info(deviceDTO.getSn() + "===residentList===" + JSONUtil.toJsonStr(residentList)); log.info(deviceDTO.getSn() + "===residentList===" + JSONUtil.toJsonStr(residentList));
if (CollectionUtils.isNotEmpty(residentList)) {
// 常驻地,是“截止目前”的条件,选驻留次数最多的那个 // 常驻地,是“截止目前”的条件,选驻留次数最多的那个
residentList.stream().min((o1, o2) -> o2.getTotalTimes() - o1.getTotalTimes()).ifPresent(residentDTO -> { residentList.stream().min((o1, o2) -> o2.getTotalTimes() - o1.getTotalTimes()).ifPresent(residentDTO -> {
String addressByLngAndLat = remoteGpsBsService.getAddressByLngAndLat(residentDTO.getElng(), residentDTO.getElat()); String addressByLngAndLat = remoteGpsBsService.getAddressByLngAndLat(residentDTO.getElng(), residentDTO.getElat());
residentInformationVO.setResidence(addressByLngAndLat); residentInformationVO.setResidence(addressByLngAndLat);
}); });
}
// 添加预测家庭地址和预测工作地址 // 添加预测家庭地址和预测工作地址
DeviceStayOften deviceStayOften = deviceStayOftenMapper.selectOneBySn(deviceDTO.getSn()); DeviceStayOften deviceStayOften = deviceStayOftenMapper.selectOneBySn(deviceDTO.getSn());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!