프로젝트

일반

사용자정보

개정판 2f7c4151

ID2f7c41510fe614aa58c4e0caf028b1e6f6ebbe39
상위 85eeb2be
하위 1d82d5d2, bb55f734

이지연이(가) 약 3년 전에 추가함

issue #000: Topology Rule Setting Value 안보이는 현상 수정, TKW 적용시 다른 Error Status가 있음에도 Is Valid가 Error 적용이 안되어 PSN Accuracy 100 이 나오는 현상 수정, P1이 하나 붙은 P2가 EGT를 가지는 현상 수정, Vent/Drain 로직 순서 수정,

Change-Id: Ie8f8b8c8e3cc55bdf88a70544a0e226b4ee15385

차이점 보기:

DTI_PID/ID2PSN/Form/MainForm.cs
490 490
            PSNPageDT.Columns.Add("Status", typeof(string));
491 491
            PSNPageDT.Columns.Add("IncludingVirtualData", typeof(string));
492 492
            PSNPageDT.Columns.Add("PSNAccuracy", typeof(string));
493
            //PSNPageDT.Columns.Add("AFC", typeof(string));
493
            PSNPageDT.Columns.Add("AFC", typeof(string));
494 494
            PSNPageDT.Columns.Add("Show", typeof(string));
495 495

  
496 496

  
......
630 630
                newRow["Pocket"] = row["Pocket"].ToString();
631 631
                newRow["EGTag"] = row["EGTag"].ToString();
632 632
                newRow["HasMLTags"] = row["HasMLTags"].ToString();
633
                //if(row.Table.Columns["AFC"] != null)
634
                //    newRow["AFC"] = row["AFC"].ToString();
633
                if(row.Table.Columns["AFC"] != null)
634
                    newRow["AFC"] = row["AFC"].ToString();
635 635
                
636 636
                PSNPageDT.Rows.Add(newRow);
637 637
            }
DTI_PID/ID2PSN/Form/TopologyRuleForm.cs
43 43
                RepositoryItemLookUpEdit lookUpEdit = new RepositoryItemLookUpEdit();
44 44
                lookUpEdit.DataSource = attrDT;
45 45
                lookUpEdit.DisplayMember = "DisplayName";
46
                lookUpEdit.ValueMember = "Name";
46
                lookUpEdit.ValueMember = "DisplayName";
47 47
                lookUpEdit.NullText = "Select Attribute";
48 48
                lookUpEdit.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("DisplayName", "Display Name"));
49 49

  
......
53 53
                foreach (DataRow ruleRow in ruleDT.Rows)
54 54
                {
55 55
                    string uid = ruleRow["UID"].ToString();
56
                    DataRow[] rows = attrDT.Select(string.Format("Name = '{0}'", uid));
56
                    DataRow[] rows = attrDT.Select(string.Format("DisplayName = '{0}'", uid));
57 57
                    if (rows.Length == 1)
58 58
                    {
59 59
                        DataRow newRow = dt.NewRow();
60
                        newRow["NAME"] = uid;
60
                        newRow["Name"] = rows[0].Field<string>("DisplayName");
61 61
                        dt.Rows.Add(newRow);
62 62
                    }
63 63
                }
......
68 68
        {
69 69
            if (e.Column.FieldName == "NAME")
70 70
            {
71
                gridViewRule.SetRowCellValue(e.RowHandle, "UID", e.Value);
71
                gridViewRule.SetRowCellValue(e.RowHandle, "DisplayName", e.Value);
72 72
            }
73 73
        }
74 74

  
DTI_PID/ID2PSN/PSN.cs
247 247
            // Topology의 subtype을 update(bypass, Header, 등등) 
248 248
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateSubType ( 60 % )");
249 249
            UpdateSubType();
250

  
251
            // Vent/Drain PSN 데이터 제거
252
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  DeleteVentDrain ( 65 % )");
253
            DeleteVentDrain();
254

  
250 255
            // Update Error
251
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateErrorForPSN ( 65 % )");
256
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateErrorForPSN ( 70 % )");
252 257
            PathItemSorting();
253 258
            UpdateErrorForPSN();
254 259
            // Insert Tee
255
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  InsertTeePSN ( 70 % )");
260
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  InsertTeePSN ( 75 % )");
256 261
            InsertTeePSN();
257
         
262

  
258 263
            // ValveGrouping
259
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateValveGrouping ( 75 % )");
264
            PathItemSorting(); //test
265
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateValveGrouping ( 80 % )");
260 266
            UpdateValveGrouping();
