修改稽查
parent
ffa27cba35
commit
f1d9f67b6e
|
@ -433,10 +433,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var followVisitGroup = followVisitTaskList.GroupBy(t => t.VisitTaskNum);
|
||||
|
||||
//每个访视去判断 是分配还是生成(因为影响哪里有些是取消分配,有些是重阅重置)
|
||||
//每个访视去判断 是分配还是生成(因为影响哪里有些是取消分配,有些是重阅重置需要重新生成)
|
||||
foreach (var visitGroup in followVisitGroup)
|
||||
{
|
||||
|
||||
//如果后续访视已分配有效 就不用处理
|
||||
if (visitGroup.Any(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.ArmEnum == Arm.DoubleReadingArm1))
|
||||
{
|
||||
//不做处理
|
||||
}
|
||||
else
|
||||
{
|
||||
var arm1 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm1);
|
||||
if (arm1 != null)
|
||||
{
|
||||
|
@ -480,6 +486,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//如果后续访视已分配有效 就不用处理
|
||||
if (visitGroup.Any(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.ArmEnum == Arm.DoubleReadingArm2))
|
||||
{
|
||||
//不做处理
|
||||
}
|
||||
else
|
||||
{
|
||||
var arm2 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm2);
|
||||
if (arm2 != null)
|
||||
{
|
||||
|
@ -527,6 +542,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//无序的时候 生成任务并分配出去
|
||||
|
@ -674,7 +691,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
foreach (var visitGroup in followVisitGroup)
|
||||
{
|
||||
//如果后续访视已分配有效 就不用处理
|
||||
if (visitGroup.Any(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated && t.ArmEnum == Arm.SingleReadingArm))
|
||||
{
|
||||
//不做处理
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
var arm = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.SingleReadingArm);
|
||||
if (arm != null)
|
||||
{
|
||||
|
@ -715,6 +739,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
CreateTime = data.CreateTime,
|
||||
CreateUserId = data.CreateUserId,
|
||||
ModuleTypeId = leftmoduleTypec.Id,
|
||||
BlindName = leftsubjectVisit.BlindName,
|
||||
BlindName = data.VisitTask.TaskBlindName,
|
||||
TrialId = data.TrialId,
|
||||
SiteId = data.SiteId,
|
||||
SubjectId = data.SubjectId,
|
||||
|
|
|
@ -196,7 +196,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<List<string>> GetSystemGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == ReadingQestionType.Group)
|
||||
var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == ReadingQestionType.Group).OrderBy(t=>t.ShowOrder)
|
||||
.Select(x => x.GroupName).ToListAsync();
|
||||
return result;
|
||||
|
||||
|
@ -576,7 +576,7 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<string>> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId && x.Type == ReadingQestionType.Group)
|
||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
|
||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId).OrderBy(t => t.ShowOrder)
|
||||
.Select(x => x.GroupName).ToListAsync();
|
||||
|
||||
return result;
|
||||
|
|
|
@ -49,6 +49,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public Guid? SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public VisitTask VisitTask { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IP地址
|
||||
|
|
|
@ -150,8 +150,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
|||
//标识操作 是否区分接口
|
||||
public bool IsDistinctionInterface=true;
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue