章政 8 سال پیش
والد
کامیت
62e79f4964
2فایلهای تغییر یافته به همراه17 افزوده شده و 16 حذف شده
  1. 14 14
      UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs
  2. 3 2
      UAS-MES/PublicMethod/LogicHandler.cs

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

@@ -218,21 +218,21 @@ namespace UAS_MES.Make
                         //如果未装满的话
                         CollectBox();
                     }
-                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, outboxcode);
-                }
-                else
-                {
-                    List<string> SQLS = new List<string>();
-                    //删除明细
-                    SQLS.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "' and pd_innerboxcode='" + outboxcode.Text + "'");
-                    //减少箱内容量
-                    SQLS.Add("update package set pa_packageqty=pa_packageqty-1,pa_totalqty=pa_totalqty-(select pa_totalqty from package where pa_outboxcode='" + outboxcode.Text + "'),pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
-                    SQLS.Add("update package set pa_mothercode='' where pa_outboxcode='" + outboxcode.Text + "'");
-                    dh.ExecuteSQLTran(SQLS.ToArray());
-                    LoadCollectNum();
-                    LoadGridData();
-                    outboxcode.Clear();
+                    else
+                    {
+                        List<string> SQLS = new List<string>();
+                        //删除明细
+                        SQLS.Add("delete from packagedetail where pd_outboxcode='" + pa_outboxcode.Text + "' and pd_innerboxcode='" + outboxcode.Text + "'");
+                        //减少箱内容量
+                        SQLS.Add("update package set pa_packageqty=pa_packageqty-1,pa_totalqty=pa_totalqty-(select pa_totalqty from package where pa_outboxcode='" + outboxcode.Text + "'),pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'");
+                        SQLS.Add("update package set pa_mothercode='' where pa_outboxcode='" + outboxcode.Text + "'");
+                        dh.ExecuteSQLTran(SQLS.ToArray());
+                        LoadCollectNum();
+                        LoadGridData();
+                        outboxcode.Clear();
+                    }
                 }
+                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, outboxcode);
             }
         }
 

+ 3 - 2
UAS-MES/PublicMethod/LogicHandler.cs

@@ -594,6 +594,7 @@ namespace UAS_MES.PublicMethod
                     sql.Append(" set ms_stepcode='" + CurrentStep + "',ms_stepname='" + CurrentStepName + "',");
                     sql.Append("ms_nextstepcode='" + nextstepcode + "', ms_sccode = '" + iSourceCode + "',ms_paststep = ");
                     sql.Append("ms_paststep || case when " + ifpast + " > 0 then ',' || '" + ifpast + "' end");
+                    ExeSQL.Add(sql.ToString());
                 }
                 else
                 {
@@ -635,8 +636,8 @@ namespace UAS_MES.PublicMethod
             //更新工序会上一执行步骤
             sql.Clear();
             sql.Append("merge into makeserial using mes_package_view on (v_outboxcode='"+ iOutBoxCode + "' and ms_sncode=");
-            sql.Append("v_barcode and ms_makecode=v_makecode) when matched then update set ms_nextstepcode=ms_stepcode, ");
-            sql.Append(" ,ms_status=1,ms_sccode='" + iSourceCode + "' ");
+            sql.Append("v_barcode and ms_makecode=v_makecode) when matched then update set ms_nextstepcode=ms_stepcode");
+            sql.Append(",ms_status=1,ms_sccode='" + iSourceCode + "' ");
             ExeSQL.Add(sql.ToString());
             //更新完工数量
             ExeSQL.Add("update make set ma_madeqty=(select count(1) from makeserial where ms_makecode='" + iMakeCode + "' and ms_status=2) where ma_code='" + iMakeCode + "'");