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.
88 lines
2.4 KiB
C#
88 lines
2.4 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.Code.Dtos;
|
|
using DS.WMS.Core.Code.Interface;
|
|
using DS.WMS.Core.Sys.Dtos;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DS.WMS.AdminApi.Controllers;
|
|
|
|
/// <summary>
|
|
/// 基础信息导入服务
|
|
/// </summary>
|
|
public class CodeInfoImportController : ApiController
|
|
{
|
|
private readonly ICodeInfoImportService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public CodeInfoImportController(ICodeInfoImportService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
/// <summary>
|
|
/// 按Excel导入包装信息
|
|
/// </summary>
|
|
/// <param name="file">Excel文件</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("ImportPackageByExcel")]
|
|
public async Task<DataResult<string>> ImportPackageByExcel(IFormFile file)
|
|
{
|
|
var res = await _invokeService.ImportPackageByExcel(file);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按Excel导入集装箱信息
|
|
/// </summary>
|
|
/// <param name="file">Excel文件</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("ImportCtnByExcel")]
|
|
public async Task<DataResult<string>> ImportCtnByExcel(IFormFile file)
|
|
{
|
|
var res = await _invokeService.ImportCtnByExcel(file);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按Excel导入国家信息
|
|
/// </summary>
|
|
/// <param name="file">Excel文件</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("ImportCountryByExcel")]
|
|
public async Task<DataResult<string>> ImportCountryByExcel(IFormFile file)
|
|
{
|
|
var res = await _invokeService.ImportCountryByExcel(file);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按Excel导入商品信息
|
|
/// </summary>
|
|
/// <param name="file">Excel文件</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("ImportGoodsByExcel")]
|
|
public async Task<DataResult<string>> ImportGoodsByExcel(IFormFile file)
|
|
{
|
|
var res = await _invokeService.ImportGoodsByExcel(file);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按Excel导入港口信息
|
|
/// </summary>
|
|
/// <param name="file">Excel文件</param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("ImportPortByExcel")]
|
|
public async Task<DataResult<string>> ImportPortByExcel(IFormFile file)
|
|
{
|
|
var res = await _invokeService.ImportPortByExcel(file);
|
|
return res;
|
|
}
|
|
} |