|
|
@@ -300,7 +300,7 @@ namespace UAS_MES.OQC
|
|
|
if (ob_status.Text == "待检验")
|
|
|
{
|
|
|
dh.ExecuteSql("update OQCBatch set ob_status='CHECKING' where ob_checkno='" + ob_checkno.Text + "' and ob_status='UNCHECK'", "update");
|
|
|
- dh.ExecuteSql("update makecraftdetail set mcd_inqty=mcd_inqty+" + ob_nowcheckqty.Text + " where mcd_macode='" + ob_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'","select");
|
|
|
+ dh.ExecuteSql("update makecraftdetail set mcd_inqty=mcd_inqty+" + ob_nowcheckqty.Text + " where mcd_macode='" + ob_makecode.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
|
|
|
}
|
|
|
//更新批次中的合格数不合格数:用抽检批检验项目表获取最大的抽检数和不合格数
|
|
|
sql.Clear();
|
|
|
@@ -329,17 +329,16 @@ namespace UAS_MES.OQC
|
|
|
{
|
|
|
if (int.Parse(ob_ngqty.Text == "" ? "0" : ob_ngqty.Text) <= int.Parse(ob_maxngacceptqty.Text == "" ? ob_maxngacceptqty.Text : ob_maxngacceptqty.Text))
|
|
|
{
|
|
|
- dh.ExecuteSql("update OQCBatch set ob_status='OK',ob_result='OK' where ob_checkno='" + ob_checkno.Text + "'", "select");
|
|
|
- string ErrorMessage;
|
|
|
- LogicHandler.UpdateOQCMessage(ms_sncode.Text, ob_checkno.Text, ob_makecode.Text, "OQC批判过", User.UserSourceCode, User.UserName, "批次通过", out ErrorMessage);
|
|
|
- //记录操作日志
|
|
|
- LogicHandler.InsertMakeProcess(ms_sncode.Text, ob_makecode.Text, User.UserSourceCode, "批结果判定", "批次通过", User.UserName);
|
|
|
- GetBatch.PerformClick();
|
|
|
- BatchPass.Enabled = false;
|
|
|
- OperateResult.AppendText(">>" + ob_checkno.Text + "通过批成功\n", Color.Green);
|
|
|
+ string ReworkCode = "";
|
|
|
+ if (LogicHandler.OQCBatchJudge(ob_checkno.Text, User.UserSourceCode, "OK", "", User.UserCode, ob_remark.Text, out ReworkCode, out ErrorMessage))
|
|
|
+ {
|
|
|
+ GetBatch.PerformClick();
|
|
|
+ BatchPass.Enabled = false;
|
|
|
+ OperateResult.AppendText(">>" + ob_checkno.Text + "通过批成功\n", Color.Green);
|
|
|
+ }
|
|
|
+ else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
}
|
|
|
- else
|
|
|
- OperateResult.AppendText(">>当前批次不合格数为" + ob_ngqty.Text + ",大于最大不合格允通过数" + ob_maxngacceptqty.Text + "\n", Color.Red);
|
|
|
+ else OperateResult.AppendText(">>当前批次不合格数为" + ob_ngqty.Text + ",大于最大不合格允通过数" + ob_maxngacceptqty.Text + "\n", Color.Red);
|
|
|
}
|
|
|
}
|
|
|
|