Uat_Study
hang 2022-09-29 16:05:48 +08:00
parent 906dd6b915
commit 017d8fac24
5 changed files with 19 additions and 16 deletions

View File

@ -211,6 +211,8 @@ namespace IRaCIS.Core.Application.ViewModel
public bool? IsSelfAnalysis { get; set; } public bool? IsSelfAnalysis { get; set; }
public string TrialReadingCriterionName { get; set; }
} }

View File

@ -423,10 +423,8 @@ namespace IRaCIS.Core.Application.ViewModel
public class CancelSubjectAssignedDoctorCommand public class CancelSubjectAssignedDoctorCommand
{ {
public Guid Id { get; set; } public Guid Id { get; set; }
public Guid TrialId { get; set; }
[NotDefault]
public Guid TrialReadingCriterionId { get; set; }
public Guid SubjectId { get; set; } public Guid SubjectId { get; set; }
public Guid DoctorUserId { get; set; } public Guid DoctorUserId { get; set; }
public Arm ArmEnum { get; set; } public Arm ArmEnum { get; set; }
@ -439,6 +437,11 @@ namespace IRaCIS.Core.Application.ViewModel
public class CancelSubjectDoctorCommand public class CancelSubjectDoctorCommand
{ {
[NotDefault]
public Guid TrialId { get; set; }
[NotDefault]
public Guid TrialReadingCriterionId { get; set; }
public List<CancelSubjectAssignedDoctorCommand> CancelList { get; set; } public List<CancelSubjectAssignedDoctorCommand> CancelList { get; set; }
public string Note { get; set; } = string.Empty; public string Note { get; set; } = string.Empty;

View File

@ -577,7 +577,7 @@ namespace IRaCIS.Core.Application.Service
var newTask = await _visitTaskRepository.AddAsync(new VisitTask() var newTask = await _visitTaskRepository.AddAsync(new VisitTask()
{ {
TrialReadingCriterionId=reReadingVisitTask.TrialReadingCriterionId,
TrialId = reReadingVisitTask.TrialId, TrialId = reReadingVisitTask.TrialId,
SubjectId = reReadingVisitTask.SubjectId, SubjectId = reReadingVisitTask.SubjectId,

View File

@ -189,14 +189,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
{ {
foreach (var command in cancelCommand.CancelList.Where(t => t.IsCancelAssign)) foreach (var command in cancelCommand.CancelList.Where(t => t.IsCancelAssign))
{ {
if (await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId==command.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState != ReadingTaskState.WaitReading)) if (await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId== cancelCommand.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState != ReadingTaskState.WaitReading))
{ {
throw new BusinessValidationFailedException("当前医生已开始做该Subject 该标准的任务,不允许取消分配"); throw new BusinessValidationFailedException("当前医生已开始做该Subject 该标准的任务,不允许取消分配");
} }
await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id); await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id);
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialReadingCriterionId==command.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState == ReadingTaskState.WaitReading && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false, u => new VisitTask() await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialReadingCriterionId== cancelCommand.TrialReadingCriterionId && t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState == ReadingTaskState.WaitReading && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false, u => new VisitTask()
{ {
AllocateTime = null, AllocateTime = null,
DoctorUserId = null, DoctorUserId = null,
@ -1432,9 +1432,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
} }
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated; Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated;
//是否是一致性分析任务 正常申请 会影响一致性分析任务 //是否是一致性分析任务 正常申请 会影响一致性分析任务
@ -1483,7 +1480,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
//PM申请 SPM / CPM审批 回退访视,在此不生成访视任务 //PM申请 SPM / CPM审批 回退访视,在此不生成访视任务 影响多个标准的任务
if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM)) if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.TrialGroupApply && (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM))
{ {
@ -1685,8 +1682,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
//IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务 //IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务
else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{ {
//影响申请标准的任务
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId==origenalTask.TrialReadingCriterionId);
//有序阅片 //有序阅片
if (trialConfig.IsReadingTaskViewInOrder) if (trialConfig.IsReadingTaskViewInOrder)
@ -2368,7 +2365,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
var trialConfig = (await _trialRepository.Where(t => t.Id == trialId).Select(t => new { TrialId = t.Id, t.IsReadingTaskViewInOrder, t.ReadingType }).FirstOrDefaultAsync()).IfNullThrowException(); var trialConfig = (await _trialRepository.Where(t => t.Id == trialId).Select(t => new { TrialId = t.Id, t.IsReadingTaskViewInOrder, t.ReadingType }).FirstOrDefaultAsync()).IfNullThrowException();
Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == filterObj.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated; Expression<Func<VisitTask, bool>> filterExpression = t => t.TrialId == trialId && t.SubjectId == filterObj.SubjectId && t.TaskState == TaskState.Effect && t.TaskAllocationState == TaskAllocationState.Allocated;
//是否是一致性分析任务 (一致性分析的任务 不会产生裁判 肿瘤学 仅仅有生成的访视和全局) //是否是一致性分析任务 (一致性分析的任务 不会产生裁判 肿瘤学 仅仅有生成的访视和全局)
@ -2377,7 +2374,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
//重阅影响 //重阅影响
if (isReReading) if (isReReading)
{ {
filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId);
//IR 申请 PM 同意 仅仅影响自己 //IR 申请 PM 同意 仅仅影响自己
@ -2521,7 +2519,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
} }
//退回影响 仅仅针对是访视类型的 //退回影响 仅仅针对是访视类型的 影响多个标准的任务
else else
{ {

View File

@ -269,7 +269,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)); .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code));
CreateMap<VisitTask, InfluenceTaskInfo>() CreateMap<VisitTask, InfluenceTaskInfo>()
//.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser)) .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
.ForMember(o => o.OptType, t => t.Ignore()); .ForMember(o => o.OptType, t => t.Ignore());