生成任务的时间

Test.EIImageViewer
hang 2023-03-08 18:03:49 +08:00
parent bde25001e5
commit 5bd9cd680b
2 changed files with 16 additions and 6 deletions

View File

@ -1034,8 +1034,9 @@ namespace IRaCIS.Core.Application.Service
TaskAllocationState = TaskAllocationState.Allocated, TaskAllocationState = TaskAllocationState.Allocated,
AllocateTime = DateTime.Now, AllocateTime = DateTime.Now,
DoctorUserId = singleTask.DoctorUserId, DoctorUserId = singleTask.DoctorUserId,
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget),
TrialReadingCriterionId = latestTask.TrialReadingCriterionId, TrialReadingCriterionId = latestTask.TrialReadingCriterionId,
IsNeedClinicalDataSign = latestTask.IsNeedClinicalDataSign, IsNeedClinicalDataSign = latestTask.IsNeedClinicalDataSign,
IsClinicalDataSign = latestTask.IsClinicalDataSign IsClinicalDataSign = latestTask.IsClinicalDataSign

View File

@ -20,6 +20,7 @@ using System.Linq.Dynamic.Core;
using System.Linq; using System.Linq;
using DocumentFormat.OpenXml.Bibliography; using DocumentFormat.OpenXml.Bibliography;
using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto;
using IRaCIS.Core.Domain.Share.Reading;
namespace IRaCIS.Core.Application.Service.Allocation namespace IRaCIS.Core.Application.Service.Allocation
{ {
@ -185,7 +186,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
DoctorUserId = doctorArm.DoctorUserId, DoctorUserId = doctorArm.DoctorUserId,
TaskAllocationState = TaskAllocationState.Allocated, TaskAllocationState = TaskAllocationState.Allocated,
SuggesteFinishedTime = DateTime.Now.AddDays(7), SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget),
}); });
} }
} }
@ -322,7 +323,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
visitTask.DoctorUserId = assignSubjectTaskToDoctorCommand.DoctorUserId; visitTask.DoctorUserId = assignSubjectTaskToDoctorCommand.DoctorUserId;
visitTask.TaskAllocationState = TaskAllocationState.Allocated; visitTask.TaskAllocationState = TaskAllocationState.Allocated;
visitTask.SuggesteFinishedTime = DateTime.Now.AddDays(7); visitTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
@ -588,7 +589,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
task.AllocateTime = DateTime.Now; task.AllocateTime = DateTime.Now;
task.TaskAllocationState = TaskAllocationState.Allocated; task.TaskAllocationState = TaskAllocationState.Allocated;
task.SuggesteFinishedTime = task.IsUrgent ? DateTime.Now.AddDays(2) : DateTime.Now.AddDays(7); task.SuggesteFinishedTime = /*task.IsUrgent ? DateTime.Now.AddDays(2) : DateTime.Now.AddDays(7)*/ GetSuggessFinishTime(true, UrgentType.NotUrget);
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == task.SourceSubjectVisitId, u => new SubjectVisit() { ReadingStatus = ReadingStatusEnum.ImageReading }); await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == task.SourceSubjectVisitId, u => new SubjectVisit() { ReadingStatus = ReadingStatusEnum.ImageReading });
@ -1381,6 +1382,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
} }
public DateTime GetSuggessFinishTime(bool isInOrder, UrgentType urgentType)
{
var datetime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day + 7, 22, 0, 0);
return datetime;
}
/// <summary> /// <summary>
/// 确认重阅与否 1同意 2 拒绝 /// 确认重阅与否 1同意 2 拒绝
/// </summary> /// </summary>
@ -1744,7 +1753,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
newTask.DoctorUserId = origenalTask.DoctorUserId; newTask.DoctorUserId = origenalTask.DoctorUserId;
newTask.TaskAllocationState = TaskAllocationState.Allocated; newTask.TaskAllocationState = TaskAllocationState.Allocated;
newTask.AllocateTime = DateTime.Now; newTask.AllocateTime = DateTime.Now;
newTask.SuggesteFinishedTime = DateTime.Now.AddDays(7); newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
//拷贝后续表单 //拷贝后续表单
if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum) if (visitTaskReReadingAppply.IsCopyFollowForms && origenalTask.VisitTaskNum != influenceTask.VisitTaskNum)
@ -1856,7 +1865,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
newTask.DoctorUserId = origenalTask.DoctorUserId; newTask.DoctorUserId = origenalTask.DoctorUserId;
newTask.TaskAllocationState = TaskAllocationState.Allocated; newTask.TaskAllocationState = TaskAllocationState.Allocated;
newTask.AllocateTime = DateTime.Now; newTask.AllocateTime = DateTime.Now;
newTask.SuggesteFinishedTime = DateTime.Now.AddDays(7); newTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
//裁判任务 需要进行特殊处理 在重阅逻辑里面处理 //裁判任务 需要进行特殊处理 在重阅逻辑里面处理