Compare commits

...

5 Commits

Author SHA1 Message Date
阿斌
1b3ed3348b
Pre Merge pull request !36 from 阿斌/N/A 2025-06-05 03:19:20 +00:00
lin
bc545f12a5 优化延时任务到期时间更新 2025-06-05 11:19:07 +08:00
lin
6a6071973c Merge remote-tracking branch 'origin/master' 2025-06-05 09:41:17 +08:00
lin
60e9fb3daa 修复推流列表和拉流代理的云端录像跳转错误 2025-06-05 09:40:43 +08:00
阿斌
da98101aac
update src/main/resources/civilCode.csv.
行政规划错误。江苏南通海门市,修改为海门区,浙江杭州删除下城区、江干区,新增钱塘区,临平区

Signed-off-by: 阿斌 <38912748@qq.com>
2024-12-15 08:58:42 +00:00
9 changed files with 17 additions and 45 deletions

View File

@ -506,7 +506,11 @@ public class DeviceServiceImpl implements IDeviceService, CommandLineRunner {
if (device == null || device.getSubscribeCycleForCatalog() < 0) {
return false;
}
log.info("[添加目录订阅] 设备 {}", device.getDeviceId());
if (transactionInfo == null) {
log.info("[添加目录订阅] 设备 {}", device.getDeviceId());
}else {
log.info("[目录订阅续期] 设备 {}", device.getDeviceId());
}
try {
sipCommander.catalogSubscribe(device, transactionInfo, eventResult -> {
ResponseEvent event = (ResponseEvent) eventResult.event;
@ -566,7 +570,11 @@ public class DeviceServiceImpl implements IDeviceService, CommandLineRunner {
@Override
public boolean addMobilePositionSubscribe(@NotNull Device device, SipTransactionInfo transactionInfo) {
log.info("[添加移动位置订阅] 设备 {}", device.getDeviceId());
if (transactionInfo == null) {
log.info("[添加移动位置订阅] 设备 {}", device.getDeviceId());
}else {
log.info("[移动位置订阅续期] 设备 {}", device.getDeviceId());
}
try {
sipCommander.mobilePositionSubscribe(device, transactionInfo, eventResult -> {
ResponseEvent event = (ResponseEvent) eventResult.event;

View File

@ -94,14 +94,7 @@ public class DeviceStatusTaskRunner {
return false;
}
log.debug("[更新状态任务时间] 编号: {}", key);
if (delayQueue.contains(task)) {
boolean remove = delayQueue.remove(task);
if (!remove) {
log.info("[更新状态任务时间] 从延时队列内移除失败: {}", key);
}
}
task.setDelayTime(expirationTime);
delayQueue.offer(task);
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getDeviceId());
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
redisTemplate.expire(redisKey, duration);

View File

@ -94,14 +94,7 @@ public class SubscribeTaskRunner{
return false;
}
log.info("[更新订阅任务时间] {}, 编号: {}", task.getName(), key);
if (delayQueue.contains(task)) {
boolean remove = delayQueue.remove(task);
if (!remove) {
log.info("[更新订阅任务时间] 从延时队列内移除失败: {}", key);
}
}
task.setDelayTime(expirationTime);
delayQueue.offer(task);
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), task.getKey());
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
redisTemplate.expire(redisKey, duration);

View File

@ -114,14 +114,7 @@ public class PlatformStatusTaskRunner {
return false;
}
log.info("[更新平台注册任务时间] 平台上级编号: {}", platformServerId);
if (registerDelayQueue.contains(task)) {
boolean remove = registerDelayQueue.remove(task);
if (!remove) {
log.info("[更新平台注册任务时间] 从延时队列内移除失败: {}", platformServerId);
}
}
task.setDelayTime(expirationTime);
registerDelayQueue.offer(task);
String redisKey = String.format("%s_%s_%s", prefix, userSetting.getServerId(), platformServerId);
Duration duration = Duration.ofSeconds((expirationTime - System.currentTimeMillis())/1000);
redisTemplate.expire(redisKey, duration);
@ -165,14 +158,7 @@ public class PlatformStatusTaskRunner {
return false;
}
log.info("[更新平台心跳任务时间] 平台上级编号: {}", platformServerId);
if (keepaliveTaskDelayQueue.contains(task)) {
boolean remove = keepaliveTaskDelayQueue.remove(task);
if (!remove) {
log.info("[更新平台心跳任务时间] 从延时队列内移除失败: {}", platformServerId);
}
}
task.setDelayTime(expirationTime);
keepaliveTaskDelayQueue.offer(task);
return true;
}

View File

@ -446,7 +446,6 @@ public class ZLMRESTfulUtils {
BigDecimal bigDecimal = new BigDecimal(stamp);
param.put("stamp", bigDecimal);
param.put("schema", schema);
System.out.println(bigDecimal);
return sendPost(mediaServer, "seekRecordStamp",param, null);
}
}

View File

@ -15,7 +15,7 @@ import java.time.temporal.TemporalAccessor;
import java.util.Locale;
/**
/**
* 全局时间工具类
* @author lin
*/
@ -70,7 +70,7 @@ public class DateUtil {
public static String yyyy_MM_dd_HH_mm_ssToISO8601(@NotNull String formatTime) {
return formatterISO8601.format(formatter.parse(formatTime));
}
public static String ISO8601Toyyyy_MM_dd_HH_mm_ss(String formatTime) {
// 三种日期格式都尝试为了兼容不同厂家的日期格式
if (verification(formatTime, formatterCompatibleISO8601)) {
@ -198,11 +198,4 @@ public class DateUtil {
return ChronoUnit.MILLIS.between(startInstant, endInstant);
}
public static void main(String[] args) {
long difference = getDifference("2025-05-21 13:00:00", "2025-05-21 13:30:00")/1000;
System.out.println(difference);
}
}

View File

@ -861,7 +861,7 @@
320623,如东县,3206
320681,启东市,3206
320682,如皋市,3206
320684,海门,3206
320684,海门,3206
320685,海安市,3206
3207,连云港市,32
320703,连云区,3207
@ -918,8 +918,6 @@
33,浙江省,
3301,杭州市,33
330102,上城区,3301
330103,下城区,3301
330104,江干区,3301
330105,拱墅区,3301
330106,西湖区,3301
330108,滨江区,3301
@ -927,6 +925,8 @@
330110,余杭区,3301
330111,富阳区,3301
330112,临安区,3301
330113,临平区,3301
330114,钱塘区,3301
330122,桐庐县,3301
330127,淳安县,3301
330182,建德市,3301

1 编号 名称 上级
861 320623 如东县 3206
862 320681 启东市 3206
863 320682 如皋市 3206
864 320684 海门市 海门区 3206
865 320685 海安市 3206
866 3207 连云港市 32
867 320703 连云区 3207
918 33 浙江省
919 3301 杭州市 33
920 330102 上城区 3301
330103 下城区 3301
330104 江干区 3301
921 330105 拱墅区 3301
922 330106 西湖区 3301
923 330108 滨江区 3301
925 330110 余杭区 3301
926 330111 富阳区 3301
927 330112 临安区 3301
928 330113 临平区 3301
929 330114 钱塘区 3301
930 330122 桐庐县 3301
931 330127 淳安县 3301
932 330182 建德市 3301

View File

@ -259,7 +259,7 @@ export default {
})
},
queryCloudRecords: function(row) {
this.$router.push(`/cloudRecordDetail/${row.app}/${row.stream}`)
this.$router.push(`/cloudRecord/detail/${row.app}/${row.stream}`)
},
deleteStreamProxy: function(row) {
this.$confirm('确定删除此代理吗?', '提示', {

View File

@ -255,7 +255,7 @@ export default {
this.getPushList()
},
queryCloudRecords: function(row) {
this.$router.push(`/cloudRecordDetail/${row.app}/${row.stream}`)
this.$router.push(`/cloudRecord/detail/${row.app}/${row.stream}`)
},
importChannel: function() {
this.$refs.importChannel.openDialog(() => {})