Forráskód Böngészése

Merge repos.ubtob.net:usoft/mes-client

callm 5 napja
szülő
commit
b43be785d0

+ 15 - 2
UAS_MES_HYSX/FunctionCode/Make/Make_AirTightnessTest.cs

@@ -248,7 +248,7 @@ namespace UAS_MES_NEW.Make
             string outMsg = "";
             param.Add(workOrder.Text.Trim());
             param.Add(sn);
-            param.Add(User.UserSourceCode);
+            param.Add(User.CurrentStepCode);
             param.Add(res);
             param.Add("");
             param.Add("");
@@ -293,11 +293,12 @@ namespace UAS_MES_NEW.Make
                     '{item.Key}','100','{item.Value}',1 )", "insert");
             }
 
+            string testResType = Convert.ToInt32(testVal) < Convert.ToInt32(max2) ? "OK" : "NG";
             Dictionary<string, string> testArr1 = new Dictionary<string, string>();
             testArr1.Add("测试项", "气密性泄漏值");
             testArr1.Add("参数名称", "气密性泄漏值");
             testArr1.Add("结果", Convert.ToInt32(testVal) < Convert.ToInt32(max2) ? "1" : "0");
-            testArr1.Add("结果描述", Convert.ToInt32(testVal) < Convert.ToInt32(max2) ? "OK" : "NG");
+            testArr1.Add("结果描述", testResType);
             testArr1.Add("产测指标门限", max2);
             testArr1.Add("测试时长", attime);
             testArr1.Add("值", testVal);
@@ -314,6 +315,18 @@ namespace UAS_MES_NEW.Make
 
             if (LogicHandler.CheckStepSNAndMacode(workOrder.Text, User.UserSourceCode, sn, User.UserCode, out oWO, out oWOId, out oErrMsg))
             {
+                /*if (testResType == "NG")
+                {
+                    dh.ExecuteSql($@"INSERT INTO makebad (mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,
+                    mb_stepcode,mb_sourcecode,mb_badcode,mb_status,
+                    mb_badname,mb_ymd,mb_linecode,MB_BGCODE,MB_BGNAME) 
+                    VALUES (makebad_seq.NEXTVAL,{oWO},{sn},{sn},{User.UserName},sysdate,
+                        {User.CurrentStepCode},{User.UserSourceCode},'{}',0,
+                        '{}', to_char(sysdate,'YYYYMMDD'),'{}','{}','{}')", "insert");
+
+                    dh.ExecuteSql($@"UPDATE makeserial SET ms_badtimes = nvl(ms_badtimes,0) + 1,ms_status = 3 WHERE ms_sncode = '{sn}'", "update");
+                }
+*/
                 if (LogicHandler.SetStepResult(oWO, User.UserSourceCode, sn, "气密性测试", "OK", User.UserCode, out oErrMsg))
                 {
 

+ 20 - 17
UAS_MES_HYSX/FunctionCode/Make/Make_HandFeedRegistration.Designer.cs

@@ -294,6 +294,7 @@
             // 
             // dataGridViewTextBoxColumn10
             // 
+            this.dataGridViewTextBoxColumn10.DataPropertyName = "ReelRemark";
             this.dataGridViewTextBoxColumn10.HeaderText = "元件信息备注";
             this.dataGridViewTextBoxColumn10.MinimumWidth = 8;
             this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
@@ -301,6 +302,7 @@
             // 
             // dataGridViewTextBoxColumn11
             // 
+            this.dataGridViewTextBoxColumn11.DataPropertyName = "ReelNum";
             this.dataGridViewTextBoxColumn11.HeaderText = "补料数量";
             this.dataGridViewTextBoxColumn11.MinimumWidth = 8;
             this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
@@ -438,14 +440,14 @@
             this.rn.HeaderText = "序号";
             this.rn.MinimumWidth = 8;
             this.rn.Name = "rn";
-            this.rn.Width = 60;
+            this.rn.Width = 50;
             // 
             // isHandReel
             // 
             this.isHandReel.HeaderText = "是否手补料";
             this.isHandReel.MinimumWidth = 8;
             this.isHandReel.Name = "isHandReel";
-            this.isHandReel.Width = 80;
+            this.isHandReel.Width = 50;
             // 
             // ms_sncode
             // 
@@ -481,7 +483,7 @@
             this.ps_table.MinimumWidth = 8;
             this.ps_table.Name = "ps_table";
             this.ps_table.ReadOnly = true;
-            this.ps_table.Width = 80;
+            this.ps_table.Width = 50;
             // 
             // psl_location
             // 
@@ -490,7 +492,7 @@
             this.psl_location.MinimumWidth = 8;
             this.psl_location.Name = "psl_location";
             this.psl_location.ReadOnly = true;
-            this.psl_location.Width = 90;
+            this.psl_location.Width = 80;
             // 
             // psl_bomlocation
             // 
@@ -517,7 +519,7 @@
             this.psl_baseqty.MinimumWidth = 8;
             this.psl_baseqty.Name = "psl_baseqty";
             this.psl_baseqty.ReadOnly = true;
-            this.psl_baseqty.Width = 80;
+            this.psl_baseqty.Width = 60;
             // 
             // ReelRemark
             // 
@@ -533,6 +535,7 @@
             this.ReelNum.HeaderText = "补料数量";
             this.ReelNum.MinimumWidth = 8;
             this.ReelNum.Name = "ReelNum";
+            this.ReelNum.Visible = false;
             this.ReelNum.Width = 80;
             // 
             // Make_HandFeedRegistration
@@ -581,18 +584,6 @@
         private System.Windows.Forms.Button query;
         private System.Windows.Forms.Button submit;
         private System.Windows.Forms.Label handCount;
-        private System.Windows.Forms.DataGridViewTextBoxColumn rn;
-        private System.Windows.Forms.DataGridViewCheckBoxColumn isHandReel;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ms_sncode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ps_linecode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ps_processcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ps_table;
-        private System.Windows.Forms.DataGridViewTextBoxColumn psl_location;
-        private System.Windows.Forms.DataGridViewTextBoxColumn psl_bomlocation;
-        private System.Windows.Forms.DataGridViewTextBoxColumn psl_prodcode;
-        private System.Windows.Forms.DataGridViewTextBoxColumn psl_baseqty;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ReelRemark;
-        private System.Windows.Forms.DataGridViewTextBoxColumn ReelNum;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
         private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
@@ -605,5 +596,17 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
         private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
+        private System.Windows.Forms.DataGridViewTextBoxColumn rn;
+        private System.Windows.Forms.DataGridViewCheckBoxColumn isHandReel;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ms_sncode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ps_linecode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ps_processcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ps_table;
+        private System.Windows.Forms.DataGridViewTextBoxColumn psl_location;
+        private System.Windows.Forms.DataGridViewTextBoxColumn psl_bomlocation;
+        private System.Windows.Forms.DataGridViewTextBoxColumn psl_prodcode;
+        private System.Windows.Forms.DataGridViewTextBoxColumn psl_baseqty;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ReelRemark;
+        private System.Windows.Forms.DataGridViewTextBoxColumn ReelNum;
     }
 }

+ 80 - 36
UAS_MES_HYSX/FunctionCode/Make/Make_ThruputLog.cs

@@ -64,7 +64,7 @@ namespace UAS_MES_NEW.Make
                     if (SNArr.IndexOf(sn) > 0)  continue;
 
                     SQL.Clear();
