修改发送邮件和稽查修改
parent
cfb6ba593b
commit
372fa13239
|
@ -1,7 +1,9 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MailKit;
|
||||
using MailKit.Security;
|
||||
using MimeKit;
|
||||
using NPOI.HPSF;
|
||||
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper;
|
||||
|
@ -40,7 +42,7 @@ public static class SendEmailHelper
|
|||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw new Exception("邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员") ;
|
||||
throw new Exception("邮件发送失败,您进行的操作未能成功,请检查邮箱或联系维护人员");
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,10 +90,19 @@ public static class SendEmailHelper
|
|||
{
|
||||
//builder.Attachments.Add(item.FileName, item.FileData);
|
||||
|
||||
builder.Attachments.Add(item.FileName, item.FileStream);
|
||||
var attachment = builder.Attachments.Add(item.FileName, item.FileStream);
|
||||
|
||||
//解决附件名过长 奇怪的名字
|
||||
foreach (var param in attachment.ContentDisposition.Parameters)
|
||||
param.EncodingMethod = ParameterEncodingMethod.Rfc2047;
|
||||
foreach (var param in attachment.ContentType.Parameters)
|
||||
param.EncodingMethod = ParameterEncodingMethod.Rfc2047;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
messageToSend.Body = builder.ToMessageBody();
|
||||
|
||||
using (var smtp = new MailKit.Net.Smtp.SmtpClient())
|
||||
|
|
|
@ -1195,7 +1195,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
// CRC 上传的基线数据签名
|
||||
|
||||
await _readingClinicalDataRepository.BatchUpdateNoTrackingAsync(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id, x => new ReadingClinicalData()
|
||||
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
||||
{
|
||||
IsSign = true,
|
||||
ReadingClinicalDataState = ReadingClinicalDataStatus.HaveSigned
|
||||
|
|
|
@ -1696,7 +1696,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
||||
|
||||
//SubjectVisitId = x.IsVisit ? x.ReadingId : null,
|
||||
SubjectVisitId = x.IsVisit ? x.ReadingId : null,
|
||||
|
||||
ObjectRelationParentId = entity.ClinicalDataTrialSetId,
|
||||
|
||||
|
|
Loading…
Reference in New Issue