客户端添加权限提醒内容

master
ZR20090193-陈敬勇 2 years ago
parent 2de319f448
commit b601db4366

@ -30,6 +30,8 @@ public class RouteItem
public RouteMeta Meta { get; set; }
public Tag Tag { get; set; }
public List<RouteItem> Children { get; set; }
}
@ -42,3 +44,14 @@ public class RouteMeta
public string Icon { get; set; }
}
public class Tag
{
/// <summary>
///
/// </summary>
public string Content { get; set; }
public bool Dot { get; set; }
public string Type { get; set; }
}

@ -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<SysNotice>()
.LeftJoin<SysNoticeClient>((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<List<RouteItem>>.Success("获取数据成功!", list);
}

@ -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

Loading…
Cancel
Save