-                    SQL.Append($@"SELECT ms_sncode,ma_code,pr_code,pr_spec FROM makeserial,make,product WHERE ms_sncode = '{sn.Replace(";", ";")}' AND ms_makecode = ma_code AND ms_prodcode = pr_code");
+                    SQL.Append($@"SELECT ms_sncode,ma_code,pr_code,pr_spec FROM makeserial,make,product WHERE ms_sncode = '{sn.Replace(";", ";")}' AND ms_makecode = ma_code AND ms_prodcode = pr_code order by MS_ID desc");
                     dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
                     if (dt.Rows.Count == 0)
                     {
@@ -78,7 +78,18 @@ namespace UAS_MES_NEW.Make
                     downRes = ParseIperfBitrate(downLog);
                     string tDetail = $"upRate/{upRes};downRate/{downRes}";
 
-                    CheckPassStation(wo, sn, "PASS", tDetail);
+                    if(Path.GetFileName(currLog).Split('_').Length > 2)
+                    {
+                        string type = Path.GetFileName(currLog).Split('_')[2];
+                        string resType = type.Contains("50") ? "5G" : "2.4G";
+
+                        CheckPassStation(wo, sn, "PASS", upRes, downRes, resType);
+                    }
+                    else
+                    {
+
+                        CheckPassStation(wo, sn, "PASS", upRes, downRes, "2.4G");
+                    }
 
                     using (StreamReader SR = new StreamReader(currLog, Encoding.GetEncoding("GBK")))
                     {
@@ -97,16 +108,16 @@ namespace UAS_MES_NEW.Make
                         string Content = SR.ReadToEnd();
                         SR.Close();
                         SR.Dispose();
-                        if (ConsoleLog(Content, currLog, $"{Path.GetFileName(currLog).Replace("up", "down")}"))
+                        if (ConsoleLog(Content, downLog, $"{Path.GetFileName(downLog)}"))
                         {
-                            File.WriteAllText(currLog, string.Empty);
-                            File.Delete(currLog);
+                            File.WriteAllText(downLog, string.Empty);
+                            File.Delete(downLog);
                         }
                     }
                 }
             }
 
-            string[] failFiles = Directory.GetFiles(failPath, $"*.log");
+            /*string[] failFiles = Directory.GetFiles(failPath, $"*.log");
             foreach (string currLog in failFiles)
             {
                 if (Path.GetFileName(currLog).Contains("up"))
@@ -118,7 +129,7 @@ namespace UAS_MES_NEW.Make
                     if (SNArr.IndexOf(sn) > 0)  continue;
 
                     SQL.Clear();
-                    SQL.Append($@"SELECT ms_sncode,ma_code,pr_code,pr_spec FROM makeserial,make,product WHERE ms_sncode = '{sn.Replace(";", ";")}' AND ms_makecode = ma_code AND ms_prodcode = pr_code");
+                    SQL.Append($@"SELECT ms_sncode,ma_code,pr_code,pr_spec FROM makeserial,make,product WHERE ms_sncode = '{sn.Replace(";", ";")}' AND ms_makecode = ma_code AND ms_prodcode = pr_code order by MS_ID desc");
                     dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
                     if (dt.Rows.Count == 0)
                     {
@@ -151,34 +162,34 @@ namespace UAS_MES_NEW.Make
                         string Content = SR.ReadToEnd();
                         SR.Close();
                         SR.Dispose();
-                        if (ConsoleLog(Content, currLog, $"{Path.GetFileName(currLog).Replace("up", "down")}"))
+                        if (ConsoleLog(Content, downLog, $"{Path.GetFileName(downLog)}"))
                         {
-                            File.WriteAllText(currLog, string.Empty);
-                            File.Delete(currLog);
+                            File.WriteAllText(downLog, string.Empty);
+                            File.Delete(downLog);
                         }
                     }
                 }
-            }
+            }*/
         }
-        private void CheckPassStation(string wo,string sn, string testRes, string testDetail)
+        private void CheckPassStation(string wo,string sn, string testRes, string upRes, string downRes, string resType)
         {
             sn = sn.Replace(";", ";");
             List<string> param = new List<string>() { };
             string outMsg = "";
             param.Add(wo);
             param.Add(sn);
-            param.Add(User.UserSourceCode);
+            param.Add(User.CurrentStepCode);
             param.Add(testRes);
             param.Add("");
             param.Add("");
             param.Add("ThruputLog");
-            param.Add(testDetail);
+            param.Add($"upRate/{upRes};downRate/{downRes}");
             param.Add(outMsg);
             string[] paramList = param.ToArray();
             dh.CallProcedure("cs_insert_testrejects", ref paramList);
             if (paramList[8].Substring(0, 2) == "OK")
             {
-                ShowMsg(1, $"序列号{sn}采集成功:测试结果为{testRes},{testDetail}");
+                ShowMsg(1, $"序列号{sn}采集成功:测试结果为{testRes},{$"upRate/{upRes};downRate/{downRes}"}");
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, workOrder.Text, User.UserLineCode, User.UserSourceCode, "无线吞吐量", "无线吞吐量过站成功", sn, "");
             }
 
