From 9634f741a46406a1f81356af3627ea695dd2f87c Mon Sep 17 00:00:00 2001 From: Carl Date: Thu, 8 Jan 2026 15:36:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MES/Material/MmMaterialService.cs | 30 +------------------ 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/DOAN.Service/MES/Material/MmMaterialService.cs b/DOAN.Service/MES/Material/MmMaterialService.cs index 7683eec..d25f3d8 100644 --- a/DOAN.Service/MES/Material/MmMaterialService.cs +++ b/DOAN.Service/MES/Material/MmMaterialService.cs @@ -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 {