|
|
|
using Cis.Application.Cm;
|
|
|
|
|
|
|
|
namespace Cis.Application.Core;
|
|
|
|
|
|
|
|
[ApiDescriptionSettings(CmInfo.GroupName, Order = CmInfo.GroupOrder)]
|
|
|
|
public class MarkSearchService : IDynamicApiController, ITransient
|
|
|
|
{
|
|
|
|
#region Attr
|
|
|
|
|
|
|
|
private CameraDataCenter _cameraDataCenter { get; set; }
|
|
|
|
|
|
|
|
#endregion Attr
|
|
|
|
|
|
|
|
public MarkSearchService(CameraDataCenter cameraDataCenter)
|
|
|
|
{
|
|
|
|
_cameraDataCenter = cameraDataCenter;
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> ActivateSearcher([FromForm] long cameraId)
|
|
|
|
{
|
|
|
|
return await _cameraDataCenter.ActivateSearcherAsync(cameraId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> DeActivateSearcher([FromForm] long cameraId)
|
|
|
|
{
|
|
|
|
return await _cameraDataCenter.DeActivateSearcherAsync(cameraId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
public async Task<bool> IsExistSearcher(long cameraId)
|
|
|
|
{
|
|
|
|
return await _cameraDataCenter.IsExistSearcherAsync(cameraId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> ActivateMarkLabel([FromForm] long cameraId, [FromForm] long markLabelId)
|
|
|
|
{
|
|
|
|
return await _cameraDataCenter.ActivateMarkLabelAsync(cameraId, markLabelId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> DeactivateMarkLabel([FromForm] long cameraId, [FromForm] long markLabelId)
|
|
|
|
{
|
|
|
|
return await _cameraDataCenter.DeactivateMarkLabelAsync(cameraId, markLabelId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
public async Task<bool> IsExistMarkLabel(long cameraId,long markLabelId)
|
|
|
|
{
|
|
|
|
return await _cameraDataCenter.IsExistMarkLabelAysnc(cameraId, markLabelId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
public async Task<List<MarkLabelCalcResult>> GetMarkLabelCalcResultList(long cameraId)
|
|
|
|
{
|
|
|
|
return await _cameraDataCenter.GetMarkLabelCalcResultListAsync(cameraId);
|
|
|
|
}
|
|
|
|
}
|