From 3ebeacf3c90191aa0e9a1f9417f483a48d222a47 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Thu, 5 May 2022 17:43:13 +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 | 20 +++++++++----
.../Service/Inspection/DTO/InspectionModel.cs | 28 +++++++++++--------
.../Service/Visit/SubjectService.cs | 5 ++--
.../Common/AuditingData.cs | 3 ++
.../Repository/Repository.cs | 5 ++++
5 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index fbffa562..a030fd17 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -156,6 +156,21 @@
子类
+
+
+ 对象名称
+
+
+
+
+ 操作类型
+
+
+
+
+ 功能模块
+
+
创建人名称
@@ -196,11 +211,6 @@
项目编码
-
-
- 对象名称
-
-
标识
diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs
index 4c0f8ddc..c7784f5e 100644
--- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs
+++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs
@@ -24,19 +24,28 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public Guid? SiteId { get; set; }
public Guid? SubjectId { get; set; }
public Guid? SubjectVisitId { get; set; }
- public string ModuleType { get; set; } = string.Empty;
- public string OptType { get; set; } = string.Empty;
-
+ ///
+ /// 子类
+ ///
+ public Guid? ChildrenType { get; set; }
+ ///
+ /// 对象名称
+ ///
+ public Guid? ObjectType { get; set; }
+ ///
+ /// 操作类型
+ ///
+ public Guid? OptType { get; set; }
+ ///
+ /// 功能模块
+ ///
+ public Guid? ModuleType { get; set; }
public string BlindName { get; set; } = string.Empty;
public string Reason { get; set; } = string.Empty;
- ///
- /// 子类
- ///
- public string ChildrenType { get; set; } = string.Empty;
public bool IsSign { get; set; }
public string JsonDetail { get; set; } = string.Empty;
@@ -84,11 +93,6 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
public List EnumList { get; set; } = new List { };
- ///
- /// 对象名称
- ///
- public string ObjectType { get; set; } = string.Empty;
-
///
/// 标识
///
diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs
index 014c7372..d415b381 100644
--- a/IRaCIS.Core.Application/Service/Visit/SubjectService.cs
+++ b/IRaCIS.Core.Application/Service/Visit/SubjectService.cs
@@ -46,13 +46,13 @@ namespace IRaCIS.Application.Services
};
- bool isadd = false;
+
Subject? mapedSubject = null;
if (subjectCommand.Id == null) //insert
{
- isadd = true;
+
mapedSubject= await _subjectRepository.InsertFromDTOAsync(subjectCommand, false, verifyExp1);
@@ -66,6 +66,7 @@ namespace IRaCIS.Application.Services
svlist.ForEach(t =>
{
+ t.Subject = mapedSubject;
t.SubjectId = mapedSubject.Id;
t.TrialId = subjectCommand.TrialId;
t.SiteId = subjectCommand.SiteId;
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index fcbd98e3..0d2c8281 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -94,8 +94,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
// 访视
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SubjectVisit)))
{
+ var subjectCode = (item.Entity as SubjectVisit).Subject?.Code;
await InsertInspection(item, type, x => new DataInspection()
{
+ SubjectCode= subjectCode,
+ SubjectId=x.SubjectId,
SubjectVisitId = x.Id,
SubjectVisitName=x.VisitName,
});
diff --git a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs
index 3c8858fc..3381e575 100644
--- a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs
+++ b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs
@@ -601,6 +601,11 @@ namespace IRaCIS.Core.Infra.EFCore
var JsonData = JsonConvert.DeserializeObject>(json);
+ if (JsonData == null)
+ {
+ return json;
+ }
+
foreach (var item in JsonData.Keys)
{
var datefirst = list.FirstOrDefault(x => x.Code.ToLower() == item.ToLower());