IRC_NewDev
parent
27d9104607
commit
10380994a4
|
@ -259,7 +259,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.AuditState), nameof(TaskMedicalReviewView.SubjectId), nameof(TaskMedicalReviewView.ArmEnum), nameof(TaskMedicalReviewView.VisitTaskNum) };
|
var defalutSortArray = new string[] { nameof(TaskMedicalReviewView.SubjectId), nameof(TaskMedicalReviewView.ArmEnum), nameof(TaskMedicalReviewView.VisitTaskNum) };
|
||||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
||||||
|
|
||||||
return ResponseOutput.Ok(pageList, new
|
return ResponseOutput.Ok(pageList, new
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public Guid TrialReadingCriterionId { get; set; }
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid TaskMedicalReviewId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -792,40 +792,33 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto()
|
var list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto()
|
||||||
{
|
{
|
||||||
TrialId=inDto.TrialId,
|
TrialId=inDto.TrialId,
|
||||||
AuditState= MedicalReviewAuditState.Auditing,
|
|
||||||
TrialReadingCriterionId=inDto.TrialReadingCriterionId,
|
TrialReadingCriterionId=inDto.TrialReadingCriterionId,
|
||||||
SubjectId=inDto.SubjectId,
|
|
||||||
PageIndex=1,
|
PageIndex=1,
|
||||||
PageSize=1,
|
PageSize=99999,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var index = list.CurrentPageData.ToList().FindIndex(x => x.Id == inDto.TaskMedicalReviewId);
|
||||||
|
|
||||||
if (list.CurrentPageData.Count() == 0)
|
var result = new GetIRMedicalFeedbackListOutDto() { };
|
||||||
|
|
||||||
|
if (index + 1 == list.CurrentPageData.Count()) // 最后一个
|
||||||
{
|
{
|
||||||
list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto()
|
|
||||||
{
|
|
||||||
TrialId = inDto.TrialId,
|
|
||||||
AuditState = MedicalReviewAuditState.Auditing,
|
|
||||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
|
||||||
PageIndex = 1,
|
|
||||||
PageSize = 1,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (list.CurrentPageData.Count() > 0)
|
|
||||||
{
|
|
||||||
return list.CurrentPageData[0];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_IRFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
throw new BusinessValidationFailedException(_localizer["MedicalReview_IRFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||||
}
|
}
|
||||||
|
else if (index == -1 || list.CurrentPageData.Count == 1) // 第一个或者只有一个
|
||||||
|
{
|
||||||
|
if (list.CurrentPageData[0].Id == inDto.TaskMedicalReviewId)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["MedicalReview_IRFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||||
|
}
|
||||||
|
result = list.CurrentPageData[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = list.CurrentPageData.Skip(index + 1).Take(1).First();
|
||||||
|
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue