This commit is contained in:
he
2023-05-23 10:35:21 +08:00
parent 80b877879c
commit 36f236f69f
4 changed files with 20 additions and 3 deletions
@@ -33,5 +33,7 @@ namespace IRaCIS.Core.Application.Contracts
Task<IResponseOutput> SubmitOncologyReadingInfo(SubmitOncologyReadingInfoInDto inDto);
Task AddOncologyTask(Guid oncologModuleId);
Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto)
}
}
@@ -147,12 +147,22 @@ namespace IRaCIS.Application.Services
public async Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto)
{
UserTypeEnum userType = (UserTypeEnum)_userInfo.UserTypeEnumInt;
//_userInfo.UserTypeId
List<UserTypeEnum> canViewUserType = new List<UserTypeEnum>()
{
UserTypeEnum.IndependentReviewer,
UserTypeEnum.IQC,
};
return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId
&& x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.Id && y.ConfirmTime != null)
&& x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId))
.Where(t => t.FileType.Code == "2" || t.FileType.Code == "6").IgnoreQueryFilters()
.WhereIf(userType== UserTypeEnum.IndependentReviewer, t => t.FileType.Code == "2" || t.FileType.Code == "6")
.WhereIf(userType == UserTypeEnum.IQC, t => t.FileType.Code == "4" || t.FileType.Code == "5")
.WhereIf(!canViewUserType.Contains(userType),t=>false)
.IgnoreQueryFilters()
.Select(x => new GetManualListOutDto()
{
Id = x.Id,