|
|
@@ -480,7 +480,7 @@ namespace UAS_MES_NEW.Make
|
|
|
BaseUtil.SetFormValue(this.Controls, dt);
|
|
|
LockMakeCode.Checked = true;
|
|
|
}
|
|
|
- dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno", "ms_outboxcode" }, "ms_id='" + oMSID + "' ");
|
|
|
+ dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno", "ms_outboxcode", "ms_stepcode" }, "ms_id='" + oMSID + "' ");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
string ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
|
|
|
@@ -542,10 +542,11 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
}
|
|
|
//如果之前是良品的
|
|
|
- dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno", "ms_outboxcode" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
|
|
|
+ dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno", "ms_outboxcode", "ms_stepcode" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
string ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
|
|
|
+ string ms_stepcode = dt.Rows[0]["ms_stepcode"].ToString();
|
|
|
if (ms_outboxcode != "")
|
|
|
{
|
|
|
OperateResult.AppendText(">>SN已装箱" + ms_outboxcode + ",采集不良请先解除装箱\n", Color.Red);
|
|
|
@@ -554,6 +555,11 @@ namespace UAS_MES_NEW.Make
|
|
|
string status = dt.Rows[0]["ms_status"].ToString();
|
|
|
if (status == "1" || status == "2")
|
|
|
{
|
|
|
+ if (ms_stepcode == User.CurrentStepCode)
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>SN" + ms_sncode.Text + "已判定为良品,不允许采集为不良\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
dh.UpdateByCondition("steppassed", "sp_result='不良品',sp_ifng=-1,sp_ymd=to_char(sysdate,'yyyymmdd'),sp_hm=to_char(sysdate,'hh24miss'),sp_linecode = '" + User.UserLineCode + "',sp_sccode = '" + User.UserSourceCode + "'", "sp_id=(select max(sp_id) from steppassed where sp_sncode='" + ms_sncode.Text + "')");
|
|
|
dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
|
|
|
dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_badtimes=nvl(ms_badtimes,0)+1", "ms_id='" + oMSID + "'");
|