@@ -41,7 +41,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.WhereIf(string.IsNullOrEmpty(queryCommonDocument.Name), t => t.Name.Contains(queryCommonDocument.Name))
|
||||
.ProjectTo<CommonDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||
|
||||
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument.PageIndex, queryCommonDocument.PageSize, String.IsNullOrEmpty(queryCommonDocument.SortField) ? nameof(CommonDocument.Code) : queryCommonDocument.SortField, queryCommonDocument.Asc); ;
|
||||
return await commonDocumentQueryable.ToPagedListAsync(queryCommonDocument);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
Task<List<TrialUserDto>> GetTrialUserSelect(Guid trialId);
|
||||
|
||||
|
||||
PageOutput<DocumentUnionWithUserStatView> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument);
|
||||
Task<PageOutput<DocumentUnionWithUserStatView>> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument);
|
||||
List<TrialUserUnionDocumentView> GetTrialUserDocumentList(Guid trialId);
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,8 @@ namespace IRaCIS.Core.Application.Services
|
||||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||
private readonly IRepository<TrialDocConfirmedUser> _trialDocUserTypeConfirmedUserRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly ISystemDocumentService _systemDocumentService;
|
||||
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||
private readonly ISystemDocumentService _systemDocumentService;
|
||||
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
||||
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||
@@ -36,8 +36,8 @@ namespace IRaCIS.Core.Application.Services
|
||||
public TrialDocumentService(IRepository<TrialDocument> trialDocumentRepository,
|
||||
IRepository<TrialDocConfirmedUser> trialDocUserTypeConfirmedUserRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
ISystemDocumentService systemDocumentService,
|
||||
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository,
|
||||
ISystemDocumentService systemDocumentService,
|
||||
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository,
|
||||
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository
|
||||
, IRepository<SystemDocument> systemDocumentRepository)
|
||||
@@ -45,8 +45,8 @@ namespace IRaCIS.Core.Application.Services
|
||||
_trialDocumentRepository = trialDocumentRepository;
|
||||
this._trialDocUserTypeConfirmedUserRepository = trialDocUserTypeConfirmedUserRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
this._systemDocumentService = systemDocumentService;
|
||||
this._systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
|
||||
this._systemDocumentService = systemDocumentService;
|
||||
this._systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
|
||||
_systemDocumentRepository = systemDocumentRepository;
|
||||
_readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
_trialCriterionAdditionalAssessmentTypeRepository = trialCriterionAdditionalAssessmentTypeRepository;
|
||||
@@ -64,7 +64,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
var trialDocumentQueryable = _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId == queryTrialDocument.TrialId)
|
||||
.WhereIf(!string.IsNullOrEmpty(queryTrialDocument.Name), t => t.Name.Contains(queryTrialDocument.Name))
|
||||
.WhereIf(queryTrialDocument.FileTypeId != null, t => t.FileTypeId == queryTrialDocument.FileTypeId)
|
||||
.WhereIf(queryTrialDocument.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t=>t.NeedConfirmUserTypeId== queryTrialDocument.UserTypeId) )
|
||||
.WhereIf(queryTrialDocument.UserTypeId != null, t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == queryTrialDocument.UserTypeId))
|
||||
.WhereIf(queryTrialDocument.IsDeleted != null, t => t.IsDeleted == queryTrialDocument.IsDeleted)
|
||||
.ProjectTo<TrialDocumentView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, isEn_Us = _userInfo.IsEn_Us });
|
||||
|
||||
@@ -75,17 +75,17 @@ namespace IRaCIS.Core.Application.Services
|
||||
public async Task<PageOutput<TrialSignDocView>> GetTrialSignDocumentList(TrialDocQuery querySystemDocument)
|
||||
{
|
||||
var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true)
|
||||
.WhereIf(querySystemDocument.TrialId!=null,t=>t.TrialId==querySystemDocument.TrialId)
|
||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) )
|
||||
.WhereIf(querySystemDocument.TrialId != null, t => t.TrialId == querySystemDocument.TrialId)
|
||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
|
||||
join trialUser in _repository.Where<TrialUser>(t=>t.UserId==_userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join trialUser in _repository.Where<TrialUser>(t => t.UserId == _userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join confirm in _repository.Where<TrialDocConfirmedUser>() on
|
||||
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
select new TrialSignDocView()
|
||||
{
|
||||
TrialCode=trialDoc.Trial.TrialCode,
|
||||
TrialCode = trialDoc.Trial.TrialCode,
|
||||
ResearchProgramNo = trialDoc.Trial.ResearchProgramNo,
|
||||
ExperimentName = trialDoc.Trial.ExperimentName,
|
||||
Id = trialDoc.Id,
|
||||
@@ -116,7 +116,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
.WhereIf(querySystemDocument.IsSigned == false, t => t.ConfirmTime == null);
|
||||
|
||||
|
||||
return await trialDocQueryable.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
return await trialDocQueryable.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
|
||||
}
|
||||
|
||||
@@ -142,19 +142,19 @@ namespace IRaCIS.Core.Application.Services
|
||||
PageSize = 1,
|
||||
})).Data;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
result = await _systemDocumentService.getWaitSignSysDocList(new SystemDocumentQuery()
|
||||
{
|
||||
PageIndex=1,
|
||||
PageIndex = 1,
|
||||
IsSigned = false,
|
||||
PageSize=1,
|
||||
Asc=false,
|
||||
SortField="UpdateTime",
|
||||
});
|
||||
PageSize = 1,
|
||||
Asc = false,
|
||||
SortField = "UpdateTime",
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (result.CurrentPageData.Count > 0)
|
||||
{
|
||||
@@ -823,7 +823,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Obsolete]
|
||||
public PageOutput<DocumentUnionWithUserStatView> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument)
|
||||
public async Task<PageOutput<DocumentUnionWithUserStatView>> GetTrialSystemDocumentList(DocumentTrialUnionQuery querySystemDocument)
|
||||
{
|
||||
var systemDocumentQueryable = _repository
|
||||
.WhereIf<SystemDocument>(!_userInfo.IsAdmin, t => t.IsDeleted == false)
|
||||
@@ -867,7 +867,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId);
|
||||
|
||||
return unionQuery.ToPagedList(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
return await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -103,8 +103,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
.OrderByDescending(x=>x.LanguageType)
|
||||
.ThenBy(t=>t.ShowOrder)
|
||||
.ProjectTo<QCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });
|
||||
|
||||
var defalutSortArray = new string[] { nameof(QCQuestionConfigureView.LanguageType) + " desc", nameof(QCQuestionConfigureView.ShowOrder) };
|
||||
|
||||
return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });
|
||||
}
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
|
||||
|
||||
@@ -637,8 +637,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
ModuleName=x.ModuleName,
|
||||
});
|
||||
|
||||
var defalutSortArray = new string[] { nameof(GetCRCConfirmListOutDto.SubjectCode) + " desc", nameof(GetCRCConfirmListOutDto.LatestScanDate) };
|
||||
|
||||
var result = await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "SubjectCode asc", "LatestScanDate asc" });
|
||||
var result = await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "SubjectCode asc", "LatestScanDate asc" });
|
||||
|
||||
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||
.Where(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||
|
||||
+3
-1
@@ -65,7 +65,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
.WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType!.Value)
|
||||
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||
|
||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });
|
||||
var defalutSortArray = new string[] { nameof(ReadingMedicineSystemQuestionView.LanguageType) + " desc", nameof(ReadingMedicineSystemQuestionView.ShowOrder) };
|
||||
|
||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user