diff --git a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs index d5944d2f..6daa0a53 100644 --- a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs @@ -251,5 +251,18 @@ public static class MultiLanguageConst public const string CodeLaneImportNoData = "Code_Lane_Import_No_Data"; [Description("存在已导入的航线信息")] public const string CodeLaneImportAlready = "Code_Lane_Import_Already"; + + [Description("付费方式已存在")] + public const string CodeFrtExist = "Code_Frt_Exist"; + [Description("付费方式导入无数据")] + public const string CodeFrtImportNoData = "Code_Frt_Import_No_Data"; + [Description("存在已导入的付费方式")] + public const string CodeFrtImportAlready = "Code_Frt_Import_Already"; + [Description("结算方式已存在")] + public const string CodeStlModeExist = "Code_StlMode_Exist"; + [Description("结算方式导入无数据")] + public const string CodeStlModeImportNoData = "Code_StlMode_Import_No_Data"; + [Description("存在已导入的结算方式")] + public const string CodeStlModeImportAlready = "Code_StlMode_Import_Already"; #endregion } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/DS.Module.Core.csproj b/ds-wms-service/DS.Module.Core/DS.Module.Core.csproj index 3591c2aa..c63fee60 100644 --- a/ds-wms-service/DS.Module.Core/DS.Module.Core.csproj +++ b/ds-wms-service/DS.Module.Core/DS.Module.Core.csproj @@ -19,11 +19,16 @@ - + - + + + + + + diff --git a/ds-wms-service/DS.Module.Core/Extensions/Extensions.cs b/ds-wms-service/DS.Module.Core/Extensions/Extensions.cs index 901d15d0..9117db2f 100644 --- a/ds-wms-service/DS.Module.Core/Extensions/Extensions.cs +++ b/ds-wms-service/DS.Module.Core/Extensions/Extensions.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using System.ComponentModel; using System.Reflection; +using Newtonsoft.Json.Linq; namespace DS.Module.Core.Extensions; @@ -460,4 +461,33 @@ public static partial class Extensions string[] propertyNames = keyName.Split("."); return propertyNames.Select(o => type.GetProperty(o)).FirstOrDefault()?.Name; } + + /// + /// 获取long值 + /// + /// + /// + /// + public static long GetLongValue(this JObject jobj, string prop) + { + var jt = jobj[prop]; + if (jt == null) + { + return 0; + } + + var strVal = jt.ToString(); + long rtnVal = 0; + long.TryParse(strVal, out rtnVal); + return rtnVal; + } + /// + /// Object 转 JSON字符串 + /// + /// + /// + public static string ToJsonString(this object obj) + { + return obj == null ? string.Empty : JsonConvert.SerializeObject(obj); + } } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/Filters/GlobalExceptionsFilter.cs b/ds-wms-service/DS.Module.Core/Filters/GlobalExceptionsFilter.cs index 1bac77f6..154ba3c1 100644 --- a/ds-wms-service/DS.Module.Core/Filters/GlobalExceptionsFilter.cs +++ b/ds-wms-service/DS.Module.Core/Filters/GlobalExceptionsFilter.cs @@ -4,6 +4,10 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using NLog; using System.Text; +using System.Text.RegularExpressions; +using DS.Module.Core.Log; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; namespace DS.Module.Core.Filters; @@ -14,10 +18,13 @@ public class GlobalExceptionsFilter : IExceptionFilter { private readonly IHostingEnvironment _env; private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); - - public GlobalExceptionsFilter(IHostingEnvironment env) + private readonly IServiceProvider _serviceProvider; + private readonly SqlSugarScope db; + public GlobalExceptionsFilter(IHostingEnvironment env, IServiceProvider serviceProvider) { - _env = env; + _env = env; + _serviceProvider = serviceProvider; + db = (SqlSugarScope)_serviceProvider.GetRequiredService(); } public void OnException(ExceptionContext context) @@ -46,6 +53,32 @@ public class GlobalExceptionsFilter : IExceptionFilter exMsg.AppendLine($"【堆栈跟踪:】{context.Exception.StackTrace}"); // logger.LogError(exMsg.ToString()); Logger.Log(NLog.LogLevel.Error, exMsg.ToString()); + + #region 写入日志库 + + var className = context.Exception.TargetSite.DeclaringType?.FullName; + var groupCollection = Regex.Match(className, "<(.*?)>").Groups; + var methodName = ""; + if (groupCollection.Count > 1) + { + methodName = groupCollection[1].Value; + } + var exLog = new SysLogException() + { + ClassName = className, + MethodName = methodName, + ExceptionName = context.Exception.Message, + ExceptionMsg = context.Exception.Message, + ExceptionSource = context.Exception.Source, + StackTrace = context.Exception.StackTrace, + ParamsObj = context.Exception.TargetSite.GetParameters().ToString(), + }; + + db.GetConnection(1288018625843826680).Insertable(exLog).ExecuteCommand(); + + #endregion + + // Logger.Log(NLog.LogLevel.Info, "异常信息:" + JsonConvert.SerializeObject(context.Exception)); //采用log4net 进行错误日志记录 //_loggerHelper.Error(json.Message, WriteLog(json.Message, context.Exception)); diff --git a/ds-wms-service/DS.Module.Core/Filters/OperationLogFilter.cs b/ds-wms-service/DS.Module.Core/Filters/OperationLogFilter.cs new file mode 100644 index 00000000..6f0eb1a2 --- /dev/null +++ b/ds-wms-service/DS.Module.Core/Filters/OperationLogFilter.cs @@ -0,0 +1,81 @@ +using System.Diagnostics; +using System.Security.Claims; +using DS.Module.Core.Extensions; +using DS.Module.Core.Log; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; +using NetTaste; +using Newtonsoft.Json.Linq; +using SqlSugar; +using Parser = UAParser.Parser; + +namespace DS.Module.Core.Filters; + +/// +/// 操作日志 过滤器 +/// +public class OperationLogFilter: IAsyncActionFilter +{ + private readonly IServiceProvider _serviceProvider; + private readonly SqlSugarScope db; + public OperationLogFilter(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = (SqlSugarScope)_serviceProvider.GetRequiredService(); + } + public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) + { + var httpContext = context.HttpContext; + var httpRequest = httpContext.Request; + + var sw = new Stopwatch(); + sw.Start(); + var actionContext = await next(); + sw.Stop(); + + var sw2 = Stopwatch.StartNew(); + + //判断是否请求成功(没有异常就是请求成功) + var isRequestSucceed = actionContext.Exception == null; + var headers = httpRequest.Headers; + var clientInfo = headers.ContainsKey("User-Agent") ? Parser.GetDefault().Parse(headers["User-Agent"]) : null; + var actionDescriptor = context.ActionDescriptor as ControllerActionDescriptor; + var isWriteLog = false; + + //请求异常时记录日志 + if (!isRequestSucceed || AppSetting.app("Middleware", "RecordAccessLogs", "Enabled").ObjToBool()) + { + isWriteLog = true; + } + + var res = actionContext.Result?.GetType() == typeof(DataResult) ? actionContext.Result.ToJsonString() : ""; + if (isWriteLog) + { + var log = new SysLogOperation() + { + // Name = context.User?.FindFirstValue(ClaimConst.CLAINM_NAME), + Ip = HttpUtil.GetClientIP(httpContext), + Success = isRequestSucceed ? true : false, + Location = HttpUtil.GetRequestUrlAddress(httpRequest), + Browser = clientInfo?.UA.Family + clientInfo?.UA.Major, + Os = clientInfo?.OS.Family + clientInfo?.OS.Major, + Url = httpRequest.Path, + ClassName = context.Controller.ToString(), + MethodName = actionDescriptor?.ActionName, + ReqMethod = httpRequest.Method, + Param = context.ActionArguments.Count < 1 ? "" : context.ActionArguments.ToJsonString(), + Result = actionContext.Result.ToJsonString(), + ElapsedTime = sw.ElapsedMilliseconds, + OpTime = DateTime.Now, + }; + + await db.GetConnection(1288018625843826680).Insertable(log).ExecuteCommandAsync(); + httpContext.Response.Headers["CheckTimeActionExecute"] = sw.ElapsedMilliseconds.ToString(); + + sw2.Stop(); + httpContext.Response.Headers["CheckTimeRequestActionFilter"] = sw2.ElapsedMilliseconds.ToString(); + } + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/Log/SysLogAudit.cs b/ds-wms-service/DS.Module.Core/Log/SysLogAudit.cs new file mode 100644 index 00000000..30bd3537 --- /dev/null +++ b/ds-wms-service/DS.Module.Core/Log/SysLogAudit.cs @@ -0,0 +1,60 @@ +using DS.Module.Core.Data; +using SqlSugar; + +namespace DS.Module.Core.Log; + +/// +/// 系统审计日志 +/// +[global::SqlSugar.SugarTable("sys_log_audit")] +public class SysLogAudit: BaseTenantModel +{ + /// + /// 主键id + /// + public long KeyId { get; set; } + + /// + /// sql语句 + /// + [SugarColumn(ColumnDescription = "sql语句", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string Sql { get; set; } + /// + /// 请求参数 + /// + [SugarColumn(ColumnDescription = "请求参数", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string Param { get; set; } + /// + /// 旧值 + /// + [SugarColumn(ColumnDescription = "旧值", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string OldValue { get; set; } + /// + /// 新值 + /// + [SugarColumn(ColumnDescription = "新值", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string NewValue { get; set; } + /// + /// 业务数据 + /// + [SugarColumn(ColumnDescription = "业务数据", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string AopData { get; set; } + /// + /// 差异数据 + /// + [SugarColumn(ColumnDescription = "差异数据", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string DiffData { get; set; } + + + // /// + // /// 创建人姓名 + // /// + // public string CreateUser { get; set; } + + /// + /// 操作方式:新增、更新、删除 + /// + + [SugarColumn(ColumnDescription = "操作方式:新增、更新、删除")] + public string OperateType { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/Log/SysLogException.cs b/ds-wms-service/DS.Module.Core/Log/SysLogException.cs new file mode 100644 index 00000000..44aea1c6 --- /dev/null +++ b/ds-wms-service/DS.Module.Core/Log/SysLogException.cs @@ -0,0 +1,74 @@ +using System.ComponentModel; +using SqlSugar; + +namespace DS.Module.Core.Log; + +/// +/// 异常访问日志 +/// +[global::SqlSugar.SugarTable("sys_log_exception")] +public class SysLogException +{ + /// + /// ID + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 类名称 + /// + public string ClassName { get; set; } + + /// + /// 方法名称 + /// + public string MethodName { get; set; } + /// + /// 异常名称 + /// + public string ExceptionName { get; set; } + + /// + /// 异常信息 + /// + [SugarColumn(ColumnDescription = "异常信息", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string ExceptionMsg { get; set; } + + /// + /// 异常源 + /// + [SugarColumn(ColumnDescription = "异常源", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string ExceptionSource { get; set; } + + /// + /// 堆栈信息 + /// + [SugarColumn(ColumnDescription = "堆栈信息", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string StackTrace { get; set; } + /// + /// 参数对象 + /// + [SugarColumn(ColumnDescription = "参数对象", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string ParamsObj { get; set; } + /// + /// 创建时间 + /// + [Description("创建时间")] + [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")] + public DateTime CreateTime { get; set; } + + /// + /// 创建人 + /// + [Description("创建人")] + [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true, ColumnDescription = "创建人")] + public string CreateBy { get; set; } + + + /// + /// 租户id + /// + public long? TenantId { get; set; } + +} \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/Log/SysLogOperation.cs b/ds-wms-service/DS.Module.Core/Log/SysLogOperation.cs new file mode 100644 index 00000000..d697e785 --- /dev/null +++ b/ds-wms-service/DS.Module.Core/Log/SysLogOperation.cs @@ -0,0 +1,112 @@ +using System.ComponentModel; +using SqlSugar; + +namespace DS.Module.Core.Log; + +/// +/// 系统操作日志 +/// +[global::SqlSugar.SugarTable("sys_log_operation")] +public class SysLogOperation +{ + /// + /// ID + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 业务id + /// + public long? KeyId { get; set; } + + + + /// + /// 是否执行成功(true-是,false-否) + /// + public bool Success { get; set; } = true; + + /// + /// 请求参数 + /// + [SugarColumn(ColumnDescription = "请求参数", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string Param { get; set; } + + + /// + /// IP + /// + public string Ip { get; set; } + + /// + /// 地址 + /// + public string Location { get; set; } + + /// + /// 浏览器 + /// + public string Browser { get; set; } + + /// + /// 操作系统 + /// + public string Os { get; set; } + + /// + /// 请求地址 + /// + public string Url { get; set; } + + /// + /// 类名称 + /// + public string ClassName { get; set; } + + /// + /// 方法名称 + /// + public string MethodName { get; set; } + + /// + /// 请求方式(GET POST PUT DELETE) + /// + public string ReqMethod { get; set; } + /// + /// 返回结果 + /// + [SugarColumn(ColumnDescription = "返回结果", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] + public string Result { get; set; } + + /// + /// 耗时(毫秒) + /// + public long ElapsedTime { get; set; } + + /// + /// 操作时间 + /// + public DateTime OpTime { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")] + public DateTime CreateTime { get; set; } + + /// + /// 创建人 + /// + [Description("创建人")] + [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true, ColumnDescription = "创建人")] + public string CreateBy { get; set; } + + + /// + /// 租户id + /// + public long? TenantId { get; set; } + +} \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/Log/SysLogVisit.cs b/ds-wms-service/DS.Module.Core/Log/SysLogVisit.cs new file mode 100644 index 00000000..2b2bed70 --- /dev/null +++ b/ds-wms-service/DS.Module.Core/Log/SysLogVisit.cs @@ -0,0 +1,67 @@ +using System.ComponentModel; +using SqlSugar; + +namespace DS.Module.Core.Log; + +/// +/// 系统访问日志 +/// +[global::SqlSugar.SugarTable("sys_log_visit")] +public class SysLogVisit +{ + /// + /// ID + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 访问类型 0 登录 1 登出 + /// + public int LoginType { get; set; } + + /// + /// 是否执行成功(true-是,false-否) + /// + public bool Success { get; set; } = true; + + /// + /// 登录Id + /// + public long UserId { get; set; } + /// + /// 登录账户 + /// + public string UserCode { get; set; } + + /// + /// 用户姓名 + /// + public string UserName { get; set; } + + /// + /// 操作时间 + /// + public DateTime OpTime { get; set; } + + /// + /// 消息 + /// + public string Message { get; set; } + + + /// + /// 创建时间 + /// + [Description("创建时间")] + [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")] + public DateTime CreateTime { get; set; } + + + + /// + /// 租户id + /// + public long? TenantId { get; set; } + +} \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/Utils/HttpUtil.cs b/ds-wms-service/DS.Module.Core/Utils/HttpUtil.cs new file mode 100644 index 00000000..ef638176 --- /dev/null +++ b/ds-wms-service/DS.Module.Core/Utils/HttpUtil.cs @@ -0,0 +1,50 @@ +using System.Text; +using DS.Module.Core.Extensions; +using Microsoft.AspNetCore.Http; + +namespace DS.Module.Core; + +/// +/// +/// +public static class HttpUtil +{ + public static string GetClientIP(HttpContext context) + { + var ip = context.Request.Headers["X-Forwarded-For"].ObjToString(); + if (string.IsNullOrEmpty(ip)) + { + ip = context.Connection.RemoteIpAddress.ObjToString(); + } + + return ip; + } + + /// + /// 获取响应内容 + /// + /// + /// + public static async Task GetResponse(HttpResponse response) + { + response.Body.Seek(0, SeekOrigin.Begin); + var text = await new StreamReader(response.Body).ReadToEndAsync(); + response.Body.Seek(0, SeekOrigin.Begin); + return text; + } + + // +// 摘要: +// 获取完整请求地址 +// +// 参数: +// request: + public static string GetRequestUrlAddress(HttpRequest request) + { + return new StringBuilder().Append(request.Scheme).Append("://").Append(request.Host) + .Append(request.PathBase) + .Append(request.Path) + .Append(request.QueryString) + .ToString(); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Core/Utils/JwtHelper.cs b/ds-wms-service/DS.Module.Core/Utils/JwtHelper.cs index dd440366..ef06c086 100644 --- a/ds-wms-service/DS.Module.Core/Utils/JwtHelper.cs +++ b/ds-wms-service/DS.Module.Core/Utils/JwtHelper.cs @@ -75,7 +75,7 @@ public class JwtHelper new Claim(JwtRegisteredClaimNames.Aud, aud), // 接收者 // new Claim("OrgId", data.OrgId), // 公司ID - + new Claim("UserName", data.Name), // UserName new Claim("TenantId", data.TenantId), // 租户ID }; @@ -150,7 +150,10 @@ public class JwtHelper /// Id /// public string Uid { get; set; } - + /// + /// Name + /// + public string Name { get; set; } /// /// GID /// diff --git a/ds-wms-service/DS.Module.Middleware/DS.Module.Middleware.csproj b/ds-wms-service/DS.Module.Middleware/DS.Module.Middleware.csproj new file mode 100644 index 00000000..a30dc69b --- /dev/null +++ b/ds-wms-service/DS.Module.Middleware/DS.Module.Middleware.csproj @@ -0,0 +1,20 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + diff --git a/ds-wms-service/DS.Module.Middleware/OperationLogMiddleware.cs b/ds-wms-service/DS.Module.Middleware/OperationLogMiddleware.cs new file mode 100644 index 00000000..d1103619 --- /dev/null +++ b/ds-wms-service/DS.Module.Middleware/OperationLogMiddleware.cs @@ -0,0 +1,193 @@ +using System.Diagnostics; +using System.Security.Claims; +using System.Text; +using System.Web; +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.Core.Log; +using DS.Module.UserModule; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.Extensions.DependencyInjection; +using NetTaste; +using Newtonsoft.Json; +using SqlSugar; +using UAParser; +using Parser = UAParser.Parser; + +namespace DS.Module.Middleware; + +/// +/// 中间件 +/// 记录用户方访问数据 +/// +public class OperationLogMiddleware +{ + /// + /// + /// + private readonly RequestDelegate _next; + + private Stopwatch _stopwatch; + private readonly IUser user; + private readonly IServiceProvider _serviceProvider; + private readonly SqlSugarScope db; + + /// + /// + /// + /// + public OperationLogMiddleware(RequestDelegate next, IServiceProvider serviceProvider) + { + _next = next; + + _stopwatch = new Stopwatch(); + _serviceProvider = serviceProvider; + user = _serviceProvider.GetRequiredService(); + db = (SqlSugarScope)_serviceProvider.GetRequiredService(); + } + + public async Task InvokeAsync(HttpContext context) + { + if (AppSetting.app("Middleware", "RecordAccessLogs", "Enabled").ObjToBool()) + { + var api = context.Request.Path.ObjToString().TrimEnd('/').ToLower(); + if (context.Request.Path.HasValue + && + ( + context.Request.Path.Value.IndexOf("SignalR", StringComparison.InvariantCultureIgnoreCase) > -1 + || context.Request.Path.Value.IndexOf("swagger", StringComparison.InvariantCultureIgnoreCase) > -1 + || context.Request.Path.Value.IndexOf("HealthCheck", StringComparison.InvariantCultureIgnoreCase) > + -1 + ) + ) + { + await _next(context); + } + + var ignoreApis = AppSetting.app("Middleware", "RecordAccessLogs", "IgnoreApis"); + + // 过滤,只有接口 + if (api.Contains("api") && !ignoreApis.Contains(api)) + { + _stopwatch.Restart(); + HttpRequest request = context.Request; + //判断是否请求成功(没有异常就是请求成功) + var headers = request.Headers; + var clientInfo = headers.ContainsKey("User-Agent") + ? Parser.GetDefault().Parse(headers["User-Agent"]) + : null; + var isWriteLog = false; + + var log = new SysLogOperation() + { + // Name = context.User?.FindFirstValue(ClaimConst.CLAINM_NAME), + Ip = GetClientIP(context), + Location = GetRequestUrlAddress(request), + Browser = clientInfo?.UA.Family + clientInfo?.UA.Major, + Os = clientInfo?.OS.Family + clientInfo?.OS.Major, + Url = request.Path, + // ClassName = context.Controller.ToString(), + // MethodName = actionDescriptor?.ActionName, + ReqMethod = request.Method, + OpTime = DateTime.Now, + }; + + // 获取请求body内容 + if (request.Method.ToLower().Equals("post") || request.Method.ToLower().Equals("put")) + { + // 启用倒带功能,就可以让 Request.Body 可以再次读取 + request.EnableBuffering(); + + Stream stream = request.Body; + byte[] buffer = new byte[request.ContentLength.Value]; + stream.Read(buffer, 0, buffer.Length); + log.Param = Encoding.UTF8.GetString(buffer); + + request.Body.Position = 0; + } + else if (request.Method.ToLower().Equals("get") || request.Method.ToLower().Equals("delete")) + { + log.Param = + HttpUtility.UrlDecode(request.QueryString.ObjToString(), Encoding.UTF8); + } + await _next(context); + // // 获取Response.Body内容 + // var originalBodyStream = context.Response.Body; + // + // using (var responseBody = new MemoryStream()) + // { + // context.Response.Body = responseBody; + // log.Result = await GetResponse(context.Response); + // + // await responseBody.CopyToAsync(originalBodyStream); + // } + + // 响应完成记录时间和存入日志 + context.Response.OnCompleted(() => + { + _stopwatch.Stop(); + + if (context.Response.StatusCode == 200 && !context.Response.HasStarted) + { + log.Success = true; + } + else + { + log.Success = false; + } + + log.ElapsedTime = _stopwatch.ElapsedMilliseconds; + + return Task.CompletedTask; + }); + } + else + { + await _next(context); + } + } + else + { + await _next(context); + } + } + + public static string GetClientIP(HttpContext context) + { + var ip = context.Request.Headers["X-Forwarded-For"].ObjToString(); + if (string.IsNullOrEmpty(ip)) + { + ip = context.Connection.RemoteIpAddress.ObjToString(); + } + + return ip; + } + /// + /// 获取响应内容 + /// + /// + /// + public async Task GetResponse(HttpResponse response) + { + response.Body.Seek(0, SeekOrigin.Begin); + var text = await new StreamReader(response.Body).ReadToEndAsync(); + response.Body.Seek(0, SeekOrigin.Begin); + return text; + } + // +// 摘要: +// 获取完整请求地址 +// +// 参数: +// request: + public static string GetRequestUrlAddress(HttpRequest request) + { + return new StringBuilder().Append(request.Scheme).Append("://").Append(request.Host) + .Append(request.PathBase) + .Append(request.Path) + .Append(request.QueryString) + .ToString(); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.Module.MultiLanguage/DS.Module.MultiLanguage.csproj b/ds-wms-service/DS.Module.MultiLanguage/DS.Module.MultiLanguage.csproj index ad46ef94..acffd9ee 100644 --- a/ds-wms-service/DS.Module.MultiLanguage/DS.Module.MultiLanguage.csproj +++ b/ds-wms-service/DS.Module.MultiLanguage/DS.Module.MultiLanguage.csproj @@ -13,4 +13,8 @@ + + + + diff --git a/ds-wms-service/DS.Module.MultiLanguage/IMultiLanguageService.cs b/ds-wms-service/DS.Module.MultiLanguage/IMultiLanguageService.cs index f62abe43..393b8922 100644 --- a/ds-wms-service/DS.Module.MultiLanguage/IMultiLanguageService.cs +++ b/ds-wms-service/DS.Module.MultiLanguage/IMultiLanguageService.cs @@ -9,4 +9,5 @@ public interface IMultiLanguageService /// /// public string GetMultiLanguageInfo(string multiCode,string language); + } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageMiddleware.cs b/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageMiddleware.cs index c694de7d..413dbfea 100644 --- a/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageMiddleware.cs +++ b/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageMiddleware.cs @@ -1,13 +1,21 @@ +using System.Diagnostics; using System.Text; +using System.Web; using DS.Module.Core; using DS.Module.Core.Extensions; +using DS.Module.Core.Log; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Routing; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using NetTaste; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using SqlSugar; - +using Parser = UAParser.Parser; namespace DS.Module.MultiLanguage; /// @@ -19,12 +27,14 @@ public class MultiLanguageMiddleware public IMultiLanguageService _invokeService; private readonly IServiceProvider _serviceProvider; private readonly SqlSugarScope db; - + private Stopwatch _stopwatch; public MultiLanguageMiddleware(RequestDelegate next, IServiceProvider serviceProvider) { _next = next; + _stopwatch = new Stopwatch(); _serviceProvider = serviceProvider; _invokeService = _serviceProvider.GetRequiredService(); + // db = (SqlSugarScope)_serviceProvider.GetRequiredService(); } public async Task Invoke(HttpContext context) @@ -46,9 +56,12 @@ public class MultiLanguageMiddleware // 过滤,只有接口 if (api.Contains("api")) { + _stopwatch.Restart(); + using (var ms = new MemoryStream()) { HttpResponse response = context.Response; + HttpRequest request = context.Request; var originalResponseBody = response.Body; using var newResponseBody = new MemoryStream(); response.Body = newResponseBody; @@ -58,7 +71,11 @@ public class MultiLanguageMiddleware await new StreamReader(response.Body).ReadToEndAsync(); var msg = JsonConvert.DeserializeObject(responseBodyText); - + var serializerSettings = new JsonSerializerSettings + { + // 设置为驼峰命名 + ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() + }; if (msg.IsNotEmptyOrNull()) { var type = context.Request.Headers["LanguageType"].FirstOrDefault(); @@ -66,11 +83,7 @@ public class MultiLanguageMiddleware { type = "CN"; } - var serializerSettings = new JsonSerializerSettings - { - // 设置为驼峰命名 - ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() - }; + if (msg.MultiCode.IsNotEmptyOrNull()) { //多语言处理返回信息 @@ -82,8 +95,87 @@ public class MultiLanguageMiddleware } } - } - + } + + // if (AppSetting.app("Middleware", "RecordAccessLogs", "Enabled").ObjToBool()) + // { + // + // var headers = request.Headers; + // var clientInfo = headers.ContainsKey("User-Agent") + // ? Parser.GetDefault().Parse(headers["User-Agent"]) + // : null; + // var controllerName = string.Empty; + // var endpoint = context.Features.Get()?.Endpoint; + // if (endpoint is RouteEndpoint routeEndpoint) + // { + // controllerName = routeEndpoint.Metadata.GetMetadata()?.ControllerName; + // } + // var log = new SysLogOperation() + // { + // // Name = context.User?.FindFirstValue(ClaimConst.CLAINM_NAME), + // Ip = HttpUtil.GetClientIP(context), + // Location = HttpUtil.GetRequestUrlAddress(request), + // Browser = clientInfo?.UA.Family + clientInfo?.UA.Major, + // Os = clientInfo?.OS.Family + clientInfo?.OS.Major, + // Url = request.Path, + // ClassName = controllerName, + // MethodName = context.GetRouteData().Values["action"].ToString(), + // ReqMethod = request.Method, + // OpTime = DateTime.Now, + // }; + // + // // 获取请求body内容 + // if (request.Method.ToLower().Equals("post") || request.Method.ToLower().Equals("put")) + // { + // // 启用倒带功能,就可以让 Request.Body 可以再次读取 + // request.EnableBuffering(); + // byte[] buffer = new byte[request.ContentLength.Value]; + // Stream stream = request.Body; + // + // await stream.ReadAsync(buffer, 0, buffer.Length); + // + // + // // request.Body.Seek(0, SeekOrigin.Begin); + // // using (var reader = new StreamReader(request.Body, Encoding.UTF8)) + // // { + // // //改为Async异步读流 + // // var data = await reader.ReadToEndAsync(); + // // log.Param = data; + // // // var obj = JObject.Parse(log.Param) ; + // // log.KeyId = data.IsNullOrEmpty() ? 0: JObject.Parse(data)?.GetLongValue("Id"); + // // } + // request.Body.Position = 0; + // log.Param = Encoding.UTF8.GetString(buffer); + // //TODO 待处理问题 KeyId + // // var obj = JObject.Parse(log.Param) ; + // // if (!log.Param.IsNullOrEmpty()) + // // { + // // log.KeyId = JObject.Parse(log.Param)?.GetLongValue("Id"); + // // } + // } + // else if (request.Method.ToLower().Equals("get") || request.Method.ToLower().Equals("delete")) + // { + // log.Param = + // HttpUtility.UrlDecode(request.QueryString.ObjToString(), Encoding.UTF8); + // } + // + // _stopwatch.Stop(); + // + // if (context.Response.StatusCode == 200 && !context.Response.HasStarted) + // { + // log.Success = true; + // } + // else + // { + // log.Success = false; + // } + // + // + // log.Result = JsonConvert.SerializeObject(msg, Formatting.None, serializerSettings); + // log.ElapsedTime = _stopwatch.ElapsedMilliseconds; + // await db.GetConnection(1288018625843826680).Insertable(log).ExecuteCommandAsync(); + // } + byte[] array = Encoding.UTF8.GetBytes(responseBodyText); using var newBodyStream = new MemoryStream(array); newBodyStream.Seek(0, SeekOrigin.Begin); @@ -93,4 +185,6 @@ public class MultiLanguageMiddleware } } } + + } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageService.cs b/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageService.cs index e0d219a6..990d6de7 100644 --- a/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageService.cs +++ b/ds-wms-service/DS.Module.MultiLanguage/MultiLanguageService.cs @@ -37,4 +37,5 @@ public class MultiLanguageService:IMultiLanguageService return result; } + } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj b/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj index 612d5873..6c205832 100644 --- a/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj +++ b/ds-wms-service/DS.Module.Nuget/DS.Module.Nuget.csproj @@ -34,6 +34,7 @@ + diff --git a/ds-wms-service/DS.Module.SqlSugar/DS.Module.SqlSugar.csproj b/ds-wms-service/DS.Module.SqlSugar/DS.Module.SqlSugar.csproj index 06436378..57f2af4a 100644 --- a/ds-wms-service/DS.Module.SqlSugar/DS.Module.SqlSugar.csproj +++ b/ds-wms-service/DS.Module.SqlSugar/DS.Module.SqlSugar.csproj @@ -9,6 +9,7 @@ + @@ -19,4 +20,8 @@ Always + + + + \ No newline at end of file diff --git a/ds-wms-service/DS.Module.SqlSugar/ISaasDbService.cs b/ds-wms-service/DS.Module.SqlSugar/ISaasDbService.cs index 8cd0e01b..8f82c38b 100644 --- a/ds-wms-service/DS.Module.SqlSugar/ISaasDbService.cs +++ b/ds-wms-service/DS.Module.SqlSugar/ISaasDbService.cs @@ -29,4 +29,10 @@ public interface ISaasDbService /// /// public SqlSugarScopeProvider GetMasterDbScope(); + + /// + /// 获取日志库信息 + /// + /// + public SqlSugarScopeProvider GetLogDb(); } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.SqlSugar/SaasDbService.cs b/ds-wms-service/DS.Module.SqlSugar/SaasDbService.cs index 409c08cb..6a536a37 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SaasDbService.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SaasDbService.cs @@ -62,6 +62,15 @@ public class SaasDbService : ISaasDbService return db.GetConnection("1288018625843826688"); } + /// + /// 获取日志库信息 + /// + /// + public SqlSugarScopeProvider GetLogDb() + { + return db.GetConnectionScope("1288018625843826680"); + } + /// /// 主库根据Id获取业务库Scope diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlSugarAppStartup.cs b/ds-wms-service/DS.Module.SqlSugar/SqlSugarAppStartup.cs index 36a1cc6f..33c21633 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlSugarAppStartup.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlSugarAppStartup.cs @@ -48,7 +48,7 @@ namespace DS.Module.SqlSugar builder.Services.AddScoped(typeof(DsDataAppService<>)); //sqlsugar注册 - builder.Services.AddSqlsugarInstall(); + builder.Services.AddSqlSugarInstall(); } } } \ No newline at end of file diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlSugarDiffUtil.cs b/ds-wms-service/DS.Module.SqlSugar/SqlSugarDiffUtil.cs new file mode 100644 index 00000000..47a73240 --- /dev/null +++ b/ds-wms-service/DS.Module.SqlSugar/SqlSugarDiffUtil.cs @@ -0,0 +1,78 @@ +using System.Text; +using SqlSugar; + +namespace DS.Module.SqlSugar; +/// +/// sqlsuagr差异帮助类 +/// +public static class SqlSugarDiffUtil +{ + /// + /// 比较两个数据对象的修改内容 + /// + /// + /// + /// + public static DiffLog GetDiff(List beforeData, List afterData) + { + string mianID = null; + if (beforeData != null) + { + var keyCoulumn = beforeData[0].Columns.FirstOrDefault(p => p.IsPrimaryKey == true); + if (keyCoulumn != null) + { + mianID = keyCoulumn.Value.ToString(); + } + } + else if (afterData != null) + { + var keyCoulumn = afterData[0].Columns.FirstOrDefault(p => p.IsPrimaryKey == true); + if (keyCoulumn != null) + { + mianID = keyCoulumn.Value.ToString(); + } + } + + StringBuilder sb = new StringBuilder(); + if (beforeData != null && afterData != null) + { + var befroeColumns = beforeData[0].Columns; + var afterCloums = afterData[0].Columns; + foreach (var item in befroeColumns) + { + if (IgnoreColumns.Contains(item.ColumnName)) + continue; + var afterItem = afterCloums.FirstOrDefault(p => p.ColumnName == item.ColumnName && !p.Value.Equals(item.Value)); + if (afterItem != null) + { + sb.Append($"[字段:{item.ColumnDescription},修改前:{item.Value},修改后:{afterItem.Value}]"); + } + } + } + + return new DiffLog { Id = mianID, DiffData = sb.ToString() }; + } + public class DiffLog + { + /// + /// 主键Id + /// + public string Id { get; set; } + /// + /// 差异数据 + /// + public string DiffData { get; set; } + } + + /// + /// 忽略的字段 + /// + private static readonly List IgnoreColumns = new List() + { + "CreateTime", + "CreateBy", + "UpdateTime", + "UpdateBy", + }; +} + diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlsugarAopHelper.cs b/ds-wms-service/DS.Module.SqlSugar/SqlsugarAopHelper.cs index 947bbb11..7366823e 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlsugarAopHelper.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlsugarAopHelper.cs @@ -1,5 +1,7 @@ -using Ds.Modules.DsEntity.log; +using DS.Module.Core; +using Ds.Modules.DsEntity.log; using DS.Module.Core.Data; +using DS.Module.Core.Extensions; using DS.Module.UserModule; using Newtonsoft.Json; using SqlSugar; @@ -46,23 +48,71 @@ namespace DS.Module.SqlSugar dbProvider.Aop.DataExecuting = (oldValue, entityInfo) => { // 新增操作 - SqlsugarHelper.InsertByObjectForSqlsugar(entityInfo, user); + if (entityInfo.OperationType == DataFilterType.InsertByObject) + { + if (entityInfo.PropertyName == "Id") + { + if (entityInfo.EntityColumnInfo.PropertyInfo.PropertyType == typeof(string)) + { + entityInfo.SetValue(GuidHelper.GetSnowflakeId()); + } + + if (entityInfo.EntityColumnInfo.IsPrimarykey && entityInfo.EntityColumnInfo.PropertyInfo.PropertyType == typeof(long)) + { + var id = entityInfo.EntityColumnInfo.PropertyInfo.GetValue(entityInfo.EntityValue); + if (id == null || (long)id == 0) + entityInfo.SetValue(SnowFlakeSingle.Instance.NextId()); + } + } + + if (entityInfo.PropertyName == "CreateTime") + entityInfo.SetValue(DateTime.Now); + + if (entityInfo.PropertyName == "TenantId") + { + var tenantId = ((dynamic)entityInfo.EntityValue).TenantId; + if (tenantId == null || tenantId == 0) + entityInfo.SetValue(user.GetTenantId()); + } + + if (entityInfo.PropertyName == "CreateBy") + { + if (!user.UserId.IsNullOrEmpty()) + { + entityInfo.SetValue(user.UserId); + } + else + { + entityInfo.SetValue(1288018625843826688); + } + } + + if (entityInfo.PropertyName == "Deleted") + entityInfo.SetValue(false); + } // 更新操作 - SqlsugarHelper.UpdateByObjectForSqlsugar(entityInfo, user); + if (entityInfo.OperationType == DataFilterType.UpdateByObject) + { + if (entityInfo.PropertyName == "UpdateTime") + entityInfo.SetValue(DateTime.Now); + if (entityInfo.PropertyName == "UpdateBy" && user != null) + entityInfo.SetValue(user.UserId); + + } }; - dbProvider.Aop.OnDiffLogEvent = (it) => + dbProvider.Aop.OnDiffLogEvent = it => { Console.WriteLine("执行更新前更新后:"); //操作前记录 包含: 字段描述 列名 值 表名 表描述 - //var editBeforeData = it.BeforeData;//插入Before为null,之前还没进库 - // //操作后记录 包含: 字段描述 列名 值 表名 表描述 - //var editAfterData = it.AfterData; - //var sql = it.Sql; - //var parameter = it.Parameters; - //var data = it.BusinessData;//这边会显示你传进来的对象 - //var time = it.Time; - //var diffType = it.DiffType;//enum insert 、update and delete + var editBeforeData = it.BeforeData;//插入Before为null,之前还没进库 + //操作后记录 包含: 字段描述 列名 值 表名 表描述 + var editAfterData = it.AfterData; + var sql = it.Sql; + var parameter = it.Parameters; + var data = it.BusinessData;//这边会显示你传进来的对象 + var time = it.Time; + var diffType = it.DiffType;//enum insert 、update and delete // Sys_Log_DataAop var log = new Sys_Log_DataAop() { @@ -76,7 +126,7 @@ namespace DS.Module.SqlSugar }; Console.WriteLine("执行的sql:" + log); //Write logic - DbScoped.Sugar.GetConnection(200).Insertable(log).ExecuteCommand(); + // DbScoped.Sugar.GetConnection(1288018625843826680).Insertable(log).ExecuteCommand(); }; //全局过滤租户 dbProvider.QueryFilter.AddTableFilter(m => m.TenantId == user.GetTenantId()); diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs b/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs index aa4508f1..7a748089 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs @@ -80,6 +80,7 @@ namespace DS.Module.SqlSugar entityInfo.SetValue(DateTime.Now); if (entityInfo.PropertyName == "UpdateBy" && user != null) entityInfo.SetValue(user.UserId); + } } diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs b/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs index f60ab210..303dd879 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlsugarInstall.cs @@ -1,8 +1,11 @@ using DS.Module.Core; +using DS.Module.Core.Data; using DS.Module.Core.Extensions; +using DS.Module.Core.Log; using DS.Module.UserModule; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; using SqlSugar; namespace DS.Module.SqlSugar; @@ -31,7 +34,7 @@ public static class SqlsugarInstall /// /// 依赖注入服务容器 /// - public static IServiceCollection AddSqlsugarInstall(this IServiceCollection services) + public static IServiceCollection AddSqlSugarInstall(this IServiceCollection services) { if (services == null) throw new ArgumentNullException(nameof(services)); Console.WriteLine("开始加载sqlsugar模块"); @@ -80,10 +83,10 @@ public static class SqlsugarInstall // } // }); //} + var httpContextAccessor = services.GetService(); var user = services.GetService(); if (user.IsNullOrEmpty()) { - var httpContextAccessor = services.GetService(); user = new AspNetUser(httpContextAccessor) { UserId = "1288018625843826688", @@ -92,89 +95,130 @@ public static class SqlsugarInstall OrgId = "1288018625843826688" }; } + //全局上下文生效 SqlSugarScope sqlSugar = new SqlSugarScope(connectConfigList, db => { // 封装AOP - SqlsugarAopHelper.AopForSqlsugar(db, user, dbList, connectConfigList); - ///* - // * 默认只会配置到第一个数据库,这里按照官方文档进行多数据库/多租户文档的说明进行循环配置 - // */ - //foreach (var c in connectConfigList) - //{ - // var dbProvider = db.GetConnectionScope((string)c.ConfigId); - // var user = services.GetService(); - // //单例参数配置,所有上下文生效 - // dbProvider.Ado.CommandTimeOut = 30; - // dbProvider.Aop.OnLogExecuting = (sql, pars) => - // { - // Logger.Log(LogLevel.Info, - // DateTime.Now.ToString() + "\r\n" + - // UtilMethods.GetSqlString(c.DbType, sql, pars)); - // }; - // dbProvider.Aop.DataExecuting = (oldValue, entityInfo) => - // { - // // 新增操作 - // SqlsugarHelper.InsertByObjectForSqlsugar(entityInfo, user); - // // 更新操作 - // SqlsugarHelper.UpdateByObjectForSqlsugar(entityInfo, user); - // //if (entityInfo.OperationType == DataFilterType.InsertByObject) - // //{ - // // if (entityInfo.PropertyName == "Id") - // // { - // // if (entityInfo.EntityColumnInfo.PropertyInfo.PropertyType == typeof(string)) - // // { - // // entityInfo.SetValue(GuidHelper.GetSnowflakeId()); - // // } - - // // if (entityInfo.EntityColumnInfo.PropertyInfo.PropertyType == typeof(long)) - // // { - // // entityInfo.SetValue(SnowFlakeSingle.Instance.NextId()); - // // } - // // } - - // // if (entityInfo.PropertyName == "CreateTime") - // // entityInfo.SetValue(DateTime.Now); - // // if (!user.UserId.IsNullOrEmpty()) - // // { - // // if (entityInfo.PropertyName == "TenantId") - // // entityInfo.SetValue(user.GetTenantId()); - // // } - - // // if (entityInfo.PropertyName == "CreateBy") - // // { - // // if (!user.UserId.IsNullOrEmpty()) - // // { - // // entityInfo.SetValue(user.UserId); - // // } - // // else - // // { - // // entityInfo.SetValue(1288018625843826688); - // // } - // // } - - // // if (entityInfo.PropertyName == "Deleted") - // // entityInfo.SetValue(false); - // //} - - // //if (entityInfo.OperationType == DataFilterType.UpdateByObject) - // //{ - // // if (entityInfo.PropertyName == "UpdateTime") - // // entityInfo.SetValue(DateTime.Now); - // // if (entityInfo.PropertyName == "UpdateBy" && user != null) - // // entityInfo.SetValue(user.UserId); - // //} - // }; - // dbProvider.Aop.OnError = (exp) => //执行SQL 错误事件 - // { - // Logger.Error(DateTime.Now.ToString() + "\r\n" + exp.Sql + "\r\n" + exp.Parametres); - // }; - - // dbProvider.QueryFilter.AddTableFilter(m => m.TenantId == user.GetTenantId()); - // //全局软删除过滤 - // dbProvider.QueryFilter.AddTableFilter(m => m.Deleted == false); - //} + // SqlsugarAopHelper.AopForSqlsugar(db, user, dbList, connectConfigList); + Console.WriteLine("开始加载sqlsugar模块 要走过滤 起了"); + foreach (var c in connectConfigList) + { + var dbProvider = db.GetConnectionScope((string)c.ConfigId); + // var user = services.GetService(); + //单例参数配置,所有上下文生效 + dbProvider.Ado.CommandTimeOut = 30; + dbProvider.Aop.OnLogExecuting = (sql, pars) => + { + //执行前事件 + //Logger.Log(LogLevel.Info, + // DateTime.Now.ToString() + "\r\n" + + // UtilMethods.GetSqlString(c.DbType, sql, pars)); + Console.WriteLine("执行的sql:" + sql); + }; + + //数据处理事件 + dbProvider.Aop.DataExecuting = (oldValue, entityInfo) => + { + // 新增操作 + if (entityInfo.OperationType == DataFilterType.InsertByObject) + { + if (entityInfo.PropertyName == "Id") + { + if (entityInfo.EntityColumnInfo.PropertyInfo.PropertyType == typeof(string)) + { + entityInfo.SetValue(GuidHelper.GetSnowflakeId()); + } + + if (entityInfo.EntityColumnInfo.IsPrimarykey && + entityInfo.EntityColumnInfo.PropertyInfo.PropertyType == typeof(long)) + { + var id = entityInfo.EntityColumnInfo.PropertyInfo.GetValue(entityInfo + .EntityValue); + if (id == null || (long)id == 0) + entityInfo.SetValue(SnowFlakeSingle.Instance.NextId()); + } + } + + if (entityInfo.PropertyName == "CreateTime") + entityInfo.SetValue(DateTime.Now); + + if (entityInfo.PropertyName == "TenantId") + { + var tenantId = ((dynamic)entityInfo.EntityValue).TenantId; + if (tenantId == null || tenantId == 0) + entityInfo.SetValue(user.GetTenantId()); + } + + if (entityInfo.PropertyName == "CreateBy") + { + if (!user.UserId.IsNullOrEmpty()) + { + entityInfo.SetValue(user.UserId); + } + else + { + entityInfo.SetValue(1288018625843826688); + } + } + + if (entityInfo.PropertyName == "Deleted") + entityInfo.SetValue(false); + } + + // 更新操作 + if (entityInfo.OperationType == DataFilterType.UpdateByObject) + { + if (entityInfo.PropertyName == "UpdateTime") + entityInfo.SetValue(DateTime.Now); + if (entityInfo.PropertyName == "UpdateBy" && user != null) + entityInfo.SetValue(user.UserId); + } + }; + + dbProvider.Aop.OnDiffLogEvent = it => + { + //排除日志库操作 + if (Convert.ToInt64(c.ConfigId) != 1288018625843826680) + { + #region 插入日志审计表 + //操作前记录 包含: 字段描述 列名 值 表名 表描述 + var editBeforeData = it.BeforeData; //插入Before为null,之前还没进库 + //操作后记录 包含: 字段描述 列名 值 表名 表描述 + var editAfterData = it.AfterData; + var sql = it.Sql; + var parameter = it.Parameters; + var data = it.BusinessData; //这边会显示你传进来的对象 + var time = it.Time; + var diffType = it.DiffType; //enum insert 、update and delete + + var diffData = SqlSugarDiffUtil.GetDiff(editBeforeData,editAfterData); + + var auditData = new SysLogAudit() + { + KeyId =Convert.ToInt64(diffData.Id), + Sql = it.Sql, + Param = JsonConvert.SerializeObject(it.Parameters), + OperateType = diffType.ToString(), + OldValue = JsonConvert.SerializeObject(editAfterData), + NewValue = JsonConvert.SerializeObject(editAfterData), + DiffData = diffData.DiffData, + AopData = JsonConvert.SerializeObject(it.BusinessData), + // CreateUser = user.UserName + }; + db.GetConnection(1288018625843826680).Insertable(auditData).ExecuteCommand(); + #endregion + } + + }; + //全局过滤租户 + dbProvider.QueryFilter.AddTableFilter(m => m.TenantId == user.GetTenantId()); + //全局过滤机构Id + dbProvider.QueryFilter.AddTableFilter(m => m.OrgId == user.GetOrgId()); + //全局软删除过滤 + dbProvider.QueryFilter.AddTableFilter(m => m.Deleted == false); + } }); services.AddSingleton(sqlSugar); //这边是SqlSugarScope用AddSingleton diff --git a/ds-wms-service/DS.Module.UserModule/AspNetUser.cs b/ds-wms-service/DS.Module.UserModule/AspNetUser.cs index 8649b826..e96d12e1 100644 --- a/ds-wms-service/DS.Module.UserModule/AspNetUser.cs +++ b/ds-wms-service/DS.Module.UserModule/AspNetUser.cs @@ -33,7 +33,7 @@ public class AspNetUser : IUser if (_userId == null) { var claimValue = GetClaimValueByType("jti").FirstOrDefault(); - _userId = claimValue != null ? claimValue.ObjToString() : "东胜软件"; + _userId = claimValue != null ? claimValue.ObjToString() : "1288018625843826688"; } return _userId; } @@ -42,7 +42,24 @@ public class AspNetUser : IUser _userId = value; } } + private string _userName; + public string UserName + { + get + { + if (_userId == null) + { + var claimValue = GetClaimValueByType("Name").FirstOrDefault(); + _userName = claimValue != null ? claimValue.ObjToString() : "管理员"; + } + return _userName; + } + set + { + _userName = value; + } + } public long GetTenantId() { var token = GetToken(); @@ -226,26 +243,29 @@ public class AspNetUser : IUser var user = _accessor.HttpContext?.User; if (user == null || !user.Claims.Any()) { - return GetDefaultUserInfo(); + return null; + // return GetDefaultUserInfo(); } var token = GetToken(); if (string.IsNullOrEmpty(token)) { - return GetDefaultUserInfo(); + return null; + // return GetDefaultUserInfo(); } var jwtHandler = new JwtSecurityTokenHandler(); if (!jwtHandler.CanReadToken(token)) { - return GetDefaultUserInfo(); + return null; + // return GetDefaultUserInfo(); } JwtSecurityToken jwtToken = jwtHandler.ReadJwtToken(token); var userInfoJson = jwtToken.Claims.First().Value; var userInfo = JsonConvert.DeserializeObject(userInfoJson); - return userInfo ?? GetDefaultUserInfo(); + return userInfo ?? null; } private UserInfo GetDefaultUserInfo() @@ -391,10 +411,10 @@ public class AspNetUser : IUser public List GetClaimValueByType(string ClaimType) { var claimsIdentity = GetClaimsIdentity(); - if (claimsIdentity == null || !claimsIdentity.Any(item => item.Type == ClaimType)) - { - return new List { "jti", "TenantId", "CompanyId", "OrgId" }; // 返回包含默认参数的列表 - } + // if (claimsIdentity == null || !claimsIdentity.Any(item => item.Type == ClaimType)) + // { + // return new List { "jti", "TenantId", "CompanyId", "OrgId" }; // 返回包含默认参数的列表 + // } return claimsIdentity.Where(item => item.Type == ClaimType).Select(item => item.Value).ToList(); } diff --git a/ds-wms-service/DS.Module.UserModule/IUser.cs b/ds-wms-service/DS.Module.UserModule/IUser.cs index 7f288778..b284d4bc 100644 --- a/ds-wms-service/DS.Module.UserModule/IUser.cs +++ b/ds-wms-service/DS.Module.UserModule/IUser.cs @@ -16,7 +16,11 @@ public interface IUser /// 获取用户ID /// string UserId { get; } - + + /// + /// 获取用户名称 + /// + string UserName { get; } /// /// 获取公司ID /// diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeFrtController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeFrtController.cs new file mode 100644 index 00000000..5f5e9896 --- /dev/null +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeFrtController.cs @@ -0,0 +1,63 @@ +using DS.Module.Core; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Code.Interface; +using DS.WMS.Core.System.Dtos; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.AdminApi.Controllers; + +/// +/// 付费方式服务 +/// +public class CodeFrtController : ApiController +{ + private readonly ICodeFrtService _invokeService; + + /// + /// 构造函数 + /// + /// + public CodeFrtController(ICodeFrtService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetCodeFrtList")] + public DataResult> GetCodeFrtList([FromBody] PageRequest request) + { + var res = _invokeService.GetListByPage(request); + return res; + } + + /// + /// 编辑 + /// + /// + /// + [HttpPost] + [Route("EditCodeFrt")] + public DataResult EditCodeFrt([FromBody] CodeFrtReq model) + { + var res = _invokeService.EditCodeFrt(model); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetCodeFrtInfo")] + public DataResult GetCodeFrtInfo([FromQuery] string id) + { + var res = _invokeService.GetCodeFrtInfo(id); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeStlModeController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeStlModeController.cs new file mode 100644 index 00000000..150b747f --- /dev/null +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/CodeStlModeController.cs @@ -0,0 +1,63 @@ +using DS.Module.Core; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Code.Interface; +using DS.WMS.Core.System.Dtos; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.AdminApi.Controllers; + +/// +/// 结算方式服务 +/// +public class CodeStlModeController : ApiController +{ + private readonly ICodeStlModeService _invokeService; + + /// + /// 构造函数 + /// + /// + public CodeStlModeController(ICodeStlModeService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetCodeStlModeList")] + public DataResult> GetCodeStlModeList([FromBody] PageRequest request) + { + var res = _invokeService.GetListByPage(request); + return res; + } + + /// + /// 编辑 + /// + /// + /// + [HttpPost] + [Route("EditCodeStlMode")] + public DataResult EditCodeStlMode([FromBody] CodeStlModeReq model) + { + var res = _invokeService.EditCodeStlMode(model); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetCodeStlModeInfo")] + public DataResult GetCodeStlModeInfo([FromQuery] string id) + { + var res = _invokeService.GetCodeStlModeInfo(id); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs index 995a899b..e41024c0 100644 --- a/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/CommonController.cs @@ -228,7 +228,7 @@ public class CommonController : ApiController /// [HttpGet] [Route("GetUserFieldSet")] - public DataResult GetUserFieldSet([FromQuery] string permissionId) + public DataResult GetUserFieldSet([FromQuery] string permissionId) { var res = _invokeService.GetUserFieldSet(permissionId); return res; diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/LogAuditController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogAuditController.cs new file mode 100644 index 00000000..eaa8a0e8 --- /dev/null +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogAuditController.cs @@ -0,0 +1,49 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.AdminApi.Controllers; + +/// +/// 审计日志模块 +/// +public class LogAuditController : ApiController +{ + private readonly ILogAuditService _invokeService; + + /// + /// 构造函数 + /// + /// + public LogAuditController(ILogAuditService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetAuditLogList")] + public DataResult> GetAuditLogList([FromBody] PageRequest request) + { + var res = _invokeService.GetAuditLogList(request); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetAuditLogInfo")] + public DataResult GetAuditLogInfo([FromQuery] string id) + { + var res = _invokeService.GetAuditLogInfo(id); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/LogExceptionController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogExceptionController.cs new file mode 100644 index 00000000..6d4d6409 --- /dev/null +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogExceptionController.cs @@ -0,0 +1,49 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.AdminApi.Controllers; + +/// +/// 异常日志模块 +/// +public class LogExceptionController : ApiController +{ + private readonly ILogExceptionService _invokeService; + + /// + /// 构造函数 + /// + /// + public LogExceptionController(ILogExceptionService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetExceptionLogList")] + public DataResult> GetExceptionLogList([FromBody] PageRequest request) + { + var res = _invokeService.GetExceptionLogList(request); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetExceptionLogInfo")] + public DataResult GetExceptionLogInfo([FromQuery] string id) + { + var res = _invokeService.GetExceptionLogInfo(id); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/LogOperationController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogOperationController.cs new file mode 100644 index 00000000..8944ad43 --- /dev/null +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogOperationController.cs @@ -0,0 +1,49 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.AdminApi.Controllers; + +/// +/// 操作日志模块 +/// +public class LogOperationController : ApiController +{ + private readonly ILogOperationService _invokeService; + + /// + /// 构造函数 + /// + /// + public LogOperationController(ILogOperationService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetOperationLogList")] + public DataResult> GetOperationLogList([FromBody] PageRequest request) + { + var res = _invokeService.GetOperationLogList(request); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetOperationLogInfo")] + public DataResult GetOperationLogInfo([FromQuery] string id) + { + var res = _invokeService.GetOperationLogInfo(id); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/LogVisitController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogVisitController.cs new file mode 100644 index 00000000..bc1ef551 --- /dev/null +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/LogVisitController.cs @@ -0,0 +1,49 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.AdminApi.Controllers; + +/// +/// 访问日志模块 +/// +public class LogVisitController : ApiController +{ + private readonly ILogVisitService _invokeService; + + /// + /// 构造函数 + /// + /// + public LogVisitController(ILogVisitService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetVisitLogList")] + public DataResult> GetVisitLogList([FromBody] PageRequest request) + { + var res = _invokeService.GetVisitLogList(request); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetVisitLogInfo")] + public DataResult GetVisitLogInfo([FromQuery] string id) + { + var res = _invokeService.GetVisitLogInfo(id); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.AdminApi/Controllers/VersionController.cs b/ds-wms-service/DS.WMS.AdminApi/Controllers/VersionController.cs index 76943e34..e0e33242 100644 --- a/ds-wms-service/DS.WMS.AdminApi/Controllers/VersionController.cs +++ b/ds-wms-service/DS.WMS.AdminApi/Controllers/VersionController.cs @@ -85,4 +85,15 @@ public class VersionController : ApiController var res = _invokeService.GetTenantVersionUpdateList(request); return res; } + + /// + /// 更新租户表差异 + /// + /// + [HttpPost] + [Route("UpdateSaasTableInfo")] + public DataResult UpdateSaasTableInfo() + { + return _invokeService.UpdateSaasTableInfo(); + } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt index fe3a4d89..b4644dcc 100644 --- a/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.AdminApi/Logs/internal-nlog.txt @@ -495,3 +495,143 @@ 2024-03-05 16:16:28.3845 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config 2024-03-05 16:16:28.4056 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-03-05 16:16:28.4584 Info Configuration initialized. +2024-03-06 17:32:32.6384 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-06 17:32:32.7478 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-06 17:32:32.7775 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-06 17:32:32.8505 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-06 17:32:32.9050 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-06 17:32:32.9277 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-06 17:32:32.9741 Info Configuration initialized. +2024-03-06 17:48:48.0058 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-06 17:48:48.1276 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-06 17:48:48.1640 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-06 17:48:48.2346 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-06 17:48:48.2942 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-06 17:48:48.3183 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-06 17:48:48.3738 Info Configuration initialized. +2024-03-07 11:52:21.9801 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 11:52:22.1448 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 11:52:22.1799 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 11:52:22.3513 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 11:52:22.4135 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 11:52:22.4465 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 11:52:22.5127 Info Configuration initialized. +2024-03-07 13:54:47.3578 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 13:54:47.4420 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 13:54:47.4615 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 13:54:47.4969 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 13:54:47.5247 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 13:54:47.5371 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 13:54:47.5652 Info Configuration initialized. +2024-03-07 14:02:19.4154 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 14:02:19.5301 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 14:02:19.5571 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 14:02:19.5955 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 14:02:19.6261 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 14:02:19.6372 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 14:02:19.6716 Info Configuration initialized. +2024-03-07 14:10:05.4579 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 14:10:05.5399 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 14:10:05.5610 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 14:10:05.5998 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 14:10:05.6270 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 14:10:05.6270 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 14:10:05.6743 Info Configuration initialized. +2024-03-07 14:57:44.2164 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 14:57:44.3419 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 14:57:44.3770 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 14:57:44.4455 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 14:57:44.5012 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 14:57:44.5258 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 14:57:44.5794 Info Configuration initialized. +2024-03-07 15:10:03.0440 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 15:10:03.1644 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 15:10:03.2678 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 15:10:03.3579 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 15:10:03.4251 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 15:10:03.4595 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 15:10:03.5358 Info Configuration initialized. +2024-03-07 15:23:08.4713 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 15:23:08.5323 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 15:23:08.5489 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 15:23:08.5766 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 15:23:08.5996 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 15:23:08.5996 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 15:23:08.6363 Info Configuration initialized. +2024-03-07 15:26:22.7802 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 15:26:22.9054 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 15:26:22.9285 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 15:26:22.9793 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 15:26:23.0153 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 15:26:23.0362 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 15:26:23.0766 Info Configuration initialized. +2024-03-07 16:00:35.9383 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:00:36.0453 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:00:36.0734 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:00:36.1376 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:00:36.1745 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:00:36.1913 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:00:36.2225 Info Configuration initialized. +2024-03-07 16:03:04.6474 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:03:04.7398 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:03:04.7621 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:03:04.8224 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:03:04.8723 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:03:04.8972 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:03:04.9368 Info Configuration initialized. +2024-03-07 16:06:00.6253 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:06:00.6634 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:06:00.6799 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:06:00.6961 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:06:00.7775 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:06:00.8048 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:06:00.8768 Info Configuration initialized. +2024-03-07 16:18:00.3701 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:18:00.4034 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:18:00.4377 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:18:00.4698 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:18:00.5190 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:18:00.5405 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:18:00.6048 Info Configuration initialized. +2024-03-07 16:36:29.2160 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:36:29.2424 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:36:29.2825 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:36:29.3307 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:36:29.3854 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:36:29.4059 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:36:29.4556 Info Configuration initialized. +2024-03-07 16:43:12.1187 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:43:12.2237 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:43:12.2542 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:43:12.3038 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:43:12.3434 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:43:12.3643 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:43:12.4007 Info Configuration initialized. +2024-03-07 16:57:48.6793 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:57:48.7936 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:57:48.8282 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:57:48.8958 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:57:48.9439 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:57:48.9624 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:57:48.9986 Info Configuration initialized. +2024-03-07 16:59:27.7180 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 16:59:27.7454 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 16:59:27.7734 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 16:59:27.8319 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 16:59:27.8969 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 16:59:27.9191 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 16:59:27.9782 Info Configuration initialized. +2024-03-07 17:06:59.5184 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 17:06:59.5466 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 17:06:59.5776 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 17:06:59.6175 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 17:06:59.6509 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-07 17:06:59.6681 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 17:06:59.7206 Info Configuration initialized. +2024-03-08 17:28:31.2096 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 17:28:31.2588 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 17:28:31.2996 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 17:28:31.3436 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 17:28:31.4061 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.AdminApi\bin\Debug\net8.0\nlog.config +2024-03-08 17:28:31.4276 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 17:28:31.4898 Info Configuration initialized. diff --git a/ds-wms-service/DS.WMS.AdminApi/Program.cs b/ds-wms-service/DS.WMS.AdminApi/Program.cs index f0159d6a..a47ece39 100644 --- a/ds-wms-service/DS.WMS.AdminApi/Program.cs +++ b/ds-wms-service/DS.WMS.AdminApi/Program.cs @@ -31,7 +31,7 @@ builder.Host builder.Services.AddAppWebInstal(); builder.Services.AddCorsInstall(); builder.Services.AddUserModuleInstall(); //用户服务 -builder.Services.AddSqlsugarInstall(); +builder.Services.AddSqlSugarInstall(); builder.Services.AddSwaggerInstall(); builder.Services.AddJwtInstall(); builder.Services.AddSaasDbInstall();//分库服务 diff --git a/ds-wms-service/DS.WMS.AdminApi/appsettings.json b/ds-wms-service/DS.WMS.AdminApi/appsettings.json index 58050367..8c3741ed 100644 --- a/ds-wms-service/DS.WMS.AdminApi/appsettings.json +++ b/ds-wms-service/DS.WMS.AdminApi/appsettings.json @@ -22,12 +22,11 @@ "DefaultDbString": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_dev", "DBS": [ { - "ConnId": "1595354960864874496", - "DBType": 1, + "ConnId": "1288018625843826680", + "DBType": 0, "Enabled": false, "HitRate": 40, - "Connection": "Data Source=47.105.193.36,11435;Initial Catalog=SHIPPINGWEB_JNHJ;Integrated Security=False;Connect Timeout=500;User ID=sa;Password=Ds20040201", - "ProviderName": "System.Data.SqlClient" + "Connection": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_log" } ] }, @@ -38,5 +37,11 @@ "Version": "1.0", "Title": "Wms Admin API", "Description": "Wms Admin API" + }, + "Middleware": { + "RecordAccessLogs": { + "Enabled": true, + "IgnoreApis": "/api/permission/getnavigationbar,/api/monitor/getids4users,/api/monitor/getaccesslogs,/api/monitor/server,/api/monitor/getactiveusers,/api/monitor/server," + } } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtReq.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtReq.cs new file mode 100644 index 00000000..f215e656 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtReq.cs @@ -0,0 +1,52 @@ +using DS.Module.Core; +using FluentValidation; + +namespace DS.WMS.Core.Code.Dtos; + +/// +/// 付费方式请求实体 +/// +public class CodeFrtReq +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 付费方式-英文名称 + /// + public string FrtName { get; set; }= ""; + /// + /// 中文名称 + /// + public string CnName { get; set; }= ""; + + /// + /// EDI代码 + /// + public string EdiCode { get; set; } = ""; + /// + /// 状态 0 启用 1 禁用 + /// + public StatusEnum? Status { get; set; } = StatusEnum.Enable; + /// + /// 备注 + /// + public string Note { get; set; } = ""; +} + +/// +/// 验证 +/// +public class CodeFrtReqValidator : AbstractValidator +{ + /// + /// 构造函数 + /// + public CodeFrtReqValidator() + { + this.RuleFor(o => o.FrtName) + .NotEmpty().WithName("付费方式-英文名称"); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtRes.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtRes.cs new file mode 100644 index 00000000..d8dbc71e --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeFrtRes.cs @@ -0,0 +1,39 @@ +using DS.Module.Core; + +namespace DS.WMS.Core.Code.Dtos; + +/// +/// 结算方式信息返回 +/// +public class CodeVesselRes +{ + /// + /// 主键Id + /// + public long Id { get; set; } + /// + /// 付费方式-英文名称 + /// + public string FrtName { get; set; } + /// + /// 中文名称 + /// + public string CnName { get; set; } + + /// + /// EDI代码 + /// + public string EdiCode { get; set; } + /// + /// 状态 0 启用 1 禁用 + /// + public StatusEnum? Status { get; set; } = StatusEnum.Enable; + /// + /// 备注 + /// + public string Note { get; set; } = ""; + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeReq.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeReq.cs new file mode 100644 index 00000000..cc89a95e --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeReq.cs @@ -0,0 +1,57 @@ +using DS.Module.Core; +using FluentValidation; + +namespace DS.WMS.Core.Code.Dtos; + +/// +/// 结算方式请求实体 +/// +public class CodeStlModeReq +{ + /// + /// 主键Id + /// + public long Id { get; set; } + /// + /// 结算方式唯一代码 + /// + public string StlCode { get; set; } = ""; + /// + /// 结算方式名称 + /// + public string StlName { get; set; } = ""; + + /// + /// 英文名称 + /// + public string EnName { get; set; } = ""; + /// + /// 财务软件代码 + /// + public string FinanceSoftCode { get; set; } = ""; + /// + /// 状态 0 启用 1 禁用 + /// + public StatusEnum? Status { get; set; } = StatusEnum.Enable; + /// + /// 备注 + /// + public string Note { get; set; } = ""; +} + +/// +/// 验证 +/// +public class CodeStlModeReqValidator : AbstractValidator +{ + /// + /// 构造函数 + /// + public CodeStlModeReqValidator() + { + this.RuleFor(o => o.StlCode) + .NotEmpty().WithName("结算方式唯一代码"); + this.RuleFor(o => o.StlName) + .NotEmpty().WithName("结算方式名称"); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeRes.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeRes.cs new file mode 100644 index 00000000..cba078e0 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeStlModeRes.cs @@ -0,0 +1,42 @@ +using DS.Module.Core; + +namespace DS.WMS.Core.Code.Dtos; + +/// +/// 结算方式返回 +/// +public class CodeStlModeRes +{ + /// + /// 主键Id + /// + public long Id { get; set; } + /// + /// 结算方式唯一代码 + /// + public string StlCode { get; set; } + /// + /// 结算方式名称 + /// + public string StlName { get; set; } + /// + /// 英文名称 + /// + public string EnName { get; set; } + /// + /// 财务软件代码 + /// + public string FinanceSoftCode { get; set; } + /// + /// 状态 0 启用 1 禁用 + /// + public StatusEnum? Status { get; set; } = StatusEnum.Enable; + /// + /// 备注 + /// + public string Note { get; set; } = ""; + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs index 6e06f6eb..c38dd50d 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Dtos/CodeVesselRes.cs @@ -3,9 +3,9 @@ using DS.Module.Core; namespace DS.WMS.Core.Code.Dtos; /// -/// 船名信息返回 +/// 付费方式返回 /// -public class CodeVesselRes +public class CodeFrtRes { /// /// 主键Id @@ -14,7 +14,7 @@ public class CodeVesselRes /// /// 船名 /// - public string VesselName { get; set; } = ""; + public string FrtName { get; set; } = ""; /// /// 中文说明 /// diff --git a/ds-wms-service/DS.WMS.Core/Code/Entity/CodeFrt.cs b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeFrt.cs new file mode 100644 index 00000000..3cfaa100 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeFrt.cs @@ -0,0 +1,34 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using SqlSugar; + +namespace DS.WMS.Core.Code.Entity; +/// +/// 付费方式表 +/// +[SqlSugar.SugarTable("op_code_frt","付费方式表")] +public class CodeFrt: BaseModel +{ + /// + /// 付费方式-英文名称 + /// + [SugarColumn(ColumnDescription = "付费方式-英文名称", Length = 100)] + public string FrtName { get; set; } + /// + /// 中文名称 + /// + [SugarColumn(ColumnDescription = "中文名称", Length = 50)] + public string CnName { get; set; } + + /// + /// EDI代码 + /// + [SugarColumn(ColumnDescription = "EDI代码", Length = 5)] + public string EdiCode { get; set; } + + /// + /// 状态 0启用 1禁用 + /// + [SugarColumn(ColumnDescription = "状态",DefaultValue = "0")] + public StatusEnum? Status { get; set; } = StatusEnum.Enable; +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Entity/CodeStlMode.cs b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeStlMode.cs new file mode 100644 index 00000000..ff42eb59 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Entity/CodeStlMode.cs @@ -0,0 +1,39 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using SqlSugar; + +namespace DS.WMS.Core.Code.Entity; +/// +/// 结算方式表 +/// +// ReSharper disable once StringLiteralTypo +[SqlSugar.SugarTable("op_code_stlmode","结算方式表")] +public class CodeStlMode: BaseModel +{ + /// + /// 结算方式唯一代码 + /// + [SugarColumn(ColumnDescription = "结算方式唯一代码", Length = 10)] + public string StlCode { get; set; } + /// + /// 结算方式名称 + /// + [SugarColumn(ColumnDescription = "结算方式名称", Length = 30)] + public string StlName { get; set; } + /// + /// 英文名称 + /// + [SugarColumn(ColumnDescription = "英文名称", Length = 100)] + public string EnName { get; set; } + /// + /// 财务软件代码 + /// + [SugarColumn(ColumnDescription = "财务软件代码", Length = 30)] + public string FinanceSoftCode { get; set; } + + /// + /// 状态 0启用 1禁用 + /// + [SugarColumn(ColumnDescription = "状态",DefaultValue = "0")] + public StatusEnum? Status { get; set; } = StatusEnum.Enable; +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeFrtService.cs b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeFrtService.cs new file mode 100644 index 00000000..33880030 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeFrtService.cs @@ -0,0 +1,70 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.WMS.Core.Code.Dtos; + +namespace DS.WMS.Core.Code.Interface; + +public interface ICodeFrtService +{ + /// + /// 列表 + /// + /// + /// + DataResult> GetListByPage(PageRequest request); + + + /// + /// 编辑 + /// + /// + /// + DataResult EditCodeFrt(CodeFrtReq req); + + /// + /// 获取详情 + /// + /// + /// + DataResult GetCodeFrtInfo(string id); + /// + /// 列表 + /// + /// + /// + DataResult> GetClientListByPage(PageRequest request); + /// + /// 编辑-客户端 + /// + /// + /// + DataResult EditClientCodeFrt(CodeFrtReq req); + /// + /// 获取详情 -客户端 + /// + /// + /// + public DataResult GetClientCodeFrtInfo(string id); + + + + /// + /// 获取付费方式列表-基础库 + /// + /// + /// + DataResult> GetCodeFrtList(PageRequest request); + /// + /// 导入付费方式列表 + /// + /// + /// + DataResult ImportCodeFrt(IdModel req); + + /// + /// 获取当前租户已有的付费方式 + /// + /// + public DataResult> GetExistCodeFrtList(); + +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeStlModeService.cs b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeStlModeService.cs new file mode 100644 index 00000000..7dcae15a --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Interface/ICodeStlModeService.cs @@ -0,0 +1,70 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.WMS.Core.Code.Dtos; + +namespace DS.WMS.Core.Code.Interface; + +public interface ICodeStlModeService +{ + /// + /// 列表 + /// + /// + /// + DataResult> GetListByPage(PageRequest request); + + + /// + /// 编辑 + /// + /// + /// + DataResult EditCodeStlMode(CodeStlModeReq req); + + /// + /// 获取详情 + /// + /// + /// + DataResult GetCodeStlModeInfo(string id); + /// + /// 列表 + /// + /// + /// + DataResult> GetClientListByPage(PageRequest request); + /// + /// 编辑-客户端 + /// + /// + /// + DataResult EditClientCodeStlMode(CodeStlModeReq req); + /// + /// 获取详情 -客户端 + /// + /// + /// + public DataResult GetClientCodeStlModeInfo(string id); + + + + /// + /// 获取结算方式列表-基础库 + /// + /// + /// + DataResult> GetCodeStlModeList(PageRequest request); + /// + /// 导入结算方式列表 + /// + /// + /// + DataResult ImportCodeStlMode(IdModel req); + + /// + /// 获取当前租户已有的结算方式 + /// + /// + public DataResult> GetExistCodeStlModeList(); + +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeCountryService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeCountryService.cs index 1a54eacf..951dc5ab 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeCountryService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeCountryService.cs @@ -62,7 +62,7 @@ public class CodeCountryService:ICodeCountryService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodeCountryService:ICodeCountryService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs index 80cba297..63439073 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeCtnService.cs @@ -62,7 +62,7 @@ public class CodeCtnService:ICodeCtnService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodeCtnService:ICodeCtnService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeFrtService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeFrtService.cs new file mode 100644 index 00000000..67a12e96 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeFrtService.cs @@ -0,0 +1,169 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.Module.Core.Extensions; +using DS.Module.SqlSugar; +using DS.Module.UserModule; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Code.Entity; +using DS.WMS.Core.Code.Interface; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.Core.Code.Method; + +public class CodeFrtService:ICodeFrtService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + private readonly ISaasDbService saasService; + /// + /// + /// + /// + public CodeFrtService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + public DataResult> GetListByPage(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = db.Queryable() + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult EditCodeFrt(CodeFrtReq req) + { + if (req.Id == 0) + { + + if (db.Queryable().Where(x=>x.FrtName == req.FrtName.Trim()).Any()) + { + return DataResult.Failed("付费方式已存在!",MultiLanguageConst.CodeFrtExist); + } + + var data = req.Adapt(); + + var entity = db.Insertable(data).ExecuteReturnEntity(); + + return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); + } + else + { + var info = db.Queryable().Where(x => x.Id == req.Id).First(); + + info = req.Adapt(info); + + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); + return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); + } + } + + public DataResult GetCodeFrtInfo(string id) + { + var data = db.Queryable() + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } + + public DataResult> GetClientListByPage(PageRequest request) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = tenantDb.Queryable() + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult EditClientCodeFrt(CodeFrtReq req) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + if (req.Id == 0) + { + + if (tenantDb.Queryable().Where(x=>x.FrtName == req.FrtName.Trim()).Any()) + { + return DataResult.Failed("付费方式已存在!",MultiLanguageConst.CodeFrtExist); + } + + var data = req.Adapt(); + + var entity = tenantDb.Insertable(data).EnableDiffLogEvent().ExecuteReturnEntity(); + + return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); + } + else + { + var info = tenantDb.Queryable().Where(x => x.Id == req.Id).First(); + + info = req.Adapt(info); + + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); + } + } + + public DataResult GetClientCodeFrtInfo(string id) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + var data = tenantDb.Queryable() + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } + + public DataResult> GetCodeFrtList(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = db.Queryable().Where(a=>a.Status == StatusEnum.Enable) + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult ImportCodeFrt(IdModel req) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + var list = db.Queryable().Where(x =>req.Ids.Contains(x.Id) ).ToList(); + if (list.Count == 0) + { + return DataResult.Failed("付费方式导入无数据!",MultiLanguageConst.CodeFrtImportNoData); + } + + if (tenantDb.Queryable().Where(x =>req.Ids.Contains(x.Id) ).Any()) + { + return DataResult.Failed("存在已导入的付费方式!",MultiLanguageConst.CodeFrtImportAlready); + } + + tenantDb.Insertable(list).ExecuteCommand(); + return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess); + } + + /// + /// 获取当前租户已有的船名 + /// + /// + public DataResult> GetExistCodeFrtList() + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + var data = tenantDb.Queryable() + .Select(n=>n.Id.ToString()) + .ToList(); + return DataResult>.Success(data); + } + +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs index e7c36272..83b79ded 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsService.cs @@ -63,7 +63,7 @@ public class CodeGoodsService:ICodeGoodsService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -112,7 +112,7 @@ public class CodeGoodsService:ICodeGoodsService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsTypeService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsTypeService.cs index 15ac8c0e..ab37f707 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsTypeService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeGoodsTypeService.cs @@ -62,7 +62,7 @@ public class CodeGoodsTypeService:ICodeGoodsTypeService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodeGoodsTypeService:ICodeGoodsTypeService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeIssueTypeService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeIssueTypeService.cs index 62d6e99d..080119ec 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeIssueTypeService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeIssueTypeService.cs @@ -62,7 +62,7 @@ public class CodeIssueTypeService:ICodeIssueTypeService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodeIssueTypeService:ICodeIssueTypeService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeLanesService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeLanesService.cs index e85c99b1..b188e609 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeLanesService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeLanesService.cs @@ -62,7 +62,7 @@ public class CodeLanesService:ICodeLanesService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodeLanesService:ICodeLanesService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs index e2223267..0eb61885 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodePackageService.cs @@ -62,7 +62,7 @@ public class CodePackageService:ICodePackageService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodePackageService:ICodePackageService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodePortService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodePortService.cs index 7bd450d4..ae0215bb 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodePortService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodePortService.cs @@ -62,7 +62,7 @@ public class CodePortService:ICodePortService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -100,7 +100,7 @@ public class CodePortService:ICodePortService var data = req.Adapt(); - var entity = tenantDb.Insertable(data).ExecuteReturnEntity(); + var entity = tenantDb.Insertable(data).EnableDiffLogEvent().ExecuteReturnEntity(); return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceDetailService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceDetailService.cs index ba7db725..7fa59c91 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceDetailService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceDetailService.cs @@ -62,7 +62,7 @@ public class CodeSourceDetailService:ICodeSourceDetailService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodeSourceDetailService:ICodeSourceDetailService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceService.cs index 82be4a54..77650704 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeSourceService.cs @@ -62,7 +62,7 @@ public class CodeSourceService:ICodeSourceService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -110,7 +110,7 @@ public class CodeSourceService:ICodeSourceService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeStlModeService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeStlModeService.cs new file mode 100644 index 00000000..7211d5f1 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeStlModeService.cs @@ -0,0 +1,169 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.Module.Core.Extensions; +using DS.Module.SqlSugar; +using DS.Module.UserModule; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Code.Entity; +using DS.WMS.Core.Code.Interface; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.Core.Code.Method; + +public class CodeStlModeService:ICodeStlModeService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + private readonly ISaasDbService saasService; + /// + /// + /// + /// + public CodeStlModeService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + public DataResult> GetListByPage(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = db.Queryable() + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult EditCodeStlMode(CodeStlModeReq req) + { + if (req.Id == 0) + { + + if (db.Queryable().Where(x=>x.StlCode == req.StlCode.Trim()).Any()) + { + return DataResult.Failed("结算方式已存在!",MultiLanguageConst.CodeStlModeExist); + } + + var data = req.Adapt(); + + var entity = db.Insertable(data).ExecuteReturnEntity(); + + return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); + } + else + { + var info = db.Queryable().Where(x => x.Id == req.Id).First(); + + info = req.Adapt(info); + + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); + return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); + } + } + + public DataResult GetCodeStlModeInfo(string id) + { + var data = db.Queryable() + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } + + public DataResult> GetClientListByPage(PageRequest request) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = tenantDb.Queryable() + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult EditClientCodeStlMode(CodeStlModeReq req) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + if (req.Id == 0) + { + + if (tenantDb.Queryable().Where(x=>x.StlCode == req.StlCode.Trim()).Any()) + { + return DataResult.Failed("结算方式已存在!",MultiLanguageConst.CodeStlModeExist); + } + + var data = req.Adapt(); + + var entity = tenantDb.Insertable(data).EnableDiffLogEvent().ExecuteReturnEntity(); + + return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); + } + else + { + var info = tenantDb.Queryable().Where(x => x.Id == req.Id).First(); + + info = req.Adapt(info); + + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); + } + } + + public DataResult GetClientCodeStlModeInfo(string id) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + var data = tenantDb.Queryable() + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } + + public DataResult> GetCodeStlModeList(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = db.Queryable().Where(a=>a.Status == StatusEnum.Enable) + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult ImportCodeStlMode(IdModel req) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + var list = db.Queryable().Where(x =>req.Ids.Contains(x.Id) ).ToList(); + if (list.Count == 0) + { + return DataResult.Failed("结算方式导入无数据!",MultiLanguageConst.CodeStlModeImportNoData); + } + + if (tenantDb.Queryable().Where(x =>req.Ids.Contains(x.Id) ).Any()) + { + return DataResult.Failed("存在已导入的结算方式!",MultiLanguageConst.CodeStlModeImportAlready); + } + + tenantDb.Insertable(list).ExecuteCommand(); + return DataResult.Successed("引入成功!",MultiLanguageConst.DataImportSuccess); + } + + /// + /// 获取当前租户已有的船名 + /// + /// + public DataResult> GetExistCodeStlModeList() + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + var data = tenantDb.Queryable() + .Select(n=>n.Id.ToString()) + .ToList(); + return DataResult>.Success(data); + } + +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs index 05a3d1d5..2aa5a983 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVesselService.cs @@ -62,7 +62,7 @@ public class CodeVesselService:ICodeVesselService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -100,7 +100,7 @@ public class CodeVesselService:ICodeVesselService var data = req.Adapt(); - var entity = tenantDb.Insertable(data).ExecuteReturnEntity(); + var entity = tenantDb.Insertable(data).EnableDiffLogEvent().ExecuteReturnEntity(); return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs index 8fb57fde..b767211a 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/CodeVoynoService.cs @@ -63,7 +63,7 @@ public class CodeVoynoService:ICodeVoynoService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -112,7 +112,7 @@ public class CodeVoynoService:ICodeVoynoService info = req.Adapt(info); - tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowTemplateService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowTemplateService.cs index 6c38d280..d8e1eea4 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowTemplateService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/ClientFlowTemplateService.cs @@ -57,7 +57,7 @@ public class ClientFlowTemplateService : IClientFlowTemplateService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } @@ -98,7 +98,7 @@ public class ClientFlowTemplateService : IClientFlowTemplateService return DataResult.Failed("工作流实例存在引用的流程模板不能删除!",MultiLanguageConst.FlowTemplateDelExistImport); } - db.Deleteable(info).ExecuteCommand(); + db.Deleteable(info).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("删除成功!",MultiLanguageConst.DataDelSuccess); } diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs index d4d5d532..0cecdf4b 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowInstanceService.cs @@ -62,7 +62,7 @@ public class FlowInstanceService : IFlowInstanceService } info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowTemplateService.cs b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowTemplateService.cs index b41220b2..e16ad331 100644 --- a/ds-wms-service/DS.WMS.Core/Flow/Method/FlowTemplateService.cs +++ b/ds-wms-service/DS.WMS.Core/Flow/Method/FlowTemplateService.cs @@ -64,7 +64,7 @@ public class FlowTemplateService:IFlowTemplateService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!"); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/AuditLogRes.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/AuditLogRes.cs new file mode 100644 index 00000000..cf9e0cbf --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/AuditLogRes.cs @@ -0,0 +1,61 @@ +using DS.Module.Core; + +namespace DS.WMS.Core.System.Dtos; + +/// +/// 审计日志返回实体 +/// +public class AuditLogRes +{ + /// + /// Id + /// + public long Id { get; set; } + /// + /// 业务id + /// + public long KeyId { get; set; } + + /// + /// sql语句 + /// + public string Sql { get; set; } + /// + /// 请求参数 + /// + public string Param { get; set; } + /// + /// 旧值 + /// + public string OldValue { get; set; } + /// + /// 新值 + /// + public string NewValue { get; set; } + /// + /// 业务数据 + /// + public string AopData { get; set; } + /// + /// 差异数据 + /// + public string DiffData { get; set; } + /// + /// 操作方式:新增、更新、删除 + /// + + public string OperateType { get; set; } + /// + /// 备注 + /// + public string Note { get; set; } = ""; + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + /// + /// 租户id + /// + public long TenantId { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataReq.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataReq.cs index ef45dd56..08888c93 100644 --- a/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataReq.cs +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataReq.cs @@ -18,9 +18,9 @@ public class DictDataReq public long TypeId { get; set; } /// - /// 字典值编码 + /// 字典名称 /// - public string Code { get; set; } + public string Name { get; set; } /// /// 字典值 @@ -63,7 +63,7 @@ public class DictDataReqValidator : AbstractValidator { this.RuleFor(o => o.Value) .NotEmpty().WithName("字典值"); - this.RuleFor(o => o.Code) - .NotEmpty().WithName("字典值编码"); + this.RuleFor(o => o.Name) + .NotEmpty().WithName("字典值名称"); } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataRes.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataRes.cs index f0304ba0..038790e5 100644 --- a/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataRes.cs +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/DictDataRes.cs @@ -16,9 +16,9 @@ public class DictDataRes public long TypeId { get; set; } /// - /// 字典值编码 + /// 字典名称 /// - public string Code { get; set; } + public string Name { get; set; } /// /// 字典值 diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/DropDownData.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/DropDownData.cs index 4eb1b8b9..58285fff 100644 --- a/ds-wms-service/DS.WMS.Core/System/Dtos/DropDownData.cs +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/DropDownData.cs @@ -11,9 +11,9 @@ public class DropDownData public string Value { get; set; } /// - /// 编码 + /// 名称 /// - public string Code { get; set; } + public string Name { get; set; } } /// diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/ExceptionLogRes.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/ExceptionLogRes.cs new file mode 100644 index 00000000..5c0ab62d --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/ExceptionLogRes.cs @@ -0,0 +1,59 @@ +namespace DS.WMS.Core.System.Dtos; + +/// +/// 异常日志返回实体 +/// +public class ExceptionLogRes +{ + /// + /// ID + /// + public int Id { get; set; } + + /// + /// 类名称 + /// + public string ClassName { get; set; } + + /// + /// 方法名称 + /// + public string MethodName { get; set; } + + /// + /// 异常名称 + /// + public string ExceptionName { get; set; } + + /// + /// 异常信息 + /// + public string ExceptionMsg { get; set; } + + /// + /// 异常源 + /// + public string ExceptionSource { get; set; } + + /// + /// 堆栈信息 + /// + public string StackTrace { get; set; } + + /// + /// 参数对象 + /// + public string ParamsObj { get; set; } + + + /// + /// 创建人 + /// + public string CreateBy { get; set; } + + + /// + /// 租户id + /// + public long? TenantId { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetReq.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetReq.cs new file mode 100644 index 00000000..c0c6b7b1 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetReq.cs @@ -0,0 +1,17 @@ +namespace DS.WMS.Core.System.Dtos; + +/// +/// 租户表单设置请求实体 +/// +public class FormSetReq +{ + /// + /// 权限Id + /// + public long? PermissionId { get; set; } + + /// + /// 字段设置 + /// + public string Content { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetRes.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetRes.cs new file mode 100644 index 00000000..d7dc0210 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/FormSetRes.cs @@ -0,0 +1,17 @@ +namespace DS.WMS.Core.System.Dtos; + +/// +/// 租户表单设置返回实体 +/// +public class FormSetRes +{ + /// + /// 权限Id + /// + public long? PermissionId { get; set; } + + /// + /// 字段设置 + /// + public string Content { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/OperationLogRes.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/OperationLogRes.cs new file mode 100644 index 00000000..8a022ba6 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/OperationLogRes.cs @@ -0,0 +1,98 @@ +namespace DS.WMS.Core.System.Dtos; + +/// +/// 操作日志返回实体 +/// +public class OperationLogRes +{ + /// + /// ID + /// + public int Id { get; set; } + + /// + /// 主键id + /// + public long? KeyId { get; set; } + + + /// + /// 是否执行成功(true-是,false-否) + /// + public bool Success { get; set; } = true; + + /// + /// 请求参数 + /// + public string Param { get; set; } + + /// + /// IP + /// + public string Ip { get; set; } + + /// + /// 地址 + /// + public string Location { get; set; } + + /// + /// 浏览器 + /// + public string Browser { get; set; } + + /// + /// 操作系统 + /// + public string Os { get; set; } + + /// + /// 请求地址 + /// + public string Url { get; set; } + + /// + /// 类名称 + /// + public string ClassName { get; set; } + + /// + /// 方法名称 + /// + public string MethodName { get; set; } + + /// + /// 请求方式(GET POST PUT DELETE) + /// + public string ReqMethod { get; set; } + /// + /// 返回结果 + /// + public string Result { get; set; } + + /// + /// 耗时(毫秒) + /// + public long ElapsedTime { get; set; } + + /// + /// 操作时间 + /// + public DateTime OpTime { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + + /// + /// 创建人 + /// + public string CreateBy { get; set; } + + + /// + /// 租户id + /// + public long? TenantId { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Dtos/VisitLogRes.cs b/ds-wms-service/DS.WMS.Core/System/Dtos/VisitLogRes.cs new file mode 100644 index 00000000..c786810f --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Dtos/VisitLogRes.cs @@ -0,0 +1,59 @@ +namespace DS.WMS.Core.System.Dtos; + +/// +/// 访问日志返回实体 +/// +public class VisitLogRes +{ + /// + /// ID + /// + public int Id { get; set; } + + /// + /// 访问类型 0 登录 1 登出 + /// + public int LoginType { get; set; } + + /// + /// 是否执行成功(true-是,false-否) + /// + public bool Success { get; set; } = true; + + /// + /// 登录Id + /// + public long UserId { get; set; } + /// + /// 登录账户 + /// + public string UserCode { get; set; } + + /// + /// 用户姓名 + /// + public string UserName { get; set; } + + /// + /// 操作时间 + /// + public DateTime OpTime { get; set; } + + /// + /// 消息 + /// + public string Message { get; set; } + + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + + + + /// + /// 租户id + /// + public long? TenantId { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Entity/SysDictData.cs b/ds-wms-service/DS.WMS.Core/System/Entity/SysDictData.cs index 87a25b67..9d19ac15 100644 --- a/ds-wms-service/DS.WMS.Core/System/Entity/SysDictData.cs +++ b/ds-wms-service/DS.WMS.Core/System/Entity/SysDictData.cs @@ -19,10 +19,10 @@ public class SysDictData : BaseModel public string Value { get; set; } /// - /// 字典值编码 + /// 字典名称 /// - [SqlSugar.SugarColumn(Length = 50,ColumnDescription="编码")] - public string Code { get; set; } + [SqlSugar.SugarColumn(Length = 50,ColumnDescription="字典名称")] + public string Name { get; set; } /// /// 字典名称(英文) diff --git a/ds-wms-service/DS.WMS.Core/System/Entity/SysUserFieldSet.cs b/ds-wms-service/DS.WMS.Core/System/Entity/SysFieldSet.cs similarity index 88% rename from ds-wms-service/DS.WMS.Core/System/Entity/SysUserFieldSet.cs rename to ds-wms-service/DS.WMS.Core/System/Entity/SysFieldSet.cs index 8de12dc6..8dec6030 100644 --- a/ds-wms-service/DS.WMS.Core/System/Entity/SysUserFieldSet.cs +++ b/ds-wms-service/DS.WMS.Core/System/Entity/SysFieldSet.cs @@ -5,8 +5,8 @@ namespace DS.WMS.Core.System.Entity; /// /// 用户字段设置 /// -[SqlSugar.SugarTable("sys_user_field")] -public class SysUserFieldSet +[SqlSugar.SugarTable("sys_field_set")] +public class SysFieldSet { /// /// ID diff --git a/ds-wms-service/DS.WMS.Core/System/Entity/SysFormSet.cs b/ds-wms-service/DS.WMS.Core/System/Entity/SysFormSet.cs new file mode 100644 index 00000000..c8b78302 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Entity/SysFormSet.cs @@ -0,0 +1,31 @@ +using SqlSugar; + +namespace DS.WMS.Core.System.Entity; + +/// +/// 租户表单设置 +/// +[SqlSugar.SugarTable("sys_tenant_form_set")] +public class SysFormSet +{ + /// + /// ID + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 租户id + /// + public long? TenantId { get; set; } + + /// + /// 权限Id + /// + public long? PermissionId { get; set; } + + /// + /// 表单设置 + /// + public string Content { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Entity/SysVersion.cs b/ds-wms-service/DS.WMS.Core/System/Entity/SysVersion.cs index 2e5cc636..13007632 100644 --- a/ds-wms-service/DS.WMS.Core/System/Entity/SysVersion.cs +++ b/ds-wms-service/DS.WMS.Core/System/Entity/SysVersion.cs @@ -28,13 +28,13 @@ public class SysVersion: BaseModel /// /// 主库更新内容 /// - [SugarColumn(ColumnDescription = "主库更新内容", IsNullable = true, Length = 5000)] + [SugarColumn(ColumnDescription = "主库更新内容", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] public string MainContent { get; set; } /// /// 租户库更新内容 /// - [SugarColumn(ColumnDescription = "租户库更新内容", IsNullable = true, Length = 5000)] + [SugarColumn(ColumnDescription = "租户库更新内容", IsNullable = true, ColumnDataType=StaticConfig.CodeFirst_BigString)] public string TenantContent { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/IAdminService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/IAdminService.cs index 13539824..0915f1f3 100644 --- a/ds-wms-service/DS.WMS.Core/System/Interface/IAdminService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Interface/IAdminService.cs @@ -1,4 +1,5 @@ using DS.Module.Core; +using DS.WMS.Core.System.Dtos; namespace DS.WMS.Core.System.Interface; @@ -10,4 +11,5 @@ public interface IAdminService /// DataResult GetServerInfo(); + } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs index b15996b3..eb44ab61 100644 --- a/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Interface/ICommonService.cs @@ -154,7 +154,7 @@ public interface ICommonService /// /// /// - public DataResult GetUserFieldSet(string permissionId); + public DataResult GetUserFieldSet(string permissionId); /// diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/IFormSetService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/IFormSetService.cs new file mode 100644 index 00000000..f6e935d6 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Interface/IFormSetService.cs @@ -0,0 +1,30 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; + +namespace DS.WMS.Core.System.Interface; + +public interface IFormSetService +{ + /// + /// 列表 + /// + /// + /// + DataResult> GetListByPage(PageRequest request); + + + /// + /// 编辑 + /// + /// + /// + DataResult EditFormSet(FormSetReq model); + + /// + /// 获取详情 + /// + /// + /// + DataResult GetFormSetInfo(string id); +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/ILogAuditService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/ILogAuditService.cs new file mode 100644 index 00000000..9b5cff9b --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Interface/ILogAuditService.cs @@ -0,0 +1,23 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; + +namespace DS.WMS.Core.System.Interface; + +public interface ILogAuditService +{ + + /// + /// 审计日志列表 + /// + /// + /// + DataResult> GetAuditLogList(PageRequest request); + + /// + /// 审计日志详情 + /// + /// + /// + DataResult GetAuditLogInfo(string id); +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/ILogExceptionService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/ILogExceptionService.cs new file mode 100644 index 00000000..027b8866 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Interface/ILogExceptionService.cs @@ -0,0 +1,23 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; + +namespace DS.WMS.Core.System.Interface; + +public interface ILogExceptionService +{ + + /// + /// 异常日志列表 + /// + /// + /// + DataResult> GetExceptionLogList(PageRequest request); + + /// + /// 异常日志详情 + /// + /// + /// + DataResult GetExceptionLogInfo(string id); +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/ILogOperationService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/ILogOperationService.cs new file mode 100644 index 00000000..7524c330 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Interface/ILogOperationService.cs @@ -0,0 +1,23 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; + +namespace DS.WMS.Core.System.Interface; + +public interface ILogOperationService +{ + + /// + /// 操作日志列表 + /// + /// + /// + DataResult> GetOperationLogList(PageRequest request); + + /// + /// 操作日志详情 + /// + /// + /// + DataResult GetOperationLogInfo(string id); +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Interface/ILogVisitService.cs b/ds-wms-service/DS.WMS.Core/System/Interface/ILogVisitService.cs new file mode 100644 index 00000000..ebef7edc --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Interface/ILogVisitService.cs @@ -0,0 +1,23 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; + +namespace DS.WMS.Core.System.Interface; + +public interface ILogVisitService +{ + + /// + /// 访问日志列表 + /// + /// + /// + DataResult> GetVisitLogList(PageRequest request); + + /// + /// 访问日志详情 + /// + /// + /// + DataResult GetVisitLogInfo(string id); +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Method/AdminService.cs b/ds-wms-service/DS.WMS.Core/System/Method/AdminService.cs index af50af72..3204e4c8 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/AdminService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/AdminService.cs @@ -1,9 +1,11 @@ using System.Diagnostics; using System.Runtime.InteropServices; using DS.Module.Core; +using DS.Module.Core.Extensions; using DS.Module.Core.Helpers; using DS.Module.SqlSugar; using DS.Module.UserModule; +using DS.WMS.Core.System.Dtos; using DS.WMS.Core.System.Interface; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; @@ -77,7 +79,7 @@ public class AdminService:IAdminService }, }; return DataResult.Success(data); - } + } #endregion 获取服务器信息 } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs b/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs index 452cb3f0..bc9122b8 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/CommonService.cs @@ -11,6 +11,7 @@ using Microsoft.Extensions.DependencyInjection; using SqlSugar; using System.Diagnostics; using System.Runtime.InteropServices; +using DS.Module.Core.Log; using DS.Module.SqlSugar; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Code.Entity; @@ -70,6 +71,7 @@ public class CommonService : ICommonService var tokenModel = new JwtHelper.JwtTokenModel { Uid = userInfo.Id.ToString(), + Name = userInfo.UserName, // OrgId = userInfo.OrgId, // GID = userInfo.GID, TenantId = userInfo.TenantId.ToString(), @@ -87,10 +89,10 @@ public class CommonService : ICommonService { var userId = long.Parse(user.UserId); var tenantId = user.GetTenantId(); - var tokenModel = new JwtHelper.JwtTokenModel { Uid = user.UserId, + Name = db.Queryable().Filter(null, true).First(x => x.Id == userId).UserName, // OrgId = userInfo.OrgId, // GID = userInfo.GID, TenantId = tenantId.ToString(), @@ -117,6 +119,16 @@ public class CommonService : ICommonService it.HomePath = "/analysis"; }) .First(); + // var context = IhttpContext.HttpContext; + // var log = new SysLogVisit() + // { + // Ip = HttpUtil.GetClientIP(context), + // Location = HttpUtil.GetRequestUrlAddress(request), + // Browser = clientInfo?.UA.Family + clientInfo?.UA.Major, + // Os = clientInfo?.OS.Family + clientInfo?.OS.Major, + // OpTime = DateTime.Now, + // }; + return DataResult.Success(data); } @@ -268,6 +280,7 @@ public class CommonService : ICommonService var tokenModel = new JwtHelper.JwtTokenModel { Uid = user.UserId, + Name = db.Queryable().Filter(null, true).First(x => x.Id == userId).UserName, TenantId = tenantId.ToString(), }; var data = new RefreshTokenRes @@ -310,6 +323,7 @@ public class CommonService : ICommonService var tokenModel = new JwtHelper.JwtTokenModel { Uid = user.UserId, + Name = db.Queryable().Filter(null, true).First(x => x.Id == userId).UserName, TenantId = tenantId.ToString(), }; var data = new RefreshTokenRes @@ -358,11 +372,22 @@ public class CommonService : ICommonService var tokenModel = new JwtHelper.JwtTokenModel { Uid = userInfo.Id.ToString(), + Name = userInfo.UserName, // OrgId = orgRelation.OrgId.ToString(), TenantId = userInfo.TenantId.ToString(), }; var token = JwtHelper.Encrypt(tokenModel, false, false); + var visLog = new SysLogVisit() + { + LoginType = 0, + UserName = userInfo.UserName, + UserCode = userInfo.UserCode, + TenantId = userInfo.TenantId, + OpTime = DateTime.Now, + Message = "登录成功" + }; + saasService.GetLogDb().Insertable(visLog).ExecuteCommand(); return DataResult.Success(token); } @@ -383,6 +408,7 @@ public class CommonService : ICommonService var tokenModel = new JwtHelper.JwtTokenModel { Uid = user.UserId, + Name = db.Queryable().Filter(null, true).First(x => x.Id == userId).UserName, // OrgId = user.GetOrgId().ToString(), TenantId = tenantId.ToString(), }; @@ -409,6 +435,7 @@ public class CommonService : ICommonService it.HomePath = "/analysis"; }) .First(); + return DataResult.Success(data); } @@ -440,6 +467,7 @@ public class CommonService : ICommonService { Uid = userId, OrgId = id, + Name = sysUser.UserName, TenantId = tenantId.ToString(), }; var token = new RefreshTokenRes @@ -1127,12 +1155,12 @@ public class CommonService : ICommonService /// /// /// - public DataResult GetUserFieldSet(string permissionId) + public DataResult GetUserFieldSet(string permissionId) { - var info = db.Queryable() + var info = db.Queryable() .Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId)).First(); - return DataResult.Success(info); + return DataResult.Success(info); } /// @@ -1142,12 +1170,12 @@ public class CommonService : ICommonService /// public DataResult UpdateUserFieldSet(UserFieldSetUpdateReq req) { - var info = db.Queryable() + var info = db.Queryable() .Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == req.PermissionId).First(); if (info.IsNull()) { - var entity = new SysUserFieldSet + var entity = new SysFieldSet { UserId = long.Parse(user.UserId), PermissionId = req.PermissionId, @@ -1194,8 +1222,8 @@ public class CommonService : ICommonService : db.Queryable().Where(x => x.TypeId == type.Id && x.Status == StatusEnum.Enable) .Select(x => new DropDownData { - Code = x.Code, - Value = x.EnName, + Name = x.EnName, + Value = x.Value, }).ToList(); return DataResult.Successed("获取字典成功!", data); @@ -1231,8 +1259,8 @@ public class CommonService : ICommonService : db.Queryable().Where(x => x.TypeId == item.Id && x.Status == StatusEnum.Enable) .Select(x => new DropDownData { - Code = x.Code, - Value = x.EnName, + Name = x.EnName, + Value = x.Value, }).ToList() }; list.Add(temp); diff --git a/ds-wms-service/DS.WMS.Core/System/Method/ConfigService.cs b/ds-wms-service/DS.WMS.Core/System/Method/ConfigService.cs index eb4db919..8ba2c4a1 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/ConfigService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/ConfigService.cs @@ -68,7 +68,7 @@ public class ConfigService : IConfigService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/DataRuleService.cs b/ds-wms-service/DS.WMS.Core/System/Method/DataRuleService.cs index 67ba3695..9b277bf4 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/DataRuleService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/DataRuleService.cs @@ -69,7 +69,7 @@ public class DataRuleService : IDataRuleService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/FormSetService.cs b/ds-wms-service/DS.WMS.Core/System/Method/FormSetService.cs new file mode 100644 index 00000000..335a03d4 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Method/FormSetService.cs @@ -0,0 +1,88 @@ +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.UserModule; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; +using DS.WMS.Core.System.Interface; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.Core.System.Method; + +public class FormSetService : IFormSetService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + + /// + /// + /// + /// + public FormSetService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + } + + /// + /// 列表 + /// + /// + /// + public DataResult> GetListByPage(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = db.Queryable() + .LeftJoin((a, b) => a.PermissionId == b.Id) + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + /// + /// 编辑 + /// + /// + /// + public DataResult EditFormSet(FormSetReq req) + { + var info = db.Queryable() + .Where(x => x.TenantId == long.Parse(user.TenantId) && x.PermissionId == req.PermissionId).First(); + + if (info.IsNull()) + { + var entity = new SysFormSet + { + TenantId = long.Parse(user.TenantId), + PermissionId = req.PermissionId, + Content = req.Content + }; + db.Insertable(entity).ExecuteCommand(); + } + else + { + info.Content = req.Content; + db.Updateable(info).ExecuteCommand(); + } + + return DataResult.Successed("更新成功",MultiLanguageConst.DataUpdateSuccess); + + } + /// + /// 详情 + /// + /// + /// + public DataResult GetFormSetInfo(string permissionId) + { + var data = db.Queryable() + .LeftJoin((a, b) => a.PermissionId == b.Id) + .Where(x => x.TenantId == long.Parse(user.TenantId) && x.PermissionId == long.Parse(permissionId)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LanguageSetService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LanguageSetService.cs index a1308726..c86585f5 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/LanguageSetService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/LanguageSetService.cs @@ -62,7 +62,7 @@ public class LanguageSetService:ILanguageSetService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!"); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogAuditService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogAuditService.cs new file mode 100644 index 00000000..4d684f83 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Method/LogAuditService.cs @@ -0,0 +1,51 @@ +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.Core.Log; +using DS.Module.SqlSugar; +using DS.Module.UserModule; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; +using DS.WMS.Core.System.Interface; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.Core.System.Method; + +public class LogAuditService : ILogAuditService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + private readonly ISaasDbService saasService; + /// + /// + /// + /// + public LogAuditService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + public DataResult> GetAuditLogList(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult GetAuditLogInfo(string id) + { + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogExceptionService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogExceptionService.cs new file mode 100644 index 00000000..cf1fa2d9 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Method/LogExceptionService.cs @@ -0,0 +1,51 @@ +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.Core.Log; +using DS.Module.SqlSugar; +using DS.Module.UserModule; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; +using DS.WMS.Core.System.Interface; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.Core.System.Method; + +public class LogExceptionService : ILogExceptionService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + private readonly ISaasDbService saasService; + /// + /// + /// + /// + public LogExceptionService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + public DataResult> GetExceptionLogList(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult GetExceptionLogInfo(string id) + { + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogOperationService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogOperationService.cs new file mode 100644 index 00000000..b706dddf --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Method/LogOperationService.cs @@ -0,0 +1,51 @@ +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.Core.Log; +using DS.Module.SqlSugar; +using DS.Module.UserModule; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; +using DS.WMS.Core.System.Interface; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.Core.System.Method; + +public class LogOperationService : ILogOperationService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + private readonly ISaasDbService saasService; + /// + /// + /// + /// + public LogOperationService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + public DataResult> GetOperationLogList(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult GetOperationLogInfo(string id) + { + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Method/LogVisitService.cs b/ds-wms-service/DS.WMS.Core/System/Method/LogVisitService.cs new file mode 100644 index 00000000..0a21e49c --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/System/Method/LogVisitService.cs @@ -0,0 +1,51 @@ +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.Core.Log; +using DS.Module.SqlSugar; +using DS.Module.UserModule; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Entity; +using DS.WMS.Core.System.Interface; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.Core.System.Method; + +public class LogVisitService : ILogVisitService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + private readonly ISaasDbService saasService; + /// + /// + /// + /// + public LogVisitService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + public DataResult> GetVisitLogList(PageRequest request) + { + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + + public DataResult GetVisitLogInfo(string id) + { + var data = saasService.GetLogDb().Queryable().Filter(null,true) + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data,MultiLanguageConst.DataQuerySuccess); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/System/Method/PermissionService.cs b/ds-wms-service/DS.WMS.Core/System/Method/PermissionService.cs index 626ebe64..540ed727 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/PermissionService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/PermissionService.cs @@ -124,7 +124,7 @@ public class PermissionService : IPermissionService var info = db.Queryable().Where(x => x.Id == model.Id).First(); var data = model.Adapt(info); - db.Updateable(data).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(data).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); // db.Updateable(info).IgnoreColumns(ignoreAllNullColumns:true).IgnoreColumns(u => new { u.AddBy,u.CreateTime }).ExecuteCommand(); return DataResult.Successed("更新权限成功!"); diff --git a/ds-wms-service/DS.WMS.Core/System/Method/SequenceRuleService.cs b/ds-wms-service/DS.WMS.Core/System/Method/SequenceRuleService.cs index 93ab4bcd..48094d10 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/SequenceRuleService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/SequenceRuleService.cs @@ -68,7 +68,7 @@ public class SequenceRuleService : ISequenceRuleService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/SequenceService.cs b/ds-wms-service/DS.WMS.Core/System/Method/SequenceService.cs index cf3842de..da578aed 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/SequenceService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/SequenceService.cs @@ -69,7 +69,7 @@ public class SequenceService : ISequenceService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/SysDictDataService.cs b/ds-wms-service/DS.WMS.Core/System/Method/SysDictDataService.cs index 2a961b5f..788bfb2f 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/SysDictDataService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/SysDictDataService.cs @@ -41,7 +41,7 @@ public class SysDictDataService:ISysDictDataService { if (req.Id == 0) { - var isExist = db.Queryable().Where(x =>x.TypeId == req.TypeId && x.Code == req.Code).First(); + var isExist = db.Queryable().Where(x =>x.TypeId == req.TypeId && x.Value == req.Value).First(); if (isExist != null) { return DataResult.Failed("字典值唯一编码已存在!",MultiLanguageConst.DictCodeExist); @@ -59,7 +59,7 @@ public class SysDictDataService:ISysDictDataService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/SysDictTypeService.cs b/ds-wms-service/DS.WMS.Core/System/Method/SysDictTypeService.cs index 49c04a60..9c7d0e84 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/SysDictTypeService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/SysDictTypeService.cs @@ -62,7 +62,7 @@ public class SysDictTypeService:ISysDictTypeService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/SysOrgService.cs b/ds-wms-service/DS.WMS.Core/System/Method/SysOrgService.cs index bf75e8ff..185c1401 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/SysOrgService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/SysOrgService.cs @@ -67,7 +67,7 @@ public class SysOrgService:ISysOrgService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/SysRoleService.cs b/ds-wms-service/DS.WMS.Core/System/Method/SysRoleService.cs index e57dc94e..e8833649 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/SysRoleService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/SysRoleService.cs @@ -74,7 +74,7 @@ public class SysRoleService : ISysRoleService info = model.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess); } } diff --git a/ds-wms-service/DS.WMS.Core/System/Method/TenantApplyService.cs b/ds-wms-service/DS.WMS.Core/System/Method/TenantApplyService.cs index 5d80c49a..7b0167e5 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/TenantApplyService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/TenantApplyService.cs @@ -291,7 +291,7 @@ public class TenantApplyService : ITenantApplyService apply.AuditStatus = (AuditStatusEnum)(int)req.AuditInfo.Status; apply.AuditTime = DateTime.Now; apply.AuditNote = req.AuditInfo.AuditNote; - await masterDb.Updateable(apply).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + await masterDb.Updateable(apply).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommandAsync(); await dbScope.Ado.CommitTranAsync(); return await Task.FromResult(DataResult.Successed("审批成功!")); diff --git a/ds-wms-service/DS.WMS.Core/System/Method/UserService.cs b/ds-wms-service/DS.WMS.Core/System/Method/UserService.cs index c6e634c8..a732ec8a 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/UserService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/UserService.cs @@ -149,7 +149,7 @@ public class UserService : IUserService info = model.MapTo(); info.PinYinCode = PinYinUtil.GetFristLetter(info.UserName); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); #region 处理用户角色 diff --git a/ds-wms-service/DS.WMS.Core/System/Method/VersionService.cs b/ds-wms-service/DS.WMS.Core/System/Method/VersionService.cs index 7316bd27..7fb31883 100644 --- a/ds-wms-service/DS.WMS.Core/System/Method/VersionService.cs +++ b/ds-wms-service/DS.WMS.Core/System/Method/VersionService.cs @@ -74,7 +74,7 @@ public class VersionService : IVersionService info = req.Adapt(info); - db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + db.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand(); return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess); } } @@ -175,7 +175,7 @@ public class VersionService : IVersionService } version.Executed = true; - await db.Updateable(version).ExecuteCommandAsync(); + await db.Updateable(version).EnableDiffLogEvent().ExecuteCommandAsync(); await dbScope.Ado.CommitTranAsync(); return await Task.FromResult(DataResult.Successed("执行版本更新成功!", MultiLanguageConst.DataUpdateSuccess)); diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/CodeFrtController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeFrtController.cs new file mode 100644 index 00000000..1bfc1b86 --- /dev/null +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeFrtController.cs @@ -0,0 +1,100 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Code.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.MainApi.Controllers; + +/// +/// 付费方式服务 +/// +public class CodeFrtController : ApiController +{ + private readonly ICodeFrtService _invokeService; + + /// + /// 构造函数 + /// + /// + public CodeFrtController(ICodeFrtService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetCodeFrtList")] + public DataResult> GetCodeFrtList([FromBody] PageRequest request) + { + var res = _invokeService.GetClientListByPage(request); + return res; + } + + /// + /// 编辑 + /// + /// + /// + [HttpPost] + [Route("EditCodeFrt")] + public DataResult EditCodeFrt([FromBody] CodeFrtReq model) + { + var res = _invokeService.EditClientCodeFrt(model); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetCodeFrtInfo")] + public DataResult GetCodeFrtInfo([FromQuery] string id) + { + var res = _invokeService.GetClientCodeFrtInfo(id); + return res; + } + + /// + /// 获取付费方式列表-基础库 + /// + /// + /// + [HttpPost] + [Route("GetBasicsCodeFrtList")] + public DataResult> GetBasicsCodeFrtList([FromBody] PageRequest request) + { + var res = _invokeService.GetCodeFrtList(request); + return res; + } + /// + /// 导入付费方式类型-基础库 + /// + /// + /// + [HttpPost] + [Route("ImportCodeFrt")] + public DataResult ImportCodeFrt([FromBody] IdModel req) + { + var res = _invokeService.ImportCodeFrt(req); + return res; + } + + /// + /// 获取当前租户已有的付费方式 + /// + /// + [HttpGet] + [Route("GetExistCodeFrtList")] + public DataResult> GetExistCodeFrtList() + { + var res = _invokeService.GetExistCodeFrtList(); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/CodeStlModeController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeStlModeController.cs new file mode 100644 index 00000000..f9ee33a4 --- /dev/null +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/CodeStlModeController.cs @@ -0,0 +1,100 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Code.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.MainApi.Controllers; + +/// +/// 结算方式服务 +/// +public class CodeStlModeController : ApiController +{ + private readonly ICodeStlModeService _invokeService; + + /// + /// 构造函数 + /// + /// + public CodeStlModeController(ICodeStlModeService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetCodeStlModeList")] + public DataResult> GetCodeStlModeList([FromBody] PageRequest request) + { + var res = _invokeService.GetClientListByPage(request); + return res; + } + + /// + /// 编辑 + /// + /// + /// + [HttpPost] + [Route("EditCodeStlMode")] + public DataResult EditCodeStlMode([FromBody] CodeStlModeReq model) + { + var res = _invokeService.EditClientCodeStlMode(model); + return res; + } + + /// + /// 详情 + /// + /// + /// + [HttpGet] + [Route("GetCodeStlModeInfo")] + public DataResult GetCodeStlModeInfo([FromQuery] string id) + { + var res = _invokeService.GetClientCodeStlModeInfo(id); + return res; + } + + /// + /// 获取结算方式列表-基础库 + /// + /// + /// + [HttpPost] + [Route("GetBasicsCodeStlModeList")] + public DataResult> GetBasicsCodeStlModeList([FromBody] PageRequest request) + { + var res = _invokeService.GetCodeStlModeList(request); + return res; + } + /// + /// 导入结算方式类型-基础库 + /// + /// + /// + [HttpPost] + [Route("ImportCodeStlMode")] + public DataResult ImportCodeStlMode([FromBody] IdModel req) + { + var res = _invokeService.ImportCodeStlMode(req); + return res; + } + + /// + /// 获取当前租户已有的结算方式 + /// + /// + [HttpGet] + [Route("GetExistCodeStlModeList")] + public DataResult> GetExistCodeStlModeList() + { + var res = _invokeService.GetExistCodeStlModeList(); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs index 6c9d99af..810dd9f3 100644 --- a/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/CommonController.cs @@ -318,7 +318,7 @@ public class CommonController : ApiController /// [HttpGet] [Route("GetUserFieldSet")] - public DataResult GetUserFieldSet([FromQuery] string permissionId) + public DataResult GetUserFieldSet([FromQuery] string permissionId) { var res = _invokeService.GetUserFieldSet(permissionId); return res; diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/FormSetController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/FormSetController.cs new file mode 100644 index 00000000..71db803a --- /dev/null +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/FormSetController.cs @@ -0,0 +1,62 @@ +using DS.Module.Core; +using DS.WMS.Core.System.Dtos; +using DS.WMS.Core.System.Interface; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.MainApi.Controllers; + +/// +/// 表单设置 模块 +/// +public class FormSetController : ApiController +{ + private readonly IFormSetService _invokeService; + + /// + /// 构造函数 + /// + /// + public FormSetController(IFormSetService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetFormSetList")] + public DataResult> GetFormSetList([FromBody] PageRequest request) + { + var res = _invokeService.GetListByPage(request); + return res; + } + + /// + /// 编辑 + /// + /// + /// + [HttpPost] + [Route("EditFormSet")] + public DataResult EditFormSet([FromBody] FormSetReq req) + { + var res = _invokeService.EditFormSet(req); + return res; + } + + /// + /// 详情 + /// + /// 权限Id + /// + [HttpGet] + [Route("GetFormSetInfo")] + public DataResult GetFormSetInfo([FromQuery] string permissionId) + { + var res = _invokeService.GetFormSetInfo(permissionId); + return res; + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj index c8790ba9..4459e722 100644 --- a/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj +++ b/ds-wms-service/DS.WMS.MainApi/DS.WMS.MainApi.csproj @@ -31,6 +31,7 @@ + diff --git a/ds-wms-service/DS.WMS.MainApi/DsAppWebInstall.cs b/ds-wms-service/DS.WMS.MainApi/DsAppWebInstall.cs index 03af4e0c..05c5772c 100644 --- a/ds-wms-service/DS.WMS.MainApi/DsAppWebInstall.cs +++ b/ds-wms-service/DS.WMS.MainApi/DsAppWebInstall.cs @@ -29,6 +29,9 @@ public static class DsAppWebInstall //options.Filters.Add(); //全局异常过滤 options.Filters.Add(); + //全局操作日志 + options.Filters.Add(); + options.SuppressAsyncSuffixInActionNames = false; }) .ConfigureApiBehaviorOptions(options => diff --git a/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt index b90a4ed3..d552f53d 100644 --- a/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.MainApi/Logs/internal-nlog.txt @@ -215,3 +215,612 @@ 2024-03-05 15:54:03.1623 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config 2024-03-05 15:54:03.1820 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-03-05 15:54:03.2199 Info Configuration initialized. +2024-03-06 17:45:02.1922 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-06 17:45:02.2980 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-06 17:45:02.3199 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-06 17:45:02.3660 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-06 17:45:02.4013 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-06 17:45:02.4224 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-06 17:45:02.4650 Info Configuration initialized. +2024-03-07 12:01:04.4405 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 12:01:04.5046 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 12:01:04.5189 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 12:01:04.5612 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 12:01:04.5866 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-07 12:01:04.5964 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 12:01:04.6228 Info Configuration initialized. +2024-03-07 14:04:43.2705 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 14:04:43.3995 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 14:04:43.4318 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 14:04:43.5060 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 14:04:43.5694 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-07 14:04:43.6068 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 14:04:43.6704 Info Configuration initialized. +2024-03-07 15:59:11.3516 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-07 15:59:11.4503 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-07 15:59:11.4688 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-07 15:59:11.5281 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-07 15:59:11.5733 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-07 15:59:11.5941 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-07 15:59:11.6429 Info Configuration initialized. +2024-03-08 11:53:24.7663 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 11:53:24.9782 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 11:53:25.1923 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 11:53:25.3733 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 11:53:25.4617 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 11:53:25.5079 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 11:53:25.5922 Info Configuration initialized. +2024-03-08 13:51:42.4606 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 13:51:42.5980 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 13:51:42.6357 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 13:51:42.6973 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 13:51:42.7518 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 13:51:42.7751 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 13:51:42.8198 Info Configuration initialized. +2024-03-08 13:56:50.2560 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 13:56:50.3218 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 13:56:50.3392 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 13:56:50.3834 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 13:56:50.4073 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 13:56:50.4175 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 13:56:50.4529 Info Configuration initialized. +2024-03-08 14:17:04.9273 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:17:04.9919 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:17:05.0040 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:17:05.0319 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:17:05.0506 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:17:05.0506 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:17:05.0821 Info Configuration initialized. +2024-03-08 14:26:58.0323 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:26:58.1946 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:26:58.2211 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:26:58.2955 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:26:58.3589 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:26:58.3836 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:26:58.4375 Info Configuration initialized. +2024-03-08 14:31:54.7573 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:31:54.8963 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:31:54.9324 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:31:55.0007 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:31:55.0528 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:31:55.0770 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:31:55.1466 Info Configuration initialized. +2024-03-08 14:34:37.1531 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:34:37.2793 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:34:37.3097 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:34:37.3637 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:34:37.4069 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:34:37.4202 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:34:37.4595 Info Configuration initialized. +2024-03-08 14:45:28.0329 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:45:28.1579 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:45:28.1881 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:45:28.2533 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:45:28.3036 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:45:28.3241 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:45:28.3818 Info Configuration initialized. +2024-03-08 14:48:27.4177 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:48:27.5795 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:48:27.6181 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:48:27.6948 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:48:27.7502 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:48:27.7830 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:48:27.8399 Info Configuration initialized. +2024-03-08 14:50:11.8966 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:50:11.9615 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:50:12.0193 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:50:12.0949 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:50:12.1809 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:50:12.2111 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:50:12.3048 Info Configuration initialized. +2024-03-08 14:52:11.2464 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 14:52:11.2996 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 14:52:11.3426 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 14:52:11.3967 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 14:52:11.4616 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 14:52:11.4855 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 14:52:11.5723 Info Configuration initialized. +2024-03-08 15:01:14.1074 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:01:14.2558 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:01:14.2943 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:01:14.3710 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:01:14.4284 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:01:14.4550 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:01:14.5095 Info Configuration initialized. +2024-03-08 15:03:33.1241 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:03:33.2258 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:03:33.2598 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:03:33.3133 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:03:33.3471 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:03:33.3662 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:03:33.4033 Info Configuration initialized. +2024-03-08 15:10:48.8612 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:10:48.9168 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:10:48.9347 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:10:48.9690 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:10:48.9864 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:10:48.9864 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:10:49.0125 Info Configuration initialized. +2024-03-08 15:13:03.9233 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:13:03.9389 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:13:03.9389 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:13:03.9698 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:13:03.9905 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:13:03.9905 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:13:04.0237 Info Configuration initialized. +2024-03-08 15:15:54.6731 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:15:54.7343 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:15:54.8042 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:15:54.8911 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:15:54.9708 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:15:55.0088 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:15:55.0931 Info Configuration initialized. +2024-03-08 15:17:58.2307 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:17:58.2997 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:17:58.3502 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:17:58.3993 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:17:58.4989 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:17:58.5354 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:17:58.6518 Info Configuration initialized. +2024-03-08 15:22:19.2992 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:22:19.3242 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:22:19.3501 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:22:19.3776 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:22:19.4220 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:22:19.4407 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:22:19.4782 Info Configuration initialized. +2024-03-08 15:26:23.6869 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:26:23.7530 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:26:23.8002 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:26:23.8461 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:26:23.9039 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:26:23.9302 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:26:24.0042 Info Configuration initialized. +2024-03-08 15:40:27.8971 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:40:27.9526 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:40:28.0053 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:40:28.0641 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:40:28.1377 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:40:28.1688 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:40:28.2358 Info Configuration initialized. +2024-03-08 15:41:56.7236 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:41:56.7986 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:41:56.7986 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:41:56.8382 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:41:56.8567 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:41:56.8643 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:41:56.8792 Info Configuration initialized. +2024-03-08 15:43:38.0181 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:43:38.0694 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:43:38.1240 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:43:38.1737 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:43:38.2367 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:43:38.2696 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:43:38.3412 Info Configuration initialized. +2024-03-08 15:47:08.6725 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:47:08.6995 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:47:08.7165 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:47:08.7769 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:47:08.8342 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:47:08.8600 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:47:08.9414 Info Configuration initialized. +2024-03-08 15:48:22.9092 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:48:22.9649 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:48:22.9785 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:48:23.0064 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:48:23.0236 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:48:23.0236 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:48:23.0562 Info Configuration initialized. +2024-03-08 15:50:33.5623 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:50:33.6611 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:50:33.6910 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:50:33.7389 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:50:33.7760 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:50:33.7918 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:50:33.8322 Info Configuration initialized. +2024-03-08 15:52:08.8728 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:52:09.0020 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:52:09.0410 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:52:09.1136 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:52:09.1699 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:52:09.1943 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:52:09.2471 Info Configuration initialized. +2024-03-08 15:53:27.5728 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:53:27.6152 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:53:27.6656 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:53:27.7116 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:53:27.8307 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:53:27.9208 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:53:28.0389 Info Configuration initialized. +2024-03-08 15:54:25.6892 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:54:25.7077 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:54:25.7721 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:54:25.8453 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:54:25.9810 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:54:26.0424 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:54:26.2142 Info Configuration initialized. +2024-03-08 15:58:53.9588 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 15:58:54.0449 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 15:58:54.0735 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 15:58:54.1334 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 15:58:54.1822 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 15:58:54.2002 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 15:58:54.2389 Info Configuration initialized. +2024-03-08 16:08:58.7672 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:08:58.8216 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:08:58.8640 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:08:58.9197 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:08:58.9778 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:08:59.0107 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:08:59.0959 Info Configuration initialized. +2024-03-08 16:10:14.1862 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:10:14.2848 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:10:14.3124 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:10:14.3687 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:10:14.4064 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:10:14.4271 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:10:14.4960 Info Configuration initialized. +2024-03-08 16:12:36.1015 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:12:36.1680 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:12:36.2296 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:12:36.3063 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:12:36.3784 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:12:36.4216 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:12:36.4958 Info Configuration initialized. +2024-03-08 16:14:51.4463 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:14:51.5352 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:14:51.5586 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:14:51.5991 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:14:51.6294 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:14:51.6504 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:14:51.7065 Info Configuration initialized. +2024-03-08 16:16:38.2328 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:16:38.2802 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:16:38.3206 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:16:38.3533 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:16:38.4035 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:16:38.4165 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:16:38.4392 Info Configuration initialized. +2024-03-08 16:18:08.0168 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:18:08.0389 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:18:08.0555 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:18:08.0843 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:18:08.1236 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:18:08.1368 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:18:08.1680 Info Configuration initialized. +2024-03-08 16:19:31.1939 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:19:31.2542 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:19:31.3143 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:19:31.3768 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:19:31.4396 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:19:31.4706 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:19:31.5240 Info Configuration initialized. +2024-03-08 16:21:08.0489 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:21:08.0713 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:21:08.0991 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:21:08.1159 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:21:08.1358 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:21:08.1436 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:21:08.1630 Info Configuration initialized. +2024-03-08 16:22:36.7362 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:22:36.7888 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:22:36.7993 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:22:36.8235 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:22:36.8403 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:22:36.8490 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:22:36.8749 Info Configuration initialized. +2024-03-08 16:24:11.7793 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:24:11.8203 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:24:11.8852 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:24:11.9477 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:24:12.0148 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:24:12.0440 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:24:12.1146 Info Configuration initialized. +2024-03-08 16:25:16.4271 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:25:16.4502 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:25:16.4636 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:25:16.4777 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:25:16.4940 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:25:16.4940 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:25:16.5173 Info Configuration initialized. +2024-03-08 16:26:30.6804 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:26:30.8425 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:26:30.9477 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:26:31.0912 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:26:31.1669 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:26:31.2016 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:26:31.2971 Info Configuration initialized. +2024-03-08 16:34:21.9652 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:34:22.0779 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:34:22.1669 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:34:22.2424 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:34:22.3195 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:34:22.3609 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:34:22.5250 Info Configuration initialized. +2024-03-08 16:35:19.1597 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:35:19.2516 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:35:19.2811 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:35:19.3346 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:35:19.3649 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:35:19.3791 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:35:19.4146 Info Configuration initialized. +2024-03-08 16:36:56.0944 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:36:56.1943 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:36:56.2107 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:36:56.2500 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:36:56.2807 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:36:56.2957 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:36:56.3124 Info Configuration initialized. +2024-03-08 16:39:01.9049 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:39:01.9218 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:39:01.9393 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:39:01.9604 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:39:01.9856 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:39:01.9856 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:39:02.0197 Info Configuration initialized. +2024-03-08 16:42:22.7641 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:42:22.7995 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:42:22.8451 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:42:22.8910 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:42:23.0076 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:42:23.0458 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:42:23.1470 Info Configuration initialized. +2024-03-08 16:43:54.6139 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:43:54.6506 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:43:54.6756 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:43:54.6981 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:43:54.7361 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:43:54.7534 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:43:54.7907 Info Configuration initialized. +2024-03-08 16:45:44.8335 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:45:44.8554 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:45:44.8808 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:45:44.9085 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:45:44.9435 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:45:44.9556 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:45:44.9885 Info Configuration initialized. +2024-03-08 16:46:32.1535 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:46:32.3145 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:46:32.3893 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:46:32.5171 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:46:32.6051 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:46:32.6434 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:46:32.7399 Info Configuration initialized. +2024-03-08 16:47:51.0130 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 16:47:51.0805 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 16:47:51.1666 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 16:47:51.2235 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 16:47:51.3084 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 16:47:51.3412 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 16:47:51.4289 Info Configuration initialized. +2024-03-08 17:27:36.8308 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 17:27:36.8650 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 17:27:36.8799 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 17:27:36.8969 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 17:27:36.9215 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 17:27:36.9321 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 17:27:36.9603 Info Configuration initialized. +2024-03-08 17:52:16.9171 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 17:52:16.9716 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 17:52:17.0061 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 17:52:17.0517 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 17:52:17.1195 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 17:52:17.1398 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 17:52:17.2016 Info Configuration initialized. +2024-03-08 17:54:55.0667 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 17:54:55.0833 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 17:54:55.0991 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 17:54:55.1169 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 17:54:55.1402 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 17:54:55.1511 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 17:54:55.1818 Info Configuration initialized. +2024-03-08 17:56:28.8034 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 17:56:28.8596 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 17:56:28.8727 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 17:56:28.8989 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 17:56:28.9166 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 17:56:28.9244 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 17:56:28.9456 Info Configuration initialized. +2024-03-08 17:59:42.7806 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 17:59:42.8947 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 17:59:42.9308 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 17:59:42.9916 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 17:59:43.0412 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 17:59:43.0666 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 17:59:43.1118 Info Configuration initialized. +2024-03-08 18:03:49.5999 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:03:49.6566 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:03:49.6705 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:03:49.6995 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:03:49.7223 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:03:49.7223 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:03:49.7585 Info Configuration initialized. +2024-03-08 18:30:09.3703 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:30:09.4067 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:30:09.4437 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:30:09.4897 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:30:09.5554 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:30:09.5766 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:30:09.6428 Info Configuration initialized. +2024-03-08 18:31:56.0675 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:31:56.1657 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:31:56.1962 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:31:56.2566 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:31:56.2971 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:31:56.3158 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:31:56.3633 Info Configuration initialized. +2024-03-08 18:33:43.3504 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:33:43.4057 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:33:43.4199 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:33:43.4529 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:33:43.4862 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:33:43.4862 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:33:43.5408 Info Configuration initialized. +2024-03-08 18:37:12.7681 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:37:12.8608 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:37:12.8782 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:37:12.9207 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:37:12.9538 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:37:12.9670 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:37:12.9868 Info Configuration initialized. +2024-03-08 18:38:08.5959 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:38:08.5959 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:38:08.6203 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:38:08.6350 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:38:08.6529 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:38:08.6596 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:38:08.6753 Info Configuration initialized. +2024-03-08 18:40:20.8500 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:40:20.9261 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:40:21.0091 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:40:21.0722 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:40:21.1745 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:40:21.2262 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:40:21.3160 Info Configuration initialized. +2024-03-08 18:40:54.8656 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:40:54.9306 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:40:54.9478 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:40:54.9795 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:40:55.0027 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:40:55.0197 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:40:55.0466 Info Configuration initialized. +2024-03-08 18:46:37.3649 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:46:37.4182 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:46:37.4998 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:46:37.5778 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:46:37.7200 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:46:37.7759 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:46:37.8873 Info Configuration initialized. +2024-03-08 18:48:51.6120 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:48:51.6491 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:48:51.6818 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:48:51.7185 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:48:51.7702 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:48:51.7992 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:48:51.8737 Info Configuration initialized. +2024-03-08 18:50:09.6957 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:50:09.7246 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:50:09.7446 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:50:09.7731 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:50:09.8064 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:50:09.8160 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:50:09.8383 Info Configuration initialized. +2024-03-08 18:52:21.0330 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:52:21.1362 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:52:21.2105 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:52:21.2869 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:52:21.4029 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:52:21.4416 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:52:21.5579 Info Configuration initialized. +2024-03-08 18:56:12.6824 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:56:12.7629 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:56:12.7803 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:56:12.8210 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:56:12.8568 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:56:12.8749 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:56:12.9238 Info Configuration initialized. +2024-03-08 18:57:32.8600 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:57:32.9043 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:57:32.9440 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:57:32.9874 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:57:33.0334 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:57:33.0506 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:57:33.1061 Info Configuration initialized. +2024-03-08 18:58:43.8638 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:58:43.9553 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:58:44.0397 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:58:44.1136 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:58:44.2364 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:58:44.2810 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:58:44.3889 Info Configuration initialized. +2024-03-08 18:59:47.3315 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 18:59:47.3860 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 18:59:47.4356 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 18:59:47.4868 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 18:59:47.5554 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 18:59:47.5820 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 18:59:47.6477 Info Configuration initialized. +2024-03-08 19:19:57.9743 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 19:19:58.0324 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 19:19:58.0970 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 19:19:58.1657 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 19:19:58.2398 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 19:19:58.2743 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 19:19:58.3901 Info Configuration initialized. +2024-03-08 19:38:21.3314 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 19:38:21.3825 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 19:38:21.4298 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 19:38:21.4790 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 19:38:21.5408 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 19:38:21.5675 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 19:38:21.6248 Info Configuration initialized. +2024-03-08 19:40:13.7378 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 19:40:13.8424 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 19:40:13.8695 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 19:40:13.9212 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 19:40:13.9653 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 19:40:13.9898 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 19:40:14.0397 Info Configuration initialized. +2024-03-08 19:44:35.2378 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-08 19:44:35.3239 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-08 19:44:35.3751 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-08 19:44:35.4294 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-08 19:44:35.5046 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-08 19:44:35.5466 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-08 19:44:35.6513 Info Configuration initialized. +2024-03-11 08:52:03.0094 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 08:52:03.1079 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 08:52:03.1245 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 08:52:03.1617 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 08:52:03.2309 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 08:52:03.2476 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 08:52:03.2769 Info Configuration initialized. +2024-03-11 09:01:12.6293 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 09:01:12.6911 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 09:01:12.7030 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 09:01:12.7328 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 09:01:12.7506 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 09:01:12.7630 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 09:01:12.7876 Info Configuration initialized. +2024-03-11 09:05:57.5342 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 09:05:57.5927 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 09:05:57.6512 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 09:05:57.7226 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 09:05:57.8090 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 09:05:57.8406 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 09:05:57.9361 Info Configuration initialized. +2024-03-11 09:15:08.5109 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 09:15:08.5633 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 09:15:08.6153 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 09:15:08.6701 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 09:15:08.7237 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 09:15:08.7401 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 09:15:08.8064 Info Configuration initialized. +2024-03-11 09:16:04.8906 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 09:16:04.9704 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 09:16:04.9910 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 09:16:05.0455 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 09:16:05.0854 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 09:16:05.1036 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 09:16:05.1392 Info Configuration initialized. +2024-03-11 09:27:43.8540 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 09:27:43.9296 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 09:27:43.9436 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 09:27:43.9715 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 09:27:43.9868 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 09:27:43.9932 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 09:27:44.0105 Info Configuration initialized. +2024-03-11 09:31:30.5271 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 09:31:30.5793 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 09:31:30.6353 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 09:31:30.6855 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 09:31:30.7954 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 09:31:30.8281 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 09:31:30.9202 Info Configuration initialized. +2024-03-11 09:49:09.6281 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-03-11 09:49:09.7189 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-03-11 09:49:09.8504 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-03-11 09:49:09.9075 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-03-11 09:49:09.9837 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config +2024-03-11 09:49:10.0201 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-03-11 09:49:10.0928 Info Configuration initialized. diff --git a/ds-wms-service/DS.WMS.MainApi/Program.cs b/ds-wms-service/DS.WMS.MainApi/Program.cs index 19ddf543..bd4f573c 100644 --- a/ds-wms-service/DS.WMS.MainApi/Program.cs +++ b/ds-wms-service/DS.WMS.MainApi/Program.cs @@ -5,6 +5,7 @@ using DS.Module.Core; using DS.Module.Core.Extensions; using DS.Module.Core.ServiceExtensions; using DS.Module.Jwt; +using DS.Module.Middleware; using DS.Module.MultiLanguage; using DS.Module.SqlSugar; using DS.Module.Swagger; @@ -33,7 +34,7 @@ builder.Host builder.Services.AddAppWebInstal(); builder.Services.AddCorsInstall(); builder.Services.AddUserModuleInstall(); //用户服务 -builder.Services.AddSqlsugarInstall(); +builder.Services.AddSqlSugarInstall(); builder.Services.AddSwaggerInstall(); builder.Services.AddJwtInstall(); builder.Services.AddSaasDbInstall();//分库服务 @@ -74,6 +75,9 @@ app.UseRouting(); app.UseStaticFiles(); //多语言中间件 app.UseMiddleware(); +// //操作日志中间件 +// app.UseMiddleware(); + // 先开启认证 app.UseAuthentication(); // 然后是授权中间件 diff --git a/ds-wms-service/DS.WMS.MainApi/appsettings.json b/ds-wms-service/DS.WMS.MainApi/appsettings.json index 42af0bd9..6921e237 100644 --- a/ds-wms-service/DS.WMS.MainApi/appsettings.json +++ b/ds-wms-service/DS.WMS.MainApi/appsettings.json @@ -22,12 +22,11 @@ "DefaultDbString": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_dev", "DBS": [ { - "ConnId": "1595354960864874496", - "DBType": 1, + "ConnId": "1288018625843826680", + "DBType": 0, "Enabled": false, "HitRate": 40, - "Connection": "Data Source=47.105.193.36,11435;Initial Catalog=SHIPPINGWEB_JNHJ;Integrated Security=False;Connect Timeout=500;User ID=sa;Password=Ds20040201", - "ProviderName": "System.Data.SqlClient" + "Connection": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_log" } ] }, @@ -38,5 +37,11 @@ "Version": "1.0", "Title": "Wms API", "Description": "Wms Web API" + }, + "Middleware": { + "RecordAccessLogs": { + "Enabled": true, + "IgnoreApis": "/api/permission/getnavigationbar,/api/monitor/getids4users,/api/monitor/getaccesslogs,/api/monitor/server,/api/monitor/getactiveusers,/api/monitor/server," + } } } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Test/Startup.cs b/ds-wms-service/DS.WMS.Test/Startup.cs index 8683c70d..bf97e580 100644 --- a/ds-wms-service/DS.WMS.Test/Startup.cs +++ b/ds-wms-service/DS.WMS.Test/Startup.cs @@ -50,7 +50,7 @@ public class Startup { // services.AddTransient(); services.AddUserModuleInstall(); //用户服务 - services.AddSqlsugarInstall(); + services.AddSqlSugarInstall(); services.AddSaasDbInstall(); } diff --git a/ds-wms-service/Ds.WMS.Finance.MediatR/MediatRAppStartup.cs b/ds-wms-service/Ds.WMS.Finance.MediatR/MediatRAppStartup.cs index 274304c9..4496e6ff 100644 --- a/ds-wms-service/Ds.WMS.Finance.MediatR/MediatRAppStartup.cs +++ b/ds-wms-service/Ds.WMS.Finance.MediatR/MediatRAppStartup.cs @@ -15,7 +15,7 @@ namespace Ds.WMS.Finance.MediatR public void ConfigureServices(WebApplicationBuilder builder) { - //builder.Services.AddSqlsugarInstall(); + //builder.Services.AddSqlSugarInstall(); var assembly = AppDomain.CurrentDomain.Load("Ds.WMS.Finance.MediatR"); builder.Services.AddMediatR(c => diff --git a/ds-wms-service/ds-wms-service.sln b/ds-wms-service/ds-wms-service.sln index b88bbff2..62bd6a64 100644 --- a/ds-wms-service/ds-wms-service.sln +++ b/ds-wms-service/ds-wms-service.sln @@ -65,6 +65,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.WMS.Test", "DS.WMS.Test\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.Module.MultiLanguage", "DS.Module.MultiLanguage\DS.Module.MultiLanguage.csproj", "{FE82ABD4-CE11-49F6-823C-6E0B64135FFC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.Module.Log", "DS.Module.Log\DS.Module.Log.csproj", "{739899DE-D41F-4083-94E1-EDA349344ECC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.Module.Middleware", "DS.Module.Middleware\DS.Module.Middleware.csproj", "{B0351554-748F-4DF8-8C22-152646937EFE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -179,6 +183,14 @@ Global {FE82ABD4-CE11-49F6-823C-6E0B64135FFC}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE82ABD4-CE11-49F6-823C-6E0B64135FFC}.Release|Any CPU.ActiveCfg = Release|Any CPU {FE82ABD4-CE11-49F6-823C-6E0B64135FFC}.Release|Any CPU.Build.0 = Release|Any CPU + {739899DE-D41F-4083-94E1-EDA349344ECC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {739899DE-D41F-4083-94E1-EDA349344ECC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {739899DE-D41F-4083-94E1-EDA349344ECC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {739899DE-D41F-4083-94E1-EDA349344ECC}.Release|Any CPU.Build.0 = Release|Any CPU + {B0351554-748F-4DF8-8C22-152646937EFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0351554-748F-4DF8-8C22-152646937EFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0351554-748F-4DF8-8C22-152646937EFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0351554-748F-4DF8-8C22-152646937EFE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -211,6 +223,8 @@ Global {47702656-3E62-4477-B72C-ADA39034B5A7} = {518DB9B5-80A8-4B2C-8570-52BD406458DE} {A8749917-1B4C-4976-98F7-C0A1B043DE38} = {EB351D25-8071-4AE1-B981-EA52B5C2C06E} {FE82ABD4-CE11-49F6-823C-6E0B64135FFC} = {518DB9B5-80A8-4B2C-8570-52BD406458DE} + {739899DE-D41F-4083-94E1-EDA349344ECC} = {518DB9B5-80A8-4B2C-8570-52BD406458DE} + {B0351554-748F-4DF8-8C22-152646937EFE} = {518DB9B5-80A8-4B2C-8570-52BD406458DE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {66115F23-94B4-43C0-838E-33B5CF77F788}