修改bug

Uat_Study
hang 2022-07-26 16:50:45 +08:00
parent 1c3462470b
commit 94bfec172b
3 changed files with 10 additions and 13 deletions

View File

@ -93,7 +93,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
{
await _subjectUserRepository.AddAsync(new SubjectUser() {TrialId=command.TrialId, ArmEnum = doctorArm.ArmEnum, DoctorUserId = doctorArm.DoctorUserId, SubjectId = subjectId, AssignTime = DateTime.Now });
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectId && t.ArmEnum == doctorArm.ArmEnum && t.TrialId==command.TrialId && t.TaskAllocationState==TaskAllocationState.NotAllocate, u => new VisitTask()
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == subjectId && t.ArmEnum == doctorArm.ArmEnum && t.TrialId==command.TrialId && t.TaskAllocationState==TaskAllocationState.NotAllocate && t.TaskState==TaskState.Effect, u => new VisitTask()
{
AllocateTime = DateTime.Now,
DoctorUserId = doctorArm.DoctorUserId,
@ -157,7 +157,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id);
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState==ReadingTaskState.WaitReading, u => new VisitTask()
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState==ReadingTaskState.WaitReading && t.TaskState==TaskState.Effect, u => new VisitTask()
{
AllocateTime=null,
DoctorUserId=null,

View File

@ -163,17 +163,19 @@ namespace IRaCIS.Core.Application.Contracts
public Guid TrialId { get; set; }
public TaskAllocateObj TaskAllocateObjEnum { get; set; }
public bool IsFollowVisitAutoAssign { get; set; }
public bool IsFollowVisitAutoAssign { get; set; } = true;
public bool IsFollowGlobalVisitAutoAssign { get; set; }
public bool IsFollowGlobalVisitAutoAssign { get; set; } = true;
public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; }
public bool IsFollowJudgeTaskAutoAssign { get; set; } = true;
public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; }
public bool IsFollowJudgeTaskAutoAssign { get; set; }
public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; }
public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
}

View File

@ -615,11 +615,6 @@ namespace IRaCIS.Core.Application
_mapper.Map(trialConfig, trialInfo);
//if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable && t.IsJudgeDoctor==false).Sum(t => t.PlanReadingRatio) != 100)
//{
// return ResponseOutput.NotOk("已启用医生比率不为百分之100");
//}
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
}