From 507be0f76a93abfd825ce7fbf192cc098b978f10 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期日, 14 七月 2024 01:47:52 +0800 Subject: [PATCH] MES采集工序,测试工序,包装工序 --- 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