261 267

  
262
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  PathItemSorting ( 80 % )");
268
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  PathItemSorting ( 85 % )");
263 269
            PathItemSorting();
264 270

  
265 271
            // AirFinCooler 
266
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateAirFinCooler ( 85 % )");
272
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateAirFinCooler ( 90 % )");
267 273
            UpdateAirFinCooler();
268 274

  
269
            // Vent/Drain PSN 데이터 제거
270
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  DeleteVentDrain ( 90 % )");
271
            DeleteVentDrain();
272

  
273 275
            // 확도 계산
274 276
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateAccuracy ( 95 % )");
275 277
            UpdateAccuracy();
......
792 794
                    else if (dataRow["Type"].ToString() == "E2B" || dataRow["Type"].ToString() == "B2E")
793 795
                    {
794 796
                        foreach (string lstoid in lstViewPipeSystemNetwork_OID)
795
                        { 
796
                            DataRow[] viewPathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", lstoid));
797
                            List<string> lstview = viewPathItemRows.Select(x => x.Field<string>("ViewPipeSystemNetwork_OID")).Distinct().ToList();
798
                            lstview.Remove(dataRow["OID"].ToString()); // P1인 자기 자신 제거
799
                            //제거 후 다른 P2를 확인
800
                            foreach (string lstvw in lstview)
797
                        {
798
                            DataRow[] p2psn = PipeSystemNetwork.Select(string.Format("OID = '{0}' AND AFC = 'P2'", lstoid));
799

  
800
                            if (p2psn.Count() > 0)
801 801
                            {
802
                                DataRow[] pipesn = PipeSystemNetwork.Select(string.Format("OID = '{0}' AND AFC = 'P2'", lstvw));
803
                                if(pipesn.Count() > 0)
802
                                DataRow[] viewPathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", lstoid));
803
                                List<string> lstview = viewPathItemRows.Select(x => x.Field<string>("ViewPipeSystemNetwork_OID")).Distinct().ToList();
804
                                lstview.Remove(dataRow["OID"].ToString()); // P1인 자신 제거
805
                                lstview.Remove(lstoid); // P2 자신 제거
806

  
807
                                List<string> lstnewpipe = new List<string>();
808
                                foreach (string lstvw in lstview) //자신 외 P1이 있는지 확인
809
                                {
810
                                    if (airFinCoolerRows.Where(x => x.Field<string>("OID").Equals(lstvw)).Count() > 0) //P1이면 리스트에 추가
811
                                        lstnewpipe.Add(lstvw);
812
                                }
813

  
814
                                if (lstnewpipe.Count() == 0)
804 815
                                {
805
                                    List<string> lstpipe = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", lstvw)).Select(x=>x.Field<string>("ViewPipeSystemNetwork_OID")).Distinct().ToList();
806
                                    lstpipe.Remove(lstvw); //현재 자기 라인 제거
807
                                    lstpipe.Remove(dataRow["OID"].ToString()); //기준 P1 제거
808
                                    List<string> lstnewpipe = new List<string>();
809
                                    foreach (string pipe in lstpipe)
816
                                    foreach (DataRow dr in pathItemRows)
810 817
                                    {
811
                                        if (airFinCoolerRows.Where(x => x.Field<string>("OID").Equals(pipe)).Count() > 0) //P1이면 리스트에 추가
812
                                            lstnewpipe.Add(pipe);
818
                                        dr["MainLineTag"] = "M";
819
                                    }
820
                                    dataRow["AFC"] = "P3";
821
                                }
822
                                else
823
                                {
824
                                    // P2에 ML값 AGT값 지정
825
                                    DataRow[] viewpathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", lstoid));
826
                                    DataRow[] pipesystemRows = PipeSystemNetwork.Select(string.Format("OID = '{0}'", lstoid));
827
                                    foreach (DataRow viewdr in pipesystemRows)
828
                                    {
829
                                        viewdr["AFC"] = "P4";
813 830
                                    }
814 831

  
815
                                    if (lstnewpipe.Count() == 0)
832
                                    foreach (DataRow viewdr in viewpathItemRows)
816 833
                                    {
817
                                        foreach (DataRow dr in pathItemRows)
818
                                        {
819
                                            dr["MainLineTag"] = "M";
820
                                        }
821
                                        dataRow["AFC"] = "P3";
834
                                        viewdr["EqpGroupTag"] = AFCTag;
835
                                        viewdr["MainLineTag"] = "M";
822 836
                                    }
823
                                    else if (lstnewpipe.Count() > 0) //P2에 기준 P1 말고 다른 P1이 있다면 P2에 ML값 AGT값 지정 후 P2에 연결된 모든 P1들의 AGT값 치환
837
                                    // 연결된 모든 P1들의 AGT값 치환
838
                                    foreach (string pipe in lstnewpipe)
824 839
                                    {
825
                                        // P2에 ML값 AGT값 지정
826
                                        DataRow[] viewpathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", lstvw));
827
                                        DataRow[] pipesystemRows = PipeSystemNetwork.Select(string.Format("OID = '{0}'", lstvw));
828
                                        foreach (DataRow viewdr in pipesystemRows)
829
                                        {
830
                                            viewdr["AFC"] = "P4";
831
                                        }
832
                                        
840
                                        viewpathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", pipe));
833 841
                                        foreach (DataRow viewdr in viewpathItemRows)
834 842
                                        {
835 843
                                            viewdr["EqpGroupTag"] = AFCTag;
836
                                            viewdr["MainLineTag"] = "M";
837
                                        }
838
                                        // 연결된 모든 P1들의 AGT값 치환
839
                                        foreach (string pipe in lstnewpipe)
840
                                        {                                            
841
                                            viewpathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", pipe));
842
                                            foreach (DataRow viewdr in viewpathItemRows)
843
                                            {
844
                                                viewdr["EqpGroupTag"] = AFCTag;
845
                                            }
846 844
                                        }
847 845
                                    }
848 846
                                }
849
                            }    
850
                        }
847
                            }                               
848
                        }   
