From b641001593f884c2b1a6ce1e21cb7cbbe15a27d4 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Sat, 14 Sep 2024 10:17:13 +0800 Subject: [PATCH 1/2] bug --- WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs index 38550f17..b5bb8f9d 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPurchaseDService.cs @@ -132,6 +132,7 @@ namespace Tnb.WarehouseMgr string supplierId = wmsPurchaseOrderH?.supplier_id ?? ""; List tableIds = new List(); tableIds.Add(_userManager.UserId); + tableIds.Add(wmsPurchaseH.create_id); tableIds.Add(WmsWareHouseConst.AdministratorOrgId); tableIds.Add(instock.warehouse_id); tableIds.AddRange(materialIds); @@ -140,7 +141,7 @@ namespace Tnb.WarehouseMgr tableIds.AddRange(unitDatas.Select(x => x.Id).ToList()); List erpExtendFields = await _db.Queryable().Where(x => tableIds.Contains(x.table_id)).ToListAsync(); - string erpCreateId = erpExtendFields.Find(x => x.table_id == instock.create_id)?.user_id ?? ""; + string erpCreateId = erpExtendFields.Find(x => x.table_id == wmsPurchaseH.create_id)?.user_id ?? ""; ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_id == (WmsWareHouseConst.AdministratorOrgId)); string nowStr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); @@ -178,8 +179,8 @@ namespace Tnb.WarehouseMgr ["cbodytranstypecode"] = erpExtendFields.Find(x => x.table_id == tranTypeId)?.transaction_type_id ?? "", // ["cbodywarehouseid"] = erpExtendFields.Find(x => x.table_id == instock.warehouse_id)?.cotherwhid ?? "", ["cbodywarehouseid"] = erpWarehouserelaHs.Find(x => x.erp_warehousecode == basWarehouse.whcode)?.erp_warehouseid ?? "", - ["cgeneralbid"] = "", - ["cgeneralhid"] = "", + ["cgeneralbid"] = null, + ["cgeneralhid"] = null, ["cmaterialoid"] = erpExtendFields.Find(x => x.table_id == item.material_id)?.cmaterialoid ?? "", ["cmaterialvid"] = erpExtendFields.Find(x => x.table_id == item.material_id)?.cmaterialvid ?? "", ["corpoid"] = erpOrg.corpoid, From ab74ee1d460801b41be0d6e5eeb596684b6c8675 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Sat, 14 Sep 2024 10:43:53 +0800 Subject: [PATCH 2/2] bug --- ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index fa1adb3a..c436b501 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -2500,7 +2500,7 @@ namespace Tnb.ProductionMgr .ToListAsync(); List erpExtendIds = new List(); - erpExtendIds.Add(_userManager.UserId); + erpExtendIds.Add(report.create_id); erpExtendIds.Add(WmsWareHouseConst.AdministratorOrgId); erpExtendIds.Add(report.material_id); // erpExtendIds.Add(report.unit_id); @@ -2508,7 +2508,7 @@ namespace Tnb.ProductionMgr List erpExtendFields = await _db.Queryable() .Where(x => erpExtendIds.Contains(x.table_id)).ToListAsync(); - string erpCreateId = erpExtendFields.Find(x => x.table_id == _userManager.UserId)?.user_id ?? ""; + string erpCreateId = erpExtendFields.Find(x => x.table_id == report.create_id)?.user_id ?? ""; ErpExtendField erpOrg = erpExtendFields.Find(x => x.table_id == (WmsWareHouseConst.AdministratorOrgId)); string nowStr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");