修改添加
parent
283bbd29e5
commit
904d5f3a3d
|
@ -244,7 +244,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public string? TaskCode { get; set; }
|
||||
|
||||
public String? TrialSiteCode { get; set; }
|
||||
public String? TrialSiteCode { get; set; }
|
||||
|
||||
public ReReadingApplyState? ReReadingApplyState { get; set; }
|
||||
|
||||
|
@ -398,7 +398,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
}
|
||||
|
||||
|
||||
public class SubjectUserDTO: SubjectUserView
|
||||
public class SubjectUserDTO : SubjectUserView
|
||||
{
|
||||
public bool IsHaveReading { get; set; }
|
||||
}
|
||||
|
@ -418,6 +418,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
}
|
||||
|
||||
|
||||
public class CancelSubjectDoctorCommand
|
||||
{
|
||||
public List<CancelSubjectAssignedDoctorCommand> CancelList { get; set; }
|
||||
|
||||
public string Note { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class SubjectAssignView
|
||||
|
|
|
@ -102,12 +102,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddSubjectCancelDoctorNote(CancelDoctorCommand command)
|
||||
{
|
||||
await _subjectCanceDoctorRepository.InsertOrUpdateAsync(command, true);
|
||||
//public async Task<IResponseOutput> AddSubjectCancelDoctorNote(CancelDoctorCommand command)
|
||||
//{
|
||||
// await _subjectCanceDoctorRepository.InsertOrUpdateAsync(command, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
// return ResponseOutput.Ok();
|
||||
//}
|
||||
|
||||
public async Task<List<SubjectCancelDoctorView>> GetSubjectCancelDoctorHistoryList(Guid subjectId)
|
||||
{
|
||||
|
|
|
@ -154,13 +154,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
/// <summary>
|
||||
/// 取消Subject 分配的医生
|
||||
/// </summary>
|
||||
/// <param name="commandList"></param>
|
||||
/// <param name="cancelCommand"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> CancelSubjectAssignedDoctor(List<CancelSubjectAssignedDoctorCommand> commandList)
|
||||
public async Task<IResponseOutput> CancelSubjectAssignedDoctor(CancelSubjectDoctorCommand cancelCommand)
|
||||
{
|
||||
foreach (var command in commandList.Where(t => t.IsCancelAssign))
|
||||
foreach (var command in cancelCommand.CancelList.Where(t => t.IsCancelAssign))
|
||||
{
|
||||
if (await _visitTaskRepository.AnyAsync(t => t.SubjectId == command.SubjectId && t.DoctorUserId == command.DoctorUserId && t.ArmEnum == command.ArmEnum && t.ReadingTaskState != ReadingTaskState.WaitReading))
|
||||
{
|
||||
|
@ -178,6 +178,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
});
|
||||
}
|
||||
|
||||
var subjectId = cancelCommand.CancelList.First().SubjectId;
|
||||
|
||||
await _repository.AddAsync(new SubjectCanceDoctor() { SubjectId = subjectId, Note = cancelCommand.Note });
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
|
Loading…
Reference in New Issue