66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using DingTalk.Api.Request;
|
|
using JNPF.Common.Configuration;
|
|
using JNPF.Common.Contracts;
|
|
using JNPF.Common.Core.Manager;
|
|
using JNPF.Common.Extension;
|
|
using JNPF.Common.Helper;
|
|
using JNPF.Common.Models;
|
|
using JNPF.Common.Security;
|
|
using JNPF.Extras.CollectiveOAuth.Enums;
|
|
using JNPF.FriendlyException;
|
|
using JNPF.Logging;
|
|
using Mapster;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using NPOI.HPSF;
|
|
using NPOI.HSSF.UserModel;
|
|
using NPOI.SS.UserModel;
|
|
using NPOI.XSSF.UserModel;
|
|
using SqlSugar;
|
|
using Tnb.BasicData.Entities;
|
|
using Tnb.WarehouseMgr.Entities;
|
|
using Tnb.WarehouseMgr.Entities.Enums;
|
|
|
|
namespace Tnb.WarehouseMgr
|
|
{
|
|
/// <summary>
|
|
/// 导入和导出接口服务提供类
|
|
/// </summary>
|
|
public class WmsImportAndExportService : BaseWareHouseService
|
|
{
|
|
private readonly ISqlSugarClient _db;
|
|
private readonly IUserManager _userManager;
|
|
public WmsImportAndExportService(ISqlSugarRepository<WmsCarryH> repository, IUserManager userManager)
|
|
{
|
|
_db = repository.AsSugarClient();
|
|
_userManager = userManager;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 载具导入模板
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public async Task<dynamic> CarryImportTemplate()
|
|
{
|
|
int row = 0;
|
|
Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
dic.Add("carry_code", "载具编号");
|
|
dic.Add("carry_name", "载具名称");
|
|
dic.Add("carrystd_id", "载具规格");
|
|
//headers = _db.DbMaintenance.GetColumnInfosByTableName("wms_carry_h").FindAll(x=>!x.IsNullable).ToDictionary(x => x.DbColumnName ,x => x.ColumnDescription);
|
|
FileStreamResult fileStreamResult = WmsTemplate(dic, "载具台账");
|
|
|
|
return fileStreamResult;
|
|
}
|
|
|
|
}
|
|
}
|