|
|
@@ -117,14 +117,20 @@ namespace UAS_MES.Make
|
|
|
OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
|
|
|
return;
|
|
|
}
|
|
|
- if (dh.getFieldDataByCondition("package", "pa_nextstep", "pa_outboxcode='"+outboxcode.Text+"'").ToString() != User.CurrentStepCode)
|
|
|
+ if (dh.getFieldDataByCondition("package", "pa_nextstep", "pa_outboxcode='" + outboxcode.Text + "'").ToString() != User.CurrentStepCode)
|
|
|
{
|
|
|
OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序不是当前岗位资源对应工序\n", Color.Red, outboxcode);
|
|
|
return;
|
|
|
}
|
|
|
- if (pa_standardqty.Text == pa_currentqty.Text)
|
|
|
+ string pa_status = dh.getFieldDataByCondition("package", "nvl(pa_status,0)pa_status", "pa_outboxcode='" + palletcode.Text + "'").ToString();
|
|
|
+ if (pa_status == "1")
|
|
|
{
|
|
|
- Packing_Click(new object(), new EventArgs());
|
|
|
+ palletcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,pa_standardqty,pa_sccode,pa_currentstep)values");
|
|
|
+ sql.Append("(package_seq.nextval,'" + palletcode.Text + "','" + pa_makecode.Text + "',sysdate,'0',3,'" + pa_prodcode.Text + "',0,'" + pa_standardqty.Text + "','" + User.UserSourceCode + "','" + User.CurrentStepCode + "')");
|
|
|
+ dh.ExecuteSql(sql.GetString(), "insert");
|
|
|
+ palletcode_KeyDown(new object(), new KeyEventArgs(Keys.Enter));
|
|
|
}
|
|
|
//如果未装满的话
|
|
|
dt = (DataTable)dh.ExecuteSql("select pa_mothercode,nvl(pa_status,0) pa_status from package where pa_outboxcode='" + outboxcode.Text + "' and pa_type=2", "select");
|
|
|
@@ -246,12 +252,7 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
OperateResult.AppendText(">>" + palletcode.Text + "装栈板成功\n", Color.Black);
|
|
|
dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + palletcode.Text + "'", "update");
|
|
|
- palletcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
|
|
|
- sql.Clear();
|
|
|
- sql.Append("insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_standardqty,pa_sccode,pa_currentstep)values");
|
|
|
- sql.Append("(package_seq.nextval,'" + palletcode.Text + "','" + pa_makecode.Text + "',sysdate,'0',3,'" + pa_prodcode.Text + "',0,'1','" + pa_standardqty.Text + "','" + User.UserSourceCode + "','" + User.CurrentStepCode + "')");
|
|
|
- dh.ExecuteSql(sql.GetString(), "insert");
|
|
|
- palletcode_KeyDown(new object(), new KeyEventArgs(Keys.Enter));
|
|
|
+
|
|
|
}
|
|
|
else OperateResult.AppendText(">>栈板号不能为空\n", Color.Red);
|
|
|
}
|