快乐的昕的电脑
5 天以前 f92369eeb7587ce03ae5bb09d74524fe6fb0f3e1
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";
        }
        //工作中心编码转ID,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=禁用