|
|
|
using Cis.Application.Core.Component.MarkSeacher;
|
|
|
|
|
|
|
|
namespace Cis.Application.Core;
|
|
|
|
|
|
|
|
[ApiDescriptionSettings(CoreInfo.GroupName, Order = CoreInfo.GroupOrder)]
|
|
|
|
public class MarkSearchService : IDynamicApiController, ITransient
|
|
|
|
{
|
|
|
|
#region Attr
|
|
|
|
|
|
|
|
private readonly IMarkSearcherServer _markSearcherServer;
|
|
|
|
|
|
|
|
#endregion Attr
|
|
|
|
|
|
|
|
public MarkSearchService(IMarkSearcherServer markSearcherServer)
|
|
|
|
{
|
|
|
|
_markSearcherServer = markSearcherServer;
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> ActivateSearcher([FromForm] long cameraId)
|
|
|
|
{
|
|
|
|
return await _markSearcherServer.ActivateSearcherAsync(cameraId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> DeactivateSearcher([FromForm] long cameraId)
|
|
|
|
{
|
|
|
|
return await _markSearcherServer.DeactivateSearcherAsync(cameraId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
public async Task<bool> IsExistsSearcher(long cameraId)
|
|
|
|
{
|
|
|
|
return await _markSearcherServer.IsExistsSearcherAsync(cameraId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> ActivateMarkLabel([FromForm] long cameraId, [FromForm] long markLabelId)
|
|
|
|
{
|
|
|
|
return await _markSearcherServer.ActivateMarkLabelAsync(cameraId, markLabelId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
public async Task<bool> DeactivateMarkLabel([FromForm] long cameraId, [FromForm] long markLabelId)
|
|
|
|
{
|
|
|
|
return await _markSearcherServer.DeactivateMarkLabelAsync(cameraId, markLabelId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
public async Task<bool> IsExistsMarkLabel(long cameraId, long markLabelId)
|
|
|
|
{
|
|
|
|
return await _markSearcherServer.IsExistsMarkLabelAsync(cameraId, markLabelId);
|
|
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
public async Task<List<MarkLabelCalcResult>> GetMarkLabelCalcResultList(long cameraId)
|
|
|
|
{
|
|
|
|
return await _markSearcherServer.GetMarkLabelCalcResultListAsync(cameraId);
|
|
|
|
}
|
|
|
|
}
|