Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
6c82cbe11d
|
@ -265,6 +265,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//中心调研 登陆
|
//中心调研 登陆
|
||||||
public async Task AnolymousSendEmail(string researchProgramNo, string emailAddress, int verificationCode)
|
public async Task AnolymousSendEmail(string researchProgramNo, string emailAddress, int verificationCode)
|
||||||
{
|
{
|
||||||
|
//throw new BusinessValidationFailedException("模拟邮件取数据或者发送异常!!!");
|
||||||
|
|
||||||
var messageToSend = new MimeMessage();
|
var messageToSend = new MimeMessage();
|
||||||
//发件地址
|
//发件地址
|
||||||
|
|
|
@ -237,6 +237,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//单双中
|
//单双中
|
||||||
t.TrialReadingCriterion.ReadingType,
|
t.TrialReadingCriterion.ReadingType,
|
||||||
|
|
||||||
|
t.TrialReadingCriterion.IsGlobalReading,
|
||||||
|
|
||||||
t.TrialReadingCriterion.CriterionType,
|
t.TrialReadingCriterion.CriterionType,
|
||||||
//有序与否
|
//有序与否
|
||||||
t.TrialReadingCriterion.IsReadingTaskViewInOrder,
|
t.TrialReadingCriterion.IsReadingTaskViewInOrder,
|
||||||
|
@ -369,7 +371,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
//仲裁在访视上 就没有全局阅片 没有阅片期
|
//仲裁在访视上 就没有全局阅片 没有阅片期
|
||||||
if (taskInfo.ArbitrationRule == ArbitrationRule.Visit)
|
if (taskInfo.ArbitrationRule == ArbitrationRule.Visit || (taskInfo.ArbitrationRule == ArbitrationRule.Reading && taskInfo.IsGlobalReading == false))
|
||||||
{
|
{
|
||||||
//找到 访视,裁判 所有有效任务(不可能有全局的) 访视和裁判任务的SourceSubjectVisitId 一样
|
//找到 访视,裁判 所有有效任务(不可能有全局的) 访视和裁判任务的SourceSubjectVisitId 一样
|
||||||
var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
var taskList = await _visitTaskRepository.Where(t => t.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||||
|
@ -406,8 +408,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//仲裁在阅片期
|
//仲裁在阅片期 并且有阅片期
|
||||||
else if (taskInfo.ArbitrationRule == ArbitrationRule.Reading)
|
else if (taskInfo.ArbitrationRule == ArbitrationRule.Reading && taskInfo.IsGlobalReading)
|
||||||
{
|
{
|
||||||
//是访视任务 不可能是裁判任务(访视上不会生成裁判),也不会是全局任务(全局任务 SourceSubjectVisitId=null )
|
//是访视任务 不可能是裁判任务(访视上不会生成裁判),也不会是全局任务(全局任务 SourceSubjectVisitId=null )
|
||||||
if (taskInfo.SourceSubjectVisitId != null)
|
if (taskInfo.SourceSubjectVisitId != null)
|
||||||
|
@ -868,13 +870,14 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var currentLatestPdVisitId = pdSubjectVisitIdList.Last();
|
var currentLatestPdVisitId = pdSubjectVisitIdList.Last();
|
||||||
//标准配置
|
//标准配置
|
||||||
var trialReadingCriterionConfig = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == trialReadingCriterionId).Select(t => new
|
var trialReadingCriterionConfig = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == trialReadingCriterionId).Select(t => new
|
||||||
{ TrialReadingCriterionId = t.Id, t.ReadingType, t.IsReadingTaskViewInOrder, t.CriterionType, t.ArbitrationRule }).FirstNotNullAsync();
|
{ TrialReadingCriterionId = t.Id, t.ReadingType, t.IsReadingTaskViewInOrder, t.CriterionType, t.ArbitrationRule, t.IsGlobalReading }).FirstNotNullAsync();
|
||||||
|
|
||||||
// 项目双重
|
// 项目双重
|
||||||
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double && trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double && trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||||
{
|
{
|
||||||
//仲裁在访视上面
|
//仲裁在访视上面 或者有阅片期 但是没有全局任务
|
||||||
if (trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Visit)
|
if (trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Visit ||
|
||||||
|
(trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Reading && trialReadingCriterionConfig.IsGlobalReading == false))
|
||||||
{
|
{
|
||||||
//在两位阅片人读完访视后,如果有裁判者等裁判读完,如果无裁判则等第二个人的读完
|
//在两位阅片人读完访视后,如果有裁判者等裁判读完,如果无裁判则等第二个人的读完
|
||||||
|
|
||||||
|
@ -910,8 +913,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//仲裁在阅片期上
|
//仲裁在阅片期上 并且有全局任务
|
||||||
else if (trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Reading)
|
else if (trialReadingCriterionConfig.ArbitrationRule == ArbitrationRule.Reading && trialReadingCriterionConfig.IsGlobalReading)
|
||||||
{
|
{
|
||||||
var existReadModule = await _readModuleRepository.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectVisitId == currentLatestPdVisitId && t.ReadingSetType == ReadingSetType.ImageReading)
|
var existReadModule = await _readModuleRepository.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectVisitId == currentLatestPdVisitId && t.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
|
@ -923,6 +926,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
var taskList = await _visitTaskRepository.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.SouceReadModuleId == existReadModule.Id
|
var taskList = await _visitTaskRepository.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.SouceReadModuleId == existReadModule.Id
|
||||||
&& (t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
&& (t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Judge)).ToListAsync();
|
||||||
|
|
||||||
|
@ -1082,6 +1086,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion))
|
x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && x.ReadingQuestionTrial.LesionType == LesionType.TargetLesion))
|
||||||
{
|
{
|
||||||
enrollAnswer = _userInfo.IsEn_Us ? "Yes" : "是";
|
enrollAnswer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||||
|
isEnroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1095,6 +1100,7 @@ x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.Readi
|
||||||
if (exists)
|
if (exists)
|
||||||
{
|
{
|
||||||
enrollAnswer = _userInfo.IsEn_Us ? "Yes" : "是";
|
enrollAnswer = _userInfo.IsEn_Us ? "Yes" : "是";
|
||||||
|
isEnroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1285,18 +1291,18 @@ x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.Readi
|
||||||
|
|
||||||
case CriterionType.PCWG3:
|
case CriterionType.PCWG3:
|
||||||
var questionAnsewer = await _readingGlobalTaskInfoRepository.Where(t => t.TaskId == visitTaskId && t.TrialReadingQuestion.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstOrDefaultAsync();
|
var questionAnsewer = await _readingGlobalTaskInfoRepository.Where(t => t.TaskId == visitTaskId && t.TrialReadingQuestion.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstOrDefaultAsync();
|
||||||
if (questionAnsewer != null&& questionAnsewer.Answer.IsNotNullOrEmpty())
|
if (questionAnsewer != null && questionAnsewer.Answer.IsNotNullOrEmpty())
|
||||||
{
|
{
|
||||||
answer = questionAnsewer.Answer;
|
answer = questionAnsewer.Answer;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var visittaskList=await _visitTaskRepository.Where(t => t.Id == visitTaskId ).Select(x=>x.RelatedVisitTaskIdList).FirstOrDefaultAsync();
|
var visittaskList = await _visitTaskRepository.Where(t => t.Id == visitTaskId).Select(x => x.RelatedVisitTaskIdList).FirstOrDefaultAsync();
|
||||||
|
|
||||||
var task = await _visitTaskRepository.Where(x => visittaskList.Contains(x.Id) && x.ReadingCategory == ReadingCategory.Visit).OrderByDescending(x => x.VisitTaskNum).FirstOrDefaultAsync();
|
var task = await _visitTaskRepository.Where(x => visittaskList.Contains(x.Id) && x.ReadingCategory == ReadingCategory.Visit).OrderByDescending(x => x.VisitTaskNum).FirstOrDefaultAsync();
|
||||||
if (task != null)
|
if (task != null)
|
||||||
{
|
{
|
||||||
answer= await _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == task.Id && t.ReadingQuestionTrial.QuestionType == QuestionType.SiteVisitForTumorEvaluation)
|
answer = await _readingTaskQuestionAnswerRepository.Where(t => t.VisitTaskId == task.Id && t.ReadingQuestionTrial.QuestionType == QuestionType.SiteVisitForTumorEvaluation)
|
||||||
.Select(t => t.Answer).FirstOrDefaultAsync();
|
.Select(t => t.Answer).FirstOrDefaultAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,7 +367,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SaveMedicineQuestion(SaveMedicineQuestionInDto inDto)
|
public async Task<IResponseOutput> SaveMedicineQuestion(SaveMedicineQuestionInDto inDto)
|
||||||
{
|
{
|
||||||
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||||
|
@ -411,7 +411,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SaveMedicalReviewInfo(SaveMedicalReviewInfoInDto inDto)
|
public async Task<IResponseOutput> SaveMedicalReviewInfo(SaveMedicalReviewInfoInDto inDto)
|
||||||
{
|
{
|
||||||
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||||
|
@ -466,7 +466,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> ClosedMedicalReviewDialog(ClosedMedicalReviewDialogInDto inDto)
|
public async Task<IResponseOutput> ClosedMedicalReviewDialog(ClosedMedicalReviewDialogInDto inDto)
|
||||||
{
|
{
|
||||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||||
|
@ -499,7 +499,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> SendMedicalReviewDialog(SendMedicalReviewDialogInDto inDto)
|
public async Task<IResponseOutput> SendMedicalReviewDialog(SendMedicalReviewDialogInDto inDto)
|
||||||
{
|
{
|
||||||
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||||
|
@ -539,7 +539,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> IRSendMedicalReviewDialog(IRSendMedicalReviewDialogInDto inDto)
|
public async Task<IResponseOutput> IRSendMedicalReviewDialog(IRSendMedicalReviewDialogInDto inDto)
|
||||||
{
|
{
|
||||||
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||||
|
@ -680,7 +680,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (allMedicalAuditList.All(t => t.IsApplyHeavyReading == false && t.AuditSignTime != null && t.AuditState == MedicalReviewAuditState.HaveSigned))
|
if (allMedicalAuditList.All(t => t.IsApplyHeavyReading == false && t.AuditSignTime != null && t.AuditState == MedicalReviewAuditState.HaveSigned))
|
||||||
{
|
{
|
||||||
//自动发送
|
//自动发送
|
||||||
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(medicalReviewInfo.VisitTaskId, false);
|
await SafeMailHelper.Run(async () => await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(medicalReviewInfo.VisitTaskId, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -699,7 +699,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||||
public async Task<IResponseOutput> IRConfirmMedicalReview(IRConfirmMedicalReviewInDto inDto)
|
public async Task<IResponseOutput> IRConfirmMedicalReview(IRConfirmMedicalReviewInDto inDto)
|
||||||
{
|
{
|
||||||
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||||
|
@ -802,7 +802,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.Select(x => new GetIRMedicalFeedbackListOutDto
|
.Select(x => new GetIRMedicalFeedbackListOutDto
|
||||||
{
|
{
|
||||||
TaskState = x.VisitTask.TaskState,
|
TaskState = x.VisitTask.TaskState,
|
||||||
IsSubjectQuit=x.VisitTask.Subject.IsSubjectQuit,
|
IsSubjectQuit = x.VisitTask.Subject.IsSubjectQuit,
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
VisitTaskId = x.VisitTaskId,
|
VisitTaskId = x.VisitTaskId,
|
||||||
IsUrgent = x.VisitTask.IsUrgent,
|
IsUrgent = x.VisitTask.IsUrgent,
|
||||||
|
|
|
@ -3525,7 +3525,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
|
||||||
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(visitTaskId);
|
await SafeMailHelper.Run(async () => await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(visitTaskId));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -501,7 +501,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
// 创建任务关联关系
|
// 创建任务关联关系
|
||||||
await this.CreateTaskRelated(inDto.VisitTaskId);
|
await this.CreateTaskRelated(inDto.VisitTaskId);
|
||||||
|
|
||||||
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(inDto.VisitTaskId);
|
await SafeMailHelper.Run(async () => await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(inDto.VisitTaskId));
|
||||||
|
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == userInfo.TrialId);
|
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == userInfo.TrialId);
|
||||||
|
|
||||||
await _mailVerificationService.AnolymousSendEmail(trialInfo.ResearchProgramNo, userInfo.Email, verificationCode);
|
await SafeMailHelper.Run(async () => await _mailVerificationService.AnolymousSendEmail(trialInfo.ResearchProgramNo, userInfo.Email, verificationCode));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
Loading…
Reference in New Issue