Browse Source

fix: 补充实体类注释,调整变量

master
fajiao 2 years ago
parent
commit
5c6de3cb27
  1. 20
      Cis.Application/Cis.Application.xml
  2. 12
      Cis.Application/Cm/Entity/CmMarkLabel.cs
  3. 5
      Cis.Application/Cm/Service/CmMarkLabelService.cs
  4. 2
      Cis.Application/Core/Center/CameraDataCenter.cs
  5. 2
      Cis.Application/Core/Component/CameraSDK/CameraSdkServer.cs
  6. 2
      Cis.Application/Core/Component/MarkSeacher/MarkSearcherServer.cs

20
Cis.Application/Cis.Application.xml

@ -209,6 +209,26 @@
Zoom 坐标
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkLabel.VideoWidth">
<summary>
视频宽度
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkLabel.VideoHeight">
<summary>
视频高度
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkLabel.CanvasLeftRatio">
<summary>
画布 left 距离比例
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkLabel.CanvasTopRatio">
<summary>
画布 top 距离比例
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkLabel.Remark">
<summary>
备注

12
Cis.Application/Cm/Entity/CmMarkLabel.cs

@ -43,15 +43,27 @@ public class CmMarkLabel : EntityBase
[SugarColumn(ColumnDescription = "Zoom坐标")]
public double ZoomPosition { get; set; }
/// <summary>
/// 视频宽度
/// </summary>
[SugarColumn(ColumnDescription = "视频宽度")]
public double VideoWidth { get; set; }
/// <summary>
/// 视频高度
/// </summary>
[SugarColumn(ColumnDescription = "视频高度")]
public double VideoHeight { get; set; }
/// <summary>
/// 画布 left 距离比例
/// </summary>
[SugarColumn(ColumnDescription = "画布 left 距离比例")]
public double CanvasLeftRatio { get; set; }
/// <summary>
/// 画布 top 距离比例
/// </summary>
[SugarColumn(ColumnDescription = "画布 top 距离比例")]
public double CanvasTopRatio { get; set; }

5
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<CmMarkLabel> _baseRep;
private CameraSdkServer _cameraSdk { get; set; }
private ICameraSdkServer _cameraSdk { get; set; }
public CmMarkLabelService(
SqlSugarRepository<CmMarkLabel> baseRep,
CameraSdkServer cameraSdk
ICameraSdkServer cameraSdk
)
{
_baseRep = baseRep;

2
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<PtzInfo>();
markSearcher.UpdateCameraCalcParams(ptzInfo);
List<MarkLabelCalcResult> resultList = await markSearcher.SearchAsync();

2
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);
}

2
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);

Loading…
Cancel
Save