From f0d3d0b19043f1d04e1877354d66e8018e29563f Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Mon, 20 Jun 2022 13:54:38 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Reading/Dto/ReadingImageTaskViewModel.cs | 25 +++++++++++
.../Reading/ReadingImageTaskService.cs | 41 ++++++++++++++++++-
.../Service/Reading/ReadingQuestionService.cs | 2 +
.../Reading/ReadingQuestionTrial.cs | 10 +++++
4 files changed, 76 insertions(+), 2 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
index 51dd3d891..569dc267c 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs
@@ -60,6 +60,31 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
}
+ public class SetTrialCriterionJudgeQuestionAnswerGroupInDto
+ {
+ [NotDefault]
+ public Guid ReadingQuestionTrialId { get; set; }
+
+
+ [NotDefault]
+ public string AnswerGroup { get; set; }
+ }
+
+ public class GetTrialCriterionJudgeQuestionListOutDto
+ {
+ public Guid ReadingQuestionTrialId { get; set; }
+
+ public string QuestionName { get; set; }
+
+ public string AnswerGroup { get; set; }
+ }
+
+ public class GetTrialCriterionJudgeQuestionListInDto
+ {
+ [NotDefault]
+ public Guid ReadingQuestionCriterionTrialId { get; set; }
+ }
+
public class GetTrialReadingQuestionInDto
{
[NotDefault]
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
index d0dcc8165..fedd57ad6 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs
@@ -143,7 +143,44 @@ namespace IRaCIS.Application.Services
}
///
- /// 获取项目的阅片问题(
+ /// 获取项目标准的裁判问题
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> GetTrialCriterionJudgeQuestionList(GetTrialCriterionJudgeQuestionListInDto inDto)
+ {
+ var result = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.ReadingQuestionCriterionTrialId && x.IsJudgeQuestion)
+ .Select(x => new GetTrialCriterionJudgeQuestionListOutDto()
+ {
+ AnswerGroup = x.AnswerGroup,
+ QuestionName = x.QuestionName,
+ ReadingQuestionTrialId = x.Id
+
+ }).ToListAsync();
+ return result;
+ }
+
+ ///
+ /// 设置裁判问题的答案分组
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task SetTrialCriterionJudgeQuestionAnswerGroup(SetTrialCriterionJudgeQuestionAnswerGroupInDto inDto)
+ {
+ await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(inDto.ReadingQuestionTrialId, x => new ReadingQuestionTrial()
+ {
+ AnswerGroup = inDto.AnswerGroup
+ });
+
+ var result = await _readingQuestionTrialRepository.SaveChangesAsync();
+
+ return ResponseOutput.Ok(result);
+ }
+
+ ///
+ /// 获取项目的阅片问题
///
///
///
@@ -237,7 +274,7 @@ namespace IRaCIS.Application.Services
///
///
///
- [HttpPost]
+ [NonDynamicMethod]
public async Task SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto inDto)
{
await this.SaveVisitTaskQuestions(inDto);
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
index 3d1674b9c..42695f1b1 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
@@ -361,6 +361,7 @@ namespace IRaCIS.Application.Services
TrialId = trialId,
Type = quesiton.Type,
GroupName=quesiton.GroupName,
+ ReadingQuestionSystemId=x.Id,
IsJudgeQuestion =quesiton.IsJudgeQuestion,
Remark=quesiton.Remark,
TypeValue = quesiton.TypeValue,
@@ -394,6 +395,7 @@ namespace IRaCIS.Application.Services
IsEnable = quesiton.IsEnable,
IsRequired = quesiton.IsRequired,
ParentId = newParentId,
+ ReadingQuestionSystemId = x.Id,
ParentTriggerValue = quesiton.ParentTriggerValue,
QuestionName = quesiton.QuestionName,
ReadingQuestionCriterionTrialId = ReadingQuestionCriterionTrialId,
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
index 096f83fee..d27599133 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
@@ -82,6 +82,16 @@ namespace IRaCIS.Core.Domain.Models
///
public DateTime CreateTime { get; set; }
+ ///
+ /// 系统问题ID
+ ///
+ public Guid? ReadingQuestionSystemId { get; set; }
+
+ ///
+ /// 答案分组
+ ///
+ public string AnswerGroup { get; set; }
+
///
/// 创建人
///