From f99518792572071c4ea385d94060007f36ade662 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Feb 2025 11:25:03 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=9F=BA=E7=A1=80=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 2 +- .../Document/DTO/TrialFileTypeViewModel.cs | 78 ++++++++++++------- .../Service/Document/SysFileTypeService.cs | 27 ++++++- .../Service/Document/TrialFileTypeService.cs | 45 ++++++++++- 4 files changed, 117 insertions(+), 35 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 0f5ae1457..e708647dd 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1343,7 +1343,7 @@ - + 系统文件类型 diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs index 640bc3003..696abc5c6 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs @@ -7,66 +7,90 @@ using System; using IRaCIS.Core.Domain.Share; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Reflection.Metadata; namespace IRaCIS.Core.Application.ViewModel; public class TrialFileTypeView : TrialFileTypeAddOrEdit { - + public DateTime CreateTime { get; set; } - + public DateTime UpdateTime { get; set; } - + +} + + +public class TrialFileTypeSelectView +{ + public Guid Id { get; set; } + + public string Name { get; set; } + + public bool IsEnable { get; set; } + + public bool IsSelfDefine { get; set; } } public class TrialFileTypeAddOrEdit { public Guid? Id { get; set; } - + public ArchiveType ArchiveTypeEnum { get; set; } - + public DateOnly FirstFinalDate { get; set; } - + public bool IsConfirmRecord { get; set; } - + public bool IsEnable { get; set; } - + public bool IsSelfDefine { get; set; } - + public string Name { get; set; } - + public string NameCN { get; set; } - + public int SubIdentification { get; set; } - + public Guid? SysFileTypeId { get; set; } - + public Guid TrialId { get; set; } - } +} public class TrialFileTypeQuery : PageInput { public ArchiveType? ArchiveTypeEnum { get; set; } - + public DateOnly? FirstFinalDate { get; set; } - + public bool? IsConfirmRecord { get; set; } - + public bool? IsEnable { get; set; } - + public bool? IsSelfDefine { get; set; } - + public string? Name { get; set; } - + public string? NameCN { get; set; } - + public int? SubIdentification { get; set; } - - public Guid? SysFileTypeId { get; set; } - - public Guid? TrialId { get; set; } - } - + + + [NotDefault] + public Guid TrialId { get; set; } +} + + +public class TrialFileTypeSelectQuery +{ + [NotDefault] + public Guid TrialId { get; set; } + + public bool? IsEnable { get; set; } + + public bool? IsSelfDefine { get; set; } +} diff --git a/IRaCIS.Core.Application/Service/Document/SysFileTypeService.cs b/IRaCIS.Core.Application/Service/Document/SysFileTypeService.cs index f4303bb53..8e84c2e2a 100644 --- a/IRaCIS.Core.Application/Service/Document/SysFileTypeService.cs +++ b/IRaCIS.Core.Application/Service/Document/SysFileTypeService.cs @@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.Service; /// [ApiExplorerSettings(GroupName = "FileRecord")] -public class SysFileTypeService(IRepository _sysFileTypeRepository, +public class SysFileTypeService(IRepository _sysFileTypeRepository, IRepository _trialFileTypeRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ISysFileTypeService { @@ -32,7 +32,13 @@ public class SysFileTypeService(IRepository _sysFileTypeRepository, { var sysFileTypeQueryable = _sysFileTypeRepository - .ProjectTo(_mapper.ConfigurationProvider); + .WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum) + .WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord) + .WhereIf(inQuery.SubIdentification != null, t => t.SubIdentification == inQuery.SubIdentification) + .WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable) + .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.Name.Contains(inQuery.Name)) + .WhereIf(inQuery.NameCN.IsNotNullOrEmpty(), t => t.NameCN.Contains(inQuery.NameCN)) + .ProjectTo(_mapper.ConfigurationProvider); var pageList = await sysFileTypeQueryable.ToPagedListAsync(inQuery); @@ -43,8 +49,23 @@ public class SysFileTypeService(IRepository _sysFileTypeRepository, public async Task AddOrUpdateSysFileType(SysFileTypeAddOrEdit addOrEditSysFileType) { + var verifyExp = new EntityVerifyExp() + { + VerifyExp = u => u.IsEnable == addOrEditSysFileType.IsEnable && (u.Name == addOrEditSysFileType.Name || u.NameCN == addOrEditSysFileType.NameCN), - var entity = await _sysFileTypeRepository.InsertOrUpdateAsync(addOrEditSysFileType, true); + // "当前类型启用的文件类型名称重复" + VerifyMsg = _localizer["SysFileType_NameRepeat"], + + IsVerify = addOrEditSysFileType.IsEnable == false + }; + + var entity = await _sysFileTypeRepository.InsertOrUpdateAsync(addOrEditSysFileType, true, verifyExp); + + //启用的才进行更新 + if (addOrEditSysFileType.Id != null && addOrEditSysFileType.IsEnable) + { + await _trialFileTypeRepository.BatchUpdateNoTrackingAsync(t => t.SysFileTypeId == addOrEditSysFileType.Id, u => new TrialFileType() { Name = addOrEditSysFileType.Name, NameCN = addOrEditSysFileType.NameCN, }); + } return ResponseOutput.Ok(entity.Id.ToString()); diff --git a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs index 71305013b..9ae25c270 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs @@ -31,22 +31,59 @@ public class TrialFileTypeService(IRepository _trialFileTypeRepos { var trialFileTypeQueryable = _trialFileTypeRepository - .ProjectTo(_mapper.ConfigurationProvider); + .Where(t => t.TrialId == inQuery.TrialId) + + .WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum) + .WhereIf(inQuery.IsConfirmRecord != null, t => t.IsConfirmRecord == inQuery.IsConfirmRecord) + .WhereIf(inQuery.SubIdentification != null, t => t.SubIdentification == inQuery.SubIdentification) + .WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable) + .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.Name.Contains(inQuery.Name)) + .WhereIf(inQuery.NameCN.IsNotNullOrEmpty(), t => t.NameCN.Contains(inQuery.NameCN)) + + .WhereIf(inQuery.IsSelfDefine != null, t => t.IsSelfDefine == inQuery.IsSelfDefine) + .ProjectTo(_mapper.ConfigurationProvider); var pageList = await trialFileTypeQueryable.ToPagedListAsync(inQuery); return pageList; } + public async Task> GetTrialFileTypeSelectList(TrialFileTypeSelectQuery inQuery) + { + var list = _trialFileTypeRepository + .Where(t => t.TrialId == inQuery.TrialId) + + .WhereIf(inQuery.IsSelfDefine != null, t => t.IsSelfDefine == inQuery.IsSelfDefine) + .WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable) + .Select(t => new TrialFileTypeSelectView() + { + Id = t.Id, + IsEnable = t.IsEnable, + Name = _userInfo.IsEn_Us ? t.Name : t.NameCN, + IsSelfDefine = t.IsSelfDefine, + }).ToList(); + + return list; + + } + public async Task AddOrUpdateTrialFileType(TrialFileTypeAddOrEdit addOrEditTrialFileType) { - // 在此处拷贝automapper 映射 - + var verifyExp = new EntityVerifyExp() + { + VerifyExp = u => u.IsEnable == addOrEditTrialFileType.IsEnable && (u.Name == addOrEditTrialFileType.Name || u.NameCN == addOrEditTrialFileType.NameCN), + + // "当前类型启用的文件类型名称重复" + VerifyMsg = _localizer["TrialFileType_NameRepeat"], + + IsVerify = addOrEditTrialFileType.IsEnable == false + }; + + var entity = await _trialFileTypeRepository.InsertOrUpdateAsync(addOrEditTrialFileType, true, verifyExp); - var entity = await _trialFileTypeRepository.InsertOrUpdateAsync(addOrEditTrialFileType, true); return ResponseOutput.Ok(entity.Id.ToString()); From 6d009c4f86148bcd5aa69ad0a80ecf0087b2d4cb Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Feb 2025 11:32:26 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/DTO/TrialFileTypeViewModel.cs | 4 ++++ .../Service/Document/TrialFileTypeService.cs | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs index 696abc5c6..0317b7e85 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/TrialFileTypeViewModel.cs @@ -30,6 +30,8 @@ public class TrialFileTypeSelectView public bool IsEnable { get; set; } public bool IsSelfDefine { get; set; } + + public ArchiveType ArchiveTypeEnum { get; set; } } @@ -90,6 +92,8 @@ public class TrialFileTypeSelectQuery public bool? IsEnable { get; set; } public bool? IsSelfDefine { get; set; } + + public ArchiveType? ArchiveTypeEnum { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs index 9ae25c270..41cadf6f1 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialFileTypeService.cs @@ -48,11 +48,16 @@ public class TrialFileTypeService(IRepository _trialFileTypeRepos return pageList; } + /// + /// 获取项目文件类型下拉框 + /// + /// + /// public async Task> GetTrialFileTypeSelectList(TrialFileTypeSelectQuery inQuery) { var list = _trialFileTypeRepository .Where(t => t.TrialId == inQuery.TrialId) - + .WhereIf(inQuery.ArchiveTypeEnum != null, t => t.ArchiveTypeEnum == inQuery.ArchiveTypeEnum) .WhereIf(inQuery.IsSelfDefine != null, t => t.IsSelfDefine == inQuery.IsSelfDefine) .WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable) .Select(t => new TrialFileTypeSelectView() @@ -61,6 +66,7 @@ public class TrialFileTypeService(IRepository _trialFileTypeRepos IsEnable = t.IsEnable, Name = _userInfo.IsEn_Us ? t.Name : t.NameCN, IsSelfDefine = t.IsSelfDefine, + ArchiveTypeEnum = t.ArchiveTypeEnum, }).ToList(); return list; From fc4ef6b939a0d654813d0f41780f3a459b6db6c3 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Feb 2025 13:24:41 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=93=BE=E6=8E=A5=E8=BF=87=E6=9C=9F+=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E4=B8=8D=E5=85=81=E8=AE=B8=E5=BF=98=E8=AE=B0?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ExtraController.cs | 13 ++++++++++++- .../Service/Management/UserService.cs | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index f737fa776..79b7ad5d0 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -25,6 +25,7 @@ using RestSharp; using RestSharp.Authenticators; using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Net; using System.Net.Http; @@ -200,10 +201,20 @@ namespace IRaCIS.Api.Controllers var errorUrl = domainStrList[0] + "//" + domainStrList[2] + "/error"; + if (lang == "zh") + { + CultureInfo.CurrentCulture = new CultureInfo(StaticData.CultureInfo.zh_CN); + CultureInfo.CurrentUICulture = new CultureInfo(StaticData.CultureInfo.zh_CN); + } + else + { + CultureInfo.CurrentCulture = new CultureInfo(StaticData.CultureInfo.en_US); + CultureInfo.CurrentUICulture = new CultureInfo(StaticData.CultureInfo.en_US); + } if (!await _useRepository.AnyAsync(t => t.Id == Guid.Parse(userId) && t.EmailToken == token && t.IsFirstAdd)) { - decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(lang == "zh" ? "您的初始化链接已过期" : "Error!The initialization link has expired.")} "; + decodeUrl = errorUrl + $"?lang={lang}&ErrorMessage={System.Web.HttpUtility.UrlEncode(I18n.T("UserRedirect_InitializationLinkExpire"))} "; } return Redirect(decodeUrl); diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 6bf2ce9ea..701bd3a85 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -334,14 +334,21 @@ namespace IRaCIS.Core.Application.Service } ////查找改邮箱或者手机的用户 - var exist = await _identityUserRepository.AnyAsync(t => t.EMail == email && t.Status == UserStateEnum.Enable); + var existUser = await _identityUserRepository.Where(t => t.EMail == email && t.Status == UserStateEnum.Enable).FirstOrDefaultAsync(); - if (!exist) + if (existUser==null) { //---邮箱错误。 return ResponseOutput.NotOk(_localizer["User_EmailError"]); } + else + { + if (existUser.IsFirstAdd && existUser.UserName.IsNullOrEmpty()) + { + return ResponseOutput.NotOk(_localizer["User_Notinitialized"]); + } + } //验证码 6位 @@ -937,7 +944,7 @@ namespace IRaCIS.Core.Application.Service var userLoginReturnModel = new IRCLoginReturnDTO(); - var loginUser = await _identityUserRepository.Where(u => u.UserName.Equals(userName) && u.Password == password).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); + var loginUser = await _identityUserRepository.Where(u => (u.UserName.Equals(userName) || u.EMail.Equals(userName)) && u.Password == password).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); var existUserLoginInfo = await _identityUserRepository.Where(u => u.UserName == userName).Select(t => new { t.LastLoginIP, t.LastChangePassWordTime, t.Id }).FirstOrDefaultAsync(); @@ -1013,13 +1020,13 @@ namespace IRaCIS.Core.Application.Service await _identityUserRepository.BatchUpdateNoTrackingAsync(x => x.Id == loginUser.IdentityUserId, x => new IdentityUser() { LastLoginTime = DateTime.Now, - LastLoginIP=_userInfo.IP, + LastLoginIP = _userInfo.IP, }); if (loginUser.Status == 0) { - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = userName, OptType = UserOptType.LoginLockedAccount, IsLoginUncommonly = isLoginUncommonly }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName = loginUser.UserName, OptType = UserOptType.LoginLockedAccount, IsLoginUncommonly = isLoginUncommonly }, true); //---该用户已经被禁用。 return ResponseOutput.NotOk(_localizer["User_Disabled"], new IRCLoginReturnDTO()); @@ -1029,7 +1036,7 @@ namespace IRaCIS.Core.Application.Service await _fusionCache.SetAsync(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes)); - await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, OptType = UserOptType.Login, IsLoginUncommonly = isLoginUncommonly }, true); + await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, ActionIdentityUserId = loginUser.IdentityUserId, ActionUserName=loginUser.UserName, OptType = UserOptType.Login, IsLoginUncommonly = isLoginUncommonly }, true); userLoginReturnModel.BasicInfo = loginUser; From 1c3ddcf1cd86f10ff6f1b3b06d5b72c9a422c6fd Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Feb 2025 13:32:54 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E7=AE=B1?= =?UTF-8?q?=E7=99=BB=E5=BD=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 7 +++++++ IRaCIS.Core.Application/Service/Management/UserService.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index e708647dd..ae189d372 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1459,6 +1459,13 @@ + + + 获取项目文件类型下拉框 + + + + 项目定稿记录 diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 701bd3a85..f3f242279 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -946,7 +946,7 @@ namespace IRaCIS.Core.Application.Service var loginUser = await _identityUserRepository.Where(u => (u.UserName.Equals(userName) || u.EMail.Equals(userName)) && u.Password == password).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync(); - var existUserLoginInfo = await _identityUserRepository.Where(u => u.UserName == userName).Select(t => new { t.LastLoginIP, t.LastChangePassWordTime, t.Id }).FirstOrDefaultAsync(); + var existUserLoginInfo = await _identityUserRepository.Where(u => u.UserName == userName ||u.EMail==userName).Select(t => new { t.LastLoginIP, t.LastChangePassWordTime, t.Id }).FirstOrDefaultAsync(); var isExistAccount = existUserLoginInfo != null; From 8b53517f2c96d39305d5fb4622ec932ac2a53978 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Feb 2025 13:43:21 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=A7=92=E8=89=B2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/DTO/UserTypeRoleModel.cs | 2 +- .../Service/Management/UserTypeService.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs index 2b97741d3..aad08ee57 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs @@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Contracts public string PermissionStr { get; set; } = string.Empty; public int Order { get; set; } - + public bool IsEnable { get; set; } public List UserTypeGroupIdList { get; set; } = new List(); diff --git a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs index e1a7fffae..109d8ed20 100644 --- a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs @@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Contracts { var userTypeRoleQueryable = _userTypeRepository + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.IsEnable == true) .WhereIf(!string.IsNullOrWhiteSpace(userTypeQuery.SearchFilter), t => t.Description.Contains(userTypeQuery.SearchFilter!) || t.UserTypeName.Contains(userTypeQuery.SearchFilter!) || t.UserTypeShortName.Contains(userTypeQuery.SearchFilter!)) .WhereIf(userTypeQuery.GroupId != null, t => t.UserTypeGroupList.Any(t => t.DictionaryId == userTypeQuery.GroupId)) @@ -158,7 +159,9 @@ namespace IRaCIS.Core.Application.Contracts public async Task> GetTrialUserTypeList() { //排除其他组的用户 - var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin) + var query = _userTypeRepository + .WhereIf(_userInfo.UserTypeEnumInt != (int)UserTypeEnum.SuperAdmin, t => t.IsEnable == true) + .Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin) .Where(t => !t.UserTypeGroupList.Any(t => t.Group.Code == "3")) .OrderBy(t => t.UserTypeShortName).ProjectTo(_mapper.ConfigurationProvider);