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.
51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using DS.Module.Core;
|
|
using DS.Module.ExcelModule;
|
|
using DS.Module.ExcelModule.Model;
|
|
using DS.WMS.Core.Code.Interface;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.MainApi.Controllers
|
|
{
|
|
/// <summary>
|
|
/// Excel服务 模块
|
|
/// </summary>
|
|
public class ExcelController : ApiController
|
|
{
|
|
private readonly IExcelService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public ExcelController(IExcelService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据用户列导出Excel数据
|
|
/// </summary>
|
|
/// <param name="req">请求数据</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("ExportExcelByColumn")]
|
|
public DataResult<string> ExportExcelByColumn([FromBody] ExportByColumnReq req)
|
|
{
|
|
return _invokeService.ExportExcelByColumn(req);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据用户列导出Excel文件流
|
|
/// </summary>
|
|
/// <param name="req">请求数据</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("ExportExcelStreamByColumn")]
|
|
public FileStreamResult ExportExcelStreamByColumn([FromBody] ExportByColumnReq req)
|
|
{
|
|
return _invokeService.ExportExcelStreamByColumn(req);
|
|
}
|
|
}
|
|
}
|