宣城位置汇聚redis存入没有devicename字段处理

ds-xuancheng
luyya 2025-07-31 17:11:05 +08:00
parent fe00bd7311
commit 588bb41537
3 changed files with 4 additions and 2 deletions

View File

@ -446,6 +446,7 @@ public class GpsServiceImpl implements IGpsService {
esGpsInfoVO2.setPoliceName(deviceEntityV21.getPoliceName());
esGpsInfoVO2.setCarNum(deviceEntityV21.getCarNum());
esGpsInfoVO2.setPhoneNum(deviceEntityV21.getPhoneNum());
esGpsInfoVO2.setDeviceName(deviceEntityV21.getDeviceName());
}
String lat = esGpsInfo.getLat();
String lng = esGpsInfo.getLng();

View File

@ -68,7 +68,7 @@ public class LocationController {
}
}else {
key = keys +"*";
key = keys +"[1,2,3,4,5,7,8]:*";
}
list = RedisUtils.searchAndGetKeysValues(key);
list.removeAll(Collections.singleton(null));
@ -113,7 +113,7 @@ public class LocationController {
.collect(Collectors.toList()); //根据前端勾选机构和全部的redis记录匹配是否包含 这样减少多次查询和查库
dlist.addAll(matchedObjects);
}else {
String key = keys + "*"; // key值为 online_users:*
String key = keys + "[1,2,3,4,5,7,8]:*"; // key值为 online_users:*
zzjgdms = params.get("zzjgdm").toString();
String[] zzjgdm = Convert.toStrArray(zzjgdms);
Set<String> targetSet = new HashSet<>(List.of(zzjgdm)); // 转为HashSet提高查询效率

View File

@ -53,6 +53,7 @@ public class DeviceRedisSchedule {
}
TDeviceBo bo = new TDeviceBo();
bo.setBeginTime(lastUpdateTime);
bo.setValid(1);
bo.setEndTime(DateUtil.formatDateTime(new Date()));
List<TDeviceVo> list = deviceService.queryList(bo);
if (list.size() >0){