851 849
                    }
852

  
853 850
                }
851
                
854 852
                //P3을 제외한 P1
855 853
                airFinCoolerRows = PipeSystemNetwork.Select("AFC Like 'P1%'");
856 854
                foreach (DataRow dataRow in airFinCoolerRows)
......
913 911

  
914 912
                                    if (airFinCoolerRows.Where(x => x.Field<string>("OID") == dr.Field<string>("ViewPipeSystemNetwork_OID")).Count() > 0)
915 913
                                        viewPSN = airFinCoolerRows.Where(x => x.Field<string>("OID") == dr.Field<string>("ViewPipeSystemNetwork_OID")).First();
916

  
917
                                    //DataRow[] pathItemviewRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", dr.Field<string>("ViewPipeSystemNetwork_OID")));
918
                                    //if (pathItemviewRows.Select(x => x.Field<string>("MainLineTag") == "M").Count() > 0)
919
                                    //{
920
                                    //}
914
                                                                        
921 915
                                    if (viewPSN != null)
922 916
                                    {
923 917
                                        lstpsn.Add(dr.Field<string>("ViewPipeSystemNetwork_OID"));
924 918
                                        lstAll.Add(dr.Field<string>("ViewPipeSystemNetwork_OID"));
925 919
                                    }
926
                                }
927

  
928
                                
920
                                }                                
929 921

  
930 922
                                dr["EqpGroupTag"] = EqpGroupTag;
931 923

  
......
3504 3496
                }
3505 3497
                else
3506 3498
                {
3507
                    IsValid = "Error";
3499
                    
3508 3500
                    item = Groups.First().Items.First();
3509 3501
                    if (item.ItemType == ItemType.Symbol)
3510 3502
                    {
3511

  
3512 3503
                        string keyword = string.Empty;
3513 3504
                        keyword = GetFromKeywordData(ref Type, item);
3514 3505

  
......
3520 3511
                                Status += ", Missing ItemTag or Description";
3521 3512

  
3522 3513
                            result = item.ID2DBName;
3514
                            IsValid = "Error";
3523 3515
                        }
3524 3516
                        else
3525 3517
                        {
3526 3518
                            result = keyword;
3527 3519
                            IsKeyword = true;
3528
                            IsValid = string.Empty;
3529 3520
                        }
3530 3521

  
3531 3522
                    }
......
3643 3634
            }
3644 3635
            else
3645 3636
            {
3646
                IsValid = "Error";
3637
                
3647 3638
                item = Groups.Last().Items.Last();
3648 3639
                if (item.ItemType == ItemType.Symbol)
3649 3640
                {
......
3658 3649
                            Status += ", Missing ItemTag or Description";
3659 3650

  
3660 3651
                        result = item.ID2DBName;
3652
                        IsValid = "Error";
3661 3653
                    }
3662 3654
                    else
3663 3655
                    {
3664 3656
                        result = keyword;
3665
                        IsValid = string.Empty;
3666 3657
                        IsKeyword = true;
3667 3658
                    }
3668 3659

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)