@@ -189,6 +200,41 @@ namespace UAS_MES_NEW.Make
                 return;
             }
 
+            dt = (DataTable)dh.ExecuteSql($"select sm_id from steptestmain where INSTR(sm_sourcetype, 'Thruput') > 0  and sm_sn = '{sn}' order by sm_indate desc", "select");
+            string sm_id = dt.Rows[0]["sm_id"].ToString();
+
+            Dictionary<string, string> testArr = new Dictionary<string, string>();
+            testArr.Add("测试项", $"{resType}吞吐量测试");
+            testArr.Add("参数名称", $"{resType}上行测试值");
+            testArr.Add("结果", "0");
+            testArr.Add("结果描述", "OK");
+            testArr.Add("产测指标门限", "");
+            testArr.Add("测试时长", "10");
+            testArr.Add("值", upRes);
+            foreach (var item in testArr)
+            {
+                dh.ExecuteSql($@"INSERT INTO steptestdetail (sd_id,sd_smid,sd_sn,sd_makecode,sd_machinecode,sd_indate,
+                    sd_class,sd_length,sd_actvalue,sd_detno) VALUES 
+                    ( steptestdetail_seq.NEXTVAL,'{sm_id}','{sn}','{workOrder.Text.Trim()}', 'ZTE',sysdate,
+                    '{item.Key}','100','{item.Value}',1 )", "insert");
+            }
+
+            Dictionary<string, string> testArr1 = new Dictionary<string, string>();
+            testArr1.Add("测试项", $"{resType}吞吐量测试");
+            testArr1.Add("参数名称", $"{resType}下行测试值");
+            testArr1.Add("结果", "0");
+            testArr1.Add("结果描述", "OK");
+            testArr1.Add("产测指标门限", "");
+            testArr1.Add("测试时长", "10");
+            testArr1.Add("值", downRes);
+            foreach (var item in testArr1)
+            {
+                dh.ExecuteSql($@"INSERT INTO steptestdetail (sd_id,sd_smid,sd_sn,sd_makecode,sd_machinecode,sd_indate,
+                    sd_class,sd_length,sd_actvalue,sd_detno) VALUES 
+                    ( steptestdetail_seq.NEXTVAL,'{sm_id}','{sn}','{workOrder.Text.Trim()}', 'ZTE',sysdate,
+                    '{item.Key}','100','{item.Value}',2 )", "insert");
+            }
+
             string oWO, oWOId, oErrMsg = "";
             if (LogicHandler.CheckStepSNAndMacode(workOrder.Text, User.UserSourceCode, sn, User.UserCode, out oWO, out oWOId, out oErrMsg))
             {
@@ -215,37 +261,35 @@ namespace UAS_MES_NEW.Make
             List<string> logItem = new List<string> { };
             foreach (var line in lines)
             {
-                //if (line.Trim().StartsWith("[SUM]"))
-                //{
-                //    logItem.Add(line);
-                //}
-
-                if(line.Contains("sender") || line.Contains("receiver"))
+                if (line.Trim().StartsWith("[SUM]") && line.Contains("receiver"))
                 {
                     logItem.Add(line);
                 }
-            }
 
-            if (logItem.Count > 0 && logItem[logItem.Count - 2].Contains("sender"))
-            {
-                var match = Regex.Match(logItem[logItem.Count - 2], @"(\d+\.\d+\s+MBytes).*?(\d+\.\d+\s+Mbits/sec)");
-                if (match.Success)
-                {
-                    sVal1 = match.Groups[1].Value;
-                    sVal2 = match.Groups[2].Value;
-                }
+                //if (line.Contains("sender") || line.Contains("receiver"))
+                //{
+                //    logItem.Add(line);
+                //}
             }
+
+            //if (logItem.Count > 0 && logItem[logItem.Count - 2].Contains("sender"))
+            //{
+            //    var match = Regex.Match(logItem[logItem.Count - 2], @"(\d+\.?\d*)\s*MBytes\s*(\d+\.?\d*)\s*Mbits/sec");
+            //    if (match.Success)
+            //    {
+            //        sVal1 = match.Groups[1].Value;
+            //        sVal2 = match.Groups[2].Value;
+            //    }
+            //}
             if (logItem.Count > 0 && logItem[logItem.Count - 1].Contains("receiver"))
             {
-                var match = Regex.Match(logItem[logItem.Count - 1], @"(\d+\.\d+\s+MBytes).*?(\d+\.\d+\s+Mbits/sec)");
+                var match = Regex.Match(logItem[logItem.Count - 1], @"(\d+\.?\d*)\s*MBytes\s*(\d+\.?\d*)\s*Mbits/sec");
                 if (match.Success)
                 {
-                    rVal1 = match.Groups[1].Value;
-                    rVal2 = match.Groups[2].Value;
+                    rVal1 = match.Groups[1].Value + "MBytes";
+                    rVal2 = match.Groups[2].Value + "Mbits/sec";
                 }
             }
-            //double num1 = (double.Parse(sVal1.Split(' ')[0]) + double.Parse(rVal1.Split(' ')[0])) / 2;
-            //double num2 = (double.Parse(sVal2.Split(' ')[0]) + double.Parse(rVal2.Split(' ')[0])) / 2;
 
             return rVal2;
         }
@@ -311,7 +355,7 @@ namespace UAS_MES_NEW.Make
             {
                 SQL.Clear();
                 SQL.Append($@"SELECT ms_sncode,ma_code,pr_code,pr_spec FROM makeserial,make,product
-                        WHERE ms_sncode = '{sn}' AND ms_makecode = ma_code AND ms_prodcode = pr_code");
+                        WHERE ms_sncode = '{sn}' AND ms_makecode = ma_code AND ms_prodcode = pr_code order by MS_ID desc");
                 dt = (DataTable)dh.ExecuteSql(SQL.ToString(), "select");
                 if (dt.Rows.Count > 0)
                 {

+ 62 - 19
UAS_MES_HYSX/FunctionCode/Make/Make_WirelessThroughput.cs

@@ -135,22 +135,29 @@ namespace UAS_MES_NEW.Make
             ShowMsg(1, $"OK,上行速率: {upRate},下行速率: {downRate}");
             ResMax.Text = upRate;
             ResMin.Text = downRate;
-            string tDetail = $"upRate/{upRate};downRate/{downRate}";
-            CheckPassStation(SN.Text, "PASS", tDetail);
+            //string tDetail = $"upRate/{upRate};downRate/{downRate}";
+            if (comboBox1.SelectedIndex.ToString() == "0")
+            {
+                CheckPassStation(SN.Text, "PASS", upRate, downRate, "2.4G");
+            }
+            else
+            {
+                CheckPassStation(SN.Text, "PASS", upRate, downRate, "5G");
+            }
         }
 
-        private void CheckPassStation(string sn, string testRes, string testDetail)
+        private void CheckPassStation(string sn, string testRes, string upRate, string downRate, string resType)
         {
             List<string> param = new List<string>() { };
             string outMsg = "";
             param.Add(workOrder.Text);
             param.Add(sn);
-            param.Add(User.UserSourceCode);
+            param.Add(User.CurrentStepCode);
             param.Add(testRes);
             param.Add("");
             param.Add("");
-            param.Add("Thruput");
-            param.Add(testDetail);
+            param.Add("ThruputCmd");
+            param.Add($"upRate/{upRate};downRate/{downRate}");
             param.Add(outMsg);
             string[] paramList = param.ToArray();
             dh.CallProcedure("cs_insert_testrejects", ref paramList);
@@ -167,6 +174,41 @@ namespace UAS_MES_NEW.Make
                 return;
             }
 
+            dt = (DataTable)dh.ExecuteSql($"select sm_id from steptestmain where INSTR(sm_sourcetype, 'Thruput') > 0  and sm_sn = '{sn}' order by sm_indate desc", "select");
+            string sm_id = dt.Rows[0]["sm_id"].ToString();
+
+            Dictionary<string, string> testArr = new Dictionary<string, string>();
+            testArr.Add("测试项", $"{resType}吞吐量测试");
+            testArr.Add("参数名称", $"{resType}上行测试值");
+            testArr.Add("结果", "0");
+            testArr.Add("结果描述", "OK");
+            testArr.Add("产测指标门限", "");
+            testArr.Add("测试时长", "10");
+            testArr.Add("值", upRate);
+            foreach (var item in testArr)
+            {
+                dh.ExecuteSql($@"INSERT INTO steptestdetail (sd_id,sd_smid,sd_sn,sd_makecode,sd_machinecode,sd_indate,
+                    sd_class,sd_length,sd_actvalue,sd_detno) VALUES 
+                    ( steptestdetail_seq.NEXTVAL,'{sm_id}','{sn}','{workOrder.Text.Trim()}', 'ZTE',sysdate,
+                    '{item.Key}','100','{item.Value}',1 )", "insert");
+            }
+
+            Dictionary<string, string> testArr1 = new Dictionary<string, string>();
+            testArr1.Add("测试项", $"{resType}吞吐量测试");
+            testArr1.Add("参数名称", $"{resType}下行测试值");
+            testArr1.Add("结果", "0");
+            testArr1.Add("结果描述", "OK");
+            testArr1.Add("产测指标门限", "");
+            testArr1.Add("测试时长", "10");
+            testArr1.Add("值", downRate);
+            foreach (var item in testArr1)
+            {
+                dh.ExecuteSql($@"INSERT INTO steptestdetail (sd_id,sd_smid,sd_sn,sd_makecode,sd_machinecode,sd_indate,
+                    sd_class,sd_length,sd_actvalue,sd_detno) VALUES 
+                    ( steptestdetail_seq.NEXTVAL,'{sm_id}','{sn}','{workOrder.Text.Trim()}', 'ZTE',sysdate,
+                    '{item.Key}','100','{item.Value}',2 )", "insert");
+            }
+
             string oWO, oWOId, oErrMsg = "";
             if (LogicHandler.CheckStepSNAndMacode(workOrder.Text, User.UserSourceCode, sn, User.UserCode, out oWO, out oWOId, out oErrMsg))
             {
@@ -497,28 +539,29 @@ namespace UAS_MES_NEW.Make
                 List<string> logItem = new List<string> { };
                 foreach (var line in lines)
                 {
-                    if (line.Trim().StartsWith("[SUM]"))
+                    if (line.Trim().StartsWith("[SUM]") && line.Contains("receiver"))
                     {
                         logItem.Add(line);
                     }
                 }
 
-                if (logItem.Count > 0 && logItem[logItem.Count - 2].Contains("sender"))
-                {
-                    var match = Regex.Match(logItem[logItem.Count - 2], @"(\d+\.\d+\s+MBytes).*?(\d+\.\d+\s+Mbits/sec)");
-                    if (match.Success)
-                    {
-                        sVal1 = match.Groups[1].Value;
-                        sVal2 = match.Groups[2].Value;
-                    }
-                }
+                //if (logItem.Count > 0 && logItem[logItem.Count - 2].Contains("sender"))
+                //{
+                //    var match = Regex.Match(logItem[logItem.Count - 2], @"(\d+\.\d+\s+MBytes).*?(\d+\.\d+\s+Mbits/sec)");
+                //    if (match.Success)
+                //    {
+                //        sVal1 = match.Groups[1].Value;
+                //        sVal2 = match.Groups[2].Value;
+                //    }
+                //}
                 if (logItem.Count > 0 && logItem[logItem.Count - 1].Contains("receiver"))
                 {
-                    var match = Regex.Match(logItem[logItem.Count - 1], @"(\d+\.\d+\s+MBytes).*?(\d+\.\d+\s+Mbits/sec)");
+                    //var match = Regex.Match(logItem[logItem.Count - 1], @"(\d+\.\d+\s+MBytes).*?(\d+\.\d+\s+Mbits/sec)");
+                    var match = Regex.Match(logItem[logItem.Count - 1], @"(\d+\.?\d*)\s*MBytes\s*(\d+\.?\d*)\s*Mbits/sec");
                     if (match.Success)
                     {
-                        rVal1 = match.Groups[1].Value;
-                        rVal2 = match.Groups[2].Value;
+                        rVal1 = match.Groups[1].Value + "MBytes";
+                        rVal2 = match.Groups[2].Value + "Mbits/sec";
                     }
                 }
                 //double num1 = (double.Parse(sVal1.Split(' ')[0]) + double.Parse(rVal1.Split(' ')[0])) / 2;