From 5676cc01951e07b73ef4a6b8ede447664fa47379 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 5 Jul 2022 17:31:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 6 ++
.../DTO/TaskConsistentRuleViewModel.cs | 1 +
.../Allocation/DTO/VisitTaskViewModel.cs | 2 +-
.../Service/Allocation/VisitTaskService.cs | 57 ++++++++++++++++++-
.../Service/QC/DTO/NoneDicomStudyViewModel.cs | 1 +
5 files changed, 63 insertions(+), 4 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index e5d95931d..d0d9cd697 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -242,6 +242,12 @@
+
+
+ PM 设置任务 退回
+
+
+
重阅影响提示列表
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs
index c773f8103..aa961eee5 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs
@@ -99,6 +99,7 @@ namespace IRaCIS.Core.Application.ViewModel
public String TrialSiteCode { get; set; } = String.Empty;
public string SubjectCode { get; set; } = String.Empty;
+ [JsonIgnore]
public List RelationDoctorUserList { get; set; }
[JsonIgnore]
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
index fcc3e7e45..4fc6df465 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
@@ -83,7 +83,7 @@ namespace IRaCIS.Core.Application.ViewModel
public class ReadingTaskView : VisitTaskView
{
-
+
public ReadingTaskState ReadingTaskState { get; set; }
public ReReadingApplyState ReReadingApplyState { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
index 95bd9c975..f8b3f0f7e 100644
--- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
@@ -278,7 +278,7 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task> GetSPMReReadingTaskList(VisitTaskQuery queryVisitTask)
{
- var visitTaskQueryable = _visitTaskReReadingRepository.Where(t=>t.RequestReReadingType==RequestReReadingType.TrialGroupApply)
+ var visitTaskQueryable = _visitTaskReReadingRepository.Where(t => t.RequestReReadingType == RequestReReadingType.TrialGroupApply)
.Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id)
.Where(t => t.OriginalReReadingTask.TrialId == queryVisitTask.TrialId)
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
@@ -1152,7 +1152,7 @@ namespace IRaCIS.Core.Application.Service
await VisitBackAsync(origenalTask.SourceSubjectVisitId);
}
// 无序阅片没有 全局 肿瘤学
-
+
}
}
@@ -1212,7 +1212,7 @@ namespace IRaCIS.Core.Application.Service
newTask.AllocateTime = DateTime.Now;
}
- });
+ });
}
}
}
@@ -1296,6 +1296,57 @@ namespace IRaCIS.Core.Application.Service
}
+ ///
+ /// PM 设置任务 退回
+ ///
+ ///
+ [HttpGet("{trialId:guid}/{taskId:guid}")]
+ public async Task PMSetTaskBack(Guid trialId, Guid taskId)
+ {
+
+ var trialConfig = (await _trialRepository.Where(t => t.Id == trialId).Select(t => new { TrialId = t.Id, t.IsReadingTaskViewInOrder, t.ReadingType }).FirstOrDefaultAsync()).IfNullThrowException();
+
+ if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
+ {
+ //有序
+ if (trialConfig.IsReadingTaskViewInOrder)
+ {
+
+ }
+ //无序 无序阅片没有 全局 肿瘤学
+ else
+ {
+ // 当前任务标为失效,后续任务不处理
+
+ var task = (await _visitTaskRepository.FirstOrDefaultAsync(t => t.Id == taskId)).IfNullThrowException();
+ task.TaskState = TaskState.Adbandon;
+
+
+ //考虑该访视 另外一个阅片人的任务也同时退回
+ var otherTask = await _visitTaskRepository.FirstOrDefaultAsync(t => t.SourceSubjectVisitId == task.SourceSubjectVisitId && t.Id != task.Id && t.TaskState == TaskState.Effect);
+
+ if (otherTask.ReadingTaskState == ReadingTaskState.HaveSigned)
+ {
+ otherTask.TaskState = TaskState.HaveReturned;
+ }
+ else
+ {
+ otherTask.TaskState = TaskState.Adbandon;
+ }
+
+ //回退访视
+ if (task.ReadingCategory == ReadingCategory.Visit)
+ {
+ //执行类似一致性核查回退流程
+ await VisitBackAsync(task.SourceSubjectVisitId);
+ }
+ }
+ }
+
+ await _visitTaskRepository.SaveChangesAsync();
+
+ return ResponseOutput.Ok();
+ }
private async Task VisitBackAsync(Guid? subjectVisitId)
diff --git a/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs
index a1bf8aeab..2fa70b740 100644
--- a/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs
+++ b/IRaCIS.Core.Application/Service/QC/DTO/NoneDicomStudyViewModel.cs
@@ -10,6 +10,7 @@ namespace IRaCIS.Core.Application.Contracts
/// NoneDicomStudyView 列表视图模型
public class NoneDicomStudyView:NoneDicomStudyAddOrEdit
{
+ public DateTime UpdateTime { get; set; }
public string CodeView { get; set; }
public int FileCount { get; set; }