mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-23 21:47:49 +08:00
录制计划时间精确到分钟
This commit is contained in:
parent
e76d25816a
commit
69f1056836
@ -79,7 +79,7 @@ public class RecordPlanServiceImpl implements IRecordPlanService {
|
|||||||
|
|
||||||
Map<Integer, StreamInfo> recordStreamMap = new HashMap<>();
|
Map<Integer, StreamInfo> recordStreamMap = new HashMap<>();
|
||||||
|
|
||||||
@Scheduled(fixedRate = 10, timeUnit = TimeUnit.MINUTES)
|
@Scheduled(fixedRate = 1, timeUnit = TimeUnit.MINUTES)
|
||||||
public void execution() {
|
public void execution() {
|
||||||
log.info("[录制计划] 执行");
|
log.info("[录制计划] 执行");
|
||||||
// 查询现在需要录像的通道Id
|
// 查询现在需要录像的通道Id
|
||||||
@ -133,7 +133,7 @@ public class RecordPlanServiceImpl implements IRecordPlanService {
|
|||||||
// 获取当前时间在一周内的序号, 数据库存储的从第几个30分钟开始, 0-47, 包括首尾
|
// 获取当前时间在一周内的序号, 数据库存储的从第几个30分钟开始, 0-47, 包括首尾
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
int week = now.getDayOfWeek().getValue();
|
int week = now.getDayOfWeek().getValue();
|
||||||
int index = now.getHour() * 2 + (now.getMinute() > 30?1:0);
|
int index = now.getHour() * 60 + now.getMinute();
|
||||||
|
|
||||||
// 查询现在需要录像的通道Id
|
// 查询现在需要录像的通道Id
|
||||||
return recordPlanMapper.queryRecordIng(week, index);
|
return recordPlanMapper.queryRecordIng(week, index);
|
||||||
|
|||||||
@ -267,5 +267,10 @@ call wvp_20250319();
|
|||||||
DROP PROCEDURE wvp_20250319;
|
DROP PROCEDURE wvp_20250319;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 20250319
|
||||||
|
*/
|
||||||
|
update wvp_record_plan_item set start = start * 30, stop = (stop + 1) * 30
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -102,4 +102,8 @@ alter table wvp_device_channel add column if not exists gps_speed double precisi
|
|||||||
alter table wvp_device_channel add column if not exists gps_altitude double precision;
|
alter table wvp_device_channel add column if not exists gps_altitude double precision;
|
||||||
alter table wvp_device_channel add column if not exists gps_direction double precision;
|
alter table wvp_device_channel add column if not exists gps_direction double precision;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 20250319
|
||||||
|
*/
|
||||||
|
update wvp_record_plan_item set start = start * 30, stop = (stop + 1) * 30
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user