using IRaCIS.Application.Interfaces; using IRaCIS.Application.ViewModels; using System; using System.Collections.Generic; using IRaCIS.Core.Application.Contracts.RequestAndResponse; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Authorization; namespace IRaCIS.Api.Controllers.Trial { /// /// 影像获取规范 /// [Route("acquisitionSpecification")] [ApiController, Authorize, ApiExplorerSettings(GroupName = "Trial")] public class TrialAttachmentController : ControllerBase { private readonly ITrialAttachmentService _specificationService; public TrialAttachmentController(ITrialAttachmentService specificationService) { _specificationService = specificationService; } /// /// 添加或更新影像采集规范[New][AUTH] /// /// /// [HttpPost, Route("addOrUpdate")] public IResponseOutput AddOrUpdateSpecification(TrialAttachmentCommand model) { var userId = User.FindFirst("id").Value; return _specificationService.AddOrUpdateSpecification(model, Guid.Parse(userId)); } /// 删除采集规范[New] [HttpDelete, Route("delete/{id:guid}")] public IResponseOutput DeleteSpecification(Guid id) { return _specificationService.DeleteSpecification(id); } [HttpPost, Route("list/{trialId:guid}")] public IResponseOutput> GetAcquisitionSpecificationList(Guid trialId,string type) { return ResponseOutput.Ok(_specificationService.GetSpecificationList( trialId, type)); } ///// 分页获取影像采集规范[New] //[HttpPost, Route("getPageList")] //[ApiExplorerSettings(IgnoreApi = true)] //public IResponseOutput> GetSpecificationList(ImageAcquisitionSpecificationQueryDTO param) //{ // return ResponseOutput.Ok(_specificationService.GetSpecificationList(param)); //} } }