修改bug

Uat_Study
hang 2022-06-23 15:12:38 +08:00
parent dbf69d42ee
commit 0bc4b1994c
5 changed files with 39 additions and 7 deletions

View File

@ -24,6 +24,8 @@ namespace IRaCIS.Core.Application.ViewModel
public TaskState TaskState { get; set; }
public bool IsJudgeTaskReturn { get; set; }
public DateTime? CheckPassedTime { 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();
//.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]

View File

@ -287,7 +287,7 @@ namespace IRaCIS.Core.Application.Service
foreach (var reReadingVisitTask in generateTaskCommand.ReReadingTaskList)
{
reReadingVisitTask.OriginalReReadingId = reReadingVisitTask.Id;
reReadingVisitTask.OriginalReReadingId = Guid.Empty;
reReadingVisitTask.Id = Guid.Empty;
reReadingVisitTask. Code = currentMaxCodeInt + 1;
reReadingVisitTask.TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask));

View File

@ -815,10 +815,17 @@ namespace IRaCIS.Core.Application.Service
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)
{
if (await _visitTaskRepository.AnyAsync(t => t.SouceReadModuleId == visitTask.SouceReadModuleId && t.DoctorUserId == assignSubjectTaskToDoctorCommand.DoctorUserId && t.Id != visitTask.Id))
{
return ResponseOutput.NotOk("其中一个任务已分配给该医生,不允许分配");
}
}
else
{
@ -878,17 +885,33 @@ namespace IRaCIS.Core.Application.Service
[UnitOfWork]
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();
foreach (var task in taskList)
{
task.IsReReading = true;
task.RequestReReadingReason = applyReReadingCommand.RequestReReadingReason;
task.RequestReReadingType = applyReReadingCommand.RequestReReadingTypeEnum;
task.RequestReReadingTime = DateTime.Now;
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()

View File

@ -31,11 +31,14 @@ namespace IRaCIS.Core.Domain.Share
//未分配
NotAllocate = 0,
//预分配
InitAllocated = 1,
//已分配
Allocated = 2,
//已取消
HaveCanceled=3
}
public enum Arm

View File

@ -134,6 +134,11 @@ namespace IRaCIS.Core.Domain.Models
public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
public bool IsJudgeTaskReturn { get; set; }
//是否回退过
public bool IsReturned { get; set; }
//裁判任务的Id
public Guid? JudgeVisitTaskId { get; set; }
@ -151,8 +156,7 @@ namespace IRaCIS.Core.Domain.Models
//签名时间
public DateTime? SignTime { get; set; }
//是否回退过
public bool IsReturned { get; set; }
//是否 重阅
public bool IsReReading { get; set; }