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; }