From 7a5ad83cbb97a9a1264654fe6e5174acfc060d91 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 29 Jan 2026 11:37:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=80=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs | 1 + IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs | 1 + IRaCIS.Core.Domain/Dcotor/Doctor.cs | 3 +++ IRaCIS.Core.Domain/Dcotor/Vacation.cs | 3 +++ 4 files changed, 8 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs index 100d4271d..f1c84a99d 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs @@ -183,6 +183,7 @@ namespace IRaCIS.Application.Contracts public class SelectionReviewerDTO : DoctorDTO { + public bool IsVacation { get; set; } public int DoctorTrialState { get; set; } public bool IsEnroll { get; set; } = false; diff --git a/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs b/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs index ae2a9ba7f..23747a3e4 100644 --- a/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Doctor/_MapConfig.cs @@ -131,6 +131,7 @@ namespace IRaCIS.Core.Application.Service #region 医生基本信息 CreateMap() + .ForMember(d => d.IsVacation, u => u.MapFrom(t => t.VacationList.Any(x=>x.StartDateDateTime.Now))) .ForMember(d => d.DoctorUserName, u => u.MapFrom(t => t.UserRole.IdentityUser.UserName)); diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs index bbc3e79de..47d9259ea 100644 --- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs +++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs @@ -16,6 +16,9 @@ public class Doctor : BaseFullAuditEntity [JsonIgnore] public List EnrollList { get; set; } + [JsonIgnore] + public List VacationList { get; set; } + [JsonIgnore] [ForeignKey("HospitalId")] public Hospital Hospital { get; set; } diff --git a/IRaCIS.Core.Domain/Dcotor/Vacation.cs b/IRaCIS.Core.Domain/Dcotor/Vacation.cs index 9f2e05aca..4c089fdf1 100644 --- a/IRaCIS.Core.Domain/Dcotor/Vacation.cs +++ b/IRaCIS.Core.Domain/Dcotor/Vacation.cs @@ -6,6 +6,9 @@ public class Vacation : BaseFullAuditEntity { #region 导航属性 + [JsonIgnore] + [ForeignKey("DoctorId")] + public Doctor Doctor { get; set; } #endregion public Guid DoctorId { get; set; } public DateTime StartDate { get; set; }