@@ -81,6 +81,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Guid? VisitId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否领取了
|
||||
/// </summary>
|
||||
public bool IsReceived { get; set; } = false;
|
||||
}
|
||||
|
||||
public class CRCRequestToQCCommand
|
||||
|
||||
@@ -882,7 +882,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
var nextIQCQuality = await this.GetNextIQCQuality(inDto);
|
||||
|
||||
if (nextIQCQuality.VisitId != null)
|
||||
if (nextIQCQuality.VisitId != null&& nextIQCQuality.IsReceived==false)
|
||||
{
|
||||
var visit = await _subjectVisitRepository.Where(x => x.Id == nextIQCQuality.VisitId).FirstNotNullAsync();
|
||||
if (!visit.IsTake)
|
||||
@@ -910,6 +910,22 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
.FirstOrDefaultAsync(t => t.TrialId == inDto.TrialId)
|
||||
.IfNullThrowException();
|
||||
|
||||
|
||||
|
||||
var currentActionList = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.CurrentActionUserId == _userInfo.UserRoleId).OrderByDescending(x => x.IsUrgent)
|
||||
.ThenBy(x => x.Subject.Code).ThenBy(x => x.VisitNum).ToListAsync();
|
||||
|
||||
if (currentActionList.Count() > 0)
|
||||
{
|
||||
return new GetNextIQCQualityOutDto()
|
||||
{
|
||||
IsReceived = true,
|
||||
SubjectId= currentActionList[0].SubjectId,
|
||||
VisitId = currentActionList[0].Id,
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
SubjectVisit? subjectVisit = null;
|
||||
List<SubjectVisit>? visitList = null;
|
||||
switch (trialConfig.QCProcessEnum)
|
||||
|
||||
Reference in New Issue
Block a user