From 4a1e0a87ba638496d5515212e89b2c2a31217850 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 24 Feb 2025 17:21:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=A1=E7=90=86=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=B1=BB=E5=9E=8B=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 7 +++++++ .../Service/Management/UserTypeService.cs | 2 +- IRaCIS.Core.Application/TestService.cs | 10 ++++++++++ IRaCIS.Core.Domain.Share/User/UserType.cs | 3 +++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 8e1e76138..f12d748c1 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1466,6 +1466,13 @@ + + + 复制系统数据到项目 + + + + 项目定稿记录 diff --git a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs index 3876f5a1e..0fabc11dd 100644 --- a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs @@ -141,7 +141,7 @@ namespace IRaCIS.Core.Application.Contracts - var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin) + var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin && x.IsEnable==true) .WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum)) .OrderBy(t => t.UserTypeShortName).ProjectTo(_mapper.ConfigurationProvider); diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index b223f086a..534d32aaf 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -166,6 +166,16 @@ namespace IRaCIS.Core.Application.Service { var userRoleList = item.OrderBy(t => t.CreateTime).ToList(); + foreach (var userRole in userRoleList) + { + var isTrue = userRole.UserTypeEnum == UserTypeEnum.SystemAdmin || userRole.UserTypeEnum == UserTypeEnum.OP || userRole.UserTypeEnum == UserTypeEnum.Dashboard; + + if (isTrue) + { + await _userRoleRepository.BatchUpdateNoTrackingAsync(t => t.Id == userRole.Id, t => new UserRole() { IsUserRoleDisabled = true }); + } + } + var firstCreateRole = userRoleList.FirstOrDefault(); var firstTrialId = _trialUserRoleRepository.Where(t => t.TrialUser.IdentityUserId == firstCreateRole.IdentityUserId).IgnoreQueryFilters().OrderBy(t => t.CreateTime).Select(t => t.TrialId).FirstOrDefault(); diff --git a/IRaCIS.Core.Domain.Share/User/UserType.cs b/IRaCIS.Core.Domain.Share/User/UserType.cs index b38f45d76..fa26e0c23 100644 --- a/IRaCIS.Core.Domain.Share/User/UserType.cs +++ b/IRaCIS.Core.Domain.Share/User/UserType.cs @@ -62,6 +62,9 @@ OP=31, + //仅仅管理后端部分数据,现在不用 + SystemAdmin=32, + //医生用户类型暂不处理 ShareImage = 125,