From 8acdbcfbe06832f35963201c5bacd86dc3e7092d Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期一, 14 十月 2024 10:54:20 +0800 Subject: [PATCH] WCS --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs" index 9518cfe..6dffe4e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Core/BaseServices/ServiceBase.cs" @@ -263,7 +263,7 @@ } Type detailType = typeof(TEntity).GetDetailType(); - MethodInfo? methodInfo = GetType().GetMethod("AddDataIncludesDetail"); + MethodInfo? methodInfo = GetType().GetMethod(nameof(AddDataIncludesDetail)); methodInfo = methodInfo?.MakeGenericMethod(new Type[] { detailType }); object? obj = methodInfo?.Invoke(this, new object[] { entity, detailType, saveModel.DetailData }); return obj as WebResponseContent; @@ -373,27 +373,27 @@ TEntity entity = saveModel.MainData.DicToModel<TEntity>(); - List<string> listCol = new List<string>(); - foreach (var item in saveModel.MainData) - { - PropertyInfo propertyInfo = typeof(TEntity).GetProperty(item.Key); - if (propertyInfo == null) - { - propertyInfo = typeof(TEntity).GetProperty(item.Key.FirstLetterToLower()); - if (propertyInfo == null) - { - propertyInfo = typeof(TEntity).GetProperty(item.Key.FirstLetterToUpper()); - } - } + //List<string> listCol = new List<string>(); + //foreach (var item in saveModel.MainData) + //{ + // PropertyInfo propertyInfo = typeof(TEntity).GetProperty(item.Key); + // if (propertyInfo == null) + // { + // propertyInfo = typeof(TEntity).GetProperty(item.Key.FirstLetterToLower()); + // if (propertyInfo == null) + // { + // propertyInfo = typeof(TEntity).GetProperty(item.Key.FirstLetterToUpper()); + // } + // } - listCol.Add(propertyInfo?.Name); - } + // listCol.Add(propertyInfo?.Name); + //} if (saveModel.DetailData == null || saveModel.DetailData.Count == 0) { - if (list != null) - listCol = listCol.Where(x => !list.Contains(x)).ToList(); - bool result = BaseDal.UpdateData(entity, listCol, list); + //if (list != null) + // listCol = listCol.Where(x => !list.Contains(x)).ToList(); + bool result = BaseDal.UpdateData(entity); return WebResponseContent.Instance.OK(); } @@ -403,7 +403,7 @@ } Type detailType = typeof(TEntity).GetDetailType(); - MethodInfo? methodInfo = GetType().GetMethod("UpdateDataInculdesDetail"); + MethodInfo? methodInfo = GetType().GetMethod(nameof(UpdateDataInculdesDetail)); methodInfo = methodInfo?.MakeGenericMethod(new Type[] { detailType }); object? obj = methodInfo?.Invoke(this, new object[] { entity, detailType, saveModel.DetailData, saveModel.DelKeys }); return obj as WebResponseContent; -- Gitblit v1.9.3