Browse Source

修改采集箱数量为2的BUG

章政 8 years ago
parent
commit
5126a8625d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

+ 2 - 2
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -120,11 +120,10 @@ namespace UAS_MES.Make
                     return;
                 }
                 sql.Clear();
-                sql.Append("select count(0) cn from package left join packagedetail on pa_id=pd_paid  where ");
+                sql.Append("select count(0) cn from packagedetail left join package on pa_id=pd_paid where ");
                 sql.Append("pa_outboxcode='" + bigoutboxcode.Text + "'");
                 int packageqty = int.Parse((dh.ExecuteSql(sql.GetString(), "select") as DataTable).Rows[0][0].ToString());
                 //如果未装满的话
-                Console.WriteLine(packageqty);
                 if (packageqty < pa_totqty)
                 {
                     if (dh.CheckExist("Package", "pa_outboxcode='" + outboxcode.Text + "' and nvl(pa_type,1)=1"))
@@ -155,6 +154,7 @@ namespace UAS_MES.Make
                                     OperateResult.AppendText(">>箱已装满,自动打印!\n", Color.Green);
                                     Printlab.PerformClick();
                                 }
+                                OperateResult.AppendText(">>大箱"+ bigoutboxcode.Text + "已采集满\n", Color.Green);
                                 bigoutboxcode.Text = LogicHandler.GetOutBoxCode("PACKAGE", "", 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_totalqty)values");