修改bug
parent
1c3462470b
commit
94bfec172b
|
@ -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 _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,
|
AllocateTime = DateTime.Now,
|
||||||
DoctorUserId = doctorArm.DoctorUserId,
|
DoctorUserId = doctorArm.DoctorUserId,
|
||||||
|
@ -157,7 +157,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
|
|
||||||
await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id);
|
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,
|
AllocateTime=null,
|
||||||
DoctorUserId=null,
|
DoctorUserId=null,
|
||||||
|
|
|
@ -163,17 +163,19 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
public TaskAllocateObj TaskAllocateObjEnum { 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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -615,11 +615,6 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
_mapper.Map(trialConfig, trialInfo);
|
_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());
|
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue