服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-07-17 800a881cec2b5e652e0a85b0897ecb64c6a8a71a
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);
            }
        }
    }
}