diff --git a/Cis.Application/Cis.Application.xml b/Cis.Application/Cis.Application.xml
index 288411d..aaa8694 100644
--- a/Cis.Application/Cis.Application.xml
+++ b/Cis.Application/Cis.Application.xml
@@ -209,6 +209,26 @@
Zoom 坐标
+
+
+ 视频宽度
+
+
+
+
+ 视频高度
+
+
+
+
+ 画布 left 距离比例
+
+
+
+
+ 画布 top 距离比例
+
+
备注
diff --git a/Cis.Application/Cm/Entity/CmMarkLabel.cs b/Cis.Application/Cm/Entity/CmMarkLabel.cs
index 3f4a646..5dc870d 100644
--- a/Cis.Application/Cm/Entity/CmMarkLabel.cs
+++ b/Cis.Application/Cm/Entity/CmMarkLabel.cs
@@ -43,15 +43,27 @@ public class CmMarkLabel : EntityBase
[SugarColumn(ColumnDescription = "Zoom坐标")]
public double ZoomPosition { get; set; }
+ ///
+ /// 视频宽度
+ ///
[SugarColumn(ColumnDescription = "视频宽度")]
public double VideoWidth { get; set; }
+ ///
+ /// 视频高度
+ ///
[SugarColumn(ColumnDescription = "视频高度")]
public double VideoHeight { get; set; }
+ ///
+ /// 画布 left 距离比例
+ ///
[SugarColumn(ColumnDescription = "画布 left 距离比例")]
public double CanvasLeftRatio { get; set; }
+ ///
+ /// 画布 top 距离比例
+ ///
[SugarColumn(ColumnDescription = "画布 top 距离比例")]
public double CanvasTopRatio { get; set; }
diff --git a/Cis.Application/Cm/Service/CmMarkLabelService.cs b/Cis.Application/Cm/Service/CmMarkLabelService.cs
index 7a1bed5..109591c 100644
--- a/Cis.Application/Cm/Service/CmMarkLabelService.cs
+++ b/Cis.Application/Cm/Service/CmMarkLabelService.cs
@@ -1,5 +1,6 @@
using Cis.Application.Core;
using Cis.Application.Core.Component.CameraSDK;
+using Cis.Application.Core.Component.PtzServer;
using EC.Helper.CameraSDK;
using Newtonsoft.Json.Linq;
@@ -13,11 +14,11 @@ public class CmMarkLabelService : IDynamicApiController, ITransient
{
private readonly SqlSugarRepository _baseRep;
- private CameraSdkServer _cameraSdk { get; set; }
+ private ICameraSdkServer _cameraSdk { get; set; }
public CmMarkLabelService(
SqlSugarRepository baseRep,
- CameraSdkServer cameraSdk
+ ICameraSdkServer cameraSdk
)
{
_baseRep = baseRep;
diff --git a/Cis.Application/Core/Center/CameraDataCenter.cs b/Cis.Application/Core/Center/CameraDataCenter.cs
index 0dbbeeb..ab46d0f 100644
--- a/Cis.Application/Core/Center/CameraDataCenter.cs
+++ b/Cis.Application/Core/Center/CameraDataCenter.cs
@@ -141,7 +141,7 @@ public class CameraDataCenter : ISingleton
if (markSearcher == null) return;
string cameraIp = _cache.HashGet(CacheInfo.CameraId2Ip, cameraId);
RedisValue value = _cache.HashGet(CacheInfo.CameraPtzInfos, cameraIp);
- if (value.IsNull) return;
+ if (!value.HasValue) return;
PtzInfo ptzInfo = value.ToString().FromJson();
markSearcher.UpdateCameraCalcParams(ptzInfo);
List resultList = await markSearcher.SearchAsync();
diff --git a/Cis.Application/Core/Component/CameraSDK/CameraSdkServer.cs b/Cis.Application/Core/Component/CameraSDK/CameraSdkServer.cs
index 05586c0..10b3fd0 100644
--- a/Cis.Application/Core/Component/CameraSDK/CameraSdkServer.cs
+++ b/Cis.Application/Core/Component/CameraSDK/CameraSdkServer.cs
@@ -57,7 +57,7 @@ public class CameraSdkServer : ICameraSdkServer, ISingleton
public bool GetPtzInfoById(string cameraId, out PtzInfo ptzInfo)
{
RedisValue value = _cache.HashGet(CacheInfo.CameraId2Ip, cameraId);
- if (value.IsNull) { ptzInfo = PtzInfo.Default; return false; }
+ if (!value.HasValue) { ptzInfo = PtzInfo.Default; return false; }
string ip = value.ToString();
return GetPtzInfoByIp(ip, out ptzInfo);
}
diff --git a/Cis.Application/Core/Component/MarkSeacher/MarkSearcherServer.cs b/Cis.Application/Core/Component/MarkSeacher/MarkSearcherServer.cs
index 1b0fa7a..cb497e3 100644
--- a/Cis.Application/Core/Component/MarkSeacher/MarkSearcherServer.cs
+++ b/Cis.Application/Core/Component/MarkSeacher/MarkSearcherServer.cs
@@ -145,7 +145,7 @@ public class MarkSearcherServer : IMarkSearcherServer, ISingleton
bool ret = MarkSearcherDict.TryRemove(cameraId, out _);
if (!ret) return false;
RedisValue value = _cache.HashGet(CacheInfo.CameraId2Ip, cameraId);
- if (value.IsNull) return false;
+ if (!value.HasValue) return false;
string cameraIp = (string)value;
_cache.HashDelete(CacheInfo.CameraId2Ip, cameraId);
_cache.HashDecrement(CacheInfo.CameraIpCounts, cameraIp);