代码修改
parent
62a1200cf3
commit
79133ccde8
|
@ -304,7 +304,12 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此分组已被引用,请先删除被引用的问题");
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
@ -587,7 +592,12 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
return ResponseOutput.NotOk("此问题存在子问题,请先删除子问题");
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
return ResponseOutput.NotOk("此分组已被引用,请先删除引用的问题");
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId&&x.ShowQuestion!= ShowQuestion.Hide).ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId)
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide)
|
||||
//.Where(x => x.LesionType != LesionType.BaselineLesions)
|
||||
.Where(x=>x.QuestionType!=QuestionType.TherapeuticEffectEvaluationGroup)
|
||||
.ToListAsync();
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var visitTaskIds = taskInfoList.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var criterionId = visitTaskInfo.TrialReadingCriterionId;
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId).ToListAsync();
|
||||
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == criterionId && x.ShowQuestion != ShowQuestion.Hide).ToListAsync();
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
||||
|
|
|
@ -247,7 +247,6 @@ namespace IRaCIS.Core.Application
|
|||
var criterionDictionaryList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
||||
.Select(x=>new ReadingTrialCriterionDictionary() {
|
||||
|
||||
Id = NewId.NextGuid(),
|
||||
CriterionId = inDto.TrialReadingCriterionId,
|
||||
CrterionDictionaryGroup=x.CrterionDictionaryGroup,
|
||||
IsBaseLineUse=x.IsBaseLineUse,
|
||||
|
@ -256,8 +255,15 @@ namespace IRaCIS.Core.Application
|
|||
ParentCode=x.ParentCode,
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(criterionDictionaryList);
|
||||
|
||||
criterionDictionaryList.ForEach(x =>
|
||||
{
|
||||
|
||||
x.Id = NewId.NextGuid();
|
||||
|
||||
});
|
||||
|
||||
await _readingTrialCriterionDictionaryRepository.AddRangeAsync(criterionDictionaryList);
|
||||
|
||||
await _trialCriterionDictionaryCode.AddRangeAsync(criterionDictionaryCodeList);
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue