修改稽查文档闭包修改
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
hang 2025-09-28 14:25:05 +08:00
parent 7a3bbbeb19
commit be1fbf2059
5 changed files with 553 additions and 463 deletions

View File

@ -1522,34 +1522,34 @@
插入闭包表关系
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.GetAuditDocumentData_New(IRaCIS.Core.Application.ViewModel.GetAuditDocumentDataInDto)">
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.GetAuditDocumentData(IRaCIS.Core.Application.ViewModel.GetAuditDocumentDataInDto)">
<summary>
获取文件树形结构 (传Id 根节点就是自己)
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.SetIsAuthorization_New(IRaCIS.Core.Application.ViewModel.SetIsAuthorizationInDto)">
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.SetIsAuthorization(IRaCIS.Core.Application.ViewModel.SetIsAuthorizationInDto)">
<summary>
设置是否授权
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.CopyFileOrFolder_New(IRaCIS.Core.Application.ViewModel.MovieFileOrFolderInDto)">
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.CopyFileOrFolder(IRaCIS.Core.Application.ViewModel.MovieFileOrFolderInDto)">
<summary>
复制文件或者文件夹
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.MovieFileOrFolder_New(IRaCIS.Core.Application.ViewModel.MovieFileOrFolderInDto)">
<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_New(IRaCIS.Core.Application.ViewModel.DeleteAuditDocumentInDto)">
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.DeleteAuditDocument(IRaCIS.Core.Application.ViewModel.DeleteAuditDocumentInDto)">
<summary>
删除稽查文档
</summary>
@ -1569,21 +1569,6 @@
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.GetAuditDocumentList(IRaCIS.Core.Application.ViewModel.AuditDocumentQuery)">
<summary>
获取稽查文档
</summary>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.GetHistoricalVersion(IRaCIS.Core.Application.ViewModel.GetHistoricalVersionInDto)">
<summary>
获取历史版本
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.UpdateAuditDocument(IRaCIS.Core.Application.ViewModel.AuditDocumentUpdateDto)">
<summary>
修改稽查文档
@ -1612,36 +1597,17 @@
</summary>
<param name="inDto"></param>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.DeleteAuditDocument(IRaCIS.Core.Application.ViewModel.DeleteAuditDocumentInDto)">
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.GetAuditDocumentList(IRaCIS.Core.Application.ViewModel.AuditDocumentQuery)">
<summary>
删除稽查文档
获取稽查文档
</summary>
<param name="inDto"></param>
<param name="inQuery"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.GetAuditDocumentData(IRaCIS.Core.Application.ViewModel.GetAuditDocumentDataInDto)">
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.GetHistoricalVersion(IRaCIS.Core.Application.ViewModel.GetHistoricalVersionInDto)">
<summary>
获取文件树形结构 (传Id 根节点就是自己)
</summary>
<param name="inDto"></param>
<returns></returns>
</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)">
<summary>
复制文件或者文件夹
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.SetIsAuthorization(IRaCIS.Core.Application.ViewModel.SetIsAuthorizationInDto)">
<summary>
设置是否授权
获取历史版本
</summary>
<param name="inDto"></param>
<returns></returns>

View File

@ -292,6 +292,8 @@ namespace IRaCIS.Application.Contracts
public string OrganizationName { get; set; } = string.Empty;
public Guid? UserType { get; set; }
public UserTypeEnum? UserTypeEnum { get; set; }
public bool? IsTestUser { get; set; }
public bool? IsZhiZhun { get; set; }

View File

@ -510,7 +510,8 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.EndLastLoginTime != null, t => t.LastLoginTime <= inQuery.EndLastLoginTime)
.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.UserType != null, t => t.UserRoleList.Any(t => t.UserTypeId == inQuery.UserType && t.IsUserRoleDisabled == false))
.WhereIf(inQuery.UserType != 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)
@ -863,7 +864,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.OptTypeList != null && inQuery.OptTypeList.Count > 0, t => inQuery.OptTypeList.Contains(t.OptType))
.WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate)
.WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate)
.WhereIf(inQuery.IsLoginUncommonly != null , t => t.IsLoginUncommonly== inQuery.IsLoginUncommonly)
.WhereIf(inQuery.IsLoginUncommonly != null, t => t.IsLoginUncommonly == inQuery.IsLoginUncommonly)
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.ActionUserName.Contains(inQuery.LoginUserName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.ActionUserName.Contains(inQuery.LoginFaildName!))
@ -922,7 +923,7 @@ namespace IRaCIS.Core.Application.Service
var password = loginDto.Password;
var emailConfig = _emailConfig.CurrentValue;
var companyInfo = new SystemEmailSendConfigView() { CompanyName = emailConfig.CompanyName, CompanyNameCN = emailConfig.CompanyNameCN, CompanyShortName = emailConfig.CompanyShortName, CompanyShortNameCN = emailConfig.CompanyShortNameCN,SystemShortName=emailConfig.SystemShortName ,EmailRegexStr=emailConfig.EmailRegexStr};
var companyInfo = new SystemEmailSendConfigView() { CompanyName = emailConfig.CompanyName, CompanyNameCN = emailConfig.CompanyNameCN, CompanyShortName = emailConfig.CompanyShortName, CompanyShortNameCN = emailConfig.CompanyShortNameCN, SystemShortName = emailConfig.SystemShortName, EmailRegexStr = emailConfig.EmailRegexStr };
int maxFailures = _verifyConfig.CurrentValue.LoginMaxFailCount;
@ -991,7 +992,7 @@ namespace IRaCIS.Core.Application.Service
//超过90天没修改密码
if (loginUser!= null&&_verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value)
if (loginUser != null && _verifyConfig.CurrentValue.IsNeedChangePassWord && loginUser.LastChangePassWordTime != null && DateTime.Now.AddDays(-_verifyConfig.CurrentValue.ChangePassWordDays) > loginUser.LastChangePassWordTime.Value)
{
loginUser.NeedChangePassWord = true;
}
@ -1002,7 +1003,7 @@ namespace IRaCIS.Core.Application.Service
UserOptType.LoginLockedAccount
};
var actionUserName= loginUser!= null ? loginUser.UserName : userName;
var actionUserName = loginUser != null ? loginUser.UserName : userName;
var lastLoginIPRegion = await _userLogRepository.Where(t => t.ActionUserName == actionUserName && userOptTypes.Contains(t.OptType))
.OrderByDescending(t => t.CreateTime).Select(t => t.IPRegion).FirstOrDefaultAsync();

View File

@ -84,9 +84,11 @@ namespace IRaCIS.Core.Application.Service
public async Task RebuildAuditDocumentClosureAsync([FromServices] IRepository<AuditDocumentClosure> _auditDocumentClosureRepository, [FromServices] IRepository<AuditDocument> _auditDocumentRepository)
{
await _auditDocumentClosureRepository.BatchDeleteNoTrackingAsync(t => t.Id != Guid.Empty);
var documents = await _auditDocumentRepository.Where().Select(t => new { t.Id, t.ParentId }).ToListAsync();
//过滤版本文件,防止污染闭包表
var documents = await _auditDocumentRepository.Where(t => t.MainFileId == null).Select(t => new { t.Id, t.ParentId }).ToListAsync();
var closures = new List<AuditDocumentClosure>();