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

This commit is contained in:
2025-10-11 15:38:41 +08:00
9 changed files with 20487 additions and 5 deletions
@@ -1007,6 +1007,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public int? PageShowOrder { get; set; }
public bool IsPreinstall { get {
return this.TableQuestions.Questions.Any(x => x.IsPreinstall);
} }
public List<TrialReadQuestionData> Childrens { get; set; }
@@ -324,6 +324,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public ImageMark? ImageMarkEnum { get; set; }
/// <summary>
/// 是否预设
/// </summary>
public bool IsPreinstall { get; set; } = false;
/// <summary>
/// 影像工具
/// </summary>
@@ -513,6 +519,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public ValueOfType? ValueType { get; set; }
/// <summary>
/// 是否预设
/// </summary>
public bool IsPreinstall { get; set; } = false;
public bool IsCopy { get; set; } = false;
@@ -1692,6 +1703,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public Guid QuestionId { get; set; }
public string QuestionName { get; set; }
[NotMapped]
@@ -1,4 +1,5 @@
using IRaCIS.Core.Application.Service.Reading.Dto;
using DocumentFormat.OpenXml.EMMA;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Infra.EFCore.Common;
@@ -366,6 +367,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var isReadingTaskViewInOrder = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).Select(x => x.IsReadingTaskViewInOrder).FirstOrDefaultAsync();
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
List<ReadingTableAnswerRowInfo> addRowList = new List<ReadingTableAnswerRowInfo>();
List<ReadingTableQuestionAnswer> addTableQuestionAnswerList = new List<ReadingTableQuestionAnswer>();
// 判断当前任务是否是基线
if (taskinfo.SourceSubjectVisitId != baseLineVisitId && isReadingTaskViewInOrder == ReadingOrder.InOrder)
{
@@ -434,13 +437,63 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
addRowList.AddRange(addList);
addTableQuestionAnswerList.AddRange(tableAnswers);
}
}
// 添加 是否预设
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.IsPreinstall).Include(x=>x.ReadingQuestionTrial).ToListAsync();
if (tableQuestionList.Count() > 0)
{
foreach (var tableQuestion in tableQuestionList)
{
var thisTableQuestionList=await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == tableQuestion.ReadingQuestionId).ToListAsync();
decimal index = 1;
foreach (var item in tableQuestion.TypeValue.Split('|'))
{
var newRowId = NewId.NextGuid();
addRowList.Add(new ReadingTableAnswerRowInfo()
{
Id = newRowId,
QuestionId = tableQuestion.ReadingQuestionId,
VisitTaskId = taskinfo.Id,
TrialId = taskinfo.TrialId,
RowIndex = index,
IsCurrentTaskAdd = true,
BlindName = taskinfo.TaskBlindName,
OrderMark = tableQuestion.ReadingQuestionTrial.OrderMark,
FristAddTaskId = taskinfo.Id,
RowMark = tableQuestion.ReadingQuestionTrial.OrderMark + decimal.Parse(index.ToString()).GetLesionMark()
});
foreach (var thisTableQuestion in thisTableQuestionList)
{
addTableQuestionAnswerList.Add(new ReadingTableQuestionAnswer()
{
Answer = thisTableQuestion.Id== tableQuestion.Id? item:string.Empty,
QuestionId = tableQuestion.ReadingQuestionId,
TrialId = taskinfo.TrialId,
VisitTaskId = taskinfo.Id,
RowId = newRowId,
RowIndex = index,
TableQuestionId = thisTableQuestion.Id,
});
}
}
}
}
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addRowList);
await _readingTableQuestionAnswerRepository.AddRangeAsync(addTableQuestionAnswerList);
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
return new AddTaskLesionAnswerFromLastTaskOutDto()
{