修改一版
parent
a9afb9a478
commit
d566298e51
|
@ -175,6 +175,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string ParentQuestionName { get; set; }
|
||||
|
||||
public int ParentQuestionShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是裁判问题
|
||||
/// </summary>
|
||||
|
@ -235,6 +237,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string ParentQuestionName { get; set; }
|
||||
|
||||
public int ParentQuestionShowOrder { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
|
|
|
@ -392,6 +392,11 @@ namespace IRaCIS.Application.Services
|
|||
throw new BusinessValidationFailedException("当前问题在项目"+ string.Join(',', trialNames) + "设置了裁判标准了,修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
}
|
||||
var entity = await _readingQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
@ -698,6 +703,11 @@ namespace IRaCIS.Application.Services
|
|||
throw new BusinessValidationFailedException("当前问题已经设置了裁判标准了,修改失败");
|
||||
}
|
||||
}
|
||||
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
}
|
||||
var entity = await _readingQuestionTrialRepository.InsertOrUpdateAsync(indto, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
|
|
@ -59,7 +59,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<AddOrUpdateReadingQuestionSystemInDto, ReadingQuestionSystem>();
|
||||
CreateMap<ReadingQuestionSystem, ReadingQuestionSystemView>()
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionSystem==null?string.Empty: s.ParentReadingQuestionSystem.QuestionName));
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionSystem==null?string.Empty: s.ParentReadingQuestionSystem.QuestionName))
|
||||
.ForMember(d => d.ParentQuestionShowOrder, u => u.MapFrom(s => s.ParentReadingQuestionSystem == null ? 0 : s.ParentReadingQuestionSystem.ShowOrder));
|
||||
|
||||
|
||||
CreateMap<AddOrUpdateReadingQuestionCriterionTrialInDto, ReadingQuestionCriterionTrial>();
|
||||
|
@ -69,8 +70,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<AddOrUpdateReadingQuestionTrialInDto, ReadingQuestionTrial>();
|
||||
CreateMap<ReadingQuestionTrial, ReadingQuestionTrialView>()
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName)); ;
|
||||
#endregion
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName))
|
||||
.ForMember(d => d.ParentQuestionShowOrder, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? 0 : s.ParentReadingQuestionTrial.ShowOrder));
|
||||
#endregion
|
||||
|
||||
#region IR阅片
|
||||
CreateMap<ReadingQuestionTrial, GetTrialReadingQuestionOutDto>()
|
||||
|
|
Loading…
Reference in New Issue