修改稽查

Uat_Study
{872297557@qq.com} 2022-12-15 18:24:44 +08:00
parent ffa27cba35
commit f1d9f67b6e
5 changed files with 153 additions and 126 deletions

View File

@ -433,10 +433,16 @@ namespace IRaCIS.Core.Application.Service
var followVisitGroup = followVisitTaskList.GroupBy(t => t.VisitTaskNum); var followVisitGroup = followVisitTaskList.GroupBy(t => t.VisitTaskNum);
//每个访视去判断 是分配还是生成(因为影响哪里有些是取消分配,有些是重阅重置 //每个访视去判断 是分配还是生成(因为影响哪里有些是取消分配,有些是重阅重置需要重新生成
foreach (var visitGroup in followVisitGroup) 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); var arm1 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm1);
if (arm1 != null) if (arm1 != null)
{ {
@ -480,6 +486,15 @@ namespace IRaCIS.Core.Application.Service
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30)); _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); var arm2 = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.DoubleReadingArm2);
if (arm2 != null) 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) 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); var arm = visitGroup.FirstOrDefault(t => t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.ArmEnum == Arm.SingleReadingArm);
if (arm != null) if (arm != null)
{ {
@ -715,6 +739,8 @@ namespace IRaCIS.Core.Application.Service
_provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30)); _provider.Set<int>($"{trialId}_{StaticData.CacheKey.TaskMaxCode}", currentMaxCodeInt, TimeSpan.FromMinutes(30));
} }
}
} }

View File

@ -94,7 +94,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
CreateTime = data.CreateTime, CreateTime = data.CreateTime,
CreateUserId = data.CreateUserId, CreateUserId = data.CreateUserId,
ModuleTypeId = leftmoduleTypec.Id, ModuleTypeId = leftmoduleTypec.Id,
BlindName = leftsubjectVisit.BlindName, BlindName = data.VisitTask.TaskBlindName,
TrialId = data.TrialId, TrialId = data.TrialId,
SiteId = data.SiteId, SiteId = data.SiteId,
SubjectId = data.SubjectId, SubjectId = data.SubjectId,

View File

@ -196,7 +196,7 @@ namespace IRaCIS.Application.Services
[HttpPost] [HttpPost]
public async Task<List<string>> GetSystemGroupNameList(GetTrialGroupNameListInDto inDto) 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(); .Select(x => x.GroupName).ToListAsync();
return result; return result;
@ -576,7 +576,7 @@ namespace IRaCIS.Application.Services
public async Task<List<string>> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto) public async Task<List<string>> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto)
{ {
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId && x.Type == ReadingQestionType.Group) 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(); .Select(x => x.GroupName).ToListAsync();
return result; return result;

View File

@ -49,6 +49,9 @@ namespace IRaCIS.Core.Domain.Models
public Guid? SubjectVisitId { get; set; } public Guid? SubjectVisitId { get; set; }
public Guid? VisitTaskId { get; set; }
public VisitTask VisitTask { get; set; }
/// <summary> /// <summary>
/// IP地址 /// IP地址

View File

@ -150,8 +150,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
//标识操作 是否区分接口 //标识操作 是否区分接口
public bool IsDistinctionInterface=true; public bool IsDistinctionInterface=true;
public Guid? VisitTaskId { get; set; }
} }