From 68cf8c5e42a98a67eafbf66a6a7befb81bb89f36 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 6 Apr 2022 13:37:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/FrontAuditConfigService.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs index b7d9402e5..6e79e44f9 100644 --- a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs @@ -37,6 +37,8 @@ namespace IRaCIS.Core.Application.Service var names = _frontAuditConfigRepository.Where(x => x.ParentId == item.AddItem).Select(x => x.ValueCN).ToList(); + var additem = await _frontAuditConfigRepository.FirstOrDefaultAsync(x => x.Id == item.AddItem); + var list = _frontAuditConfigRepository.Where(x => item.DataSource.Contains(x.ParentId)).ToList().GroupBy(x => new { x.ValueCN }, (key, lst) => new FrontAuditConfig { Sort = lst.Select(x => x.Sort).FirstOrDefault(), @@ -58,7 +60,11 @@ namespace IRaCIS.Core.Application.Service ValueCN = lst.Select(x => x.ValueCN).FirstOrDefault(), Value = lst.Select(x => x.Value).FirstOrDefault(), UpdateUserId = _userInfo.Id, - Id=Guid.NewGuid(), + ChildrenTypeId= additem?.ChildrenTypeId, + ModuleTypeId = additem?.ModuleTypeId, + ObjectTypeId = additem?.ObjectTypeId, + OptTypeId = additem?.OptTypeId, + Id =Guid.NewGuid(), }).ToList(); list = list.Where(x => !names.Contains(x.ValueCN)).ToList();