프로젝트

일반

사용자정보

개정판 2ada3be8

ID2ada3be816c58fd17a540beff3bdfd531bcf32f4
상위 aadd8450
하위 879ce10b, 710a49f1

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

issue #000: 확도 룰 적용중

Change-Id: Ic860ea39a692adbf6dfaa2946d592aee5919b351

차이점 보기:

DTI_PID/ID2PSN/PSN.cs
28 28
        InValid //이값은 들어가는데가 없음..
29 29
    }
30 30

  
31
    
32

  
33

  
31 34
    public class PSN
32 35
    {
33 36
        private double[] DrawingSize = null;
......
42 45
        public DataTable Equipment { get; set; }
43 46
        public DataTable Nozzle { get; set; }
44 47

  
48

  
49
        public string Rule1 = "";
50
        public string Rule2 = "";
51
        public string Rule3 = "";
52
        public string Rule4 = "";
53
        public string Rule5 = "";
54

  
45 55
        List<Document> Documents;
46 56
        List<Group> groups = new List<Group>();
47 57
        List<PSNItem> PSNItems = new List<PSNItem>();
......
1053 1063
                                if (bVentDrain)
1054 1064
                                    return;
1055 1065

  
1066
                                List<double> lstAcc = new List<double>();
1056 1067
                                DataRow newRow = pipeSystemNetworkDT.NewRow();
1057 1068
                                newRow["OID"] = PSNItem.PSN_OID();
1058 1069
                                newRow["Type"] = PSNItem.GetPSNType();
1059 1070
                                newRow["OrderNumber"] = psnOrder;
1060 1071
                                newRow["Pipeline_OID"] = item.PSNPipeLineID;
1061
                                newRow["FROM_DATA"] = PSNItem.GetFromData();
1062
                                newRow["TO_DATA"] = PSNItem.GetToData();
1072
                                string From_d = PSNItem.GetFromData();
1073
                                string To_d = PSNItem.GetToData();
1074
                                newRow["FROM_DATA"] = From_d;
1075
                                newRow["TO_DATA"] = To_d;
1063 1076
                                newRow["TopologySet_OID_Key"] = item.Topology.FullName;
1064 1077
                                newRow["PSNRevisionNumber"] = string.Format("V{0:D4}", Revision);
1065 1078
                                newRow["PBS"] = PSNItem.GetPBSData();
1066 1079
                                newRow["Validity"] = PSNItem.Validity;
1067 1080
                                newRow["Status"] = !string.IsNullOrEmpty(PSNItem.Status) ? PSNItem.Status.Remove(0, 2) : string.Empty;
1081

  
1082
                                if(!string.IsNullOrEmpty(From_d) || !string.IsNullOrEmpty(To_d))
1083
                                {
1084
                                    if (From_d.Contains(Rule1) || To_d.Contains(Rule1))
1085
                                        lstAcc.Add(0.75);
1086
                                    else if (From_d.Contains(Rule2) || To_d.Contains(Rule2))
1087
                                        lstAcc.Add(0.7);
1088
                                    else if (From_d.Contains(Rule3) || To_d.Contains(Rule3))
1089
                                        lstAcc.Add(0.5);
1090
                                    else if (From_d.Contains(Rule4) || To_d.Contains(Rule4))
1091
                                        lstAcc.Add(0.65);
1092
                                    else if (From_d.Contains(Rule5) || To_d.Contains(Rule5))
1093
                                        lstAcc.Add(0.6);
1094
                                }
1095

  
1068 1096
                                newRow["IncludingVirtualData"] = !string.IsNullOrEmpty(PSNItem.IncludingVirtualData) ? PSNItem.IncludingVirtualData : "No";
1069
                                newRow["PSNAccuracy"] = !string.IsNullOrEmpty(PSNItem.PSNAccuracy) ? Convert.ToString(Math.Round(Convert.ToDouble(PSNItem.PSNAccuracy), 1)) + "%" : "0%";
1097
                                PSNItem.PSNAccuracy = Convert.ToString(Math.Round(Convert.ToDouble(AccuracyCalculation(lstAcc)), 1)) + "%";
1098
                                newRow["PSNAccuracy"] = PSNItem.PSNAccuracy;
1070 1099

  
1071 1100
                                List<string> drawingNames = new List<string>();
1072 1101
                                foreach (Group _group in PSNItem.Groups)
......
1172 1201
                MessageBox.Show(ex.Message, "ID2 " + id2Info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Information);
1173 1202
            }
1174 1203
        }
1204

  
1205
        private double AccuracyCalculation(List<double> lstAcc)
1206
        {
1207
            double acc = 1;
1208
            foreach(double lacc in lstAcc)
1209
            {
1210
                acc *= lacc;
1211
            }
1212
            acc = acc * 100;
1213
            return acc;
1214
        }
1215

  
1175 1216
        private void UpdateSubType()
1176 1217
        {
1177 1218
            foreach (PSNItem PSNItem in PSNItems)

내보내기 Unified diff

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