Compare commits
No commits in common. "5b3beea8fa3787208cd84768b6afd92dfabfff9f" and "bf0ab3411d272ec3eee07dd40329abf061f16f4e" have entirely different histories.
5b3beea8fa
...
bf0ab3411d
|
|
@ -1,12 +1,9 @@
|
||||||
using DocumentFormat.OpenXml.Office2019.Excel.ThreadedComments;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using NPOI.POIFS.Properties;
|
|
||||||
using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
@ -268,27 +265,64 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public void FindSystemChildQuestion(GetSystemReadingQuestionOutDto item, List<GetSystemReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
|
public void FindSystemChildQuestion(GetSystemReadingQuestionOutDto item, List<GetSystemReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
|
||||||
{
|
{
|
||||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupId == item.Id)).ToList();
|
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupId == item.Id)).ToList();
|
||||||
var itemChild = _mapper.Map<List<GetSystemReadingQuestionOutDto>>(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).ToList());
|
|
||||||
itemChild.ForEach(x =>
|
|
||||||
{
|
|
||||||
x.Childrens = new List<GetSystemReadingQuestionOutDto>();
|
|
||||||
x.GroupName = string.Empty;
|
|
||||||
x.ImageCount = 0;
|
|
||||||
x.ParentId = item.Id;
|
|
||||||
var relationQuestions= _mapper.Map<List<GetSystemReadingQuestionOutDto>>(tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).ToList());
|
|
||||||
relationQuestions.ForEach(y =>
|
|
||||||
{
|
|
||||||
y.Childrens = new List<GetSystemReadingQuestionOutDto>();
|
|
||||||
y.GroupName = string.Empty;
|
|
||||||
y.ImageCount = 0;
|
|
||||||
y.ParentId = item.Id;
|
|
||||||
y.LesionType = item.LesionType;
|
|
||||||
y.RelationQuestions = new List<GetSystemReadingQuestionOutDto>();
|
|
||||||
});
|
|
||||||
|
|
||||||
x.RelationQuestions= relationQuestions;
|
item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetSystemReadingQuestionOutDto
|
||||||
});
|
{
|
||||||
item.Childrens.AddRange(itemChild);
|
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
GroupName = string.Empty,
|
||||||
|
Id = x.Id,
|
||||||
|
Type = x.Type,
|
||||||
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
TableQuestionType = x.TableQuestionType,
|
||||||
|
DependParentId = x.DependParentId,
|
||||||
|
IsDepend = x.IsDepend,
|
||||||
|
QuestionMark = x.QuestionMark,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
RelevanceId = x.RelevanceId,
|
||||||
|
IsRequired = x.IsRequired,
|
||||||
|
RelevanceValue = x.RelevanceValue,
|
||||||
|
ImageCount = 0,
|
||||||
|
ParentId = item.Id,
|
||||||
|
ShowQuestion=x.ShowQuestion,
|
||||||
|
DataTableColumn = x.DataTableColumn,
|
||||||
|
LesionType = item.LesionType,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
IsCopy=x.IsCopy,
|
||||||
|
ClassifyTableQuestionId= x.ClassifyTableQuestionId,
|
||||||
|
ClassifyAlgorithms=x.ClassifyAlgorithms,
|
||||||
|
RelationQuestions = tableQuestions.Where(z => (z.DependParentId ?? default(Guid)) == x.Id).Select(x => new GetSystemReadingQuestionOutDto
|
||||||
|
{
|
||||||
|
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
||||||
|
ShowOrder = x.ShowOrder,
|
||||||
|
GroupName = string.Empty,
|
||||||
|
Id = x.Id,
|
||||||
|
DictionaryCode = x.DictionaryCode,
|
||||||
|
Type = x.Type,
|
||||||
|
ShowQuestion = x.ShowQuestion,
|
||||||
|
TableQuestionType = x.TableQuestionType,
|
||||||
|
DependParentId = x.DependParentId,
|
||||||
|
IsDepend = x.IsDepend,
|
||||||
|
QuestionMark = x.QuestionMark,
|
||||||
|
TypeValue = x.TypeValue,
|
||||||
|
RelevanceId = x.RelevanceId,
|
||||||
|
RelevanceValue = x.RelevanceValue,
|
||||||
|
ImageCount = 0,
|
||||||
|
ParentId = item.Id,
|
||||||
|
DataTableColumn = x.DataTableColumn,
|
||||||
|
LesionType = item.LesionType,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
RelationQuestions = new List<GetSystemReadingQuestionOutDto>(),
|
||||||
|
Remark = x.Remark,
|
||||||
|
IsCopy = x.IsCopy,
|
||||||
|
ClassifyTableQuestionId = x.ClassifyTableQuestionId,
|
||||||
|
ClassifyAlgorithms = x.ClassifyAlgorithms,
|
||||||
|
|
||||||
|
}).ToList(),
|
||||||
|
Remark = x.Remark,
|
||||||
|
|
||||||
|
}));
|
||||||
|
|
||||||
if (item.Childrens != null && item.Childrens.Count != 0)
|
if (item.Childrens != null && item.Childrens.Count != 0)
|
||||||
{
|
{
|
||||||
item.Childrens.ForEach(x =>
|
item.Childrens.ForEach(x =>
|
||||||
|
|
|
||||||
|
|
@ -211,8 +211,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<ReadingQuestionSystem, GetSystemReadingQuestionOutDto>()
|
CreateMap<ReadingQuestionSystem, GetSystemReadingQuestionOutDto>()
|
||||||
;
|
;
|
||||||
|
|
||||||
CreateMap<TableQuestionDataInfo, GetSystemReadingQuestionOutDto>();
|
|
||||||
|
|
||||||
CreateMap<ReadingTableQuestionSystem, TableQuestionDataInfo>();
|
CreateMap<ReadingTableQuestionSystem, TableQuestionDataInfo>();
|
||||||
CreateMap<ReadingTableQuestionTrial, TableQuestionDataInfo>()
|
CreateMap<ReadingTableQuestionTrial, TableQuestionDataInfo>()
|
||||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue