From f92369eeb7587ce03ae5bb09d74524fe6fb0f3e1 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期五, 12 十二月 2025 11:04:14 +0800
Subject: [PATCH] 物料信息:工作中心编码转ID
---
MES.Service/service/BasicData/MesItemsManager.cs | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/MES.Service/service/BasicData/MesItemsManager.cs b/MES.Service/service/BasicData/MesItemsManager.cs
index 390ed88..cf1dd48 100644
--- a/MES.Service/service/BasicData/MesItemsManager.cs
+++ b/MES.Service/service/BasicData/MesItemsManager.cs
@@ -311,7 +311,7 @@
}
else
{
- entity.SubconUnit = "0";
+ entity.DepotCode = "0";
}
//閲囪喘鍛樼紪鐮佽浆ID,Fpurchaserid = item.FPurchaserId,
@@ -329,7 +329,25 @@
}
else
{
- entity.SubconUnit = "0";
+ entity.Fpurchaserid = "0";
+ }
+
+ //宸ヤ綔涓績缂栫爜杞琁D,ProductionWorkshop = item.FWorkShopId,
+ var entityProductionWorkshop = Db.Queryable<SysDepartment>()
+ .Where(x => x.WorkshopCenterCode == item.FWorkShopId)
+ .Select(x => x.Id.ToString())
+ .First();
+ if (!string.IsNullOrWhiteSpace(entityProductionWorkshop))
+ {
+ entity.ProductionWorkshop = entityProductionWorkshop;
+ }
+ else if (!string.IsNullOrWhiteSpace(item.FWorkShopId))
+ {
+ entity.ProductionWorkshop = item.FWorkShopId;
+ }
+ else
+ {
+ entity.ProductionWorkshop = "0";
}
//// ERP: Y=鏈鐢�, N=绂佺敤
--
Gitblit v1.9.3