개정판 f0656b3a
issue #000: psn
Change-Id: I13e589d6dd990cb34ca843f143e91a145c87602d
DTI_PID/ID2PSN/DB.cs | ||
---|---|---|
322 | 322 |
dicColCheck.Add("Equipment_OID", "NVARCHAR(255)"); |
323 | 323 |
dicColCheck.Add("NPD", "NVARCHAR(255)"); |
324 | 324 |
dicColCheck.Add("GROUPTAG", "NVARCHAR(255)"); |
325 |
dicColCheck.Add("PipeSystemNetwork_OID", "NVARCHAR(255)"); |
|
325 |
dicColCheck.Add("PipeSystemNetwork_OID_ID2", "NVARCHAR(255)");
|
|
326 | 326 |
dicColCheck.Add("PipeRun_OID", "NVARCHAR(255)"); |
327 |
dicColCheck.Add("ViewPipeSystemNetwork_OID", "NVARCHAR(255)");
|
|
327 |
dicColCheck.Add("PipeSystemNetwork_OID", "NVARCHAR(255)"); |
|
328 | 328 |
|
329 | 329 |
dicColCheck.Add("EqpGroupTag", "NVARCHAR(255)"); |
330 | 330 |
dicColCheck.Add("MainLineTag", "NVARCHAR(255)"); |
... | ... | |
337 | 337 |
{ |
338 | 338 |
var query = $"CREATE TABLE {PSN_PATHITEMS} (OID NVARCHAR(255), SequenceData_OID NVARCHAR(255), " + |
339 | 339 |
"TopologySet_OID NVARCHAR(255), BranchTopologySet_OID NVARCHAR(255), PipeLine_OID NVARCHAR(255), ItemName NVARCHAR(255), ItemTag NVARCHAR(255), DESCRIPTION NVARCHAR(255), " + |
340 |
"CLASS NVARCHAR(255), SUBCLASS NVARCHAR(255), TYPE NVARCHAR(255), MULTIWAY NVARCHAR(255), PIDNAME NVARCHAR(255), Equipment_OID NVARCHAR(255), NPD NVARCHAR(255), GROUPTAG NVARCHAR(255), PipeSystemNetwork_OID NVARCHAR(255), PipeRun_OID NVARCHAR(255), " + |
|
341 |
"ViewPipeSystemNetwork_OID NVARCHAR(255), EqpGroupTag NVARCHAR(255), MainLineTag NVARCHAR(255), EGTConnectedPoint INT, EGFlowDirection NVARCHAR(10))";
|
|
340 |
"CLASS NVARCHAR(255), SUBCLASS NVARCHAR(255), TYPE NVARCHAR(255), MULTIWAY NVARCHAR(255), PIDNAME NVARCHAR(255), Equipment_OID NVARCHAR(255), NPD NVARCHAR(255), GROUPTAG NVARCHAR(255), PipeSystemNetwork_OID_ID2 NVARCHAR(255), PipeRun_OID NVARCHAR(255), " +
|
|
341 |
"PipeSystemNetwork_OID NVARCHAR(255), EqpGroupTag NVARCHAR(255), MainLineTag NVARCHAR(255), EGTConnectedPoint INT, EGFlowDirection NVARCHAR(10))"; |
|
342 | 342 |
using (var cmd = connection.GetSqlStringCommand(query)) |
343 | 343 |
{ |
344 | 344 |
cmd.ExecuteNonQuery(); |
... | ... | |
1881 | 1881 |
DataRow row = item.PathItems.Rows[i]; |
1882 | 1882 |
query = $"INSERT INTO {PSN_PATHITEMS} " + |
1883 | 1883 |
$"(OID, SequenceData_OID, TopologySet_OID, BranchTopologySet_OID, PipeLine_OID, ItemName, ItemTag, DESCRIPTION, CLASS, SUBCLASS, TYPE, MULTIWAY," + |
1884 |
$"PIDNAME, Equipment_OID, NPD, GROUPTAG, PipeSystemNetwork_OID, PipeRun_OID, ViewPipeSystemNetwork_OID, EqpGroupTag, MainLineTag, EGTConnectedPoint, EGFlowDirection) VALUES " +
|
|
1884 |
$"PIDNAME, Equipment_OID, NPD, GROUPTAG, PipeSystemNetwork_OID_ID2, PipeRun_OID, PipeSystemNetwork_OID, EqpGroupTag, MainLineTag, EGTConnectedPoint, EGFlowDirection) VALUES " +
|
|
1885 | 1885 |
$"(@OID, @SequenceData_OID, @TopologySet_OID, @BranchTopologySet_OID, @PipeLine_OID, @ITEMNAME, @ITEMTAG, @DESCRIPTION, @Class, @SubClass, @TYPE, @MULTIWAY, @PIDNAME, " + |
1886 |
$"@Equipment_OID, @NPD, @GROUPTAG, @PipeSystemNetwork_OID,@PipeRun_OID, @ViewPipeSystemNetwork_OID, @EqpGroupTag , @MainLineTag, @EGTConnectedPoint, @EGFlowDirection)";
|
|
1886 |
$"@Equipment_OID, @NPD, @GROUPTAG, @PipeSystemNetwork_OID_ID2,@PipeRun_OID, @PipeSystemNetwork_OID, @EqpGroupTag , @MainLineTag, @EGTConnectedPoint, @EGFlowDirection)";
|
|
1887 | 1887 |
var cmd = connection.GetSqlStringCommand(query); |
1888 | 1888 |
AddWithValue(cmd, "@OID", string.IsNullOrEmpty(row["OID"].ToString()) ? "" : row["OID"].ToString()); |
1889 | 1889 |
AddWithValue(cmd, "@SequenceData_OID", string.IsNullOrEmpty(row["SequenceData_OID"].ToString()) ? "" : row["SequenceData_OID"].ToString()); |
... | ... | |
1901 | 1901 |
AddWithValue(cmd, "@Equipment_OID", string.IsNullOrEmpty(row["Equipment_OID"].ToString()) ? "" : row["Equipment_OID"].ToString()); |
1902 | 1902 |
AddWithValue(cmd, "@NPD", string.IsNullOrEmpty(row["NPD"].ToString()) ? "" : row["NPD"].ToString()); |
1903 | 1903 |
AddWithValue(cmd, "@GROUPTAG", string.IsNullOrEmpty(row["GROUPTAG"].ToString()) ? "" : row["GROUPTAG"].ToString()); |
1904 |
AddWithValue(cmd, "@PipeSystemNetwork_OID_ID2", string.IsNullOrEmpty(row["PipeSystemNetwork_OID_ID2"].ToString()) ? "" : row["PipeSystemNetwork_OID_ID2"].ToString()); |
|
1904 | 1905 |
AddWithValue(cmd, "@PipeSystemNetwork_OID", string.IsNullOrEmpty(row["PipeSystemNetwork_OID"].ToString()) ? "" : row["PipeSystemNetwork_OID"].ToString()); |
1905 |
AddWithValue(cmd, "@ViewPipeSystemNetwork_OID", string.IsNullOrEmpty(row["ViewPipeSystemNetwork_OID"].ToString()) ? "" : row["ViewPipeSystemNetwork_OID"].ToString()); |
|
1906 | 1906 |
AddWithValue(cmd, "@PipeRun_OID", string.IsNullOrEmpty(row["PipeRun_OID"].ToString()) ? "" : row["PipeRun_OID"].ToString()); |
1907 | 1907 |
AddWithValue(cmd, "@EqpGroupTag", string.IsNullOrEmpty(row["EqpGroupTag"].ToString()) ? "" : row["EqpGroupTag"].ToString()); |
1908 | 1908 |
AddWithValue(cmd, "@MainLineTag", string.IsNullOrEmpty(row["MainLineTag"].ToString()) ? "" : row["MainLineTag"].ToString()); |
... | ... | |
2945 | 2945 |
dicColCheck.Add("Equipment_OID", "NVARCHAR(255)"); |
2946 | 2946 |
dicColCheck.Add("NPD", "NVARCHAR(255)"); |
2947 | 2947 |
dicColCheck.Add("GROUPTAG", "NVARCHAR(255)"); |
2948 |
dicColCheck.Add("PipeSystemNetwork_OID", "NVARCHAR(255)"); |
|
2948 |
dicColCheck.Add("PipeSystemNetwork_OID_ID2", "NVARCHAR(255)");
|
|
2949 | 2949 |
dicColCheck.Add("PipeRun_OID", "NVARCHAR(255)"); |
2950 |
dicColCheck.Add("ViewPipeSystemNetwork_OID", "NVARCHAR(255)");
|
|
2950 |
dicColCheck.Add("PipeSystemNetwork_OID", "NVARCHAR(255)"); |
|
2951 | 2951 |
dicColCheck.Add("EqpGroupTag", "NVARCHAR(255)"); |
2952 | 2952 |
dicColCheck.Add("MainLineTag", "NVARCHAR(255)"); |
2953 | 2953 |
dicColCheck.Add("EGTConnectedPoint", "INT"); |
... | ... | |
2956 | 2956 |
{ |
2957 | 2957 |
var query = $"CREATE TABLE {PSN_PATHITEMS} (OID NVARCHAR(255), SequenceData_OID NVARCHAR(255), " + |
2958 | 2958 |
"TopologySet_OID NVARCHAR(255), BranchTopologySet_OID NVARCHAR(255), PipeLine_OID NVARCHAR(255), ItemName NVARCHAR(255), ItemTag NVARCHAR(255), DESCRIPTION NVARCHAR(255), " + |
2959 |
"CLASS NVARCHAR(255), SUBCLASS NVARCHAR(255), TYPE NVARCHAR(255), MULTIWAY NVARCHAR(255), PIDNAME NVARCHAR(255), Equipment_OID NVARCHAR(255), NPD NVARCHAR(255), GROUPTAG NVARCHAR(255), PipeSystemNetwork_OID NVARCHAR(255), PipeRun_OID NVARCHAR(255), " + |
|
2960 |
"ViewPipeSystemNetwork_OID NVARCHAR(255), EqpGroupTag NVARCHAR(255), MainLineTag NVARCHAR(255), EGTConnectedPoint INT, EGFlowDirection NVARCHAR(10))";
|
|
2959 |
"CLASS NVARCHAR(255), SUBCLASS NVARCHAR(255), TYPE NVARCHAR(255), MULTIWAY NVARCHAR(255), PIDNAME NVARCHAR(255), Equipment_OID NVARCHAR(255), NPD NVARCHAR(255), GROUPTAG NVARCHAR(255), PipeSystemNetwork_OID_ID2 NVARCHAR(255), PipeRun_OID NVARCHAR(255), " +
|
|
2960 |
"PipeSystemNetwork_OID NVARCHAR(255), EqpGroupTag NVARCHAR(255), MainLineTag NVARCHAR(255), EGTConnectedPoint INT, EGFlowDirection NVARCHAR(10))"; |
|
2961 | 2961 |
using (var cmd = connection.GetSqlStringCommand(query)) |
2962 | 2962 |
{ |
2963 | 2963 |
cmd.ExecuteNonQuery(); |
... | ... | |
3438 | 3438 |
DataRow row = item.PathItems.Rows[i]; |
3439 | 3439 |
query = $"INSERT INTO {PSN_PATHITEMS} " + |
3440 | 3440 |
$"(OID, SequenceData_OID, TopologySet_OID, BranchTopologySet_OID, PipeLine_OID, ItemName, ItemTag, DESCRIPTION, CLASS, SUBCLASS, TYPE, MULTIWAY, " + |
3441 |
$"PIDNAME, Equipment_OID, NPD, GROUPTAG, PipeSystemNetwork_OID, PipeRun_OID, ViewPipeSystemNetwork_OID, EqpGroupTag , MainLineTag, EGTConnectedPoint, EGFlowDirection ) VALUES " +
|
|
3441 |
$"PIDNAME, Equipment_OID, NPD, GROUPTAG, PipeSystemNetwork_OID_ID2, PipeRun_OID, PipeSystemNetwork_OID, EqpGroupTag , MainLineTag, EGTConnectedPoint, EGFlowDirection ) VALUES " +
|
|
3442 | 3442 |
$"(@OID, @SequenceData_OID, @TopologySet_OID, @BranchTopologySet_OID, @PipeLine_OID, @ITEMNAME, @ITEMTAG, @DESCRIPTION, @Class, @SubClass, @TYPE, @MULTIWAY, @PIDNAME," + |
3443 |
$" @Equipment_OID, @NPD, @GROUPTAG, @PipeSystemNetwork_OID,@PipeRun_OID, @ViewPipeSystemNetwork_OID, @EqpGroupTag , @MainLineTag, @EGTConnectedPoint, @EGFlowDirection )";
|
|
3443 |
$" @Equipment_OID, @NPD, @GROUPTAG, @PipeSystemNetwork_OID_ID2,@PipeRun_OID, @PipeSystemNetwork_OID, @EqpGroupTag , @MainLineTag, @EGTConnectedPoint, @EGFlowDirection )";
|
|
3444 | 3444 |
var cmd = connection.GetSqlStringCommand(query); |
3445 | 3445 |
AddWithValue(cmd, "@OID", string.IsNullOrEmpty(row["OID"].ToString()) ? "" : row["OID"].ToString()); |
3446 | 3446 |
AddWithValue(cmd, "@SequenceData_OID", string.IsNullOrEmpty(row["SequenceData_OID"].ToString()) ? "" : row["SequenceData_OID"].ToString()); |
... | ... | |
3458 | 3458 |
AddWithValue(cmd, "@Equipment_OID", string.IsNullOrEmpty(row["Equipment_OID"].ToString()) ? "" : row["Equipment_OID"].ToString()); |
3459 | 3459 |
AddWithValue(cmd, "@NPD", string.IsNullOrEmpty(row["NPD"].ToString()) ? "" : row["NPD"].ToString()); |
3460 | 3460 |
AddWithValue(cmd, "@GROUPTAG", string.IsNullOrEmpty(row["GROUPTAG"].ToString()) ? "" : row["GROUPTAG"].ToString()); |
3461 |
AddWithValue(cmd, "@PipeSystemNetwork_OID_ID2", string.IsNullOrEmpty(row["PipeSystemNetwork_OID_ID2"].ToString()) ? "" : row["PipeSystemNetwork_OID_ID2"].ToString()); |
|
3461 | 3462 |
AddWithValue(cmd, "@PipeSystemNetwork_OID", string.IsNullOrEmpty(row["PipeSystemNetwork_OID"].ToString()) ? "" : row["PipeSystemNetwork_OID"].ToString()); |
3462 |
AddWithValue(cmd, "@ViewPipeSystemNetwork_OID", string.IsNullOrEmpty(row["ViewPipeSystemNetwork_OID"].ToString()) ? "" : row["ViewPipeSystemNetwork_OID"].ToString()); |
|
3463 | 3463 |
AddWithValue(cmd, "@PipeRun_OID", string.IsNullOrEmpty(row["PipeRun_OID"].ToString()) ? "" : row["PipeRun_OID"].ToString()); |
3464 | 3464 |
AddWithValue(cmd, "@EqpGroupTag", string.IsNullOrEmpty(row["EqpGroupTag"].ToString()) ? "" : row["EqpGroupTag"].ToString()); |
3465 | 3465 |
AddWithValue(cmd, "@MainLineTag", string.IsNullOrEmpty(row["MainLineTag"].ToString()) ? "" : row["MainLineTag"].ToString()); |
내보내기 Unified diff