From 63919c8f6b723c73bab10057cbb57a8a35ea8299 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Thu, 16 Jan 2025 15:13:58 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=B4=E6=8A=A4=E6=96=B9?=
=?UTF-8?q?=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
IRaCIS.Core.Application/TestService.cs | 1 -
.../Common/AuditingData.cs | 51 +++++++++----------
2 files changed, 23 insertions(+), 29 deletions(-)
diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs
index 02ce983d3..99e28458e 100644
--- a/IRaCIS.Core.Application/TestService.cs
+++ b/IRaCIS.Core.Application/TestService.cs
@@ -161,7 +161,6 @@ namespace IRaCIS.Core.Application.Service
///
public async Task UserMutiAccount([FromServices] IRepository _identityUserRepository)
{
- _userInfo.IsNotNeedInspection = true;
if ((await _identityUserRepository.FirstOrDefaultAsync()) == null)
{
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index b05bc360a..d8618ad05 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -1735,13 +1735,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as IdentityUser;
- if (!_userInfo.IsNotNeedInspection)
- {
+
await InsertInspection(entity, type, x => new InspectionConvertDTO
{
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
});
- }
}
// 项目参与人员
@@ -1753,33 +1751,30 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var identityUser = await _dbContext.IdentityUser.AsNoTracking().Where(x => x.Id == entity.IdentityUserId).FirstOrDefaultAsync();
- //if (type == AuditOpt.Update)
- //{
- // extraIndentification = "/" + entity.IsDeleted.ToString();
- //}
-
-
- //var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
- await InsertInspection(entity, type, x => new InspectionConvertDTO
- {
- //IsDistinctionInterface = true ,
- TrialId = x.TrialId,
- IsDistinctionInterface=false,
- ObjectRelationParentId = x.TrialId,
- ExtraIndentification = extraIndentification,
- //ObjectRelationParentId2 = x.IdentityUserId,
- }, new
+ // 变更维护数据,会维护数据,不能插入稽查
+ if (_userInfo.IsNotNeedInspection == false)
{
+ await InsertInspection(entity, type, x => new InspectionConvertDTO
+ {
+ //IsDistinctionInterface = true ,
+ TrialId = x.TrialId,
+ IsDistinctionInterface = false,
+ ObjectRelationParentId = x.TrialId,
+ ExtraIndentification = extraIndentification,
+ //ObjectRelationParentId2 = x.IdentityUserId,
+ }, new
+ {
- identityUser.FullName,
- identityUser.EMail,
- identityUser.Code,
- identityUser.UserCode,
- identityUser.UserName,
- identityUser.DepartmentName,
- identityUser.Phone,
- identityUser.OrganizationName,
- });
+ identityUser.FullName,
+ identityUser.EMail,
+ identityUser.Code,
+ identityUser.UserCode,
+ identityUser.UserName,
+ identityUser.DepartmentName,
+ identityUser.Phone,
+ identityUser.OrganizationName,
+ });
+ }
}
// 项目人员