|
|
@@ -153,7 +153,8 @@ namespace UAS_MES_NEW.Make
|
|
|
ShowMsg(0, $"获取MAC异常: {error}");
|
|
|
return;
|
|
|
}
|
|
|
- if (string.IsNullOrEmpty(output))
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(output))
|
|
|
{
|
|
|
Match match = Regex.Match(output, @"link/ether\s+([0-9a-fA-F:]{17})");
|
|
|
if (match.Success)
|
|
|
@@ -169,6 +170,31 @@ namespace UAS_MES_NEW.Make
|
|
|
MsgBox.BackColor = Color.LawnGreen;
|
|
|
resultType = "OK";
|
|
|
|
|
|
+ string omakeCode, oMsid, oErrorMessage;
|
|
|
+ if (LogicHandler.CheckStepSNAndMacode(WO, User.UserSourceCode, SN, User.UserCode, out omakeCode, out oMsid, out oErrorMessage))
|
|
|
+ {
|
|
|
+ if (LogicHandler.SetStepResult(omakeCode, User.UserSourceCode, SN, "MAC比对", resultType, User.UserCode, out oErrorMessage))
|
|
|
+ {
|
|
|
+ LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, woVal.Text, User.UserLineCode, User.UserSourceCode, "MAC比对", "", SN, "");
|
|
|
+
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append($@"INSERT INTO steptestdetail (std_id,std_sn,std_makecode,std_date,std_indate,
|
|
|
+ std_rescode,std_stepcode,std_class,std_value1,STD_VALUE2,STD_TESTRESULT) values
|
|
|
+ (steptestdetail_seq.NEXTVAL,'{SN}','{woVal.Text}',sysdate,sysdate,
|
|
|
+ '{User.UserSourceCode}','{User.CurrentStepCode}','MAC比对','{snCollectionBox1.Text}','{MAC}','{resultType}')");
|
|
|
+ dh.ExecuteSql(sql.ToString(), "insert");
|
|
|
+ ShowMsg(1, $"MAC核对成功,已处理过站并上传测试结果");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ShowMsg(0, $"过站处理记录NG: {oErrorMessage}");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ShowMsg(0, $"过站核对NG: {oErrorMessage}");
|
|
|
+ }
|
|
|
+
|
|
|
snCollectionBox1.Focus();
|
|
|
snCollectionBox1.SelectAll();
|
|
|
}
|
|
|
@@ -182,15 +208,6 @@ namespace UAS_MES_NEW.Make
|
|
|
snCollectionBox1.SelectAll();
|
|
|
}
|
|
|
|
|
|
- LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, woVal.Text, User.UserLineCode, User.UserSourceCode, "MAC比对", "", SN, "");
|
|
|
-
|
|
|
- sql.Clear();
|
|
|
- sql.Append($@"INSERT INTO steptestdetail (std_id,std_sn,std_makecode,std_date,std_indate,
|
|
|
- std_rescode,std_stepcode,std_class,std_value1,STD_VALUE2,STD_TESTRESULT) values
|
|
|
- (steptestdetail_seq.NEXTVAL,'{SN}','{woVal.Text}',sysdate,sysdate,
|
|
|
- '{User.UserSourceCode}','{User.CurrentStepCode}','MAC比对','{snCollectionBox1.Text}','{MAC}','{resultType}')");
|
|
|
- dh.ExecuteSql(sql.ToString(), "insert");
|
|
|
- ShowMsg(1, $"MAC核对成功,已上传测试结果");
|
|
|
|
|
|
/*res.Items.Clear();
|
|
|
res.Items.Add(output);*/
|
|
|
@@ -235,8 +252,8 @@ namespace UAS_MES_NEW.Make
|
|
|
GetSNCode.Focus();
|
|
|
GetSNCode.SelectAll();
|
|
|
|
|
|
- MsgBox.Text = "Pass";
|
|
|
- MsgBox.BackColor = Color.LawnGreen;
|
|
|
+ MsgBox.Text = "";
|
|
|
+ MsgBox.BackColor = SystemColors.Control;
|
|
|
}
|
|
|
|
|
|
private void ParseXml(string path)
|