|
|
@@ -257,42 +257,44 @@ namespace UAS_MES.Make
|
|
|
////箱号不存在的情况
|
|
|
if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
|
|
|
{
|
|
|
- if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
|
|
|
+ //if (LogicHandler.SetStepResult(ms_makecode.Text, User.UserSourceCode, sn_code.Text, "包装采集", "装箱成功", User.UserCode, out ErrorMessage))
|
|
|
+ //{
|
|
|
+ //提示正确返回时传递的信息
|
|
|
+ if (ErrorMessage.Contains("AFTERSUCCESS"))
|
|
|
+ OperateResult.AppendText(">>" + ErrorMessage + "\n");
|
|
|
+ LoadCheckQTY();
|
|
|
+ LastSncode = sn_code.Text;
|
|
|
+ OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
|
|
|
+ LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
|
|
|
+ //满箱更新状态为1
|
|
|
+ LoadData();
|
|
|
+ LoadGridData();
|
|
|
+ //采集完后如果是第一个装的序列号,把序列号的NextStepCode赋值给箱号
|
|
|
+ if (pa_currentqty.Text == "1")
|
|
|
{
|
|
|
- //提示正确返回时传递的信息
|
|
|
- if (ErrorMessage.Contains("AFTERSUCCESS"))
|
|
|
- OperateResult.AppendText(">>" + ErrorMessage + "\n");
|
|
|
- LoadCheckQTY();
|
|
|
- LastSncode = sn_code.Text;
|
|
|
- OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
|
|
|
- LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "采集成功", sn_code.Text, "");
|
|
|
- //满箱更新状态为1
|
|
|
- LoadData();
|
|
|
- LoadGridData();
|
|
|
- //采集完后如果是第一个装的序列号,把序列号的NextStepCode赋值给箱号
|
|
|
- if (pa_currentqty.Text == "1")
|
|
|
- {
|
|
|
- string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
- dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
- }
|
|
|
- if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == pr_outboxinnerqty.Value)
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱\n", Color.Black);
|
|
|
- if (PR_CHECKCARTONW != "0")
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "满箱需要重量检测,请在卡通箱称重界面进行称重打印\n", Color.Red);
|
|
|
- return;
|
|
|
- }
|
|
|
- dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "采集完成,封箱成功\n", Color.Green);
|
|
|
- pa_status.Text = "1";
|
|
|
- pa_standardqty.Text = "";
|
|
|
- if (AutoPrint.Checked)
|
|
|
- Print_Click(new object(), new EventArgs());
|
|
|
- }
|
|
|
- sn_code.Clear();
|
|
|
+ // string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsID + "'").ToString();
|
|
|
+ dh.UpdateByCondition("package", "pa_nextstep='" + User.CurrentStepCode + "', PA_CURRENTSTEP = '" + User.CurrentStepCode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ }
|
|
|
+ if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == pr_outboxinnerqty.Value)
|
|
|
+ {
|
|
|
+ dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_totalqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱采集完成,封箱成功\n", Color.Green);
|
|
|
+ pa_status.Text = "1";
|
|
|
+ pa_standardqty.Text = "";
|
|
|
+ if (AutoPrint.Checked)
|
|
|
+ Print_Click(new object(), new EventArgs());
|
|
|
+ }
|
|
|
+ sn_code.Clear();
|
|
|
+ if (PR_CHECKCARTONW != "0")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "满箱需要重量检测,请在卡通箱称重界面进行称重打印\n", Color.Red);
|
|
|
+ return;
|
|
|
}
|
|
|
- else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
+ LogicHandler.CartonBoxStepPass(oMakeCode, User.UserSourceCode, pa_outboxcode.Text, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", out ErrorMessage);
|
|
|
+ dh.UpdateByCondition("package", "pa_nextstep='" + dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='" + pa_outboxcode.Text + "'").ToString() + "' PA_CURRENTSTEP = '' ", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+
|
|
|
+ //}
|
|
|
+ //else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
}
|
|
|
else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
|
|
|
}
|
|
|
@@ -348,19 +350,23 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "' and nvl(pa_status,0)=0"))
|
|
|
{
|
|
|
- if (PR_CHECKCARTONW != "0")
|
|
|
- {
|
|
|
- OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "需要重量检测,请在卡通箱称重界面进行操作\n", Color.Red);
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
string Seal = MessageBox.Show(this.ParentForm, "是否确认封箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
|
|
|
if (Seal == "Yes")
|
|
|
{
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "满箱采集完成,封箱成功\n", Color.Green);
|
|
|
dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
pa_status.Text = "1";
|
|
|
pa_standardqty.Text = "";
|
|
|
LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "装箱采集", "封箱成功", pa_outboxcode.Text, "");
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "封箱成功\n", Color.Green);
|
|
|
+ if (PR_CHECKCARTONW != "0")
|
|
|
+ {
|
|
|
+ OperateResult.AppendText(">>卡通箱" + pa_outboxcode.Text + "需要重量检测,请在卡通箱称重界面进行操作\n", Color.Red);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ LogicHandler.CartonBoxStepPass(oMakeCode, User.UserSourceCode, pa_outboxcode.Text, User.UserCode, "卡通箱:" + pa_outboxcode.Text + "整箱过站", out ErrorMessage);
|
|
|
+ dh.UpdateByCondition("package", "pa_nextstep='" +dh.getFieldDataByCondition("packagedetail left join makeserial on ms_sncode=pd_barcode and ms_makecode=pd_makecode", "max(ms_nextstepcode)", "pd_outboxcode='"+pa_outboxcode.Text+"'").ToString()+ "' PA_CURRENTSTEP = '' ", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "错误或者已封箱\n", Color.Red);
|