using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Opsoft.NetCore.O3App.Domain.Models.ESOP; using Opsoft.NetCore.O3App.Domain.UnitOfWork.ESOP.ESOP; using Opsoft.NetCore.O3App.Domain.UnitOfWork.ESOP.IServices; using Opsoft.NetCore.O3App.Shared; using Opsoft.NetCore.O3App.WebApi.Models; using System.Collections.Generic; using System.Threading.Tasks; namespace Opsoft.NetCore.O3App.WebApi.Controllers.ESOP { /// /// ESOP /// [Authorize] public class ESOPController : BaseApiController { //服务层变量 private readonly IESOPService service; public ESOPController(IMapper mapper, ILogger logger, IESOPService service) : base(mapper, logger) { this.service = service; } /// /// 获取文件信息 /// /// /// [HttpPost] public async Task> GetAnnounceAndFile([FromBody] ESOPRequest request) { return await TryProcess(async input => { return await service.GetAnnounceAndFile(input); }, request); } /// /// 根据工位编码获取资源以及工序识别码信息 /// /// /// [HttpGet] public async Task> GetSourceAndCode(string stationCode) { return await TryProcess(async input => { return await service.GetSourceAndCode(input); }, stationCode); } } }