修改 参数可传与否
parent
94d4ac83cf
commit
a08570d701
|
@ -1398,8 +1398,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
[NotDefault]
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
public Guid TrialReadingCriterionId { get; set; }
|
|
||||||
|
|
||||||
public Guid? VisitTaskId { get; set; }
|
public Guid? VisitTaskId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -2259,12 +2259,19 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var trialReadingCriterionId = inDto.TrialReadingCriterionId;
|
var trialReadingCriterionId = inDto.TrialReadingCriterionId;
|
||||||
|
|
||||||
var trialReadingCriterion= await _readingQuestionCriterionTrialRepository.FindAsync(trialReadingCriterionId);
|
|
||||||
|
|
||||||
//if (trialReadingCriterionId == null && inDto.VisitTaskId == null)
|
if (trialReadingCriterionId == null && inDto.VisitTaskId == null)
|
||||||
//{
|
{
|
||||||
// throw new BusinessValidationFailedException(_localizer["ReadingImage_IDMust"]);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_IDMust"]);
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
if (inDto.VisitTaskId != null)
|
||||||
|
{
|
||||||
|
trialReadingCriterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(t => t.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
var trialReadingCriterion = await _readingQuestionCriterionTrialRepository.FindAsync(trialReadingCriterionId ?? Guid.Empty);
|
||||||
|
|
||||||
|
|
||||||
//看已阅的任务
|
//看已阅的任务
|
||||||
if (inDto.VisitTaskId != null)
|
if (inDto.VisitTaskId != null)
|
||||||
|
@ -2282,15 +2289,13 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
|
|
||||||
trialReadingCriterionId = task.TrialReadingCriterionId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder)
|
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder)
|
||||||
{
|
{
|
||||||
var subjectTaskList = (await _visitTaskService.GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto()
|
var subjectTaskList = (await _visitTaskService.GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto()
|
||||||
{
|
{
|
||||||
TrialId = inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
TrialReadingCriterionId = trialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionId.Value,
|
||||||
Page = new PageInput()
|
Page = new PageInput()
|
||||||
{
|
{
|
||||||
PageIndex = 1,
|
PageIndex = 1,
|
||||||
|
@ -2357,11 +2362,11 @@ namespace IRaCIS.Application.Services
|
||||||
// }).OrderByDescending(t => t.TaskBlindName).FirstOrDefaultAsync();
|
// }).OrderByDescending(t => t.TaskBlindName).FirstOrDefaultAsync();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
var taskQuery = await _visitTaskService.GetNotOrderReadingQueryableAsync(inDto.TrialId,(Guid) trialReadingCriterionId);
|
var taskQuery = await _visitTaskService.GetNotOrderReadingQueryableAsync(inDto.TrialId, (Guid)trialReadingCriterionId);
|
||||||
|
|
||||||
var list = taskQuery.ToList();
|
var list = taskQuery.ToList();
|
||||||
|
|
||||||
task = await taskQuery.OrderByDescending(t => t.TaskBlindName)
|
task = await taskQuery.OrderByDescending(t => t.TaskBlindName)
|
||||||
.Select(x => new GetReadingTaskDto()
|
.Select(x => new GetReadingTaskDto()
|
||||||
{
|
{
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
|
@ -2373,7 +2378,7 @@ namespace IRaCIS.Application.Services
|
||||||
SubjectId = x.SubjectId,
|
SubjectId = x.SubjectId,
|
||||||
SubjectCode = x.Subject.Code,
|
SubjectCode = x.Subject.Code,
|
||||||
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
||||||
}).OrderByDescending(t => t.TaskBlindName).FirstOrDefaultAsync();
|
}).OrderByDescending(t => t.TaskBlindName).FirstOrDefaultAsync();
|
||||||
|
|
||||||
if (task != null)
|
if (task != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue