diff --git a/gslk-wmsapi-service-client/DS.WMS.Core/System/Dtos/RouteItem.cs b/gslk-wmsapi-service-client/DS.WMS.Core/System/Dtos/RouteItem.cs index d08ccad..dc5d883 100644 --- a/gslk-wmsapi-service-client/DS.WMS.Core/System/Dtos/RouteItem.cs +++ b/gslk-wmsapi-service-client/DS.WMS.Core/System/Dtos/RouteItem.cs @@ -24,12 +24,14 @@ public class RouteItem public string Component { get; set; } - + public string Redirect { get; set; } public RouteMeta Meta { get; set; } + public Tag Tag { get; set; } + public List Children { get; set; } } @@ -41,4 +43,15 @@ public class RouteMeta public string Title { get; set; } public string Icon { get; set; } +} + +public class Tag +{ + /// + /// + /// + public string Content { get; set; } + + public bool Dot { get; set; } + public string Type { get; set; } } \ No newline at end of file diff --git a/gslk-wmsapi-service-client/DS.WMS.Core/System/Method/CommonService.cs b/gslk-wmsapi-service-client/DS.WMS.Core/System/Method/CommonService.cs index 9a9412f..113b7ca 100644 --- a/gslk-wmsapi-service-client/DS.WMS.Core/System/Method/CommonService.cs +++ b/gslk-wmsapi-service-client/DS.WMS.Core/System/Method/CommonService.cs @@ -110,7 +110,7 @@ public class CommonService : ICommonService var child = new RouteItem { Path = "/analysis", - Name = "Analysis", + Name = "分析页", Meta = new RouteMeta { Title = "分析页", @@ -121,7 +121,7 @@ public class CommonService : ICommonService var dashboard = new RouteItem { Path = "/dashboard", - Name = "Dashboard", + Name = "首页", Component = "layouts/default/index", Redirect = "/analysis", Meta = new RouteMeta @@ -137,7 +137,7 @@ public class CommonService : ICommonService var per = new RouteItem { Path = "/wms", - Name = "WMS", + Name = "预约管理", Component = "layouts/default/index", Redirect = "/wms/wmsinplan", Meta = new RouteMeta @@ -152,7 +152,7 @@ public class CommonService : ICommonService var child1 = new RouteItem { Path = "/wmsinplan", - Name = "wmsinplanManagement", + Name = "预约入库", Meta = new RouteMeta { Icon = "ant-design:cloud-upload-outlined", @@ -163,7 +163,7 @@ public class CommonService : ICommonService var child2 = new RouteItem { Path = "/wmsoutplan", - Name = "wmsoutplanManagement", + Name = "预约出库", Meta = new RouteMeta { Icon = "ant-design:cloud-download-outlined", @@ -174,7 +174,7 @@ public class CommonService : ICommonService var child31 = new RouteItem { Path = "/wmsclearance", - Name = "wmsclearanceManagement", + Name = "预约清关", Meta = new RouteMeta { Icon = "carbon:shopping-cart-clear", @@ -194,7 +194,7 @@ public class CommonService : ICommonService var child4 = new RouteItem { Path = "/user", - Name = "userManagement", + Name = "用户管理", Meta = new RouteMeta { Icon = "ion:people-sharp", @@ -205,7 +205,7 @@ public class CommonService : ICommonService var child5 = new RouteItem { Path = "/company", - Name = "companyManagement", + Name = "企业信息维护", Meta = new RouteMeta { Icon = "ion:settings-outline", @@ -216,7 +216,7 @@ public class CommonService : ICommonService var child3 = new RouteItem { Path = "/notice", - Name = "noticeManagement", + Name = "系统公告", Meta = new RouteMeta { Icon = "ant-design:bell-outlined", @@ -227,7 +227,7 @@ public class CommonService : ICommonService var child6 = new RouteItem { Path = "/good", - Name = "goodManagement", + Name = "商品信息", Meta = new RouteMeta { Icon = "icon-park-outline:commodity", @@ -238,7 +238,7 @@ public class CommonService : ICommonService var child7 = new RouteItem { Path = "/goodAudit", - Name = "goodAuditManagement", + Name = "商品申报", Meta = new RouteMeta { Icon = "ant-design:cloud-upload-outlined", @@ -255,7 +255,7 @@ public class CommonService : ICommonService var system = new RouteItem { Path = "/system", - Name = "System", + Name = "系统管理", Component = "layouts/default/index", Redirect = "/company", Meta = new RouteMeta @@ -276,7 +276,7 @@ public class CommonService : ICommonService var storequery = new RouteItem { Path = "/storequery", - Name = "StoreQuery", + Name = "库存明细", Meta = new RouteMeta { Icon = "ant-design:bar-chart-outlined", @@ -287,7 +287,7 @@ public class CommonService : ICommonService var storeinquery = new RouteItem { Path = "/storeinquery", - Name = "StoreInQuery", + Name = "入库明细", Meta = new RouteMeta { Icon = "ant-design:bar-chart-outlined", @@ -298,7 +298,7 @@ public class CommonService : ICommonService var storeoutquery = new RouteItem { Path = "/storeoutquery", - Name = "StoreOutQuery", + Name = "出库明细", Meta = new RouteMeta { Icon = "ant-design:bar-chart-outlined", @@ -312,7 +312,7 @@ public class CommonService : ICommonService var query = new RouteItem { Path = "/query", - Name = "query", + Name = "查询报表", Component = "layouts/default/index", Redirect = "/storequery", Meta = new RouteMeta @@ -324,6 +324,32 @@ public class CommonService : ICommonService }; list.Add(query); + + #region 处理报警信息 + var companyId = user.GetCompanyId(); + var noticeCount = db.Queryable() + .LeftJoin((a, b) => a.Id == b.NoticeId) + .Where((a, b) => a.SendStatus == SendStatus.Send.ToEnumInt() && b.IsRead == false && b.ClientId == companyId).Count(); + + + + foreach (var item in list) + { + if (item.Name =="系统管理") + { + var notice = item.Children.Where(x => x.Name == "系统公告").First(); + notice.Tag = new Tag() + { + Type = "error", + Dot = false, + Content = noticeCount.ToString(), + }; + } + + } + + + #endregion return DataResult>.Success("获取数据成功!", list); } diff --git a/gslk-wmsapi-service-client/DS.WMS.WebApi/Logs/internal-nlog.txt b/gslk-wmsapi-service-client/DS.WMS.WebApi/Logs/internal-nlog.txt index b5ef9eb..46d5cda 100644 --- a/gslk-wmsapi-service-client/DS.WMS.WebApi/Logs/internal-nlog.txt +++ b/gslk-wmsapi-service-client/DS.WMS.WebApi/Logs/internal-nlog.txt @@ -5329,3 +5329,44 @@ 2023-04-23 19:54:23.0763 Info Shutdown() called. Logger closing... 2023-04-23 19:54:23.0779 Info Closing old configuration. 2023-04-23 19:54:23.1657 Info Logger has been closed down. +2023-04-24 11:23:23.1446 Info Message Template Auto Format enabled +2023-04-24 11:23:23.1742 Info Loading assembly: NLog.Web.AspNetCore +2023-04-24 11:23:23.3924 Info Adding target FileTarget(Name=allfile) +2023-04-24 11:23:23.3924 Info Adding target FileTarget(Name=ownFile-web) +2023-04-24 11:23:23.4463 Info Adding target ColoredConsoleTarget(Name=console) +2023-04-24 11:23:23.5502 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config +2023-04-24 11:23:23.5675 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2023-04-24 11:28:10.7371 Info Shutdown() called. Logger closing... +2023-04-24 11:28:10.7371 Info Closing old configuration. +2023-04-24 11:28:10.7772 Info Logger has been closed down. +2023-04-24 11:28:34.0942 Info Message Template Auto Format enabled +2023-04-24 11:28:34.1244 Info Loading assembly: NLog.Web.AspNetCore +2023-04-24 11:28:34.2571 Info Adding target FileTarget(Name=allfile) +2023-04-24 11:28:34.2692 Info Adding target FileTarget(Name=ownFile-web) +2023-04-24 11:28:34.2902 Info Adding target ColoredConsoleTarget(Name=console) +2023-04-24 11:28:34.3432 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config +2023-04-24 11:28:34.3647 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2023-04-24 11:31:16.2680 Info Message Template Auto Format enabled +2023-04-24 11:31:16.3205 Info Loading assembly: NLog.Web.AspNetCore +2023-04-24 11:31:16.6117 Info Adding target FileTarget(Name=allfile) +2023-04-24 11:31:16.6117 Info Adding target FileTarget(Name=ownFile-web) +2023-04-24 11:31:16.6612 Info Adding target ColoredConsoleTarget(Name=console) +2023-04-24 11:31:16.7305 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config +2023-04-24 11:31:16.7412 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2023-04-24 11:32:17.3232 Info Shutdown() called. Logger closing... +2023-04-24 11:32:17.3232 Info Closing old configuration. +2023-04-24 11:32:17.3777 Info Logger has been closed down. +2023-04-24 11:32:49.6704 Info Message Template Auto Format enabled +2023-04-24 11:32:49.6862 Info Loading assembly: NLog.Web.AspNetCore +2023-04-24 11:32:49.7446 Info Adding target FileTarget(Name=allfile) +2023-04-24 11:32:49.7495 Info Adding target FileTarget(Name=ownFile-web) +2023-04-24 11:32:49.7495 Info Adding target ColoredConsoleTarget(Name=console) +2023-04-24 11:32:49.7883 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config +2023-04-24 11:32:49.7958 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2023-04-24 11:34:13.4524 Info Message Template Auto Format enabled +2023-04-24 11:34:13.4936 Info Loading assembly: NLog.Web.AspNetCore +2023-04-24 11:34:13.6937 Info Adding target FileTarget(Name=allfile) +2023-04-24 11:34:13.7102 Info Adding target FileTarget(Name=ownFile-web) +2023-04-24 11:34:13.7418 Info Adding target ColoredConsoleTarget(Name=console) +2023-04-24 11:34:13.8487 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config +2023-04-24 11:34:13.8945 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile