From b07f20845de0e3aa3d8174d4dd036343eea4cb4e Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Wed, 4 Sep 2024 14:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entity/ErpEntity/ErpBdMaterial.cs | 5 +++++ ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/ErpEntity/ErpBdMaterial.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/ErpEntity/ErpBdMaterial.cs index 194606da..ba6e508f 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/ErpEntity/ErpBdMaterial.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/ErpEntity/ErpBdMaterial.cs @@ -56,5 +56,10 @@ namespace Tnb.ProductionMgr.Entities.Entity.ErpEntity /// 修改时间 /// public string MODIFIEDTIME { get; set; } + + /// + /// mes物料类型 + /// + public string DEFNAME { get; set; } } } \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs index 2716229e..8ec20959 100644 --- a/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/TimeWorkService.cs @@ -42,6 +42,7 @@ using Tnb.ProductionMgr.Entities.Dto.PrdManage; using Tnb.ProductionMgr.Entities.Entity; using Tnb.ProductionMgr.Entities.Entity.ErpEntity; using Tnb.BasicData.Entities.Dto; +using Tnb.BasicData; namespace Tnb.ProductionMgr { @@ -994,6 +995,9 @@ namespace Tnb.ProductionMgr Dictionary unitDic2 = await _db.Queryable() .Where(x => x.DictionaryTypeId == WmsWareHouseConst.UNITTYPEID) .ToDictionaryAsync(x => x.FullName, y => y.EnCode); + Dictionary materialcategoryDic = await _db.Queryable() + .Where(x => x.DictionaryTypeId == DictConst.MaterialCatagoryID) + .ToDictionaryAsync(x => x.FullName, y => y.EnCode); List materials = await _db.Queryable().ToListAsync(); List basEbomHs = await _db.Queryable().ToListAsync(); List insertMaterial = new List(); @@ -1038,7 +1042,7 @@ namespace Tnb.ProductionMgr } else { - + categoryId = materialcategoryDic.ContainsKey(erpBdMaterial.DEFNAME) ? $"[\"{materialcategoryDic["erpBdMaterial.DEFNAME"]}\"]" : "[\"CGJCJ\"]"; } if (erpExtendFields.All(x => x.cmaterialoid != erpBdMaterial.ID))