diff --git a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs index 0f001cccb..cefd27089 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs @@ -42,7 +42,7 @@ namespace IRaCIS.Core.Application.Contracts public Guid? ConfirmUserId { get; set; } - public bool IsConfirmed { get; set; } + public bool IsConfirmed => ConfirmTime != null; public string UserName { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 31425bf20..d4309f64f 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -194,7 +194,7 @@ namespace IRaCIS.Core.Application.Services FullFilePath = needConfirmedUserType.SystemDocument.Path, - IsConfirmed = confirm.ConfirmTime != null, + //IsConfirmed = confirm.ConfirmTime != null, ConfirmUserId = confirm.ConfirmUserId, ConfirmTime = confirm.ConfirmTime, RealName = trialUser.User.FullName, @@ -226,7 +226,7 @@ namespace IRaCIS.Core.Application.Services UpdateTime = trialDoc.UpdateTime, SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes, - IsConfirmed = confirm.ConfirmTime != null, + //IsConfirmed = confirm.ConfirmTime != null, ConfirmUserId = confirm.ConfirmUserId, ConfirmTime = confirm.ConfirmTime, RealName = trialUser.User.FullName, @@ -362,7 +362,7 @@ namespace IRaCIS.Core.Application.Services FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId, FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN, UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime, - IsConfirmed= confirm.ConfirmTime!=null, + //IsConfirmed= confirm.ConfirmTime!=null, @@ -398,7 +398,7 @@ namespace IRaCIS.Core.Application.Services FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN, FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId, UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime, - IsConfirmed = confirm.ConfirmTime != null, + //IsConfirmed = confirm.ConfirmTime != null, ConfirmUserId = confirm.ConfirmUserId, ConfirmTime = confirm.ConfirmTime, @@ -413,8 +413,9 @@ namespace IRaCIS.Core.Application.Services var unionQuery = trialDocQuery.Union(systemDocQuery) .WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name)) .WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId) - .WhereIf(querySystemDocument.IsConfirmed != null, t => t.IsConfirmed == querySystemDocument.IsConfirmed) - .WhereIf(querySystemDocument.IsDeleted != null, t => t.IsDeleted == querySystemDocument.IsDeleted) + .WhereIf(querySystemDocument.IsConfirmed == true, t => t.ConfirmTime != null) + .WhereIf(querySystemDocument.IsConfirmed == false, t => t.ConfirmTime == null) + .WhereIf(querySystemDocument.IsDeleted != null, t => t.IsDeleted == querySystemDocument.IsDeleted) .WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId); var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);