From 70679cbf170b03a9eee4a97264e5ed541b469f49 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 11 Jan 2023 11:05:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/WorkLoad/DoctorWorkloadService.cs | 2 +- IRaCIS.Core.Domain/Dcotor/Doctor.cs | 7 ++++-- IRaCIS.Core.Domain/Management/User.cs | 4 ++++ .../EntityConfigration/DoctorConfigration.cs | 24 +++++++++---------- 4 files changed, 22 insertions(+), 15 deletions(-) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs index d1c319b4a..4c8844d66 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs @@ -217,7 +217,7 @@ namespace IRaCIS.Application.Services Id=x.Id }).ToList(), CriterionReadingCategoryList =intoGroup.EnrollReadingCategoryList.Select(t=>new TrialCriterionReadingCategory() { EnrollId=t.EnrollId,ReadingCategory=t.ReadingCategory, TrialReadingCriterionId = t.TrialReadingCriterionId }).ToList(), - ReadingTaskStateList=doctor.VisitTaskList.Where(x=>x.TaskState==TaskState.Effect&&x.TrialId== trialId).Select(x=>x.ReadingTaskState).ToList(), + ReadingTaskStateList=doctor.User.VisitTaskList.Where(x=>x.TaskState==TaskState.Effect&&x.TrialId== trialId).Select(x=>x.ReadingTaskState).ToList(), DoctorId = doctor.Id, Code = doctor.ReviewerCode, FirstName = doctor.FirstName, diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs index e64f8a8c9..ab0837d23 100644 --- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs +++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs @@ -188,9 +188,12 @@ namespace IRaCIS.Core.Domain.Models [JsonIgnore] public List CriterionFileList { get; set; } - [JsonIgnore] - public List VisitTaskList { get; set; } + public User User { get; set; } + + + //[JsonIgnore] + //public List VisitTaskList { get; set; } public bool IsVirtual { get; set; } diff --git a/IRaCIS.Core.Domain/Management/User.cs b/IRaCIS.Core.Domain/Management/User.cs index 2aa4d1e0e..2e410c5a0 100644 --- a/IRaCIS.Core.Domain/Management/User.cs +++ b/IRaCIS.Core.Domain/Management/User.cs @@ -78,6 +78,10 @@ namespace IRaCIS.Core.Domain.Models //医生生成账号后,会有值 public Guid? DoctorId { get; set; } + [JsonIgnore] + [ForeignKey("DoctorId")] + public Doctor Doctor { get; set; } + public bool IsTestUser { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs b/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs index 7c6cc7b08..bac14118a 100644 --- a/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs +++ b/IRaCIS.Core.Infra.EFCore/EntityConfigration/DoctorConfigration.cs @@ -26,22 +26,22 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration } - public class DoctorTaskConfigration : IEntityTypeConfiguration - { + //public class DoctorTaskConfigration : IEntityTypeConfiguration + //{ - public void Configure(EntityTypeBuilder builder) - { - builder - .HasOne(dd => dd.DoctorUser) - .WithMany(p => p.VisitTaskList) - .HasForeignKey(dd => dd.DoctorUserId); - - - } + // public void Configure(EntityTypeBuilder builder) + // { + // builder + // .HasOne(dd => dd.DoctorUser) + // .WithMany(p => p.VisitTaskList) + // .HasForeignKey(dd => dd.DoctorUserId); - } + // } + + + //} public class DictionaryConfigration : IEntityTypeConfiguration {