修改稽查

Test_IRC_Net8
he 2025-04-29 17:56:14 +08:00
parent 381b1965cf
commit 5064630d1f
2 changed files with 52 additions and 16 deletions

View File

@ -3161,6 +3161,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
TrialReadingCriterionId = t.ReadingQuestionTrial.ReadingQuestionCriterionTrialId, //标准Id
Type = t.ReadingQuestionTrial.QuestionName, //病灶类型
t.ReadingQuestionTrial.Unit,
t.QuestionMark,
t.ReadingQuestionTrial.CustomUnit,
t.DictionaryCode,
t.QuestionName,
@ -3170,7 +3171,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
AnswerType = t.Type,
})
.OrderBy(t => t.ShowOrder).ToListAsync();
.OrderBy(t => t.ShowOrder).ToListAsync();
var trialReadingCriterionId = tableQuesionList.FirstOrDefault()?.TrialReadingCriterionId;
@ -3198,6 +3199,41 @@ namespace IRaCIS.Core.Infra.EFCore.Common
entity.RowMark = entity.OrderMark + entity.RowIndex.GetLesionMark();
var tableAnswerList = tableQuestionAnswerList.Join(tableQuesionList, t => t.TableQuestionId, u => u.QuestionId, (t, u) =>
new TableQuestionAnswerDto()
{
//如果问题类型是附件 特殊处理 方便前端解析
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer + unitDataList.Where(y => y.Unit == u.Unit).Select(x => x.UnitName).FirstIsNullReturnEmpty(),
//t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
QuestionName=u.QuestionName,
QuestionEnName= u.QuestionEnName,
DictionaryCode= u.DictionaryCode,
QuestionMark= u.QuestionMark,
ShowOrder= u.ShowOrder,
}
).OrderBy(t => t.ShowOrder).ToList();
var organ= await _dbContext.OrganInfo.Where(x => x.Id == entity.OrganInfoId).FirstOrDefaultAsync();
if (organ != null)
{
foreach (var item1 in tableAnswerList)
{
switch (item1.QuestionMark)
{
case QuestionMark.Organ:
item1.Answer = _userInfo.IsEn_Us ? organ.TULOCEN : organ.TULOC;
break;
case QuestionMark.Location:
item1.Answer = _userInfo.IsEn_Us ? organ.TULATEN : organ.TULAT;
break;
case QuestionMark.Part:
item1.Answer = _userInfo.IsEn_Us ? organ.PartEN : organ.Part;
break;
}
}
}
await InsertInspection<ReadingTableAnswerRowInfo>(entity, type, x => new InspectionConvertDTO()
{
@ -3213,21 +3249,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{
OriginalRowMark = originalRowMark,
//TableName = tableName,
QuestionAnswerList =
//需要手动添加病灶类型
tableQuestionAnswerList.Join(tableQuesionList, t => t.TableQuestionId, u => u.QuestionId, (t, u) =>
new
{
//如果问题类型是附件 特殊处理 方便前端解析
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer + unitDataList.Where(y => y.Unit == u.Unit).Select(x => x.UnitName).FirstIsNullReturnEmpty(),
//t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
u.QuestionName,
u.QuestionEnName,
u.DictionaryCode,
u.ShowOrder
}
).OrderBy(t => t.ShowOrder).ToList()
QuestionAnswerList = tableAnswerList,
},_userInfo.AuditIdentification);

View File

@ -63,6 +63,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common
public string SelectResult { get; set; }
}
public class TableQuestionAnswerDto
{
public string Answer { get; set; }
public string QuestionName { get; set; }
public string QuestionEnName { get; set; }
public string DictionaryCode { get; set; }
public QuestionMark? QuestionMark { get; set; }
public int ShowOrder { get; set; }
}
public class InspectionConvertDTO : DataInspection
{
/// <summary>