diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Service/ProductDesignLibrary/ProductDesignLibraryService.cs b/admin.net.pro/Admin.NET/Vistar.Application/Service/ProductDesignLibrary/ProductDesignLibraryService.cs index bf28397..bc3534b 100644 --- a/admin.net.pro/Admin.NET/Vistar.Application/Service/ProductDesignLibrary/ProductDesignLibraryService.cs +++ b/admin.net.pro/Admin.NET/Vistar.Application/Service/ProductDesignLibrary/ProductDesignLibraryService.cs @@ -192,7 +192,7 @@ public class ProductDesignLibraryService : IDynamicApiController, ITransient .Where(x => x.RecordGuid == input.ParentGuid && x.deleted == false && x._system_objConfigurationName == "默认" && !x.SWPDMFileName.Contains("SLDDRW")) .MaxAsync(x => x.VersionIndex); var BomData = await _configurationDataRep.AsQueryable() - .Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == input.ParentGuid && x.isDeleted == false && x.ParentVersion == parent && (x.fld005577 != "不包含" || x.fld005577 == null)&&x.isSuppressed==false) + .Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == input.ParentGuid && x.isDeleted == false && x.ParentVersion == parent && (x.fld005577 != "不包含" || x.fld005577 == null)&&x.isSuppressed== false && x.inContext == false) .WhereIF(!string.IsNullOrWhiteSpace(input.Description), u => u.Description.Contains(input.Description.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.PartNumber), u => u.PartNumber.Contains(input.PartNumber.Trim())) .Select().ToPagedListAsync(input.Page, input.PageSize); @@ -244,7 +244,7 @@ public class ProductDesignLibraryService : IDynamicApiController, ITransient if (!string.IsNullOrEmpty(ParentData.fld005686)) { var configid = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "SolidWorks").FirstAsync(); - var BomData = await _configurationDataRep.AsQueryable().Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == input[0].ParentGuid && x.isDeleted == false && x.ParentVersion == Convert.ToInt32(ParentData.fld005686) && (x.fld005577 != "不包含" || x.fld005577 == null) && x.isSuppressed == false).ToListAsync(); + var BomData = await _configurationDataRep.AsQueryable().Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == input[0].ParentGuid && x.isDeleted == false && x.ParentVersion == Convert.ToInt32(ParentData.fld005686) && (x.fld005577 != "不包含" || x.fld005577 == null) && x.isSuppressed == false && x.inContext == false).ToListAsync(); for (int i = 0; i < BomData.Count; i++) { @@ -582,7 +582,7 @@ public class ProductDesignLibraryService : IDynamicApiController, ITransient var ecnGuid = item.fld005679_Rec; // 查询 BOM var bomData = await _configurationDataRep.AsQueryable() - .Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == item.RecordGuid && x.isDeleted == false && x.ParentVersion == versionIndex && (x.fld005577 != "不包含" || x.fld005577 == null) && x.isSuppressed == false).ToListAsync(); + .Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == item.RecordGuid && x.isDeleted == false && x.ParentVersion == versionIndex && (x.fld005577 != "不包含" || x.fld005577 == null) && x.isSuppressed == false && x.inContext == false).ToListAsync(); if (bomData.Count == 0) { continue; @@ -622,7 +622,7 @@ public class ProductDesignLibraryService : IDynamicApiController, ITransient if (!string.IsNullOrEmpty(ParentData.fld005686)) { var configidold = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "SolidWorks").FirstAsync(); - var BomData = await _configurationDataRep.AsQueryable().Where(x => x.ConfigId == configidold.ConfigID && x.ParentGuid == bomData[0].ParentGuid && x.isDeleted == false && x.ParentVersion == Convert.ToInt32(ParentData.fld005686) && (x.fld005577 != "不包含" || x.fld005577 == null) && x.isSuppressed == false).ToListAsync(); + var BomData = await _configurationDataRep.AsQueryable().Where(x => x.ConfigId == configidold.ConfigID && x.ParentGuid == bomData[0].ParentGuid && x.isDeleted == false && x.ParentVersion == Convert.ToInt32(ParentData.fld005686) && (x.fld005577 != "不包含" || x.fld005577 == null) && x.isSuppressed == false && x.inContext==false).ToListAsync(); for (int i = 0; i < BomData.Count; i++) {