Browse Source

栈板以及大箱采集界面增加判断被采集箱类型

Hcsy 7 years ago
parent
commit
3faba3284c

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

@@ -162,10 +162,15 @@ namespace UAS_MES.Make
                             return;
                         }
                         sql.Clear();
-                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno,pa_mothercode from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno,pa_mothercode,pa_type from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
                         {
+                            if (dt.Rows[0]["pa_type"].ToString() != "2")
+                            {
+                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "类型并非大箱,不允许操作\n", Color.Red);
+                                return;
+                            }
                             if (dt.Rows[0]["pa_mothercode"].ToString() != "")
                             {
                                 OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "已被栈板" + dt.Rows[0]["pa_mothercode"].ToString() + "采集,不允许操作\n", Color.Red);

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

@@ -158,10 +158,15 @@ namespace UAS_MES.Make
                             return;
                         }
                         sql.Clear();
-                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno,pa_type from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
                         {
+                            if (dt.Rows[0]["pa_type"].ToString() != "3")
+                            {
+                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "类型并非栈板,不允许操作\n", Color.Red);
+                                return;
+                            }
                             if (dt.Rows[0]["pa_outno"].ToString() != "")
                             {
                                 OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red);

+ 6 - 1
UAS_MES_NEW/FunctionCode/Packing/Packing_BigBoxCollection.cs

@@ -152,10 +152,15 @@ namespace UAS_MES_NEW.Packing
                             return;
                         }
                         sql.Clear();
-                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno,pa_mothercode from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno,pa_mothercode,pa_type from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
                         {
+                            if (dt.Rows[0]["pa_type"].ToString() != "2")
+                            {
+                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "类型并非大箱,不允许操作\n", Color.Red);
+                                return;
+                            }
                             if (dt.Rows[0]["pa_mothercode"].ToString() != "")
                             {
                                 OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "已被栈板" + dt.Rows[0]["pa_mothercode"].ToString() + "采集,不允许操作\n", Color.Red);

+ 6 - 1
UAS_MES_NEW/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -156,10 +156,15 @@ namespace UAS_MES_NEW.Packing
                             return;
                         }
                         sql.Clear();
-                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        sql.Append("select nvl(pa_iostatus,0) pa_iostatus,pa_outno,pa_type from package where pa_outboxcode='" + pa_outboxcode.Text + "'");
                         dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dt.Rows.Count > 0)
                         {
+                            if (dt.Rows[0]["pa_type"].ToString() != "3")
+                            {
+                                OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "类型并非栈板,不允许操作\n", Color.Red);
+                                return;
+                            }
                             if (dt.Rows[0]["pa_outno"].ToString() != "")
                             {
                                 OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "已被出货单" + dt.Rows[0]["pa_outno"].ToString() + "采集,不允许操作\n", Color.Red);