修改添加
parent
283bbd29e5
commit
904d5f3a3d
|
@ -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
|
public class SubjectAssignView
|
||||||
|
|
|
@ -102,12 +102,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task<IResponseOutput> AddSubjectCancelDoctorNote(CancelDoctorCommand command)
|
//public async Task<IResponseOutput> AddSubjectCancelDoctorNote(CancelDoctorCommand command)
|
||||||
{
|
//{
|
||||||
await _subjectCanceDoctorRepository.InsertOrUpdateAsync(command, true);
|
// await _subjectCanceDoctorRepository.InsertOrUpdateAsync(command, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
// return ResponseOutput.Ok();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public async Task<List<SubjectCancelDoctorView>> GetSubjectCancelDoctorHistoryList(Guid subjectId)
|
public async Task<List<SubjectCancelDoctorView>> GetSubjectCancelDoctorHistoryList(Guid subjectId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -154,13 +154,13 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 取消Subject 分配的医生
|
/// 取消Subject 分配的医生
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="commandList"></param>
|
/// <param name="cancelCommand"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
[HttpPost]
|
[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))
|
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();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
Loading…
Reference in New Issue