XH.LAB.UTILS 1.0.35

There is a newer version of this package available.
See the version list below for details.
dotnet add package XH.LAB.UTILS --version 1.0.35                
NuGet\Install-Package XH.LAB.UTILS -Version 1.0.35                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XH.LAB.UTILS" Version="1.0.35" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XH.LAB.UTILS --version 1.0.35                
#r "nuget: XH.LAB.UTILS, 1.0.35"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XH.LAB.UTILS as a Cake Addin
#addin nuget:?package=XH.LAB.UTILS&version=1.0.35

// Install XH.LAB.UTILS as a Cake Tool
#tool nuget:?package=XH.LAB.UTILS&version=1.0.35                

XH.LAB.UTILS

介绍

XH.LAB通用方法库

  • PathCombine方法优化,兼容了原来系统的Path Combine因为第二个参数前有/导致无法正常拼接路径的问题

  • 引用公共组件后,业务代码需做一下相应修改:

  • 1、AutofacModuleRegister类增加一下代码,注册依赖注入

    //文件上传 builder.RegisterType<UploadFileService>().As<IUploadFileService>().InstancePerLifetimeScope() .EnableInterfaceInterceptors()//启用拦截器 .InterceptedBy(interceptType.ToArray());

    //权限服务 builder.RegisterType<AuthorityService>().As<IAuthorityService>().InstancePerLifetimeScope() .EnableInterfaceInterceptors()//启用拦截器 .InterceptedBy(interceptType.ToArray());

  • 2、SugarDbContext_Base类(也有其它命名,总之是SugarUnitOfWork的继承类)更改基类,如:

    public class SugarDbContext_Base : SugarUnitOfWork   
    
    更改为:
    
    public class SugarDbContext_Base : SugarDbContext_Base_Utils
    
  • 3、删除或修改本地重名模型

  • 4、更新引用

  • IAuthorityService相关服务功能介绍

  • 1、 方法 GetUserMenuList 用于获取用户的岗位权限许可的功能菜单列表(或按钮列表,权限类列表)

  • 2、 方法 CheckUserMenuPermission 用于判断用户在具体条件下(医院、科室、专业)是否存在某一权限(页面/按钮/权限类),常用于操作权限校验

  • 3、 方法 GetUserPermissionPgroup 用于获取用户某一权限(页面/按钮/权限类)下的专业组列表,返回结果包含所有状态的专业组,业务代码需要做无效过滤

  • 4、 方法 GetUserPermissionLab 用于获取用户某一权限(页面/按钮/权限类)下的科室列表,返回结果包含所有状态的科室

  • 6、 方法 GetAreaGroupTree 用于按条件查询权限范围的管理专业组-检验专业组树(tree是以树结构多层节点返回,line是相同对象以平铺列表返回),各系统使用此方法重构专业组树

  • 7、 方法 GetAreaLabGroupTree 按条件查询权限范围的科室/管理专业组-检验专业组树(tree是以树结构多层节点返回,line是相同对象以平铺列表返回),树顶部可带有科室节点,各系统使用此方法重构专业组树

  • 8、 方法 GetAreaGroupDropDownList 按条件查询权限范围的院区-检验专业组两层下拉列表,各系统使用此方法重构专业组树下拉列表

  • 5、增加2个中间件

  • 1、LabExceptionMiddleware:异常日志记录中间件 Program.cs里用法:全局异常中间件app.UseMiddleware<LabExceptionMiddleware>();
    **原来的是app.UseMiddleware<GlobalExceptionMiddleware>(); **

  • 2、LabTimeWatchMiddleware:超时长打印日志中间件 超时长打印 默认的计数是超500ms打印,如需修改,在任一地方调用LabTimeWatchMiddleware.SetSpanTimeWarnLine Program.cs里用法:app.UseMiddleware<TraceResposeHeadMiddleware>();app.UseMiddleware<LabTimeWatchMiddleware>(); 日志会在接口超过设置的预警毫秒数时打印出 【接口超时阀值预警】 关键字,这样可以时不时定位下现场哪个接口存在性能问题

  • 6、修复下entity代码

  • 7、1.0.30 ⇒ 上次访问记录增加科室、院区id

  • 8、1.0.35 ⇒ 增加添加一系列枚举工具方法

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.40.19 0 11/13/2024
1.0.40.18 37 11/8/2024
1.0.40.17 34 11/8/2024
1.0.40.16 85 11/4/2024
1.0.40.15 88 10/29/2024
1.0.40.14 89 10/29/2024
1.0.40.13 81 10/17/2024
1.0.40.12 110 10/15/2024
1.0.40.11 116 9/20/2024
1.0.40.10 101 9/13/2024
1.0.40.9 145 9/6/2024
1.0.40.8 100 9/3/2024
1.0.40.7 84 8/30/2024
1.0.40.6 108 8/23/2024
1.0.40.5 90 8/21/2024
1.0.40.3 99 8/21/2024
1.0.40.2 100 8/13/2024
1.0.40.1 101 8/13/2024
1.0.40 101 7/23/2024
1.0.39.2 100 7/23/2024
1.0.39.1 86 7/17/2024
1.0.39 68 7/17/2024
1.0.38.9-pre1 71 7/10/2024
1.0.38.8 106 7/10/2024
1.0.38.7 94 6/28/2024
1.0.38.6 111 6/27/2024
1.0.38.6-pre3 103 6/12/2024
1.0.38.6-pre2 103 6/12/2024
1.0.38.6-pre1 61 6/11/2024
1.0.38.5 76 6/11/2024
1.0.38.5-pre3 72 6/11/2024
1.0.38.5-pre2 88 6/11/2024
1.0.38.5-pre1 84 6/11/2024
1.0.38.4 89 6/7/2024
1.0.38.3 94 6/5/2024
1.0.38.2 98 6/3/2024
1.0.38-pre3 113 6/3/2024
1.0.38-pre2 99 5/27/2024
1.0.38-pre1 105 5/25/2024
1.0.37.10 101 5/25/2024
1.0.37.9 96 5/25/2024
1.0.37.8 130 5/25/2024
1.0.37.7 134 5/24/2024
1.0.37.6 116 5/23/2024
1.0.37 122 5/22/2024
1.0.37-pre1 85 5/25/2024
1.0.37-alpha1 83 5/25/2024
1.0.36 110 5/20/2024
1.0.35 125 5/20/2024
1.0.33 107 5/17/2024
1.0.32 134 5/7/2024
1.0.31 112 5/7/2024
1.0.30 101 4/28/2024
1.0.29 110 4/28/2024
1.0.28 103 4/26/2024
1.0.27 111 4/26/2024
1.0.26 117 4/25/2024
1.0.25 114 4/16/2024
1.0.24 108 4/16/2024
1.0.23 106 4/15/2024
1.0.22 102 4/15/2024
1.0.21 100 4/10/2024
1.0.20 104 4/8/2024
1.0.19 131 4/3/2024
1.0.18 120 3/31/2024
1.0.17 108 3/27/2024
1.0.16 111 3/26/2024
1.0.15 124 3/20/2024
1.0.14 126 3/20/2024
1.0.13 111 3/18/2024
1.0.12 111 3/18/2024
1.0.11 129 3/14/2024
1.0.10 109 3/14/2024
1.0.9 129 3/14/2024
1.0.8 131 3/14/2024
1.0.7 122 3/14/2024
1.0.6 126 2/28/2024
1.0.5 98 2/22/2024
1.0.4 93 2/19/2024
1.0.3 114 2/18/2024
1.0.2 110 2/6/2024
1.0.1 108 1/29/2024

增加路径拼接方法