服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-07-06 092991fec504315c609ca69e00ea214e32401c05
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);
            }
        }
    }
}