This commit is contained in:
2026-01-08 15:36:31 +08:00
parent 50cd23a6a1
commit 9634f741a4

View File

@@ -206,10 +206,6 @@ namespace DOAN.Service.BZFM
NPOI.SS.UserModel.ICell currentCell_04 = currentRow.GetCell(4);
material.Specification = currentCell_04?.ToString();
if (currentCell_04 == null || string.IsNullOrEmpty(material.Specification))
{
continue;
}
//05 类型编码
NPOI.SS.UserModel.ICell currentCell_05 = currentRow.GetCell(5);
@@ -239,45 +235,21 @@ namespace DOAN.Service.BZFM
NPOI.SS.UserModel.ICell currentCell_07 = currentRow.GetCell(7);
material.Unit = currentCell_07?.ToString();
if (
currentCell_07 == null
|| string.IsNullOrEmpty(material.Unit)
)
{
continue;
}
//08 供应商编码
NPOI.SS.UserModel.ICell currentCell_08 = currentRow.GetCell(8);
material.SupplierCode = currentCell_08?.ToString();
if (currentCell_08 == null || string.IsNullOrEmpty(material.SupplierCode))
{
continue;
}
//09 供应商名称
NPOI.SS.UserModel.ICell currentCell_09 = currentRow.GetCell(9);
material.SupplierName = currentCell_09?.ToString();
if (
currentCell_09 == null
|| string.IsNullOrEmpty(material.SupplierName)
)
{
continue;
}
//10 状态
NPOI.SS.UserModel.ICell currentCell_10 = currentRow.GetCell(10);
material.Status = currentCell_10?.ToString();
if (currentCell_10 == null || string.IsNullOrEmpty(material.Status))
{
continue;
}
materialList.Add(material);
}
}
@@ -298,7 +270,7 @@ namespace DOAN.Service.BZFM
.SplitInsert(it => !it.Any())
.WhereColumns(it => it.Id) //如果不是主键可以这样实现多字段it=>new{it.x1,it.x2}
.ToStorage();
var result = x.AsInsertable.ExecuteCommand(); //插入可插入部分;
var result = x.AsUpdateable.ExecuteCommand(); //插入可插入部分;
var importResult = new ImportResultDto
{