修改领取规则
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0d4a0adf00
commit
f1185758d6
|
@ -81,6 +81,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
public Guid? VisitId { get; set; }
|
public Guid? VisitId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否领取了
|
||||||
|
/// </summary>
|
||||||
|
public bool IsReceived { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CRCRequestToQCCommand
|
public class CRCRequestToQCCommand
|
||||||
|
|
|
@ -882,7 +882,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
{
|
{
|
||||||
var nextIQCQuality = await this.GetNextIQCQuality(inDto);
|
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();
|
var visit = await _subjectVisitRepository.Where(x => x.Id == nextIQCQuality.VisitId).FirstNotNullAsync();
|
||||||
if (!visit.IsTake)
|
if (!visit.IsTake)
|
||||||
|
@ -910,6 +910,22 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
.FirstOrDefaultAsync(t => t.TrialId == inDto.TrialId)
|
.FirstOrDefaultAsync(t => t.TrialId == inDto.TrialId)
|
||||||
.IfNullThrowException();
|
.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;
|
SubjectVisit? subjectVisit = null;
|
||||||
List<SubjectVisit>? visitList = null;
|
List<SubjectVisit>? visitList = null;
|
||||||
switch (trialConfig.QCProcessEnum)
|
switch (trialConfig.QCProcessEnum)
|
||||||
|
|
Loading…
Reference in New Issue