|
|
@@ -160,15 +160,15 @@ namespace UAS_MES_NEW.Packing
|
|
|
string v_stop = dh.getFieldDataByCondition("Line", "nvl(li_stop,0)", "li_code='" + User.UserLineCode + "'").ToString();
|
|
|
string v_ftime = dh.getFieldDataByCondition("product", "nvl(pr_ftime,0)", "pr_code='" + pd_prodcode.Text + "'").ToString();
|
|
|
|
|
|
- if (!dh.CheckExist("FIRSTRECORD", "fr_linecode = '" + User.UserLineCode + "' and fr_content='" + outboxcode.Text + "' and FR_STATUS = 0 "))
|
|
|
- {
|
|
|
- string count = dh.getFieldDataByCondition("FIRSTRECORD", "count(1) cn", "fr_linecode = '" + User.UserLineCode + "' and FR_STATUS = 0 and datediff_mes(fr_date,sysdate)>"+ v_ftime + "+0.5").ToString();
|
|
|
- if (v_stop == "-1" || (v_allowfirstover == "0" && int.Parse(count) > 0))
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>线体" + User.UserLineCode + "已触发首件停线,当前线体不允许采集!\n", Color.Red, outboxcode);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ //if (!dh.CheckExist("FIRSTRECORD", "fr_linecode = '" + User.UserLineCode + "' and fr_content='" + outboxcode.Text + "' and FR_STATUS = 0 "))
|
|
|
+ //{
|
|
|
+ // string count = dh.getFieldDataByCondition("FIRSTRECORD", "count(1) cn", "fr_linecode = '" + User.UserLineCode + "' and FR_STATUS = 0 and datediff_mes(fr_date,sysdate)>"+ v_ftime + "+0.5").ToString();
|
|
|
+ // if (v_stop == "-1" || (v_allowfirstover == "0" && int.Parse(count) > 0))
|
|
|
+ // {
|
|
|
+ // OperateResult.AppendText(">>线体" + User.UserLineCode + "已触发首件停线,当前线体不允许采集!\n", Color.Red, outboxcode);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
|
|
|
if (pa_nextstep != User.CurrentStepCode && pa_nextstep != "" && (unfinpack == "0" || unfinpack == ""))
|
|
|
@@ -279,30 +279,30 @@ namespace UAS_MES_NEW.Packing
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- if (dh.CheckExist("palletbind", "pb_pack='" + outboxcode.Text + "'")|| dh.CheckExist("palletbind", "pb_pall='" + pa_outboxcode.Text + "'"))
|
|
|
- {
|
|
|
- if (!dh.CheckExist("palletbind", "pb_pack='" + outboxcode.Text + "' and pb_pall ='"+ pa_outboxcode.Text + "' "))
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>箱号"+ outboxcode.Text + ",栈板号"+ pa_outboxcode.Text + "不属于栈板绑定关系\n", Color.Red, outboxcode);
|
|
|
- return;
|
|
|
- }
|
|
|
- if (!dh.CheckExist("packagedetail", "pd_outboxcode='" + pa_outboxcode.Text + "'"))
|
|
|
- {
|
|
|
- if (dh.getFieldDataByCondition("palletbind", "min(pb_pack)", "pb_pall ='" + pa_outboxcode.Text + "'").ToString() != outboxcode.Text)
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>箱号" + outboxcode.Text + "不属于栈板号" + pa_outboxcode.Text + "关联第一个号\n", Color.Red, outboxcode);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- string maxout = dh.getFieldDataByCondition("packagedetail", "max(pd_innerboxcode)", "pd_outboxcode ='" + pa_outboxcode.Text + "'").ToString();
|
|
|
- if (int.Parse(dh.getFieldDataByCondition("palletbind", "count(1)", "pb_pack between '"+ maxout + "' and '"+outboxcode.Text+"'").ToString())>2)
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>箱号" + outboxcode.Text + "需要顺序采集进栈板" + pa_outboxcode.Text + ",暂时无法采集此号\n", Color.Red, outboxcode);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //if (dh.CheckExist("palletbind", "pb_pack='" + outboxcode.Text + "'")|| dh.CheckExist("palletbind", "pb_pall='" + pa_outboxcode.Text + "'"))
|
|
|
+ //{
|
|
|
+ // if (!dh.CheckExist("palletbind", "pb_pack='" + outboxcode.Text + "' and pb_pall ='"+ pa_outboxcode.Text + "' "))
|
|
|
+ // {
|
|
|
+ // OperateResult.AppendText(">>箱号"+ outboxcode.Text + ",栈板号"+ pa_outboxcode.Text + "不属于栈板绑定关系\n", Color.Red, outboxcode);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // if (!dh.CheckExist("packagedetail", "pd_outboxcode='" + pa_outboxcode.Text + "'"))
|
|
|
+ // {
|
|
|
+ // if (dh.getFieldDataByCondition("palletbind", "min(pb_pack)", "pb_pall ='" + pa_outboxcode.Text + "'").ToString() != outboxcode.Text)
|
|
|
+ // {
|
|
|
+ // OperateResult.AppendText(">>箱号" + outboxcode.Text + "不属于栈板号" + pa_outboxcode.Text + "关联第一个号\n", Color.Red, outboxcode);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // else {
|
|
|
+ // string maxout = dh.getFieldDataByCondition("packagedetail", "max(pd_innerboxcode)", "pd_outboxcode ='" + pa_outboxcode.Text + "'").ToString();
|
|
|
+ // if (int.Parse(dh.getFieldDataByCondition("palletbind", "count(1)", "pb_pack between '"+ maxout + "' and '"+outboxcode.Text+"'").ToString())>2)
|
|
|
+ // {
|
|
|
+ // OperateResult.AppendText(">>箱号" + outboxcode.Text + "需要顺序采集进栈板" + pa_outboxcode.Text + ",暂时无法采集此号\n", Color.Red, outboxcode);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
dt = (DataTable)dh.ExecuteSql("select pa_totalqty,pa_mothercode,nvl(pa_status,0) pa_status from package where pa_outboxcode='" + outboxcode.Text + "'", "select");
|
|
|
if (dt.Rows.Count > 0)
|
|
|
{
|