分配并应用
parent
c80dd824ed
commit
fab3da327b
|
@ -93,6 +93,13 @@ 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 == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.TrialId==command.TrialId, u => new VisitTask()
|
||||
{
|
||||
AllocateTime = DateTime.Now,
|
||||
DoctorUserId = command.DoctorUserId,
|
||||
TaskAllocationState = TaskAllocationState.Allocated
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +157,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
await _subjectUserRepository.DeleteFromQueryAsync(t => t.Id == command.Id);
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum, u => new VisitTask()
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum, u => new VisitTask()
|
||||
{
|
||||
AllocateTime=null,
|
||||
DoctorUserId=null,
|
||||
|
|
Loading…
Reference in New Issue