diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs index 1c25af2f0..06cda4737 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewRuleService.cs @@ -67,11 +67,11 @@ namespace IRaCIS.Core.Application.Service public async Task DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId) { - if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any())) - { - //"已产生医学审核任务" - return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]); - } + //if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any())) + //{ + // //"已产生医学审核任务" + // return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]); + //} var success = await _taskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId,true); diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index b3d60c351..556b96ccf 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -92,8 +92,8 @@ namespace IRaCIS.Core.Domain.Models /// //public Guid DoctorUserId { get; set; } - [JsonIgnore] - public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; } + //[JsonIgnore] + //public TaskMedicalReviewRule TaskMedicalReviewRule { get; set; } /// diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs index ddefaf355..7f7be240a 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs @@ -41,12 +41,14 @@ namespace IRaCIS.Core.Domain.Models public int PlanGlobalCount { get; set; } public int PlanTumorCount { get; set; } + [JsonIgnore] public User DoctorUser { get; set; } - [JsonIgnore] - public List DoctorTrialVisitTaskList { get; set; } - [JsonIgnore] - public List TaskMedicalReviewList { get; set; } + + //[JsonIgnore] + //public List DoctorTrialVisitTaskList { get; set; } + //[JsonIgnore] + //public List TaskMedicalReviewList { get; set; } } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index bbc4b3fa8..257e38e4e 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -134,8 +134,8 @@ namespace IRaCIS.Core.Domain.Models //public TaskAllocationRule DoctorTaskAllocationRule { get; set; } - [JsonIgnore] - public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; } + //[JsonIgnore] + //public TaskMedicalReviewRule DoctorTaskMedicalReviewRule { get; set; } diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 4a4db84c4..efd038e73 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -70,7 +70,7 @@ namespace IRaCIS.Core.Infra.EFCore modelBuilder.Entity().HasMany(t => t.VisitTaskList).WithOne(t => t.DoctorUser).HasForeignKey(t => t.DoctorUserId).IsRequired(false); - modelBuilder.Entity().HasMany(t => t.DoctorTrialVisitTaskList).WithOne(t => t.DoctorTaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId }); + //modelBuilder.Entity().HasMany(t => t.DoctorTrialVisitTaskList).WithOne(t => t.DoctorTaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId }); //modelBuilder.Entity().HasMany(t => t.TaskMedicalReviewList).WithOne(t => t.TaskMedicalReviewRule).HasForeignKey(t => new { t.DoctorUserId, t.TrialId }).HasPrincipalKey(u => new { u.DoctorUserId, u.TrialId });