From 092991fec504315c609ca69e00ea214e32401c05 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期六, 06 七月 2024 22:24:47 +0800
Subject: [PATCH] 优化实体

---
 Tiger.Business/MES/Biz.Route.cs |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/Tiger.Business/MES/Biz.Route.cs b/Tiger.Business/MES/Biz.Route.cs
index 3cf9ded..c36570e 100644
--- a/Tiger.Business/MES/Biz.Route.cs
+++ b/Tiger.Business/MES/Biz.Route.cs
@@ -379,6 +379,36 @@
                 }
                 return await Task.FromResult(result);
             }
+
+            /// <summary>
+            /// 淇濆瓨鑺傜偣宀椾綅璧勬簮
+            /// </summary>
+            /// <param name="nodePost"></param>
+            /// <returns></returns>
+            public async Task<ApiAction> SaveRouteNodePost(List<MES_ROUTE_NODE_POST> nodePost) {
+                var result = new ApiAction();
+                try
+                {
+                    var db = Db;
+                    var dbTran = db.UseTran(() =>
+                    {
+                        var y = db.Storageable(nodePost)
+                           .ToStorage();
+                        y.AsInsertable.ExecuteCommand();
+                        y.AsUpdateable.ExecuteCommand();
+                    });
+                    if (!dbTran.IsSuccess)
+                    {
+                        result.IsSuccessed = false;
+                        result.LocaleMsg = new($"淇濆瓨鑺傜偣宀椾綅璧勬簮鏁版嵁寮傚父");
+                    }
+                }
+                catch (Exception ex)
+                {
+                    result.CatchExceptionWithLog(ex, "淇濆瓨鑺傜偣宀椾綅璧勬簮鏁版嵁寮傚父");
+                }
+                return await Task.FromResult(result);
+            }
         }
     }
 }

--
Gitblit v1.9.3