Uat_Study
hang 2023-05-22 17:41:27 +08:00
commit 3ed4d29af3
2 changed files with 21 additions and 6 deletions

View File

@ -14,6 +14,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Microsoft.Extensions.Caching.Memory;
using IRaCIS.Core.Application.Filter;
using DocumentFormat.OpenXml.Drawing;
namespace IRaCIS.Application.Services
{
@ -1130,7 +1131,7 @@ namespace IRaCIS.Application.Services
});
var thisAnswer = tableAnswers.Where(x => x.QuestionId == item.Id).ToList();
var orders = thisAnswer.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList();
var orders = thisAnswer.OrderBy(x => x.RowIndex).Select(x=>x.RowId).Distinct().ToList();
item.TableQuestions.Answers = new List<Dictionary<string, string>>();
@ -1140,10 +1141,15 @@ namespace IRaCIS.Application.Services
QuestionMark.Part,
};
orders.ForEach(x =>
foreach (var x in orders)
{
Dictionary<string, string> answers = new Dictionary<string, string>();
var rowInfo = tableAnsweRowInfos.Where(y => y.RowIndex == x && y.QuestionId == item.Id).FirstOrDefault();
var rowInfo = tableAnsweRowInfos.Where(y => y.Id==x).FirstOrDefault();
//if (rowInfo == null)
//{
// continue;
//}
var rowAnswer = thisAnswer.Where(y => y.RowId == rowInfo.Id).OrderBy(y => y.ShowOrder).ToList();
var organInfo = organInfos.Where(x => x.Id == rowInfo.OrganInfoId).FirstOrDefault();
@ -1241,7 +1247,7 @@ namespace IRaCIS.Application.Services
item.TableQuestions.Answers.Add(answers);
});
};
if (item.Childrens != null && item.Childrens.Count != 0)
{

View File

@ -249,8 +249,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
index++;
x.RowIndex = index;
x.RowMark = otherLesionQuestion.OrderMark + x.RowIndex.GetLesionMark();
x.FromMark = x.FristAddTaskId == beforeConvertedTaskId ? string.Empty : x.RowMark;
x.FristAddTaskId = x.FristAddTaskId==beforeConvertedTaskId? visitTaskId: x.FristAddTaskId;
var fristAddTaskId = x.FristAddTaskId.Clone();
x.FromMark = fristAddTaskId == beforeConvertedTaskId ? string.Empty : x.RowMark;
x.FristAddTaskId = fristAddTaskId == beforeConvertedTaskId? visitTaskId: fristAddTaskId;
x.QuestionId = otherLesionQuestion.Id;
x.OrderMark = otherLesionQuestion.OrderMark;
x.ReportMark = x.RowMark;
@ -265,6 +266,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
{
if (needRowIds.Contains(x.RowId))
{
var row = addrowInfo.Where(y => y.Id == x.RowId).FirstOrDefault();
if (row != null)
{
x.RowIndex = row.RowIndex;
}
x.QuestionId = otherLesionQuestion.Id;
var newLesionTableQuestion = newLesionTableQuestionList.Where(y => y.Id == x.TableQuestionId).FirstOrDefault();