diff --git a/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/service/impl/GpsServiceImpl.java b/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/service/impl/GpsServiceImpl.java index a86e5ac5..3cac7f0e 100644 --- a/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/service/impl/GpsServiceImpl.java +++ b/stwzhj-modules/wzhj-data2es/src/main/java/org/dromara/data2es/service/impl/GpsServiceImpl.java @@ -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(); diff --git a/stwzhj-modules/wzhj-location/src/main/java/org/dromara/location/controller/LocationController.java b/stwzhj-modules/wzhj-location/src/main/java/org/dromara/location/controller/LocationController.java index 79946b6d..096da857 100644 --- a/stwzhj-modules/wzhj-location/src/main/java/org/dromara/location/controller/LocationController.java +++ b/stwzhj-modules/wzhj-location/src/main/java/org/dromara/location/controller/LocationController.java @@ -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 targetSet = new HashSet<>(List.of(zzjgdm)); // 转为HashSet提高查询效率 diff --git a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java index bb100ad0..de7df84a 100644 --- a/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java +++ b/stwzhj-modules/wzhj-system/src/main/java/org/dromara/system/schedule/DeviceRedisSchedule.java @@ -53,6 +53,7 @@ public class DeviceRedisSchedule { } TDeviceBo bo = new TDeviceBo(); bo.setBeginTime(lastUpdateTime); + bo.setValid(1); bo.setEndTime(DateUtil.formatDateTime(new Date())); List list = deviceService.queryList(bo); if (list.size() >0){