代码修改
parent
8da1ab2413
commit
f7f84ef28a
|
@ -515,7 +515,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public string QuestionEnName { get; set; } = string.Empty;
|
public string QuestionEnName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public List<string> ParentTriggerValueList { get; set; }
|
||||||
|
public List<string> RelevanceValueList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1038,6 +1039,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ValueOfType? ValueType { get; set; }
|
public ValueOfType? ValueType { get; set; }
|
||||||
|
|
||||||
|
public List<string> ParentTriggerValueList { get; set; }
|
||||||
|
public List<string> RelevanceValueList { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1730,6 +1734,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 问题英文分组
|
/// 问题英文分组
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GroupEnName { get; set; } = string.Empty;
|
public string GroupEnName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public List<string> ParentTriggerValueList { get; set; }
|
||||||
|
public List<string> RelevanceValueList { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -271,6 +271,8 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingQuestionSystem(AddOrUpdateReadingQuestionSystemInDto indto)
|
public async Task<IResponseOutput> AddOrUpdateReadingQuestionSystem(AddOrUpdateReadingQuestionSystemInDto indto)
|
||||||
{
|
{
|
||||||
|
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||||
|
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||||
if (indto.Id != null)
|
if (indto.Id != null)
|
||||||
{
|
{
|
||||||
var trialIdList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionSystemId == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None)
|
var trialIdList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionSystemId == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None)
|
||||||
|
@ -371,10 +373,11 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="addOrEditReadingTableQuestionSystem"></param>
|
/// <param name="addOrEditReadingTableQuestionSystem"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit addOrEditReadingTableQuestionSystem)
|
public async Task<IResponseOutput> AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit indto)
|
||||||
{
|
{
|
||||||
|
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||||
var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(addOrEditReadingTableQuestionSystem, true);
|
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||||
|
var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
|
@ -221,7 +222,42 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[ForeignKey("RelevanceId")]
|
[ForeignKey("RelevanceId")]
|
||||||
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
|
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<string> ParentTriggerValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.ParentTriggerValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<string> RelevanceValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.RelevanceValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@ using System;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
|
@ -176,6 +179,43 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[ForeignKey("DependParentId")]
|
[ForeignKey("DependParentId")]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public ReadingTableQuestionSystem DependParentQuestion { get; set; }
|
public ReadingTableQuestionSystem DependParentQuestion { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<string> ParentTriggerValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.ParentTriggerValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<string> RelevanceValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.RelevanceValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue