|
|
@@ -533,16 +533,22 @@ namespace UAS_MES_NEW.Make
|
|
|
return;
|
|
|
}
|
|
|
//如果之前是良品的
|
|
|
- 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_isactive" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
string status = dt.Rows[0]["ms_status"].ToString();
|
|
|
+ string ms_isactive = dt.Rows[0]["ms_isactive"].ToString();
|
|
|
ms_outboxcode = dt.Rows[0]["ms_outboxcode"].ToString();
|
|
|
if (ms_outboxcode != "")
|
|
|
{
|
|
|
OperateResult.AppendText(">>" + ms_sncode.Text + "已装箱" + ms_outboxcode + ",请先取消装箱\n", Color.Green);
|
|
|
return;
|
|
|
}
|
|
|
+ if (ms_isactive == "-1")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>" + ms_sncode.Text + "已激活,不允许采集不良\n", Color.Green);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (status == "1" || status == "2")
|
|
|
{
|
|
|
dh.UpdateByCondition("steppassed", "sp_result='不良品',sp_ifng=-1,sp_date=sysdate,sp_ymd=to_char(sysdate,'yyyymmdd'),sp_hm=to_char(sysdate,'hh24miss')", "sp_id=(select max(sp_id) from steppassed where sp_sncode='" + ms_sncode.Text + "')");
|