|
|
@@ -213,7 +213,7 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
Result.Text = parseStr;
|
|
|
string testRes = LoadTestDetail("L", "1");
|
|
|
- CheckPassStation(FirstSN.Text.Trim(), testRes);
|
|
|
+ CheckPassStation(FirstSN.Text.Trim(), testRes, RTxt8.Text.Trim(), RTxt7.Text.Trim());
|
|
|
if (testRes == "NG")
|
|
|
{
|
|
|
Pagination.SelectedIndex = 0;
|
|
|
@@ -225,7 +225,7 @@ namespace UAS_MES_NEW.Make
|
|
|
{
|
|
|
Result1.Text = parseStr;
|
|
|
string testRes = LoadTestDetail("L", "2");
|
|
|
- CheckPassStation(SecondSN.Text.Trim(), testRes);
|
|
|
+ CheckPassStation(SecondSN.Text.Trim(), testRes, R1Txt8.Text.Trim(), R1Txt7.Text.Trim());
|
|
|
if (testRes == "NG")
|
|
|
{
|
|
|
Pagination.SelectedIndex = 1;
|
|
|
@@ -233,7 +233,7 @@ namespace UAS_MES_NEW.Make
|
|
|
R1Txt8.SelectAll();
|
|
|
}
|
|
|
}
|
|
|
- receivedData.Clear();
|
|
|
+ receivedData.Clear();
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -242,7 +242,7 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void CheckPassStation(string sn,string res)
|
|
|
+ private void CheckPassStation(string sn,string res, string testVal, string pressureVal)
|
|
|
{
|
|
|
List<string> param = new List<string>() { };
|
|
|
string outMsg = "";
|
|
|
@@ -253,7 +253,7 @@ namespace UAS_MES_NEW.Make
|
|
|
param.Add("");
|
|
|
param.Add("");
|
|
|
param.Add("AirTightness");
|
|
|
- param.Add("");
|
|
|
+ param.Add(testVal);
|
|
|
param.Add(outMsg);
|
|
|
string[] paramList = param.ToArray();
|
|
|
dh.CallProcedure("cs_insert_testrejects", ref paramList);
|
|
|
@@ -263,6 +263,51 @@ namespace UAS_MES_NEW.Make
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oWO, User.UserLineCode, User.UserSourceCode, "气密性测试", "气密性测试过站成功", sn, "");
|
|
|
}
|
|
|
|
|
|
+ dt = (DataTable)dh.ExecuteSql($"select sm_id from steptestmain where sm_sourcetype = 'AirTightness' and sm_sn = '{sn}' order by sm_indate desc", "select");
|
|
|
+ string sm_id = dt.Rows[0]["sm_id"].ToString();
|
|
|
+
|
|
|
+ dt = (DataTable)dh.ExecuteSql($"SELECT pr_at_max1,pr_at_max2,pr_at_time FROM product, makeserial WHERE ms_sncode = '{sn}' AND ms_prodcode = pr_code", "select");
|
|
|
+ string max1 = dt.Rows[0]["pr_at_max1"].ToString();
|
|
|
+ string max2 = dt.Rows[0]["pr_at_max2"].ToString();
|
|
|
+ string attime = dt.Rows[0]["pr_at_time"].ToString();
|
|
|
+ if (dt.Rows.Count == 0 || string.IsNullOrEmpty(max1) || string.IsNullOrEmpty(max2) || string.IsNullOrEmpty(attime))
|
|
|
+ {
|
|
|
+ ShowMsg(0, $"序列号{sn},请维护气密性测试");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Dictionary<string,string> testArr = new Dictionary<string,string>();
|
|
|
+ testArr.Add("测试项", "气密性测试压力");
|
|
|
+ testArr.Add("参数名称", "气密性测试压力");
|
|
|
+ testArr.Add("结果", Convert.ToInt32(testVal) > Convert.ToInt32(max1) ? "1" : "0");
|
|
|
+ testArr.Add("结果描述", Convert.ToInt32(testVal) > Convert.ToInt32(max1) ? "OK" : "NG");
|
|
|
+ testArr.Add("产测指标门限", max1);
|
|
|
+ testArr.Add("测试时长", attime);
|
|
|
+ testArr.Add("值", pressureVal);
|
|
|
+ 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("测试项", "气密性泄漏值");
|
|
|
+ testArr1.Add("参数名称", "气密性泄漏值");
|
|
|
+ testArr1.Add("结果", Convert.ToInt32(pressureVal) < Convert.ToInt32(max2) ? "1" : "0");
|
|
|
+ testArr1.Add("结果描述", Convert.ToInt32(pressureVal) < Convert.ToInt32(max2) ? "OK" : "NG");
|
|
|
+ testArr1.Add("产测指标门限", max2);
|
|
|
+ testArr1.Add("测试时长", attime);
|
|
|
+ testArr1.Add("值", testVal);
|
|
|
+ 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");
|
|
|
+ }
|
|
|
+
|
|
|
dt = (DataTable)dh.ExecuteSql($"SELECT mp_id FROM makeprocess WHERE mp_sncode = '{sn}' AND instr(mp_stepname, '气密性') > 0", "select");
|
|
|
if (dt.Rows.Count > 0) return;
|
|
|
|
|
|
@@ -353,7 +398,6 @@ namespace UAS_MES_NEW.Make
|
|
|
R1Txt9.Text = "";
|
|
|
R1Txt10.Text = "";
|
|
|
}
|
|
|
- return "";
|
|
|
}
|
|
|
return "";
|
|
|
}
|
|
|
@@ -369,7 +413,7 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
FirstSN.Focus();
|
|
|
FirstSN.SelectAll();
|
|
|
- CheckPassStation(FirstSN.Text, "OK");
|
|
|
+ CheckPassStation(FirstSN.Text, "OK", RTxt8.Text, RTxt7.Text.Trim());
|
|
|
}
|
|
|
RTxt8.Focus();
|
|
|
RTxt8.SelectAll();
|
|
|
@@ -385,7 +429,7 @@ namespace UAS_MES_NEW.Make
|
|
|
|
|
|
SecondSN.Focus();
|
|
|
SecondSN.SelectAll();
|
|
|
- CheckPassStation(SecondSN.Text, "OK");
|
|
|
+ CheckPassStation(SecondSN.Text, "OK", R1Txt8.Text, R1Txt7.Text.Trim());
|
|
|
}
|
|
|
R1Txt8.Focus();
|
|
|
R1Txt8.SelectAll();
|