From f13c2bf7cc7376df0d4f3dcbe8c8bb502432204f Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 26 Jun 2025 13:59:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A1=AE=E8=AE=A4=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Doctor/DTO/DoctorModel.cs | 7 +++++++ .../Service/Doctor/DoctorListService.cs | 19 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs index 335955f65..100d4271d 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs @@ -242,6 +242,8 @@ namespace IRaCIS.Application.Contracts public class ConfirmationReviewerDTO : DoctorOptDTO { + public Guid DoctorId { get; set; } + public int DoctorTrialState { get; set; } public string OptUserName { get; set; } = string.Empty; @@ -249,6 +251,11 @@ namespace IRaCIS.Application.Contracts public DateTime? OptTime { get; set; } public string? OptTimeStr => OptTime?.ToString("yyyy-MM-dd HH:mm:ss"); + public UserTypeEnum? AuditTypeEnum { get; set; } + public DateTime? AuditTime { get; set; } + public string AuditUserName { get; set; } = string.Empty; + public string? AuditTimeStr => AuditTime?.ToString("yyyy-MM-dd HH:mm:ss"); + //SPM 需要看到 public DateTime? SubmmitTime { get; set; } public string SubmmitUserName { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index 4a12e84c2..6440c6423 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -337,14 +337,29 @@ namespace IRaCIS.Core.Application.Service doctorPageList.CurrentPageData.ToList().ForEach(u => { u.DoctorTrialState = (int)EnrollStatus.InviteIntoGroup; - var opt = enrollStateList.OrderByDescending(x=>x.OptTime).FirstOrDefault(t => t.DoctorId == u.Id); + + var lastState= enrollStateList.OrderByDescending(x=>x.OptTime).FirstOrDefault(t => t.DoctorId == u.Id); + if (lastState != null) + { + u.DoctorTrialState = lastState.IntoGroupState; + } + var opt = enrollStateList.Where(x => x.IntoGroupState == 10).FirstOrDefault(t => t.DoctorId == u.Id); if (opt != null) { - u.DoctorTrialState = opt.IntoGroupState; + u.OptTime = opt.OptTime; u.UserTypeEnum = opt.UserTypeEnum; u.OptUserName = opt.OptUserName; } + + var approved = enrollStateList.Where(x => x.IntoGroupState == 8).FirstOrDefault(t => t.DoctorId == u.Id); + + if (approved != null) + { + u.AuditTime = approved.OptTime; + u.AuditTypeEnum = approved.UserTypeEnum; + u.AuditUserName = approved.OptUserName; + } }); return doctorPageList;