Browse Source

已完工序列号也可以采集卡通箱

章政 8 years ago
parent
commit
bc3ef882bb

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -139,7 +139,7 @@ namespace UAS_MES.Make
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
-                    if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage) || dh.CheckExist("makeserial", "ms_sncode='" + sn_code.Text + "' and ms_status=2"))
                     {
                         //获取序列号信息
                         sql.Clear();

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -216,7 +216,7 @@ namespace UAS_MES.Make
             {
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                 {
-                    if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage))
+                    if (LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sn_code.Text, User.UserCode, out oMakeCode, out oMsID, out ErrorMessage)||dh.CheckExist("makeserial", "ms_sncode='" + sn_code.Text + "' and ms_status=2"))
                     {
                         sql.Clear();
                         sql.Append("select ms_makecode,pr_code,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,pr_code,pr_detail,");

+ 6 - 1
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -214,7 +214,6 @@ namespace UAS_MES.Make
                                 SQLS.Add("update package set pa_mothercode='" + palletcode.Text + "' where pa_outboxcode='" + outboxcode.Text + "'");
                                 dh.ExecuteSQLTran(SQLS.ToArray());
                                 //更新大箱的栈板号
-                                LoadCollectNum();
                                 if (dh.getFieldDataByCondition("package", "pa_makecode", "pa_outboxcode='" + palletcode.Text + "'").ToString() == "")
                                 {
                                     string carton_macode = dh.getFieldDataByCondition("package", "pa_makecode", "pa_outboxcode='" + outboxcode.Text + "'").ToString();
@@ -223,7 +222,13 @@ namespace UAS_MES.Make
                                 }
                                 //已箱号过站
                                 LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "栈板采集成功,栈板号:" + palletcode.Text, "栈板采集");
+                                LoadCollectNum();
                                 LoadGridData();
+                                if (pa_currentqty.Text == "1")
+                                {
+                                    string nextstepcode = dh.getFieldDataByCondition("mes_package_view left join makeserial on ms_sncode=v_barcode", "ms_nextstepcode", "v_outboxcode='" + outboxcode.Text + "'").ToString();
+                                    dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + palletcode.Text + "'");
+                                }
                                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板采集成功", palletcode.Text, "");
                                 OperateResult.AppendText(">>箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
                                 LoadGridData();