diff --git a/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs index 9060e8f1a..4ff621279 100644 --- a/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/Interface/ITrialDocumentService.cs @@ -16,10 +16,10 @@ namespace IRaCIS.Core.Application.Contracts Task UserAbandonDoc(Guid documentId, bool isSystemDoc); Task AddOrUpdateTrialDocument(AddOrEditTrialDocument addOrEditTrialDocument); Task DeleteTrialDocument(Guid trialDocumentId, Guid trialId); - Task<(PageOutput, object)> GetDocumentConfirmList(DocumentTrialUnionQuery querySystemDocument); + Task>> GetDocumentConfirmList(DocumentTrialUnionQuery querySystemDocument); Task> GetTrialDocumentList(TrialDocumentQuery queryTrialDocument); - - Task> > GetUserDocumentList(TrialUserDocUnionQuery querySystemDocument); + + Task>> GetUserDocumentList(TrialUserDocUnionQuery querySystemDocument); Task SetFirstViewDocumentTime(Guid documentId, bool isSystemDoc); Task UserConfirm(UserConfirmCommand userConfirmCommand); Task> GetTrialUserSelect(Guid trialId); diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 8e13c0287..da0bbf23c 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -225,7 +225,6 @@ namespace IRaCIS.Core.Application.Services //系统文档查询 var systemDocumentQueryable = from needConfirmedUserType in _systemDocNeedConfirmedUserTypeRepository.Where(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) - //.Where(u => u.UserTypeRole.UserList.SelectMany(cc => cc.UserTrials.Where(t => t.TrialId == querySystemDocument.TrialId)).Any(e => e.Trial.TrialFinishedTime < u.SystemDocument.CreateTime)) .WhereIf(trialInfo.TrialFinishedTime != null, u => u.SystemDocument.CreateTime < trialInfo.TrialFinishedTime) .WhereIf(!_userInfo.IsAdmin, t => t.SystemDocument.IsDeleted == false || (t.SystemDocument.IsDeleted == true && t.SystemDocument.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id))) @@ -356,7 +355,7 @@ namespace IRaCIS.Core.Application.Services /// /// [HttpPost] - public async Task<(PageOutput, object)> GetDocumentConfirmList(DocumentTrialUnionQuery inQuery) + public async Task>> GetDocumentConfirmList(DocumentTrialUnionQuery inQuery) { @@ -393,7 +392,7 @@ namespace IRaCIS.Core.Application.Services #endregion - var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); + var trialInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId,ignoreQueryFilters:true).Select(t => new { t.TrialFinishedTime, t.TrialStatusStr }).FirstNotNullAsync()); var trialDocQuery = from trialDocumentNeedConfirmedUserType in _trialDocNeedConfirmedUserTypeRepository.Where(t => t.TrialDocument.TrialId == inQuery.TrialId) join trialUser in _trialUserRepository.Where(t => t.TrialId == inQuery.TrialId) @@ -486,7 +485,7 @@ namespace IRaCIS.Core.Application.Services .CountAsync(); - return (result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr = trialInfo.TrialStatusStr }); + return ResponseOutput.Ok (result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr = trialInfo.TrialStatusStr }); } diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs index 071affd3e..a639dc0f5 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/UnionStudyViewDodel.cs @@ -382,7 +382,7 @@ namespace IRaCIS.Core.Application.Contracts public string HtmlPath { get; set; } = string.Empty; - public long FileSize { get; set; } + public long FileSize { get; set; } } public class CRCUploadTaskQuery @@ -578,7 +578,7 @@ namespace IRaCIS.Core.Application.Contracts } - public class TrialIamgeDownQuery:PageInput + public class TrialIamgeDownQuery : PageInput { [NotDefault] public Guid TrialId { get; set; } @@ -595,6 +595,8 @@ namespace IRaCIS.Core.Application.Contracts public DateTime? DownloadEndTime { get; set; } public string? IP { get; set; } + + public string? Name { get; set} } public class SubjectVisitTaskInfo diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs index 5941c0d16..1bf154b8a 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DownloadAndUploadService.cs @@ -997,6 +997,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId) .WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode)) .WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP)) + .WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUser.UserName.Contains(inQuery.Name) || t.CreateUser.FullName.Contains(inQuery.Name)) .WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType) .WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType) .WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess) diff --git a/IRaCIS.Core.Application/Service/QC/ClinicalDataService.cs b/IRaCIS.Core.Application/Service/QC/ClinicalDataService.cs index c4c186183..6ac863684 100644 --- a/IRaCIS.Core.Application/Service/QC/ClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/QC/ClinicalDataService.cs @@ -51,7 +51,7 @@ namespace IRaCIS.Core.Application.Contracts return await previousHistoryQueryable.ToListAsync(); } - [HttpPost] + [HttpPost("{trialId:guid}")] public async Task> AddOrUpdatePreviousHistory(PreviousHistoryAddOrEdit addOrEditPreviousHistory) { await _qCCommon.VerifyIsCRCSubmmitAsync(_subjectVisitRepository, _userInfo, addOrEditPreviousHistory.SubjectVisitId);