From 72b8b579e28c4359d772f659d854205cad90194c Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Mon, 16 May 2022 09:53:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 17 ++++++++++++++
.../Common/DTO/FrontAuditConfigViewModel.cs | 13 +++++++++++
.../Service/Common/FrontAuditConfigService.cs | 22 ++++++++++++++++++-
.../Common/AuditingData.cs | 12 ++++++++++
4 files changed, 63 insertions(+), 1 deletion(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index bf27ade4..ecca20e4 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -84,6 +84,13 @@
+
+
+ 完全复制其他子项到当前项
+
+
+
+
Cope子项数据
@@ -470,6 +477,16 @@
FrontAuditConfigView 列表视图模型
+
+
+ 数据来源对象
+
+
+
+
+ 要赋值到的对象
+
+
FrontAuditConfigQuery 列表查询参数模型
diff --git a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs
index d3603a6e..be2d73e1 100644
--- a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs
@@ -48,7 +48,20 @@ namespace IRaCIS.Core.Application.ViewModel
public Guid Id { get; set; }
}
+ public class FullyReplicated
+ {
+ ///
+ /// 数据来源对象
+ ///
+ public Guid DataFromItem { get; set; }
+ ///
+ /// 要赋值到的对象
+ ///
+ public Guid ThisTiem { get; set; }
+
+
+ }
public class CopyOtherToThisItem
diff --git a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs
index b8683146..5a141006 100644
--- a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs
+++ b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs
@@ -127,7 +127,27 @@ namespace IRaCIS.Core.Application.Service
select childrenType).OrderBy(x=>x.Sort).ToListAsync();
return list;
}
-
+
+ ///
+ /// 完全复制其他子项到当前项
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task FullyReplicated(FullyReplicated fully)
+ {
+ await _frontAuditConfigRepository.DeleteFromQueryAsync(x => x.ParentId == fully.ThisTiem);
+ var list = await _frontAuditConfigRepository.Where(x => x.ParentId == fully.DataFromItem).ToListAsync();
+ list.ForEach(x =>
+ {
+ x.ParentId = fully.ThisTiem;
+ });
+ await _frontAuditConfigRepository.AddRangeAsync(list);
+ await _frontAuditConfigRepository.SaveChangesAsync();
+ return ResponseOutput.Ok();
+ }
+
+
///
/// Cope子项数据
///
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 0e2b99dc..f1b5854b 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -106,6 +106,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common
});
}
+ // 签名模板
+ foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemBasicData)))
+ {
+ await InsertInspection(item, type, x => new DataInspection()
+ {
+ VisitStageId = x.Id,
+ });
+ }
+
+
+
// 项目
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Trial)))
{
@@ -156,6 +167,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
+
// 检查
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
{