|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.WMS.Core.Op.Dtos;
|
|
|
|
|
using DS.WMS.Core.Sys.Dtos;
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
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>item1-文件绝对路径 item2-新文件名 item3-原文件名</returns>
|
|
|
|
|
Task<DataResult<Tuple<string, string, 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>item1-文件绝对路径 item2-新文件名 item3-原文件名</returns>
|
|
|
|
|
Task<DataResult<Tuple<string, string, string,int>>> MoveFile(string fileDictKey, string sourceFilePath, string batchNo,
|
|
|
|
|
bool isLocalTempFile = false, string attachFileType = "bcfiles", bool isKeepSource = false);
|
|
|
|
|
}
|
|
|
|
|
}
|