IRC_NewDev
parent
8bc0cee81f
commit
70fbf8d352
|
@ -2820,8 +2820,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var tableQuestionAnswerList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(t => t.Entity as ReadingTableQuestionAnswer).Where(t => t.RowId == entity.Id).ToList();
|
||||
|
||||
|
||||
//获取表格问题名称 组合成数组
|
||||
var tableQuesionList = await _dbContext.ReadingTableQuestionTrial.Where(t => tableQuestionAnswerList.Select(k => k.TableQuestionId).Contains(t.Id)).Select(t =>
|
||||
List<UnitData> unitDataList = (await _dbContext.Dictionary.Where(x => x.Parent.Code == "ValueUnit").Where(x => x.Code != "0").ToListAsync()).Select(x => new UnitData()
|
||||
{
|
||||
|
||||
Unit = (ValueUnit)int.Parse(x.Code),
|
||||
UnitName = x.Value.ToString(),
|
||||
}).ToList();
|
||||
|
||||
//获取表格问题名称 组合成数组
|
||||
var tableQuesionList = await _dbContext.ReadingTableQuestionTrial.Where(t => tableQuestionAnswerList.Select(k => k.TableQuestionId).Contains(t.Id)).Select(t =>
|
||||
new
|
||||
{
|
||||
TrialReadingCriterionId = t.ReadingQuestionTrial.ReadingQuestionCriterionTrialId, //标准Id
|
||||
|
@ -2886,7 +2893,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
new
|
||||
{
|
||||
//如果问题类型是附件 特殊处理 方便前端解析
|
||||
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
|
||||
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,
|
||||
|
|
|
@ -5,6 +5,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
||||
{
|
||||
|
@ -97,6 +98,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto
|
|||
public Guid ChildId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class UnitData
|
||||
{
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
public string UnitName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 稽查数据
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue