Camera Information System
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.8 KiB

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