只限制 changeDicomReadingQuestionAnswer 接口 以及微信通知
parent
1f3e1ceb37
commit
4082850b7a
|
|
@ -95,6 +95,8 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
|||
|
||||
// 验证请求频繁情况
|
||||
if (
|
||||
requestPath == "/ReadingImageTask/changeDicomReadingQuestionAnswer"&&
|
||||
|
||||
!requestPath
|
||||
.Split("/", StringSplitOptions.RemoveEmptyEntries)
|
||||
.Any(segment => segment.StartsWith("get", StringComparison.OrdinalIgnoreCase)) &&
|
||||
|
|
|
|||
|
|
@ -3429,16 +3429,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
//// 验证一个问题不能有多个答案
|
||||
//bool hasDuplicate = await _readingTaskQuestionAnswerRepository
|
||||
// .Where(x => x.VisitTaskId == inDto.VisitTaskId)
|
||||
// .GroupBy(x => x.ReadingQuestionTrialId)
|
||||
// .AnyAsync(g => g.Count() > 1);
|
||||
// 验证一个问题不能有多个答案
|
||||
bool hasDuplicate = await _readingTaskQuestionAnswerRepository
|
||||
.Where(x => x.VisitTaskId == inDto.VisitTaskId)
|
||||
.GroupBy(x => x.ReadingQuestionTrialId)
|
||||
.AnyAsync(g => g.Count() > 1);
|
||||
|
||||
//if (hasDuplicate)
|
||||
//{
|
||||
// return ResponseOutput.NotOk(_localizer["ReadingImage_BackImageNotExist"]);
|
||||
//}
|
||||
if (hasDuplicate)
|
||||
{
|
||||
_ = SendWeComNotifier(inDto.VisitTaskId, "阅片问题答案有重复");
|
||||
}
|
||||
|
||||
|
||||
//验证后处理影像必须传
|
||||
|
|
|
|||
|
|
@ -946,6 +946,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var userList = _config.GetSection("WeComNoticeConfig:APINoticeUserList").Get<string[]>();
|
||||
|
||||
var visitTask = await _visitTaskRepository.Where(x => x.Id == visiTaskId).Include(x=>x.Subject).Include(x=>x.SourceSubjectVisit).FirstNotNullAsync();
|
||||
|
||||
|
||||
// 🔔 异步告警(不要阻塞请求)
|
||||
|
|
@ -956,7 +957,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
Env = baseUrl,
|
||||
UserName = msg,
|
||||
Api = "",
|
||||
Message = $"异常信息:{msg}",
|
||||
Message = $"异常信息:{msg},受试者:{visitTask.Subject.Code},访视:{visitTask.SourceSubjectVisit.VisitName},任务Id:{visiTaskId}",
|
||||
Stack = string.Empty,
|
||||
AtUsers = userList ?? []
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue