|
|
@@ -190,7 +190,7 @@ namespace UAS_MES_NEW.Special
|
|
|
{
|
|
|
if (serBtn.Checked)
|
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select ms_makecode,ms_prodcode,ms_sncode,ms_craftcode cr_code,ms_status,ms_outboxcode from makeserial where ms_sncode = '" + input.Text + "' ORDER BY MS_ID DESC", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select nvl(ms_iostatus,0) ms_iostatus, ms_makecode,ms_prodcode,ms_sncode,ms_craftcode cr_code,ms_status,ms_outboxcode from makeserial where ms_sncode = '" + input.Text + "' ORDER BY MS_ID DESC", "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
|
|
|
@@ -203,6 +203,11 @@ namespace UAS_MES_NEW.Special
|
|
|
OperatResult.AppendText("SN:" + input.Text + "为不良品,不允许采集\n", Color.Red, input);
|
|
|
return;
|
|
|
}
|
|
|
+ if (dt.Rows[0]["ms_iostatus"].ToString() != "0")
|
|
|
+ {
|
|
|
+ OperatResult.AppendText("SN:" + input.Text + "已被出入库采集,不允许采集\n", Color.Red, input);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
|
|
|
{
|
|
|
OperatResult.AppendText("SN:" + input.Text + "已装箱" + dt.Rows[0]["ms_outboxcode"].ToString() + ",不允许采集\n", Color.Red, input);
|
|
|
@@ -227,7 +232,7 @@ namespace UAS_MES_NEW.Special
|
|
|
}
|
|
|
else if (bigboxBtn.Checked)
|
|
|
{
|
|
|
- dt = (DataTable)dh.ExecuteSql("select pa_makecode ms_makecode,pa_prodcode ms_prodcode,pa_outboxcode,pa_mothercode,ma_craftcode cr_code from package left join make on pa_makecode = ma_code where pa_outboxcode = '"+input.Text+"' and pa_type = '1'", "select");
|
|
|
+ dt = (DataTable)dh.ExecuteSql("select nvl(pa_iostatus,0) pa_iostatus,pa_makecode ms_makecode,pa_prodcode ms_prodcode,pa_outboxcode,pa_mothercode,ma_craftcode cr_code from package left join make on pa_makecode = ma_code where pa_outboxcode = '" + input.Text+"' and pa_type = '1'", "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|
|
|
if (ms_makecode.Text != "" && dt.Rows[0]["ms_makecode"].ToString() != ms_makecode.Text)
|
|
|
@@ -235,6 +240,11 @@ namespace UAS_MES_NEW.Special
|
|
|
OperatResult.AppendText("SN:" + input.Text + "所属工单" + dt.Rows[0]["ms_makecode"].ToString() + "与当前工单" + ms_makecode.Text + "不一致\n", Color.Red, input);
|
|
|
return;
|
|
|
}
|
|
|
+ if (dt.Rows[0]["pa_iostatus"].ToString() != "0")
|
|
|
+ {
|
|
|
+ OperatResult.AppendText("箱号:" + input.Text + "已被出入库采集,不允许采集\n", Color.Red, input);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (dt.Rows[0]["pa_mothercode"].ToString() != "")
|
|
|
{
|
|
|
OperatResult.AppendText("卡通箱:" + input.Text + "已装栈板" + dt.Rows[0]["pa_mothercode"].ToString() + ",不允许采集\n", Color.Red, input);
|