개정판 08b33e44
issue #000: No Pocket 기능 추가
Change-Id: Ia571ce289d700882397361a8a2040d631ea2d7a4
DTI_PID/ID2PSN/PSN.cs | ||
---|---|---|
357 | 357 |
} |
358 | 358 |
} |
359 | 359 |
} |
360 |
|
|
361 |
if(valveitem.GroupType.Contains("PSV")) |
|
362 |
{ |
|
363 |
DataRow[] psnRows = PipeSystemNetwork.Select(string.Format("OID = '{0}'", drPathitem["PipeSystemNetwork_OID"].ToString())); |
|
364 |
foreach (DataRow row in psnRows) |
|
365 |
row["Pocket"] = "Yes"; |
|
366 |
} |
|
360 | 367 |
} |
361 | 368 |
} |
362 | 369 |
catch (Exception ex) |
... | ... | |
1124 | 1131 |
pipeSystemNetworkDT.Columns.Add("Status", typeof(string)); |
1125 | 1132 |
pipeSystemNetworkDT.Columns.Add("IncludingVirtualData", typeof(string)); |
1126 | 1133 |
pipeSystemNetworkDT.Columns.Add("PSNAccuracy", typeof(string)); |
1134 |
pipeSystemNetworkDT.Columns.Add("Pocket", typeof(string)); |
|
1127 | 1135 |
|
1128 | 1136 |
DataTable topologySetDT = new DataTable(); |
1129 | 1137 |
topologySetDT.Columns.Add("OID", typeof(string)); |
... | ... | |
1215 | 1223 |
} |
1216 | 1224 |
#endregion |
1217 | 1225 |
|
1226 |
|
|
1227 |
#region EquipmentNoPocket Info |
|
1228 |
EquipmentNoPocketInfo EquipmentNoPocket = new EquipmentNoPocketInfo(); |
|
1229 |
DataTable dtEquipmentNoPocket = DB.SelectEquipmentNoPocketSetting(); |
|
1230 |
foreach (DataRow row in dtEquipmentNoPocket.Rows) |
|
1231 |
{ |
|
1232 |
EquipmentNoPocket.EquipmentNoPocketItem.Add(new EquipmentNoPocketItem() |
|
1233 |
{ |
|
1234 |
Index = Convert.ToInt32(row["INDEX"]), |
|
1235 |
Type = row["TYPE"].ToString(), |
|
1236 |
Name = row["NAME"].ToString() |
|
1237 |
}); |
|
1238 |
} |
|
1239 |
#endregion |
|
1240 |
|
|
1218 | 1241 |
// key = 미입력 branch |
1219 | 1242 |
Dictionary<Item, Item> startBranchDic = new Dictionary<Item, Item>(); |
1220 | 1243 |
Dictionary<Item, Item> endBranchDic = new Dictionary<Item, Item>(); |
... | ... | |
1429 | 1452 |
void CreatePipeSystemNetworkDataRow() |
1430 | 1453 |
{ |
1431 | 1454 |
LineNumber lineNumber = item.Document.LineNumbers.Find(x => x.UID == item.Owner); |
1455 |
string FluidCode = string.Empty; |
|
1432 | 1456 |
if (lineNumber != null) |
1433 | 1457 |
{ |
1434 | 1458 |
List<Attribute> att = lineNumber.Attributes; |
1435 | 1459 |
if (att != null) |
1436 | 1460 |
{ |
1437 | 1461 |
List<string> oid = new List<string>(); |
1438 |
string FluidCode = att.Where(x => x.Name.ToUpper().Equals("FLUIDCODE")).FirstOrDefault() != null ? att.Where(x => x.Name.ToUpper().Equals("FLUIDCODE")).FirstOrDefault().Value : string.Empty;
|
|
1462 |
FluidCode = att.Where(x => x.Name.ToUpper().Equals("FLUIDCODE")).FirstOrDefault() != null ? att.Where(x => x.Name.ToUpper().Equals("FLUIDCODE")).FirstOrDefault().Value : string.Empty; |
|
1439 | 1463 |
string PMC = lineNumber.Attributes.Where(x => x.Name.ToUpper().Equals("PIPINGMATERIALSCLASS")).FirstOrDefault() != null ? lineNumber.Attributes.Where(x => x.Name.ToUpper().Equals("PIPINGMATERIALSCLASS")).FirstOrDefault().Value : string.Empty; |
1440 | 1464 |
string SEQNUMBER = lineNumber.Attributes.Where(x => x.Name.ToUpper().Equals("TAG SEQ NO")).FirstOrDefault() != null ? lineNumber.Attributes.Where(x => x.Name.ToUpper().Equals("TAG SEQ NO")).FirstOrDefault().Value : string.Empty; |
1441 | 1465 |
string INSULATION = lineNumber.Attributes.Where(x => x.Name.ToUpper().Equals("INSULATIONPURPOSE")).FirstOrDefault() != null ? lineNumber.Attributes.Where(x => x.Name.ToUpper().Equals("INSULATIONPURPOSE")).FirstOrDefault().Value : string.Empty; |
... | ... | |
1547 | 1571 |
|
1548 | 1572 |
} |
1549 | 1573 |
|
1550 |
|
|
1551 |
|
|
1552 | 1574 |
if (dr != null) |
1553 | 1575 |
{ |
1554 | 1576 |
newRow["FROM_DATA"] = dr.Field<string>("FROM_DATA"); |
... | ... | |
1594 | 1616 |
// return; |
1595 | 1617 |
//newRow["IncludingVirtualData"] = "No"; |
1596 | 1618 |
newRow["PSNAccuracy"] = "100"; |
1619 |
|
|
1620 |
string Pocket = "No"; |
|
1621 |
string Condition = PSNFluidDT.Select(string.Format("Code = '{0}'", FluidCode)).FirstOrDefault().Field<string>("Condition"); |
|
1622 |
if (Condition.Equals("Flare")) |
|
1623 |
Pocket = "Yes"; |
|
1624 |
|
|
1625 |
if (PSNItem.StartType == PSNType.Equipment) //From은 Pump 제외 |
|
1626 |
{ |
|
1627 |
// string itemName = From_item.Name; |
|
1628 |
Equipment Equipment = From_item.Equipment; |
|
1629 |
EquipmentNoPocketItem nopocket = EquipmentNoPocket.EquipmentNoPocketItem.Where(x => x.Name == Equipment.Name && x.Type != "Pump(To)").FirstOrDefault(); |
|
1630 |
if(nopocket != null) |
|
1631 |
{ |
|
1632 |
Pocket = "Yes"; |
|
1633 |
} |
|
1634 |
} |
|
1635 |
|
|
1636 |
if (PSNItem.EndType == PSNType.Equipment) //To는 전체 |
|
1637 |
{ |
|
1638 |
// string itemName = To_item.Name; |
|
1639 |
Equipment Equipment = To_item.Equipment; |
|
1640 |
EquipmentNoPocketItem nopocket = EquipmentNoPocket.EquipmentNoPocketItem.Where(x => x.Name == Equipment.Name).FirstOrDefault(); |
|
1641 |
if (nopocket != null) |
|
1642 |
{ |
|
1643 |
Pocket = "Yes"; |
|
1644 |
} |
|
1645 |
} |
|
1646 |
|
|
1647 |
newRow["Pocket"] = Pocket; |
|
1648 |
|
|
1597 | 1649 |
pipeSystemNetworkDT.Rows.Add(newRow); |
1598 | 1650 |
} |
1599 | 1651 |
} |
... | ... | |
2511 | 2563 |
IsKeyword = false; |
2512 | 2564 |
try |
2513 | 2565 |
{ |
2566 |
item = Groups.First().Items.First(); |
|
2567 |
|
|
2514 | 2568 |
if (StartType == PSNType.Header) |
2515 | 2569 |
result = "ENDOFHEADER"; |
2516 | 2570 |
else if (StartType == PSNType.Branch) |
2517 | 2571 |
{ |
2518 |
|
|
2519 |
item = Groups.First().Items.First(); |
|
2520 | 2572 |
//if (!item.MissingLineNumber && item.Relations.First().Item.LineNumber != null && !string.IsNullOrEmpty(item.Relations.First().Item.LineNumber.Name)) |
2521 | 2573 |
if (!item.MissingLineNumber2) |
2522 | 2574 |
result = item.Relations.First().Item.LineNumber.Name; |
... | ... | |
2634 | 2686 |
if (IsKeyword) |
2635 | 2687 |
IsKeyword = false; |
2636 | 2688 |
|
2689 |
item = Groups.Last().Items.Last(); |
|
2690 |
|
|
2637 | 2691 |
if (EndType == PSNType.Header) |
2638 | 2692 |
result = "ENDOFHEADER"; |
2639 | 2693 |
else if (EndType == PSNType.Branch) |
2640 | 2694 |
{ |
2641 | 2695 |
|
2642 |
item = Groups.Last().Items.Last(); |
|
2696 |
|
|
2643 | 2697 |
//if (!item.MissingLineNumber && item.Relations.Last().Item.LineNumber != null && !string.IsNullOrEmpty(item.Relations.Last().Item.LineNumber.Name)) |
2644 | 2698 |
if (!item.MissingLineNumber2) |
2645 | 2699 |
result = item.Relations.Last().Item.LineNumber.Name; |
내보내기 Unified diff