摄像头分类

DataMaintenance
洁 任 2026-01-06 11:28:21 +08:00
parent 62a45776fc
commit 98afd01e4f
2 changed files with 36 additions and 3 deletions

View File

@ -1622,6 +1622,10 @@ ORDER BY
#region 感知中心--摄像头类型
/// <summary>
/// 感知中心--摄像头类型数量统计
/// </summary>
/// <returns></returns>
public async Task<Response<dynamic>> GetCameraCountByType()
{
using (var db = base.UnitWork.CreateContext())
@ -1672,14 +1676,23 @@ ORDER BY
{
cs.num = cameralist.Where(r => r.Manufacturer == "海康").Take(325).Count().ToString();
}
if (item.ItemValue == "LinQuSheXiangTou")
if (item.ItemValue == "TieTaJianKong")
{
cs.num = cameralist.Where(r => r.Manufacturer == "海康").Take(325).Count().ToString();
cs.num = cameralist.Where(r => r.Manufacturer == "海康").Take(63).Count().ToString();
}
if (item.ItemValue == "WuRenJiJiChang")
{
cs.num = "2";
}
if (item.ItemValue == "FeiXianXianYouJiZhan")
{
cs.num = cameralist.Where(r => r.Manufacturer == "海康2").Count().ToString();
}
clist.Add(cs);
}
return new Response<dynamic>
{
Result = camerajj
Result = JsonConvert.SerializeObject(clist)
};
}
}

View File

@ -746,5 +746,25 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers.FireManagement
}
#endregion
#region 感知中心--摄像头类型
[HttpGet]
[AllowAnonymous]
public async Task<Response<dynamic>> GetCameraCountByType()
{
try
{
return await _app.GetCameraCountByType();
}
catch (Exception ex)
{
return new Response<dynamic>
{
Result = null,
Message = ex.Message.ToString()
};
}
}
#endregion
}
}