You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
C#
55 lines
1.4 KiB
C#
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.System.Dtos;
|
|
using DS.WMS.Core.System.Interface;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.AdminApi.Controllers;
|
|
|
|
/// <summary>
|
|
/// 系统附件模块
|
|
/// </summary>
|
|
public class SysFileController : ApiController
|
|
{
|
|
private readonly ISysFileService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public SysFileController(ISysFileService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 添加附件
|
|
/// </summary>
|
|
/// <param name="file">文件信息</param>
|
|
/// <param name="req">业务附件请求实体</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("AddFile")]
|
|
public async Task<DataResult<string>> AddFile(IFormFile file, [FromForm] SysFileReq req)
|
|
{
|
|
var res = _invokeService.AddFile( file, req);
|
|
return await res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取系统附件
|
|
/// </summary>
|
|
/// <param name="id">业务id</param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetSysFileList")]
|
|
public DataResult<List<SysFileRes>> GetSysFileList([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetSysFileList(id);
|
|
return res;
|
|
}
|
|
|
|
} |