| | |
| | | } |
| | | else |
| | | { |
| | | var idlist = db.Queryable<Entity.AssetsPumpGroupAndMainMap>() |
| | | .Where(x => x.PumpGroupID == group.ID) |
| | | .Select(x => x.PumpMainID) // 假设 PumpGroupID 是与 AssetsPumpMain 关联的外键 |
| | | var idlist = db.Queryable<Entity.AssetsPumpGroupAndMainMapping>() |
| | | .Where(x => x.GroupID == group.ID) |
| | | .Select(x => x.MainID) // 假设 GroupID 是与 AssetsPumpMain 关联的外键 |
| | | .ToList(); |
| | | var main = db.Queryable<Entity.AssetsPumpGroupAndMainMap>() |
| | | .Where(x => x.PumpGroupID == group.ID) |
| | | var main = db.Queryable<Entity.AssetsPumpGroupAndMainMapping>() |
| | | .Where(x => x.GroupID == group.ID) |
| | | .ToList(); |
| | | if (main.Count > 0) |
| | | { |