分配并应用

Uat_Study
hang 2022-07-26 13:44:30 +08:00
parent c80dd824ed
commit fab3da327b
1 changed files with 8 additions and 1 deletions

View File

@ -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 _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 _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, AllocateTime=null,
DoctorUserId=null, DoctorUserId=null,