修改bug
parent
a2f5f9abc2
commit
55e26202d8
|
@ -1508,10 +1508,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
RequestReReadingResultEnum = RequestReReadingResult.Agree,
|
RequestReReadingResultEnum = RequestReReadingResult.Agree,
|
||||||
});
|
});
|
||||||
|
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == origenalTask.Id, u => new VisitTask()
|
//await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == origenalTask.Id, u => new VisitTask()
|
||||||
{
|
//{
|
||||||
ReReadingApplyState = ReReadingApplyState.Agree
|
// ReReadingApplyState = ReReadingApplyState.Agree
|
||||||
});
|
//});
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -83,7 +83,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public CriterionType CriterionTypeEnum { get; set; }
|
public CriterionType CriterionTypeEnum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid FromUserId { get; set; }
|
|
||||||
|
public string FromEmail { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public List<Guid> ToUserIdList { get; set; }
|
public List<Guid> ToUserIdList { get; set; }
|
||||||
public List<Guid> CopyUserIdList { get; set; }
|
public List<Guid> CopyUserIdList { get; set; }
|
||||||
|
|
||||||
|
@ -99,13 +102,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
//public string CopyEmailsStr { get; set; } = string.Empty;
|
//public string CopyEmailsStr { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
public string FromEmail { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
public bool IsUrgent { get; set; }
|
public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
public bool IsAutoSend { get; set; }
|
public bool IsAutoSend { get; set; }
|
||||||
|
|
||||||
public bool IsDistinguishCriteria { get; set; }
|
|
||||||
|
|
||||||
public bool IsReturnRequired { get; set; }
|
public bool IsReturnRequired { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -121,9 +121,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//邮件内容html
|
|
||||||
var isNeedSend = await FillWordTemplateAndSetEmailAsync(visitTaskId, sendEmailConfig, businessScenarioEnum, criterionTypeEnum!);
|
|
||||||
|
|
||||||
//邮件附件
|
//邮件附件
|
||||||
var path = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, emailConfig.FilePath);
|
var path = FileStoreHelper.GetPhysicalFilePath(_hostEnvironment, emailConfig.FilePath);
|
||||||
|
|
||||||
|
@ -132,12 +129,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
throw new BusinessValidationFailedException("找不到该项目标准场景下邮件模板");
|
throw new BusinessValidationFailedException("找不到该项目标准场景下邮件模板");
|
||||||
}
|
}
|
||||||
|
|
||||||
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
//邮件内容html
|
||||||
{
|
var (isNeedSend, templateStream) = await FillWordTemplateAndSetEmailAsync(visitTaskId, sendEmailConfig, businessScenarioEnum, emailConfig.FilePath, path);
|
||||||
FileName = emailConfig.FileName,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FileStream = System.IO.File.OpenRead(path)
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,10 +144,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async Task<bool> FillWordTemplateAndSetEmailAsync(Guid visitTaskId, SMTPEmailConfig sendEmailConfig, CommonDocumentBusinessScenario businessScenarioEnum, CriterionType criterionType)
|
private async Task<(bool IsNeedSend,FileStream? TemplateStream)> FillWordTemplateAndSetEmailAsync(Guid visitTaskId, SMTPEmailConfig sendEmailConfig, CommonDocumentBusinessScenario businessScenarioEnum, string fileName,string filePath)
|
||||||
{
|
{
|
||||||
|
|
||||||
var isNeedSend = true;
|
var isNeedSend = true;
|
||||||
|
var answer = "否";
|
||||||
|
|
||||||
|
|
||||||
var pathToFile = _hostEnvironment.WebRootPath
|
var pathToFile = _hostEnvironment.WebRootPath
|
||||||
+ Path.DirectorySeparatorChar.ToString()
|
+ Path.DirectorySeparatorChar.ToString()
|
||||||
|
@ -197,9 +196,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isNeedSend = false;
|
//isNeedSend = false;
|
||||||
|
return (false,null);
|
||||||
return isNeedSend;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//入组确认仅在基线
|
//入组确认仅在基线
|
||||||
|
@ -211,7 +209,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == documentNeedBasicInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
if (await _visitTaskRepository.AnyAsync(t => t.SourceSubjectVisitId == documentNeedBasicInfo.SourceSubjectVisitId && t.TaskState == TaskState.Effect && t.IsAnalysisCreate == false &&
|
||||||
t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned))
|
t.Id != visitTaskId && t.ReadingTaskState == ReadingTaskState.HaveSigned))
|
||||||
{
|
{
|
||||||
isNeedSend = false;
|
//isNeedSend = false;
|
||||||
|
|
||||||
|
return (false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendEmailConfig.TopicDescription = "入组确认";
|
sendEmailConfig.TopicDescription = "入组确认";
|
||||||
|
@ -227,7 +227,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var answer = "否";
|
|
||||||
|
|
||||||
if (await _repository.Where<ReadingTableQuestionAnswer>().AnyAsync(x => x.VisitTaskId == visitTaskId && x.Answer == TargetState.Exist.GetEnumInt() &&
|
if (await _repository.Where<ReadingTableQuestionAnswer>().AnyAsync(x => x.VisitTaskId == visitTaskId && x.Answer == TargetState.Exist.GetEnumInt() &&
|
||||||
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion))
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion))
|
||||||
|
@ -261,7 +260,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (documentNeedBasicInfo.IsReadingTaskViewInOrder)
|
if (documentNeedBasicInfo.IsReadingTaskViewInOrder)
|
||||||
{
|
{
|
||||||
|
|
||||||
var answer = "否";
|
|
||||||
|
|
||||||
//单重
|
//单重
|
||||||
|
|
||||||
|
@ -329,7 +327,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isNeedSend = false;
|
//isNeedSend = false;
|
||||||
|
|
||||||
|
return (false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -391,7 +391,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isNeedSend = false;
|
//isNeedSend = false;
|
||||||
|
|
||||||
|
return (false, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +419,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
//单重
|
//单重
|
||||||
|
|
||||||
var answer = "否";
|
|
||||||
|
|
||||||
if (documentNeedBasicInfo.ReadingType == ReadingMethod.Single && documentNeedBasicInfo.ArbitrationRule == ArbitrationRule.None)
|
if (documentNeedBasicInfo.ReadingType == ReadingMethod.Single && documentNeedBasicInfo.ArbitrationRule == ArbitrationRule.None)
|
||||||
{
|
{
|
||||||
|
@ -444,7 +445,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isNeedSend = false;
|
//isNeedSend = false;
|
||||||
|
return (false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -456,14 +458,30 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return isNeedSend;
|
|
||||||
|
if (isNeedSend)
|
||||||
|
{
|
||||||
|
|
||||||
|
var docFileStream = System.IO.File.OpenRead(fileName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sendEmailConfig.EmailAttachMentConfigList.Add(new EmailAttachMentConfig()
|
||||||
|
{
|
||||||
|
FileName = fileName,
|
||||||
|
|
||||||
|
FileStream = docFileStream
|
||||||
|
});
|
||||||
|
|
||||||
|
return (false, null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (false, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -548,8 +566,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig)
|
public async Task<IResponseOutput> AddOrUpdateTrialEmailNoticeConfig(TrialEmailNoticeConfigAddOrEdit addOrEditTrialEmailNoticeConfig)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//var entity = await _trialEmailNoticeConfigRepository.InsertOrUpdateAsync(addOrEditTrialEmailNoticeConfig);
|
//var entity = await _trialEmailNoticeConfigRepository.InsertOrUpdateAsync(addOrEditTrialEmailNoticeConfig);
|
||||||
|
|
||||||
if (addOrEditTrialEmailNoticeConfig.Id == null)
|
if (addOrEditTrialEmailNoticeConfig.Id == null)
|
||||||
|
@ -558,11 +574,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var entity = _mapper.Map<TrialEmailNoticeConfig>(addOrEditTrialEmailNoticeConfig);
|
var entity = _mapper.Map<TrialEmailNoticeConfig>(addOrEditTrialEmailNoticeConfig);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
entity.TrialEmailNoticeUserList.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.From, UserId = addOrEditTrialEmailNoticeConfig.FromUserId });
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserIdList)
|
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserIdList)
|
||||||
{
|
{
|
||||||
entity.TrialEmailNoticeUserList.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserId = item });
|
entity.TrialEmailNoticeUserList.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserId = item });
|
||||||
|
@ -594,10 +605,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
List<TrialEmailNoticeUser> trialEmailNoticeUsers = new List<TrialEmailNoticeUser>();
|
List<TrialEmailNoticeUser> trialEmailNoticeUsers = new List<TrialEmailNoticeUser>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
trialEmailNoticeUsers.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.From, UserId = addOrEditTrialEmailNoticeConfig.FromUserId, TrialEmailNoticeConfigId = entity.Id });
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserIdList)
|
foreach (var item in addOrEditTrialEmailNoticeConfig.ToUserIdList)
|
||||||
{
|
{
|
||||||
trialEmailNoticeUsers.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserId = item, TrialEmailNoticeConfigId = entity.Id });
|
trialEmailNoticeUsers.Add(new TrialEmailNoticeUser() { EmailUserType = EmailUserType.To, UserId = item, TrialEmailNoticeConfigId = entity.Id });
|
||||||
|
|
|
@ -1226,7 +1226,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
TrialReadingCriterionId = trialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionId,
|
||||||
ReadingSetType = ReadingSetType.ImageReading,
|
ReadingSetType = ReadingSetType.ImageReading,
|
||||||
SubjectVisitId = dbSubjectVisit.Id,
|
SubjectVisitId = dbSubjectVisit.Id,
|
||||||
ModuleName = "",
|
ModuleName = $"G-{dbSubjectVisit.BlindName}",
|
||||||
|
ModuleType = ModuleTypeEnum.Global ,
|
||||||
IsUrgent = dbSubjectVisit.IsUrgent,
|
IsUrgent = dbSubjectVisit.IsUrgent,
|
||||||
TrialId = dbSubjectVisit.TrialId,
|
TrialId = dbSubjectVisit.TrialId,
|
||||||
SubjectId = dbSubjectVisit.SubjectId
|
SubjectId = dbSubjectVisit.SubjectId
|
||||||
|
|
|
@ -26,11 +26,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public int? CriterionEnum { get; set; }
|
public int? CriterionEnum { get; set; }
|
||||||
|
|
||||||
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 任务类型
|
/// 任务类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ReadingCategory? ReadingCategory { get; set; }
|
public ReadingCategory? ReadingCategory { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<ReadingMedicineSystemQuestionView>> GetReadingMedicineSystemQuestionList(ReadingMedicineSystemQuestionQuery inDto)
|
public async Task<List<ReadingMedicineSystemQuestionView>> GetReadingMedicineSystemQuestionList(ReadingMedicineSystemQuestionQuery inDto)
|
||||||
{
|
{
|
||||||
|
//避免前端遍历
|
||||||
|
var criterionEnum = inDto.TrialReadingCriterionId != null ? _readingQuestionCriterionTrialRepository.Where(t => t.Id == inDto.TrialReadingCriterionId).Select(t => t.CriterionType).FirstOrDefault(): CriterionType.NoCriterion;
|
||||||
|
|
||||||
var query = _readingMedicineSystemQuestionRepository.AsQueryable()
|
var query = _readingMedicineSystemQuestionRepository.AsQueryable()
|
||||||
.WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue))
|
.WhereIf(!inDto.TypeValue.IsNullOrEmpty(), x => x.TypeValue.Contains(inDto.TypeValue))
|
||||||
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
|
.WhereIf(!inDto.ParentTriggerValue.IsNullOrEmpty(), x => x.ParentTriggerValue.Contains(inDto.ParentTriggerValue))
|
||||||
|
@ -52,6 +55,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||||
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
||||||
.WhereIf(inDto.CriterionEnum != null, x => x.CriterionEnumStr.Contains($"|{inDto.CriterionEnum}|") )
|
.WhereIf(inDto.CriterionEnum != null, x => x.CriterionEnumStr.Contains($"|{inDto.CriterionEnum}|") )
|
||||||
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.CriterionEnumStr.Contains($"|{criterionEnum}|"))
|
||||||
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||||
return await query.ToListAsync();
|
return await query.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
|
|
||||||
//[Required]
|
//[Required]
|
||||||
//public string FromEmail { get; set; }
|
|
||||||
//public string ReceiveEmailsStr { get; set; } = string.Empty;
|
//public string ReceiveEmailsStr { get; set; } = string.Empty;
|
||||||
//public string CopyEmailsStr { get; set; } = string.Empty;
|
//public string CopyEmailsStr { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public string FromEmail { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool IsUrgent { get; set; }
|
public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
|
@ -61,9 +63,6 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public bool IsAutoSend { get; set; }
|
public bool IsAutoSend { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[Required]
|
|
||||||
public bool IsDistinguishCriteria { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
public CommonDocumentBusinessScenario BusinessScenarioEnum { get; set; }
|
public CommonDocumentBusinessScenario BusinessScenarioEnum { get; set; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue