修改邮件和阅片跟踪
This commit is contained in:
@@ -713,7 +713,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
/// <param name="queryVisitTask"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<ReadingTaskView>/*, object?)*/> GetReadingTaskList(VisitTaskQuery queryVisitTask)
|
||||
public async Task<(PageOutput<ReadingTaskView>, object?)> GetReadingTaskList(VisitTaskQuery queryVisitTask)
|
||||
{
|
||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId && t.IsAnalysisCreate == false)
|
||||
//.Where(t => t.IsAnalysisCreate == false && t.DoctorUserId != null)
|
||||
@@ -743,9 +743,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
|
||||
var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray);
|
||||
|
||||
//var trialTaskConfig = _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).ProjectTo<TrialTaskConfigView>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||
var trialTaskConfig = _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).ProjectTo<TrialUrgentConfig>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||
|
||||
return pageList;
|
||||
return (pageList,trialTaskConfig);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share.Common;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Spire.Doc;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -770,6 +771,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var phyPath = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, sendFileRelativePath);
|
||||
|
||||
|
||||
//先预先生成了邮件,发送预先生成的邮件
|
||||
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
||||
{
|
||||
@@ -797,11 +799,21 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
};
|
||||
|
||||
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetSubjectEnrollConfirmOrPDEmailPath(_hostEnvironment, Path.GetFileName(path), taskInfo.TrialId, taskInfo.SiteId, taskInfo.SubjectId);
|
||||
var (serverFilePath, relativePath, fileRealName) = FileStoreHelper.GetSubjectEnrollConfirmOrPDEmailPath(_hostEnvironment, Path.GetFileName(path), taskInfo.TrialId, taskInfo.SiteId, taskInfo.SubjectId,true);
|
||||
|
||||
if (emailStoreMode == EmailStoreSendMode.StoreLocalSend || emailStoreMode == EmailStoreSendMode.OnlyStoreLocalNotSentEmail)
|
||||
{
|
||||
MiniSoftware.MiniWord.SaveAsByTemplate(serverFilePath, path, value);
|
||||
|
||||
MemoryStream wordMemoryStream = new MemoryStream();
|
||||
|
||||
Document document = new Document();
|
||||
|
||||
MiniSoftware.MiniWord.SaveAsByTemplate(wordMemoryStream, path, value);
|
||||
|
||||
document.LoadFromStream(wordMemoryStream,FileFormat.Docx);
|
||||
|
||||
document.SaveToFile(serverFilePath, FileFormat.PDF);
|
||||
|
||||
|
||||
}
|
||||
//手动生成发送的邮件内容,但是并不发送
|
||||
@@ -819,16 +831,21 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
MemoryStream pdfMemoryStream = new MemoryStream();
|
||||
|
||||
|
||||
MiniSoftware.MiniWord.SaveAsByTemplate(memoryStream, path, value);
|
||||
Document document = new Document();
|
||||
|
||||
memoryStream.Seek(0, SeekOrigin.Begin);
|
||||
document.LoadFromStream(memoryStream, FileFormat.Docx);
|
||||
document.SaveToStream(pdfMemoryStream, FileFormat.PDF);
|
||||
pdfMemoryStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
||||
{
|
||||
FileName = $"{taskInfo.SubjectCode}_{emailConfig.FileName}",
|
||||
|
||||
FileStream = memoryStream
|
||||
FileStream = pdfMemoryStream
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -220,36 +220,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public class TrialTaskConfigView : TrialTaskConfig
|
||||
{
|
||||
public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
|
||||
|
||||
public bool IsReadingTaskViewInOrder { get; set; } = true;
|
||||
|
||||
//public ReadingMethod ReadingType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅片是否显示受试者信息
|
||||
/// </summary>
|
||||
public bool IsReadingShowSubjectInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅片是否显示既往结果
|
||||
/// </summary>
|
||||
public bool IsReadingShowPreviousResults { get; set; }
|
||||
|
||||
public ReadingTool ReadingTool { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// QC流程 0 不审,1 单审,2双审
|
||||
/// </summary>
|
||||
public TrialQCProcess QCProcessEnum { get; set; } = TrialQCProcess.DoubleAudit;
|
||||
|
||||
/// <summary>
|
||||
/// 影像一致性核查
|
||||
/// </summary>
|
||||
public bool IsImageConsistencyVerification { get; set; } = true;
|
||||
|
||||
}
|
||||
|
||||
public class TrialReadingTaskViewConfig
|
||||
|
||||
Reference in New Issue
Block a user