From c3a050007846b015c11ec53db980831d23e7c3f8 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期四, 12 九月 2024 14:08:54 +0800 Subject: [PATCH] 基础资料接口部分实体与erp的对照增加Type字段的赋值,防止根据type分组时报错 --- MES.Service/service/BasicData/MesSupplierManager.cs | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/MES.Service/service/BasicData/MesSupplierManager.cs b/MES.Service/service/BasicData/MesSupplierManager.cs index b2e5ac3..f6fe88a 100644 --- a/MES.Service/service/BasicData/MesSupplierManager.cs +++ b/MES.Service/service/BasicData/MesSupplierManager.cs @@ -28,7 +28,7 @@ return 1; break; case "3": - if (DeleteSupplier(db, entity.Id)) + if (DeleteSupplier(entity.Id)) return 1; break; case "4": @@ -108,12 +108,9 @@ throw new NotImplementedException("鎻掑叆澶辫触"); } - private bool DeleteSupplier(SqlSugarScope db, decimal supplierId) + private bool DeleteSupplier(decimal supplierId) { - var deleteById = db.Deleteable<MesSupplier>().In(supplierId) - .ExecuteCommand(); - if (deleteById > 0) - return true; + if (base.DeleteById(supplierId)) return true; throw new NotImplementedException("鍒犻櫎澶辫触"); } @@ -123,6 +120,7 @@ return new MesSupplier { Id = Convert.ToDecimal(supplier.Id), + Type = supplier.Type, SuppNo = supplier.FNumber, SuppSname = supplier.FShortName, SuppName = supplier.FName, -- Gitblit v1.9.3