From 69f1056836cc0abd63025212d73d63fce3e96bee Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 4 Apr 2025 23:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=95=E5=88=B6=E8=AE=A1=E5=88=92=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=B2=BE=E7=A1=AE=E5=88=B0=E5=88=86=E9=92=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/RecordPlanServiceImpl.java | 4 ++-- 数据库/2.7.3/更新-mysql-2.7.3.sql | 5 +++++ 数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/RecordPlanServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/RecordPlanServiceImpl.java index d0897839b..6f8783f9f 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/RecordPlanServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/RecordPlanServiceImpl.java @@ -79,7 +79,7 @@ public class RecordPlanServiceImpl implements IRecordPlanService { Map recordStreamMap = new HashMap<>(); - @Scheduled(fixedRate = 10, timeUnit = TimeUnit.MINUTES) + @Scheduled(fixedRate = 1, timeUnit = TimeUnit.MINUTES) public void execution() { log.info("[录制计划] 执行"); // 查询现在需要录像的通道Id @@ -133,7 +133,7 @@ public class RecordPlanServiceImpl implements IRecordPlanService { // 获取当前时间在一周内的序号, 数据库存储的从第几个30分钟开始, 0-47, 包括首尾 LocalDateTime now = LocalDateTime.now(); int week = now.getDayOfWeek().getValue(); - int index = now.getHour() * 2 + (now.getMinute() > 30?1:0); + int index = now.getHour() * 60 + now.getMinute(); // 查询现在需要录像的通道Id return recordPlanMapper.queryRecordIng(week, index); diff --git a/数据库/2.7.3/更新-mysql-2.7.3.sql b/数据库/2.7.3/更新-mysql-2.7.3.sql index 515fb9844..dde500200 100644 --- a/数据库/2.7.3/更新-mysql-2.7.3.sql +++ b/数据库/2.7.3/更新-mysql-2.7.3.sql @@ -267,5 +267,10 @@ call wvp_20250319(); DROP PROCEDURE wvp_20250319; DELIMITER ; +/* +* 20250319 +*/ +update wvp_record_plan_item set start = start * 30, stop = (stop + 1) * 30 + diff --git a/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql b/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql index 2de2d1efe..db4b31e8b 100644 --- a/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql +++ b/数据库/2.7.3/更新-postgresql-kingbase-2.7.3.sql @@ -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_direction double precision; +/* +* 20250319 +*/ +update wvp_record_plan_item set start = start * 30, stop = (stop + 1) * 30