亳州位置汇聚首页统计修改

ds-bozhou
luyya 2025-07-11 14:48:20 +08:00
parent 638c54684f
commit 3c85d5950d
3 changed files with 8 additions and 4 deletions

View File

@ -52,6 +52,7 @@
select indexcode deviceCode,'5' deviceType, longitude lng, latitude lat,to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') gpsTime from public.mobileposition_view
<where>
<if test="gpsTime != null "> and to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') > #{gpsTime} </if>
and to_timestamp(updatatime, 'YYYY-MM-DD HH24:MI:SS') &lt;= now()
</where>
order by updatatime desc
</select>

View File

@ -4,6 +4,7 @@ package org.dromara.system.controller.system;
import cn.hutool.core.date.DateUtil;
import jdk.dynalink.linker.LinkerServices;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.common.core.domain.R;
import org.dromara.common.redis.utils.RedisUtils;
@ -24,6 +25,7 @@ import java.util.*;
@RequiredArgsConstructor
@RestController
@Slf4j
public class IndexStaticsController extends BaseController {
private final ISysDeptService deptService;
@ -90,7 +92,7 @@ public class IndexStaticsController extends BaseController {
/*
* ES
* */
@Scheduled(cron = "0 */30 * * * ?")
// @Scheduled(cron = "0 */30 * * * ?")
public void listen(){
List<String> strs = elasticSearchService.linstenDataStatus();
if (strs.size() >0){
@ -105,8 +107,9 @@ public class IndexStaticsController extends BaseController {
noticeService.insertNotice(noticeBo);
}
}
}
}
/*
* 线

View File

@ -39,7 +39,7 @@ public class DeviceRedisSchedule {
/*
* Redis online_usert_device_redis
* */
@Scheduled(cron = "0/30 * * * * ?")
// @Scheduled(cron = "0/30 * * * * ?")
public void handleDeviceRedis(){
List<JSONObject> jlist = RedisUtils.searchAndGetKeysValues("online_users:*");
redisService.insertBatch(BeanUtil.copyToList(jlist, DeviceRedis.class));
@ -81,7 +81,7 @@ public class DeviceRedisSchedule {
/*
* 线
* */
// @Scheduled(cron = "0 0 0/1 * * ?")
@Scheduled(cron = "0 0 0/1 * * ?")
public void removeRedis(){
deviceService.deleteRedis();
}