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/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(); 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) 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.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(); } 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();