修改建议完成时间
parent
6e3145685d
commit
daed7ea078
|
@ -15,9 +15,12 @@ using AutoMapper;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 访视读片任务
|
/// 访视读片任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -245,7 +248,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
task1.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
task1.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
||||||
task1.AllocateTime = DateTime.Now;
|
task1.AllocateTime = DateTime.Now;
|
||||||
|
|
||||||
task1.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
task1.SuggesteFinishedTime = GetSuggessFinishTime(true,UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2) && task2 != null)
|
if (assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2) && task2 != null)
|
||||||
|
@ -253,7 +256,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
task2.TaskAllocationState = defaultState;
|
task2.TaskAllocationState = defaultState;
|
||||||
task2.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
task2.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
||||||
task2.AllocateTime = DateTime.Now;
|
task2.AllocateTime = DateTime.Now;
|
||||||
task2.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
task2.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -298,7 +301,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
singleTask.AllocateTime = DateTime.Now;
|
singleTask.AllocateTime = DateTime.Now;
|
||||||
|
|
||||||
singleTask.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
singleTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -422,6 +425,49 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime GetSuggessFinishTime(bool isInOrder, UrgentType urgentType )
|
||||||
|
{
|
||||||
|
|
||||||
|
var datetime= new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day + 7, 22, 0, 0);
|
||||||
|
//switch (urgentType)
|
||||||
|
//{
|
||||||
|
// case UrgentType.NotUrget:
|
||||||
|
|
||||||
|
// datetime= new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day + 7, 22, 0, 0);
|
||||||
|
|
||||||
|
// break;
|
||||||
|
// case UrgentType.EnrollConfirm:
|
||||||
|
|
||||||
|
// datetime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day , 22, 0, 0);
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case UrgentType.EnrollConfirmOtherNotUrgent:
|
||||||
|
|
||||||
|
// datetime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day+5, 22, 0, 0);
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// case UrgentType.PDVProgressVisitOrGlobal:
|
||||||
|
// datetime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 22, 0, 0);
|
||||||
|
// break;
|
||||||
|
// case UrgentType.PDVProgressJudge:
|
||||||
|
// datetime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day+1, 22, 0, 0);
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// //不加急 7天
|
||||||
|
// case UrgentType.NormalUrgent:
|
||||||
|
|
||||||
|
// datetime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day + 7, 22, 0, 0);
|
||||||
|
// break;
|
||||||
|
|
||||||
|
// default:
|
||||||
|
// break;
|
||||||
|
//}
|
||||||
|
|
||||||
|
return datetime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public async Task AddTaskAsync(GenerateTaskCommand generateTaskCommand)
|
public async Task AddTaskAsync(GenerateTaskCommand generateTaskCommand)
|
||||||
|
@ -640,7 +686,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
task1.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
task1.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
||||||
task1.AllocateTime = DateTime.Now;
|
task1.AllocateTime = DateTime.Now;
|
||||||
|
|
||||||
task1.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
task1.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2) && task2 != null)
|
if (assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2) && task2 != null)
|
||||||
|
@ -648,7 +694,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
task2.TaskAllocationState = defaultState;
|
task2.TaskAllocationState = defaultState;
|
||||||
task2.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
task2.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
||||||
task2.AllocateTime = DateTime.Now;
|
task2.AllocateTime = DateTime.Now;
|
||||||
task2.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
task2.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -688,7 +734,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
arm1.TaskAllocationState = TaskAllocationState.Allocated;
|
arm1.TaskAllocationState = TaskAllocationState.Allocated;
|
||||||
arm1.AllocateTime = DateTime.Now;
|
arm1.AllocateTime = DateTime.Now;
|
||||||
arm1.DoctorUserId = task1.DoctorUserId;
|
arm1.DoctorUserId = task1.DoctorUserId;
|
||||||
arm1.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
arm1.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -718,7 +764,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
TaskAllocationState = TaskAllocationState.Allocated,
|
TaskAllocationState = TaskAllocationState.Allocated,
|
||||||
AllocateTime = DateTime.Now,
|
AllocateTime = DateTime.Now,
|
||||||
DoctorUserId = task1.DoctorUserId,
|
DoctorUserId = task1.DoctorUserId,
|
||||||
SuggesteFinishedTime = DateTime.Now.AddDays(7),
|
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget),
|
||||||
TrialReadingCriterionId = latestTask.TrialReadingCriterionId,
|
TrialReadingCriterionId = latestTask.TrialReadingCriterionId,
|
||||||
IsNeedClinicalDataSign = latestTask.IsNeedClinicalDataSign,
|
IsNeedClinicalDataSign = latestTask.IsNeedClinicalDataSign,
|
||||||
IsClinicalDataSign = latestTask.IsClinicalDataSign
|
IsClinicalDataSign = latestTask.IsClinicalDataSign
|
||||||
|
@ -747,7 +793,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
arm2.TaskAllocationState = TaskAllocationState.Allocated;
|
arm2.TaskAllocationState = TaskAllocationState.Allocated;
|
||||||
arm2.AllocateTime = DateTime.Now;
|
arm2.AllocateTime = DateTime.Now;
|
||||||
arm2.DoctorUserId = task2.DoctorUserId;
|
arm2.DoctorUserId = task2.DoctorUserId;
|
||||||
arm2.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
arm2.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -779,7 +825,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
TaskAllocationState = TaskAllocationState.Allocated,
|
TaskAllocationState = TaskAllocationState.Allocated,
|
||||||
AllocateTime = DateTime.Now,
|
AllocateTime = DateTime.Now,
|
||||||
DoctorUserId = task2.DoctorUserId,
|
DoctorUserId = task2.DoctorUserId,
|
||||||
SuggesteFinishedTime = DateTime.Now.AddDays(7),
|
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget),
|
||||||
|
|
||||||
TrialReadingCriterionId = latestTask.TrialReadingCriterionId,
|
TrialReadingCriterionId = latestTask.TrialReadingCriterionId,
|
||||||
IsNeedClinicalDataSign = latestTask.IsNeedClinicalDataSign,
|
IsNeedClinicalDataSign = latestTask.IsNeedClinicalDataSign,
|
||||||
|
@ -808,7 +854,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
task1.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
task1.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
||||||
task1.AllocateTime = DateTime.Now;
|
task1.AllocateTime = DateTime.Now;
|
||||||
|
|
||||||
task1.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
task1.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2) && task2 != null)
|
if (assignConfigList.Any(t => t.ArmEnum == Arm.DoubleReadingArm2) && task2 != null)
|
||||||
|
@ -816,7 +862,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
task2.TaskAllocationState = defaultState;
|
task2.TaskAllocationState = defaultState;
|
||||||
task2.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
task2.DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
||||||
task2.AllocateTime = DateTime.Now;
|
task2.AllocateTime = DateTime.Now;
|
||||||
task2.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
task2.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -924,7 +970,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
singleTask.AllocateTime = DateTime.Now;
|
singleTask.AllocateTime = DateTime.Now;
|
||||||
|
|
||||||
singleTask.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
singleTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -960,7 +1006,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
arm.TaskAllocationState = TaskAllocationState.Allocated;
|
arm.TaskAllocationState = TaskAllocationState.Allocated;
|
||||||
arm.AllocateTime = DateTime.Now;
|
arm.AllocateTime = DateTime.Now;
|
||||||
arm.DoctorUserId = singleTask.DoctorUserId;
|
arm.DoctorUserId = singleTask.DoctorUserId;
|
||||||
arm.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
arm.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1029,7 +1075,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
singleTask.AllocateTime = DateTime.Now;
|
singleTask.AllocateTime = DateTime.Now;
|
||||||
|
|
||||||
singleTask.SuggesteFinishedTime = DateTime.Now.AddDays(7);
|
singleTask.SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1203,7 +1249,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DoctorUserId = task.DoctorUserId,
|
DoctorUserId = task.DoctorUserId,
|
||||||
TaskAllocationState = TaskAllocationState.Allocated,
|
TaskAllocationState = TaskAllocationState.Allocated,
|
||||||
AllocateTime = DateTime.Now,
|
AllocateTime = DateTime.Now,
|
||||||
SuggesteFinishedTime = DateTime.Now.AddDays(7),
|
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget),
|
||||||
|
|
||||||
SouceReadModuleId = task.SouceReadModuleId,
|
SouceReadModuleId = task.SouceReadModuleId,
|
||||||
SourceSubjectVisitId = task.SourceSubjectVisitId,
|
SourceSubjectVisitId = task.SourceSubjectVisitId,
|
||||||
|
@ -1253,7 +1299,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DoctorUserId = task.DoctorUserId,
|
DoctorUserId = task.DoctorUserId,
|
||||||
TaskAllocationState = TaskAllocationState.Allocated,
|
TaskAllocationState = TaskAllocationState.Allocated,
|
||||||
AllocateTime = DateTime.Now,
|
AllocateTime = DateTime.Now,
|
||||||
SuggesteFinishedTime = DateTime.Now.AddDays(7),
|
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget),
|
||||||
|
|
||||||
IsAnalysisCreate = true,
|
IsAnalysisCreate = true,
|
||||||
IsSelfAnalysis = false,
|
IsSelfAnalysis = false,
|
||||||
|
@ -1300,7 +1346,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DoctorUserId = subjectUser == null ? null : subjectUser.DoctorUserId,
|
DoctorUserId = subjectUser == null ? null : subjectUser.DoctorUserId,
|
||||||
TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
||||||
AllocateTime = subjectUser == null ? null : DateTime.Now,
|
AllocateTime = subjectUser == null ? null : DateTime.Now,
|
||||||
SuggesteFinishedTime = subjectUser == null ? null : DateTime.Now.AddDays(7),
|
SuggesteFinishedTime = subjectUser == null ? null : GetSuggessFinishTime(true, UrgentType.NotUrget),
|
||||||
|
|
||||||
TrialReadingCriterionId = firstTask.TrialReadingCriterionId,
|
TrialReadingCriterionId = firstTask.TrialReadingCriterionId,
|
||||||
|
|
||||||
|
@ -1354,7 +1400,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DoctorUserId = originalTaskInfo.DoctorUserId,
|
DoctorUserId = originalTaskInfo.DoctorUserId,
|
||||||
AllocateTime = DateTime.Now,
|
AllocateTime = DateTime.Now,
|
||||||
TaskAllocationState = TaskAllocationState.Allocated,
|
TaskAllocationState = TaskAllocationState.Allocated,
|
||||||
SuggesteFinishedTime = DateTime.Now.AddDays(7),
|
SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget),
|
||||||
|
|
||||||
Code = currentMaxCodeInt + 1,
|
Code = currentMaxCodeInt + 1,
|
||||||
TaskBlindName = "G-"+ visitNumList.IndexOf(originalTaskInfo.VisitTaskNum),
|
TaskBlindName = "G-"+ visitNumList.IndexOf(originalTaskInfo.VisitTaskNum),
|
||||||
|
@ -1404,7 +1450,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
DoctorUserId = oncologySubjectUser == null ? null : oncologySubjectUser.DoctorUserId,
|
DoctorUserId = oncologySubjectUser == null ? null : oncologySubjectUser.DoctorUserId,
|
||||||
AllocateTime = oncologySubjectUser == null ? null : DateTime.Now,
|
AllocateTime = oncologySubjectUser == null ? null : DateTime.Now,
|
||||||
TaskAllocationState = oncologySubjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
TaskAllocationState = oncologySubjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
||||||
SuggesteFinishedTime = oncologySubjectUser == null ? null : DateTime.Now.AddDays(7),
|
SuggesteFinishedTime = oncologySubjectUser == null ? null : GetSuggessFinishTime(true, UrgentType.NotUrget),
|
||||||
|
|
||||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||||
ReadingCategory = item.ReadingCategory,
|
ReadingCategory = item.ReadingCategory,
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Domain.Share.Reading
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public enum UrgentType
|
||||||
|
{
|
||||||
|
NotUrget = 0,
|
||||||
|
|
||||||
|
EnrollConfirm = 1,
|
||||||
|
|
||||||
|
EnrollConfirmOtherNotUrgent=5,
|
||||||
|
|
||||||
|
PDVProgressVisitOrGlobal = 2,
|
||||||
|
|
||||||
|
PDVProgressJudge = 3,
|
||||||
|
|
||||||
|
NormalUrgent = 4,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue