From 7ca92a76759ec7bb24d0448907a773bc252bce47 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 7 Jun 2024 17:59:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 55 +++++++++++++++---- .../Common/Dto/SetDictionaryValueDto.cs | 13 +++++ 2 files changed, 56 insertions(+), 12 deletions(-) diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index b0d95ad1e..668549658 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -2570,9 +2570,27 @@ namespace IRaCIS.Core.Infra.EFCore.Common } + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SubjectCanceDoctor))) + { + var type = GetEntityAuditOpt(item); - //申请重阅记录表 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(VisitTaskReReading))) + var entity = item.Entity as SubjectCanceDoctor; + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + + ObjectRelationParentId = entity.SubjectId, + + + ObjectRelationParentId3 = entity.TrialReadingCriterionId, + + }, new { }); + } + + + + //申请重阅记录表 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(VisitTaskReReading))) { var type = GetEntityAuditOpt(item); @@ -2580,7 +2598,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common var extraIdentification = string.Empty; - + var reason = entity.RequestReReadingReason; switch (_userInfo.RequestUrl) { case "VisitTask/applyReReading": @@ -2598,8 +2616,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common { extraIdentification = "/" + 2; } + reason = entity.RequestReReadingRejectReason; - if (entity.RequestReReadingResultEnum == RequestReReadingResult.Agree) + if (entity.RequestReReadingResultEnum == RequestReReadingResult.Agree) { extraIdentification = extraIdentification+"/" + 1; @@ -2616,7 +2635,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common { VisitTaskId = entity.OriginalReReadingTaskId, - Reason = entity.RequestReReadingReason, + Reason = reason, ObjectRelationParentId = entity.OriginalReReadingTaskId, @@ -3127,11 +3146,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common var entity = item.Entity as VisitTask; var userRealName = await _dbContext.User.Where(x => x.Id == entity.DoctorUserId).Select(x => x.FullName).FirstOrDefaultAsync(); - object obj = new { UserRealName= userRealName }; + VisitTaskAuditingDto obj = new VisitTaskAuditingDto() + { + UserRealName = userRealName, - #region 标识区分 + }; + #region 标识区分 - if (type == AuditOpt.Add) + if (type == AuditOpt.Add) { //生成一致性分析任务 if (entity.IsSelfAnalysis == true) @@ -3194,7 +3216,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common { //跳转阅片结果需要该参数 var subjectCode = _dbContext.Subject.Where(t => t.Id == entity.SubjectId).Select(t => t.Code).First(); - obj = new { SubjectCode = subjectCode }; + + obj.SubjectCode=subjectCode; } #region 裁判、肿瘤学、全局 都是通用的 @@ -3210,8 +3233,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common var r1 = list.Where(t => t.ArmEnum == Arm.DoubleReadingArm1).FirstOrDefault(); var r2 = list.Where(t => t.ArmEnum == Arm.DoubleReadingArm2).FirstOrDefault(); - - obj = new { R1 = r1.FullName, R2 = r2.FullName, SelectResult = r1.Id == entity.JudgeResultTaskId ? "R1" : "R2" }; + obj.R1 = r1.FullName; + obj.R2 = r2.FullName; + obj.SelectResult = r1.Id == entity.JudgeResultTaskId ? "R1" : "R2"; } @@ -3294,8 +3318,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common #endregion + if (entity.SouceReadModuleId != null) + { + var subjectVisitId = await _dbContext.ReadModule.Where(x => x.Id == entity.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync(); - await InsertInspection(entity, type, x => new InspectionConvertDTO() + obj.CutOffVisitName = await _dbContext.SubjectVisit.Where(x => x.Id == subjectVisitId).Select(x => x.BlindName).FirstOrDefaultAsync(); + + } + + await InsertInspection(entity, type, x => new InspectionConvertDTO() { VisitTaskId = x.Id, diff --git a/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs b/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs index 62cb923ab..627e7e891 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs @@ -120,7 +120,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto public object CommonData { get; set; } } + public class VisitTaskAuditingDto + { + public string UserRealName { get; set; } + public string SubjectCode { get; set; } + + public string R1 { get; set; } + + public string R2 { get; set; } + + public string CutOffVisitName { get; set; } + + public string SelectResult { get; set; } + } public class InspectionConvertDTO : DataInspection { ///