개정판 c6503eaa
dev issue #000 : dev equip
Change-Id: Ia41abf502381c603baf6a7af96a03da8552ff7d0
DTI_PID/ID2PSN/PSN.cs | ||
---|---|---|
24 | 24 |
private double DrawingWidth = double.NaN; |
25 | 25 |
private double DrawingHeight = double.NaN; |
26 | 26 |
public int Revision; |
27 |
public string EquipTagNoAttributeName = string.Empty; |
|
27 | 28 |
public DataTable PathItems { get; set; } |
28 | 29 |
public DataTable SequenceData { get; set; } |
29 | 30 |
public DataTable PipeSystemNetwork { get; set; } |
... | ... | |
645 | 646 |
{ |
646 | 647 |
DataRow row = equipDT.NewRow(); |
647 | 648 |
row["OID"] = equipment.UID; |
648 |
row["ITEMTAG"] = equipment.Name; |
|
649 |
if (!string.IsNullOrEmpty(EquipTagNoAttributeName)) |
|
650 |
{ |
|
651 |
Attribute attribute = equipment.Attributes.Find(x => x.Name == EquipTagNoAttributeName); |
|
652 |
if (attribute != null) |
|
653 |
equipment.ItemTag = attribute.Value; |
|
654 |
} |
|
655 |
else |
|
656 |
equipment.ItemTag = equipment.Name; |
|
649 | 657 |
|
658 |
row["ITEMTAG"] = equipment.ItemTag; |
|
650 | 659 |
List<double> xList = equipment.POINT.Select(x => x[0]).ToList(); |
651 | 660 |
row["XCOORDS"] = (xList.Sum() / (double)xList.Count) / DrawingWidth; |
652 | 661 |
|
... | ... | |
993 | 1002 |
else if (StartType == PSNType.Branch) |
994 | 1003 |
result = Groups.First().Items.First().LineNumber.Name; |
995 | 1004 |
else if (StartType == PSNType.Equipment) |
996 |
result = Groups.First().Items.First().Equipment.Name;
|
|
1005 |
result = Groups.First().Items.First().Equipment.ItemTag;
|
|
997 | 1006 |
else |
998 | 1007 |
result = "Unknown"; |
999 | 1008 |
|
... | ... | |
1008 | 1017 |
else if (EndType == PSNType.Branch) |
1009 | 1018 |
result = Groups.Last().Items.Last().LineNumber.Name; |
1010 | 1019 |
else if (EndType == PSNType.Equipment) |
1011 |
result = Groups.Last().Items.Last().Equipment.Name;
|
|
1020 |
result = Groups.Last().Items.Last().Equipment.ItemTag;
|
|
1012 | 1021 |
else |
1013 | 1022 |
result = "Unknown"; |
1014 | 1023 |
return result; |
내보내기 Unified diff