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