| | |
| | | { |
| | | if (input.DbId == null) |
| | | input.MatchingDbId = vmo.ID.ToString(); |
| | | if (input.ModelType == null) |
| | | if (input.ModelType == null && input.ModelType == string.Empty) |
| | | input.MatchingModelType = vmo.Name; |
| | | if (input.DN < 0) |
| | | if (input.DN <= 0) |
| | | input.MatchingDN = vmo.DN; |
| | | if (input.MinLevel < 0) |
| | | if (input.MinLevel <= 0) |
| | | input.MatchingMinLevel = vmo.MinLevel; |
| | | input.MatchingOverFlow = vmo.OverFlow; |
| | | if (input.MinVol <= 0) |
| | | input.MatchingMinVol = vmo.MinVol; |
| | | if (input.MaxLevel <= 0) |
| | | input.MatchingMaxLevel = vmo.MaxLevel; |
| | | if (input.CurveDbId == null) |
| | | { |
| | | var list = Task.Run(async () => await new BLL.PhartDiagramRelation().GetExByObjectTypeAndObjectID(HStation.Assets.DataType.ValveMain, vmo.ID)).Result; |
| | | var list = Task.Run(async () => await new BLL.PhartDiagramRelation().GetExByObjectTypeAndObjectID(HStation.Assets.DataType.TankMain, vmo.ID)).Result; |
| | | if (list != null && list.Count > 0) |
| | | { |
| | | var def = list.OrderByDescending(x => x.Importance).First(); |
| | |
| | | input.MatchingDN = vmo.DN; |
| | | input.MatchingMinLevel = vmo.MinLevel; |
| | | input.MatchingOverFlow = vmo.OverFlow; |
| | | input.MatchingMinVol = vmo.MinVol; |
| | | input.MatchingMaxLevel = vmo.MaxLevel; |
| | | |
| | | var list = Task.Run(async () => await new BLL.PhartDiagramRelation().GetExByObjectTypeAndObjectID(HStation.Assets.DataType.ValveMain, vmo.ID)).Result; |
| | | if (list != null && list.Count > 0) |
| | | { |