From b6e604f2449bb65dfaafb0f0741ba54ff0d2f9c2 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 30 四月 2024 15:20:03 +0800
Subject: [PATCH] 修改云端录像详情页使用直接访问zlm的方式播放录像
---
src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java
index 2cfe16e..c646058 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java
@@ -125,7 +125,7 @@
strTmp = String.format("%02X", moveSpeed);
builder.append(strTmp, 0, 2);
builder.append(strTmp, 0, 2);
-
+
//浼樺寲zoom浣庡�嶉�熶笅鐨勫彉鍊嶉�熺巼
if ((zoomSpeed > 0) && (zoomSpeed <16))
{
@@ -140,6 +140,26 @@
return builder.toString();
}
+ public static String getNewCallId() {
+ return (int) Math.floor(Math.random() * 1000000000) + "";
+ }
+
+ public static int getTypeCodeFromGbCode(String deviceId) {
+ if (ObjectUtils.isEmpty(deviceId)) {
+ return 0;
+ }
+ return Integer.parseInt(deviceId.substring(10, 13));
+ }
+
+ /**
+ * 鍒ゆ柇鏄惁鏄墠绔鍥磋澶�
+ * @param deviceId
+ * @return
+ */
+ public static boolean isFrontEnd(String deviceId) {
+ int typeCodeFromGbCode = getTypeCodeFromGbCode(deviceId);
+ return typeCodeFromGbCode > 130 && typeCodeFromGbCode < 199;
+ }
/**
* 浠庤姹備腑鑾峰彇璁惧ip鍦板潃鍜岀鍙e彿
* @param request 璇锋眰
@@ -250,7 +270,6 @@
if (ObjectUtils.isEmpty(timeStr)){
return null;
}
- System.out.println(timeStr);
LocalDateTime localDateTime;
try {
localDateTime = LocalDateTime.parse(timeStr);
@@ -262,6 +281,6 @@
return null;
}
}
- return localDateTime.format(DateUtil.formatterISO8601);
+ return localDateTime.format(DateUtil.formatter);
}
-}
+}
\ No newline at end of file
--
Gitblit v1.8.0