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.

57 lines
2.1 KiB
C#

8 months ago
using DS.Module.Core;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Sys.Dtos;
8 months ago
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Sys.Interface
8 months ago
{
public interface ISysFileService
{
/// <summary>
/// 添加系统附件
/// </summary>
/// <param name="file"></param>
/// <param name="req"></param>
/// <returns></returns>
public Task<DataResult<string>> AddFile(IFormFile file, [FromForm] SysFileReq req);
/// <summary>
/// 获取系统附件
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public DataResult<List<SysFileRes>> GetSysFileList(string id);
/// <summary>
/// 保存文件并返回文件完整路径
/// </summary>
/// <param name="fileDictKey">文件目录KEY</param>
/// <param name="fileBytes">文件二进制流</param>
/// <param name="batchNo">批次号</param>
/// <param name="fileName">文件名称</param>
/// <param name="attachFileType">附件类型</param>
/// <returns></returns>
Task<DataResult<string>> SaveFileDirect(string fileDictKey, byte[] fileBytes, string batchNo,
string fileName, string attachFileType);
/// <summary>
/// 转移文件
/// </summary>
/// <param name="fileDictKey">文件目录KEY</param>
/// <param name="sourceFilePath">源文件完整路径</param>
/// <param name="batchNo">批次号</param>
/// <param name="isLocalTempFile">是否生成本地文件</param>
/// <param name="attachFileType">附件类型 bcfiles-BC文件</param>
/// <param name="isKeepSource">是否保留原文件</param>
/// <returns>返回新的文件路径</returns>
Task<DataResult<string>> MoveFile(string fileDictKey, string sourceFilePath, string batchNo,
bool isLocalTempFile = false, string attachFileType = "bcfiles", bool isKeepSource = false);
8 months ago
}
}