Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
he 2025-09-29 11:01:48 +08:00
commit 28014139f5
7 changed files with 24 additions and 11 deletions

View File

@ -1536,12 +1536,6 @@
<param name="inDto"></param> <param name="inDto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.MovieFileOrFolder(IRaCIS.Core.Application.ViewModel.MovieFileOrFolderInDto)">
<summary>
移动文件或者文件夹 到其他文件夹
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.DeleteAuditDocument(IRaCIS.Core.Application.ViewModel.DeleteAuditDocumentInDto)"> <member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.DeleteAuditDocument(IRaCIS.Core.Application.ViewModel.DeleteAuditDocumentInDto)">
<summary> <summary>
删除稽查文档 删除稽查文档
@ -1562,6 +1556,12 @@
<param name="inDto"></param> <param name="inDto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.MovieFileOrFolder(IRaCIS.Core.Application.ViewModel.MovieFileOrFolderInDto)">
<summary>
移动文件或者文件夹 到其他文件夹
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.CopyFileOrFolder(IRaCIS.Core.Application.ViewModel.MovieFileOrFolderInDto)"> <member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.CopyFileOrFolder(IRaCIS.Core.Application.ViewModel.MovieFileOrFolderInDto)">
<summary> <summary>
复制文件或者文件夹 复制文件或者文件夹

View File

@ -911,12 +911,15 @@ namespace IRaCIS.Core.Application.Services
var isInternal = _userInfo.IsZhiZhun; var isInternal = _userInfo.IsZhiZhun;
var isEA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.EA;
var systemDocQuery = var systemDocQuery =
from sysDoc in _systemDocumentRepository.AsQueryable(false) from sysDoc in _systemDocumentRepository.AsQueryable(false)
.Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true) .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))) 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.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 => 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 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() from confirm in cc.DefaultIfEmpty()
select new UnionDocumentWithConfirmInfoView() select new UnionDocumentWithConfirmInfoView()
@ -956,13 +959,13 @@ namespace IRaCIS.Core.Application.Services
.WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime) .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime)
.WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName))
.WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) .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); var result = await unionQuery.ToPagedListAsync(inQuery);
#region 处理文档 需要签署的角色类型 和每个人的角色信息 #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(); var sysDocIdList = result.CurrentPageData.Where(t => t.IsSystemDoc == true).Select(t => t.Id).ToList();

View File

@ -155,7 +155,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.IdentityUserList, c => c.MapFrom(t => t.AuditRecordIdentityUserList)); .ForMember(d => d.IdentityUserList, c => c.MapFrom(t => t.AuditRecordIdentityUserList));
CreateMap<AuditRecordAddOrEdit, AuditRecord>() CreateMap<AuditRecordAddOrEdit, AuditRecord>()
.ForMember(d => d.AuditRecordIdentityUserList, c => c.MapFrom(t => t.IdnetityUserIdList)); /* .ForMember(d => d.AuditRecordIdentityUserList, c => c.MapFrom(t => t.IdnetityUserIdList))*/;
CreateMap<Guid, AuditRecordIdentityUser>() CreateMap<Guid, AuditRecordIdentityUser>()
.EqualityComparison((odto, o) => odto == o.IdentityUserId) .EqualityComparison((odto, o) => odto == o.IdentityUserId)

View File

@ -317,6 +317,8 @@ namespace IRaCIS.Application.Contracts
public UserCeateSource? UserCeateSource { get; set; } public UserCeateSource? UserCeateSource { get; set; }
public Guid? AuditRecordId { get; set; } public Guid? AuditRecordId { get; set; }
public bool? IsAuditRecordUserSelect { get; set; }
} }
public class UserRoleInfoDTO public class UserRoleInfoDTO

View File

@ -511,11 +511,13 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.BeginLastChangePassWordTime != null, t => t.LastChangePassWordTime >= inQuery.BeginLastChangePassWordTime) .WhereIf(inQuery.BeginLastChangePassWordTime != null, t => t.LastChangePassWordTime >= inQuery.BeginLastChangePassWordTime)
.WhereIf(inQuery.EndLastChangePassWordTime != null, t => t.LastChangePassWordTime <= inQuery.EndLastChangePassWordTime) .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.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.UserState != null, t => t.Status == inQuery.UserState)
.WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser) .WhereIf(inQuery.IsTestUser != null, t => t.IsTestUser == inQuery.IsTestUser)
.WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun) .WhereIf(inQuery.IsZhiZhun != null, t => t.IsZhiZhun == inQuery.IsZhiZhun)
.WhereIf(inQuery.UserCeateSource != null, t => t.UserCeateSource == inQuery.UserCeateSource) .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<UserListDTO>(_mapper.ConfigurationProvider); .ProjectTo<UserListDTO>(_mapper.ConfigurationProvider);
var pageList = await userQueryable.ToPagedListAsync(inQuery); var pageList = await userQueryable.ToPagedListAsync(inQuery);

View File

@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="_auditDocumentRepository"></param> /// <param name="_auditDocumentRepository"></param>
/// <returns></returns> /// <returns></returns>
[AllowAnonymous] [AllowAnonymous]
public async Task RebuildAuditDocumentClosureAsync([FromServices] IRepository<AuditDocumentClosure> _auditDocumentClosureRepository, [FromServices] IRepository<AuditDocument> _auditDocumentRepository) public async Task<IResponseOutput> RebuildAuditDocumentClosureAsync([FromServices] IRepository<AuditDocumentClosure> _auditDocumentClosureRepository, [FromServices] IRepository<AuditDocument> _auditDocumentRepository)
{ {
@ -134,6 +134,8 @@ namespace IRaCIS.Core.Application.Service
await _auditDocumentClosureRepository.AddRangeAsync(closures); await _auditDocumentClosureRepository.AddRangeAsync(closures);
await _auditDocumentClosureRepository.SaveChangesAsync(); await _auditDocumentClosureRepository.SaveChangesAsync();
return ResponseOutput.Ok();
} }

View File

@ -69,6 +69,10 @@ public class IdentityUser : BaseFullAuditEntity
[JsonIgnore] [JsonIgnore]
public List<TrialIdentityUser> UserTrialList { get; set; } public List<TrialIdentityUser> UserTrialList { get; set; }
[JsonIgnore]
public List<AuditRecordIdentityUser> AuditRecordList { get; set; }
[JsonIgnore] [JsonIgnore]
public List<UserRole> UserRoleList { get; set; } = new List<UserRole>(); public List<UserRole> UserRoleList { get; set; } = new List<UserRole>();