From 401a32e3d21a38d542d1c6e83c968dadfffccc9c Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期三, 18 九月 2024 21:41:41 +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