代码修改
							parent
							
								
									8da1ab2413
								
							
						
					
					
						commit
						f7f84ef28a
					
				| 
						 | 
				
			
			@ -514,11 +514,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
			
		|||
		/// </summary>
 | 
			
		||||
		public string QuestionEnName { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
        public List<string> ParentTriggerValueList { get; set; }
 | 
			
		||||
        public List<string> RelevanceValueList { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	public class ReadingCriterionPageView
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -1038,10 +1039,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
			
		|||
		/// </summary>
 | 
			
		||||
		public ValueOfType? ValueType { get; set; }
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// 备注
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		public string Remark { get; set; }
 | 
			
		||||
        public List<string> ParentTriggerValueList { get; set; }
 | 
			
		||||
        public List<string> RelevanceValueList { get; set; }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 备注
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public string Remark { get; set; }
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// 数据来源
 | 
			
		||||
| 
						 | 
				
			
			@ -1730,7 +1734,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
			
		|||
		/// 问题英文分组
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		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]
 | 
			
		||||
        public async Task<IResponseOutput> AddOrUpdateReadingQuestionSystem(AddOrUpdateReadingQuestionSystemInDto indto)
 | 
			
		||||
        {
 | 
			
		||||
            indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
 | 
			
		||||
            indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
 | 
			
		||||
            if (indto.Id != null)
 | 
			
		||||
            {
 | 
			
		||||
                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>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        [HttpPost]
 | 
			
		||||
        public async Task<IResponseOutput> AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit addOrEditReadingTableQuestionSystem)
 | 
			
		||||
        public async Task<IResponseOutput> AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit indto)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(addOrEditReadingTableQuestionSystem, true);
 | 
			
		||||
            indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
 | 
			
		||||
            indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
 | 
			
		||||
            var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
 | 
			
		||||
 | 
			
		||||
            return ResponseOutput.Ok(entity.Id.ToString());
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,6 +5,7 @@ using IRaCIS.Core.Domain.Share;
 | 
			
		|||
using System.ComponentModel.DataAnnotations;
 | 
			
		||||
using System.ComponentModel.DataAnnotations.Schema;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
 | 
			
		||||
namespace IRaCIS.Core.Domain.Models
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -221,9 +222,44 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
		[ForeignKey("RelevanceId")]
 | 
			
		||||
		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 System.ComponentModel.DataAnnotations;
 | 
			
		||||
using System.ComponentModel.DataAnnotations.Schema;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
 | 
			
		||||
namespace IRaCIS.Core.Domain.Models
 | 
			
		||||
{
 | 
			
		||||
	 ///<summary>
 | 
			
		||||
| 
						 | 
				
			
			@ -176,7 +179,44 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
		[ForeignKey("DependParentId")]
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		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