From 87955d2ca0279f8bd03d0b0d0ff7d752101b2dbf Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 29 Sep 2025 10:30:09 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs | 2 ++ IRaCIS.Core.Application/Service/Management/UserService.cs | 4 +++- IRaCIS.Core.Domain/Management/User.cs | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index cfc1752c5..90c41fc23 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -317,6 +317,8 @@ namespace IRaCIS.Application.Contracts public UserCeateSource? UserCeateSource { get; set; } public Guid? AuditRecordId { get; set; } + + public bool? IsAuditRecordUserSelect { get; set; } } public class UserRoleInfoDTO diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index fa5108fc4..f602ec53e 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -511,11 +511,13 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.BeginLastChangePassWordTime != null, t => t.LastChangePassWordTime >= inQuery.BeginLastChangePassWordTime) .WhereIf(inQuery.EndLastChangePassWordTime != null, t => t.LastChangePassWordTime <= inQuery.EndLastChangePassWordTime) .WhereIf(inQuery.UserType != null, t => t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserType && t.IsUserRoleDisabled == false)) - .WhereIf(inQuery.UserTypeEnum != null, t => t.UserRoleList.Any(t => t.UserTypeRole.UserTypeEnum == inQuery.UserTypeEnum && t.IsUserRoleDisabled == false)) + .WhereIf(inQuery.UserTypeEnum != null, t => t.UserRoleList.Any(t => t.UserTypeRole.UserTypeEnum == inQuery.UserTypeEnum && t.IsUserRoleDisabled == false)) .WhereIf(inQuery.UserState != null, t => t.Status == inQuery.UserState) .WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser) .WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun) .WhereIf(inQuery.UserCeateSource != null, t => t.UserCeateSource == inQuery.UserCeateSource) + .WhereIf(inQuery.AuditRecordId != null && inQuery.IsAuditRecordUserSelect == true, t => t.AuditRecordList.Any(t => t.AuditRecordId == inQuery.AuditRecordId)) + .WhereIf(inQuery.AuditRecordId != null && inQuery.IsAuditRecordUserSelect == false, t => !t.AuditRecordList.Any(t => t.AuditRecordId == inQuery.AuditRecordId)) .ProjectTo(_mapper.ConfigurationProvider); var pageList = await userQueryable.ToPagedListAsync(inQuery); diff --git a/IRaCIS.Core.Domain/Management/User.cs b/IRaCIS.Core.Domain/Management/User.cs index 9ac550c24..577181053 100644 --- a/IRaCIS.Core.Domain/Management/User.cs +++ b/IRaCIS.Core.Domain/Management/User.cs @@ -69,6 +69,10 @@ public class IdentityUser : BaseFullAuditEntity [JsonIgnore] public List UserTrialList { get; set; } + [JsonIgnore] + + public List AuditRecordList { get; set; } + [JsonIgnore] public List UserRoleList { get; set; } = new List(); From b6d21280346e44ad50cdcf7e9ced0ab6e9139f29 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 29 Sep 2025 10:31:57 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 12 ++++++------ .../Service/Document/_MapConfig.cs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 33d9b0d87..a52150858 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1536,12 +1536,6 @@ - - - 移动文件或者文件夹 到其他文件夹 - - - 删除稽查文档 @@ -1562,6 +1556,12 @@ + + + 移动文件或者文件夹 到其他文件夹 + + + 复制文件或者文件夹 diff --git a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs index 2e2b617f7..da8d51638 100644 --- a/IRaCIS.Core.Application/Service/Document/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Document/_MapConfig.cs @@ -155,7 +155,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.IdentityUserList, c => c.MapFrom(t => t.AuditRecordIdentityUserList)); CreateMap() - .ForMember(d => d.AuditRecordIdentityUserList, c => c.MapFrom(t => t.IdnetityUserIdList)); + /* .ForMember(d => d.AuditRecordIdentityUserList, c => c.MapFrom(t => t.IdnetityUserIdList))*/; CreateMap() .EqualityComparison((odto, o) => odto == o.IdentityUserId) From 36856864477832989bfe48dc3f38c728bab97e6c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 29 Sep 2025 10:42:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?EA=20=E6=9F=A5=E7=9C=8B=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=20=E7=94=A8=E6=88=B7=20=E6=96=87=E4=BB=B6=E7=BA=A7=E5=88=AB?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/TrialDocumentService.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 06fdd2181..520bff7fb 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -911,12 +911,15 @@ namespace IRaCIS.Core.Application.Services var isInternal = _userInfo.IsZhiZhun; + var isEA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.EA; + var systemDocQuery = from sysDoc in _systemDocumentRepository.AsQueryable(false) .Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true) from identityUser in _identityUserRepository.AsQueryable(false).Where(t => t.Status == UserStateEnum.Enable && t.UserRoleList.Where(t => t.IsUserRoleDisabled == false).Any(t => sysDoc.NeedConfirmedUserTypeList.AsQueryable().Any(c => c.NeedConfirmUserTypeId == t.UserTypeId))) .Where(t => inQuery.UserId != null ? t.Id == inQuery.UserId : true) .Where(t => inQuery.UserTypeId != null ? t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserTypeId && t.IsUserRoleDisabled == false) : true) + .Where(t => isEA ? t.IsZhiZhun == true : true) //EA 只能查看内部人员文档 join confirm in _systemDocConfirmedUserRepository.Where() on new { ConfirmUserId = identityUser.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc from confirm in cc.DefaultIfEmpty() select new UnionDocumentWithConfirmInfoView() @@ -956,13 +959,13 @@ namespace IRaCIS.Core.Application.Services .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) - .WhereIf(isInternal == false, t => t.ConfirmTime != null); + .WhereIf(isInternal == false, t => t.ConfirmTime != null); //不是内部的人,看有签名时间的 var result = await unionQuery.ToPagedListAsync(inQuery); #region 处理文档 需要签署的角色类型 和每个人的角色信息 - var trialDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList(); + //var trialDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == false).Select(t => t.Id).ToList(); var sysDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList(); From 09bf2b4d9129ecb5ea376e65854df5ec958d4e54 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 29 Sep 2025 10:44:40 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=87=8D=E5=BB=BA=E9=97=AD=E5=8C=85?= =?UTF-8?q?=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/TestService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index 9118be0be..8840437ae 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.Service /// /// [AllowAnonymous] - public async Task RebuildAuditDocumentClosureAsync([FromServices] IRepository _auditDocumentClosureRepository, [FromServices] IRepository _auditDocumentRepository) + public async Task RebuildAuditDocumentClosureAsync([FromServices] IRepository _auditDocumentClosureRepository, [FromServices] IRepository _auditDocumentRepository) { @@ -134,6 +134,8 @@ namespace IRaCIS.Core.Application.Service await _auditDocumentClosureRepository.AddRangeAsync(closures); await _auditDocumentClosureRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(); }