From a635360c95b4c0d4a5fd86202ef35fca8bbda4d1 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 10 Aug 2023 11:15:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A0=E6=80=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/DTO/VisitTaskViewModel.cs | 62 ++++++++++--------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index ca595c584..7a45450e7 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -257,7 +257,7 @@ namespace IRaCIS.Core.Application.ViewModel public Guid SubjectId { get; set; } public string SubjectCode { get; set; } = String.Empty; - public bool IsUrgent => UnReadTaskList.Any(t => t.IsUrgent); + public bool IsUrgent => UnReadCanReadTaskList.Any(t => t.IsUrgent); public int UnReadTaskCount { get; set; } @@ -271,6 +271,38 @@ namespace IRaCIS.Core.Application.ViewModel public DateTime? SuggesteFinishedTime { get; set; } + public int? UrgentColor + { + get + { + if (this.SuggesteFinishedTime != null) + { + var date = DateTime.Now; + var timeSpan = SuggesteFinishedTime.Value- date; + if (timeSpan.TotalDays <= 2) + { + return 1; + } + else if (timeSpan.TotalDays <= 5) + { + return 2; + } + else + { + return 3; + } + } + else + { + return null; + } + } + } + + + + public int UrgentCount => UnReadCanReadTaskList.Count(t => t.IsUrgent); + public List UnReadCanReadTaskList => UnReadTaskList.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).ToList(); public List UnReadTaskList { get; set; } = new List(); @@ -298,34 +330,6 @@ namespace IRaCIS.Core.Application.ViewModel public Guid? VisistId { get; set; } public DateTime? SuggesteFinishedTime { get; set; } - public int? UrgentColor - { - get - { - if (this.SuggesteFinishedTime != null) - { - var date = DateTime.Now; - var timeSpan = date - SuggesteFinishedTime.Value; - if (timeSpan.TotalDays <= 2) - { - return 1; - } - else if (timeSpan.TotalDays <= 5) - { - return 2; - } - else - { - return 3; - } - } - else - { - return null; - } - } - } - public Guid TrialReadingCriterionId { get; set; } public bool IsNeedClinicalDataSign { get; set; }