using DS.Module.Core; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Op.Interface; using DS.WMS.Core.Sys.Dtos; using DS.WMS.Core.Sys.Interface; using Microsoft.AspNetCore.Mvc; namespace DS.WMS.MainApi.Controllers; /// /// 业务附件模块 /// public class OpFileController : ApiController { private readonly IOpFileService _invokeService; /// /// 构造函数 /// /// public OpFileController(IOpFileService invokeService) { _invokeService = invokeService; } /// /// 添加附件 /// /// 文件信息 /// 业务附件请求实体 /// [HttpPost] [Route("AddFile")] public async Task> AddFile(IFormFile file, [FromForm] OpFileReq req) { var res = _invokeService.AddFile( file, req); return await res; } /// /// 获取业务附件 /// /// 业务id /// [HttpGet] [Route("GetOpFileList")] public DataResult> GetOpFileList([FromQuery] string id) { var res = _invokeService.GetOpFileList(id); return res; } }