1.去掉编译条件

2.重写业务导入功能
This commit is contained in:
FanLian
2023-08-09 17:49:27 +08:00
parent 7913642d3d
commit 1bbb30f135
7 changed files with 127 additions and 89 deletions

View File

@@ -21,7 +21,7 @@ namespace Tnb.WarehouseMgr
protected Task<List<Dictionary<string, object>>> ImportExcelToMemory(IFormFile file)
{
int rowIndex = 1;
List<Dictionary<string, object>> dics = new();
List<Dictionary<string, object>>? dics = new();
IWorkbook? workbook = null;
try
{
@@ -71,18 +71,20 @@ namespace Tnb.WarehouseMgr
dics.Add(dic);
}
}
if (dics == null) throw new AppFriendlyException("输入的数据为空", 500);
}
}
}
}
catch (Exception)
{
//return Task.FromResult(dics);
throw;
}
return Task.FromResult(dics);
}
public async Task<dynamic?> GenImportTemplate(params string[] fields)
public async Task<dynamic?> GenImportTemplate(params string[] fields)
{
return null;
}