From a499971e9144379e634127961d1e0ba9e6fdf7e2 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 21 Apr 2025 14:26:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MassTransit/Recurring/SystemDocumentConsumer.cs | 1 + .../Service/Document/SystemDocumentService.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs b/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs index fa20819fd..8b120f4e9 100644 --- a/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs @@ -131,6 +131,7 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring public async Task Consume(ConsumeContext context) { + Console.WriteLine("开始 发布系统文档SystemDocumentPublishEvent"); var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US; var systemDocQuery = from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id)) diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index dbd815f8a..80c499a9c 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -176,6 +176,7 @@ namespace IRaCIS.Core.Application.Services IsDeleted = false, }); + Console.WriteLine("开始 发布系统文档"); Task.Run(async () => { From fc81d6da2256f42839aac975c6fce2fa57254a35 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 21 Apr 2025 14:50:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MassTransit/Recurring/SystemDocumentConsumer.cs | 5 ++--- .../Service/Document/DTO/SystemDocumentViewModel.cs | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs b/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs index 8b120f4e9..2766c0de5 100644 --- a/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Recurring/SystemDocumentConsumer.cs @@ -131,7 +131,6 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring public async Task Consume(ConsumeContext context) { - Console.WriteLine("开始 发布系统文档SystemDocumentPublishEvent"); var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US; var systemDocQuery = from sysDoc in _systemDocumentRepository.AsQueryable(false).Where(x => context.Message.Ids.Contains(x.Id)) @@ -151,12 +150,12 @@ namespace IRaCIS.Core.Application.MassTransit.Recurring RealName = identityUser.FullName, UserName = identityUser.UserName, - + IsNeedSendEmial= identityUser.IsZhiZhun || (!identityUser.IsZhiZhun&& sysDoc.DocUserSignType== DocUserSignType.InnerAndOuter), FullFilePath = sysDoc.Path }; - var datalist = await systemDocQuery.IgnoreQueryFilters().ToListAsync(); + var datalist = await systemDocQuery.IgnoreQueryFilters().Where(x=>x.IsNeedSendEmial).ToListAsync(); var confirmUserIdList = datalist.Select(t => t.ConfirmUserId).Distinct().ToList(); var userinfoList = await _identityUserRepository.Where(x => confirmUserIdList.Contains(x.Id)).ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs index d9cecdf26..44d22de49 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs @@ -93,6 +93,7 @@ namespace IRaCIS.Core.Application.Contracts public class UnionDocumentWithConfirmInfoView : UnionDocumentView { + public bool IsNeedSendEmial { get; set; } public DateTime UserCreateTime { get; set; }