From b0dc8869680168a0c8fda011f8ae2492d843c159 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期二, 06 八月 2024 12:02:48 +0800
Subject: [PATCH] 已完成所有工步更新

---
 Tiger.Business.WMS/Transaction/ProductionMaterialReq.cs |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/ProductionMaterialReq.cs b/Tiger.Business.WMS/Transaction/ProductionMaterialReq.cs
index 84e7d6e..cb6742e 100644
--- a/Tiger.Business.WMS/Transaction/ProductionMaterialReq.cs
+++ b/Tiger.Business.WMS/Transaction/ProductionMaterialReq.cs
@@ -120,6 +120,7 @@
                     return action;
                 }
 
+                Biz.Db.Deleteable<WMS_ITEM_POOL>().Where(q => q.TRANS_CODE == req.BILLCODE).ExecuteCommand();
                 //濡傛灉涓婁竴娆℃帹鑽愭湁鏁版嵁锛屽垯鍏堢伃鎺変寒鐨勭伅
                 if (Suggests.Any())
                 {
@@ -265,18 +266,8 @@
                 }
 
                 //淇濆瓨鐗╂枡姹犲埌鏁版嵁搴�
-                var db = Biz.Db;
-                var dbTran = db.UseTran(() =>
-                {
-                    db.Deleteable<WMS_ITEM_POOL>().Where(x => x.TRANS_NO == req.BILLCODE).ExecuteCommand();
-                    db.Insertable(CurPoolList).ExecuteCommand();
-                });
-                if (!dbTran.IsSuccess)
-                {
-                    Logger.Default.Fatal(dbTran.ErrorException, "Database transaction save exception");
-                    this.Close(!dbTran.IsSuccess);
-                    throw dbTran.ErrorException;
-                }
+                Biz.Db.Insertable(CurPoolList).ExecuteCommand();
+               
                 action = await LightAll(new() { AuthOption = input.AuthOption, ReqType = CurReqType, Color = LedColor.Blue });
             }
             catch (Exception ex)

--
Gitblit v1.9.3