修改bug
parent
dbf69d42ee
commit
0bc4b1994c
|
@ -24,6 +24,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public TaskState TaskState { get; set; }
|
public TaskState TaskState { get; set; }
|
||||||
|
|
||||||
|
public bool IsJudgeTaskReturn { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public DateTime? CheckPassedTime { get; set; }
|
public DateTime? CheckPassedTime { get; set; }
|
||||||
public DateTime? AllocateTime { get; set; }
|
public DateTime? AllocateTime { get; set; }
|
||||||
|
@ -277,7 +279,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public List<Guid> DoctorUserIdList => DoctorUserList.Select(t => t.DoctorUserId).ToList();
|
public List<Guid> DoctorUserIdList => DoctorUserList.Select(t => t.DoctorUserId).ToList();
|
||||||
|
|
||||||
//.ForEach(t => t.HistoryDoctorList = TotalDoctorUserList.Where(c => (Guid?)t.Id == c.OrignalSubjectUserId).ToList())
|
//.ForEach(t => t.HistoryDoctorList = TotalDoctorUserList.Where(c => (Guid?)t.Id == c.OrignalSubjectUserId).ToList())
|
||||||
public List<AssignDoctorView> DoctorUserList => TotalDoctorUserList.Where(t => t.IsConfirmed && t.OrignalSubjectUserId == null).ToList()
|
public List<AssignDoctorView> DoctorUserList => TotalDoctorUserList.Where(t => t.OrignalSubjectUserId == null).ToList()
|
||||||
;
|
;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|
|
@ -287,7 +287,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
foreach (var reReadingVisitTask in generateTaskCommand.ReReadingTaskList)
|
foreach (var reReadingVisitTask in generateTaskCommand.ReReadingTaskList)
|
||||||
{
|
{
|
||||||
reReadingVisitTask.OriginalReReadingId = reReadingVisitTask.Id;
|
reReadingVisitTask.OriginalReReadingId = reReadingVisitTask.Id;
|
||||||
reReadingVisitTask.OriginalReReadingId = Guid.Empty;
|
reReadingVisitTask.Id = Guid.Empty;
|
||||||
reReadingVisitTask. Code = currentMaxCodeInt + 1;
|
reReadingVisitTask. Code = currentMaxCodeInt + 1;
|
||||||
reReadingVisitTask.TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask));
|
reReadingVisitTask.TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask));
|
||||||
|
|
||||||
|
|
|
@ -815,10 +815,17 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (visitTask.SourceSubjectVisitId != null)
|
if (visitTask.SourceSubjectVisitId != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if(await _visitTaskRepository.AnyAsync(t=>t.SourceSubjectVisitId== visitTask.SourceSubjectVisitId && t.DoctorUserId== assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("其中一个任务已分配给该医生,不允许分配");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (visitTask.SouceReadModuleId != null)
|
else if (visitTask.SouceReadModuleId != null)
|
||||||
{
|
{
|
||||||
|
if (await _visitTaskRepository.AnyAsync(t => t.SouceReadModuleId == visitTask.SouceReadModuleId && t.DoctorUserId == assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("其中一个任务已分配给该医生,不允许分配");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -878,17 +885,33 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
public async Task<IResponseOutput> ApplyReReading(ApplyReReadingCommand applyReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
public async Task<IResponseOutput> ApplyReReading(ApplyReReadingCommand applyReReadingCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
||||||
{
|
{
|
||||||
var taskList = await _visitTaskRepository.Where(t => applyReReadingCommand.TaskIdList.Contains(t.Id), true).ToListAsync();
|
var taskList = await _visitTaskRepository.Where(t => applyReReadingCommand.TaskIdList.Contains(t.Id), true).Include(t=>t.JudgeVisitTask).ToListAsync();
|
||||||
|
|
||||||
var reReadingTaskList = taskList.Clone();
|
var reReadingTaskList = taskList.Clone();
|
||||||
|
|
||||||
foreach (var task in taskList)
|
foreach (var task in taskList)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
task.IsReReading = true;
|
task.IsReReading = true;
|
||||||
task.RequestReReadingReason = applyReReadingCommand.RequestReReadingReason;
|
task.RequestReReadingReason = applyReReadingCommand.RequestReReadingReason;
|
||||||
task.RequestReReadingType = applyReReadingCommand.RequestReReadingTypeEnum;
|
task.RequestReReadingType = applyReReadingCommand.RequestReReadingTypeEnum;
|
||||||
task.RequestReReadingTime = DateTime.Now;
|
task.RequestReReadingTime = DateTime.Now;
|
||||||
task.RequestReReadingUserId = _userInfo.Id;
|
task.RequestReReadingUserId = _userInfo.Id;
|
||||||
|
|
||||||
|
//产生了裁判
|
||||||
|
if (task.JudgeVisitTaskId != null)
|
||||||
|
{
|
||||||
|
if(task.ReadingTaskState==ReadingTaskState.WaitReading || task.ReadingTaskState == ReadingTaskState.Reading)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
task.JudgeVisitTask.IsJudgeTaskReturn = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||||
|
|
|
@ -31,11 +31,14 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
//未分配
|
//未分配
|
||||||
NotAllocate = 0,
|
NotAllocate = 0,
|
||||||
|
|
||||||
|
//预分配
|
||||||
InitAllocated = 1,
|
InitAllocated = 1,
|
||||||
|
|
||||||
//已分配
|
//已分配
|
||||||
Allocated = 2,
|
Allocated = 2,
|
||||||
|
|
||||||
|
//已取消
|
||||||
|
HaveCanceled=3
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Arm
|
public enum Arm
|
||||||
|
|
|
@ -134,6 +134,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
|
public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
|
||||||
|
|
||||||
|
public bool IsJudgeTaskReturn { get; set; }
|
||||||
|
|
||||||
|
//是否回退过
|
||||||
|
public bool IsReturned { get; set; }
|
||||||
|
|
||||||
//裁判任务的Id
|
//裁判任务的Id
|
||||||
public Guid? JudgeVisitTaskId { get; set; }
|
public Guid? JudgeVisitTaskId { get; set; }
|
||||||
|
|
||||||
|
@ -151,8 +156,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
//签名时间
|
//签名时间
|
||||||
public DateTime? SignTime { get; set; }
|
public DateTime? SignTime { get; set; }
|
||||||
|
|
||||||
//是否回退过
|
|
||||||
public bool IsReturned { get; set; }
|
|
||||||
|
|
||||||
//是否 重阅
|
//是否 重阅
|
||||||
public bool IsReReading { get; set; }
|
public bool IsReReading { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue