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