Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
eaf4cc3b61
|
@ -954,7 +954,6 @@ namespace IRaCIS.Application.Services
|
|||
await _readingTableQuestionTrialRepository.AddRangeAsync(needAddTableDatas);
|
||||
#endregion
|
||||
|
||||
await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -192,7 +192,8 @@ namespace IRaCIS.Core.Application
|
|||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterion.Id);
|
||||
var criterionDictionaryList = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId == trialCriterion.ReadingQuestionCriterionSystemId.Value)
|
||||
.ToListAsync();
|
||||
criterionDictionaryList.ForEach(x => {
|
||||
criterionDictionaryList.ForEach(x =>
|
||||
{
|
||||
x.Id = NewId.NextGuid();
|
||||
x.Dictionary = null;
|
||||
x.IsSystemCriterion = false;
|
||||
|
@ -215,13 +216,7 @@ namespace IRaCIS.Core.Application
|
|||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
});
|
||||
|
||||
// 清除多余答案
|
||||
|
||||
var questionQuery = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).AsQueryable();
|
||||
var tableQuestionQuery = _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == inDto.TrialReadingCriterionId).AsQueryable();
|
||||
await _readingTaskQuestionAnswer.BatchDeleteNoTrackingAsync(x => questionQuery.Count(y => y.Id == x.ReadingQuestionTrialId) == 0) ;
|
||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => questionQuery.Count(y => y.Id == x.QuestionId)==0);
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => tableQuestionQuery.Count(y => y.Id == x.TableQuestionId)==0);
|
||||
|
||||
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync();
|
||||
|
||||
|
@ -239,7 +234,16 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
SynchronizeOriginalTime = DateTime.Now
|
||||
});
|
||||
|
||||
await _readingCriterionDictionaryRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
// 清除多余答案
|
||||
var questionQuery = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId).AsQueryable();
|
||||
var tableQuestionQuery = _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == inDto.TrialReadingCriterionId).AsQueryable();
|
||||
await _readingTaskQuestionAnswer.BatchDeleteNoTrackingAsync(x => questionQuery.Count(y => y.Id == x.ReadingQuestionTrialId) == 0);
|
||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => questionQuery.Count(y => y.Id == x.QuestionId) == 0);
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => tableQuestionQuery.Count(y => y.Id == x.TableQuestionId) == 0);
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok(true);
|
||||
|
|
|
@ -196,10 +196,18 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var isDistinctionInterface = false;
|
||||
|
||||
//设置项目配置 肿瘤学配置 和阅片标准配置
|
||||
if (_userInfo.RequestUrl == "TrialConfig/setOncologySet" || _userInfo.RequestUrl == "TrialConfig/setTrialReadingCriterion" || _userInfo.RequestUrl == "configTrialBasicInfo/ConfigTrialProcessInfoConfirm"
|
||||
if (_userInfo.RequestUrl == "TrialConfig/setOncologySet"
|
||||
|
||||
//现在废弃 没用
|
||||
|| _userInfo.RequestUrl == "TrialConfig/setTrialReadingCriterion"
|
||||
|
||||
//项目流程确认
|
||||
|| _userInfo.RequestUrl == "configTrialBasicInfo/ConfigTrialProcessInfoConfirm"
|
||||
|
||||
//阅片单元 保存阅片规则
|
||||
|| _userInfo.RequestUrl == "TrialConfig/setCriterionReadingInfo")
|
||||
|| _userInfo.RequestUrl == "TrialConfig/setCriterionReadingInfo"
|
||||
|
||||
|| _userInfo.RequestUrl == "configTrialBasicInfo/TrialReadingInfoSign")
|
||||
{
|
||||
isDistinctionInterface = true;
|
||||
}
|
||||
|
@ -212,6 +220,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
extraIdentification = "/Auto";
|
||||
}
|
||||
|
||||
//保存肿瘤学配置哪里 强行要将 评估结果(中间字典表的多条数据)存到标准稽查上
|
||||
|
||||
var dicIdList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).Where(t=>t.CriterionId==entity.Id).Select(t=>t.DictionaryId).ToList();
|
||||
|
||||
var dicValueList = new List<string>();
|
||||
if (dicIdList.Count() == 0)
|
||||
{
|
||||
dicValueList = await _dbContext.ReadingCriterionDictionary.Where(t => t.CriterionId == entity.Id).Select(t => t.Dictionary.Value).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
dicValueList = await _dbContext.Dictionary.Where(t => dicIdList.Contains(t.Id) ).Select(t => t.Value).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
await InsertInspection<ReadingQuestionCriterionTrial>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
|
@ -223,6 +245,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
ExtraIndentification = extraIdentification
|
||||
|
||||
}, new
|
||||
{
|
||||
EvaluationResultTypes = dicValueList.Count > 0 ? string.Join(",", dicValueList) : string.Empty
|
||||
}) ;
|
||||
}
|
||||
|
||||
|
@ -264,21 +289,40 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
|
||||
var isDistinctionInterface = false;
|
||||
//重置仲裁规则
|
||||
if (_userInfo.RequestUrl == "ReadingImageTask/setTrialCriterionJudgeQuestionAnswerGroup")
|
||||
{
|
||||
isDistinctionInterface = true;
|
||||
}
|
||||
|
||||
|
||||
var extraIdentification = string.Empty;
|
||||
|
||||
//同步的数据 后面加"/Auto" 因为同步的地方可能会改 所以取反
|
||||
var extraIdentification = string.Empty;
|
||||
if (_userInfo.RequestUrl != "ReadingQuestion/addOrUpdateReadingQuestionTrial" && type == AuditOpt.Add)
|
||||
{
|
||||
extraIdentification = "/Auto";
|
||||
}
|
||||
|
||||
//重置仲裁规则
|
||||
|
||||
var cloneEntity = entity.Clone();
|
||||
|
||||
if (_userInfo.RequestUrl == "ReadingImageTask/setTrialCriterionJudgeQuestionAnswerGroup")
|
||||
{
|
||||
isDistinctionInterface = true;
|
||||
|
||||
if (entity.JudgeType == JudgeTypeEnum.None)
|
||||
{
|
||||
extraIdentification = "/Reset";
|
||||
}
|
||||
|
||||
//翻译 可能自己填写的 也有可能是从字典中获取的
|
||||
if (entity.QuestionGenre == TableQuestionType.Dictionary && !string.IsNullOrWhiteSpace(entity.DictionaryCode))
|
||||
{
|
||||
var translateList = _dbContext.Dictionary.Where(t => t.Code == entity.DictionaryCode.Trim()).SelectMany(t => t.ChildList).Select(t => new { t.Code, t.Value, t.ValueCN }).ToList();
|
||||
|
||||
foreach (var translateItem in translateList)
|
||||
{
|
||||
cloneEntity.AnswerCombination = cloneEntity.AnswerCombination.Replace($"\"{translateItem.Code}\"", $"\"{translateItem.Value}\"");
|
||||
|
||||
cloneEntity.AnswerGroup = cloneEntity.AnswerGroup.Replace($"|{translateItem.Code}|", $"|{translateItem.Value}|");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int? parentQuestionShowOrder = null;
|
||||
int? relavantQuestionShowOrder = null;
|
||||
|
@ -295,7 +339,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}
|
||||
|
||||
|
||||
await InsertInspection<ReadingQuestionTrial>(entity, type, x => new InspectionConvertDTO()
|
||||
await InsertInspection<ReadingQuestionTrial>(cloneEntity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
IsDistinctionInterface = isDistinctionInterface,
|
||||
|
||||
|
@ -545,23 +589,25 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)))
|
||||
{
|
||||
|
||||
//系统标准设置 没有翻译的字段
|
||||
//if (_userInfo.RequestUrl == "ReadingQuestion/setCriterionDictionary")
|
||||
//{
|
||||
|
||||
|
||||
var type = AuditOpt.Add;
|
||||
|
||||
var list = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).ToList();
|
||||
|
||||
var firstEntity = list.First();
|
||||
|
||||
var cloneEntity = firstEntity.Clone();
|
||||
|
||||
var allList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).ToList();
|
||||
|
||||
//查询出字典的Value ValueCN Des 保存
|
||||
var dicIdList = list.Select(t => t.DictionaryId).ToList();
|
||||
var dicIdList = allList.Select(t => t.DictionaryId).ToList();
|
||||
|
||||
var selectList = await _dbContext.Dictionary.Where(x => dicIdList.Contains(x.Id)).Select(t => new { t.Id, t.Value, t.ValueCN, t.Description, t.ShowOrder }).ToListAsync();
|
||||
|
||||
|
||||
foreach (var list in allList.GroupBy(t => t.ParentCode))
|
||||
{
|
||||
|
||||
var firstEntity = list.First();
|
||||
var cloneEntity = list.First().Clone();
|
||||
|
||||
|
||||
//保证Id 唯一
|
||||
cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.CriterionId.ToString(), firstEntity.ParentCode.ToString());
|
||||
|
||||
|
@ -605,8 +651,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}
|
||||
).OrderBy(t => t.ShowOrder).ToList()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2527,22 +2578,22 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}
|
||||
break;
|
||||
|
||||
case nameof(ReadingQuestionTrial):
|
||||
//case nameof(ReadingQuestionTrial):
|
||||
|
||||
var trialReadingQuestion = entityObj as ReadingQuestionTrial;
|
||||
// var trialReadingQuestion = entityObj as ReadingQuestionTrial;
|
||||
|
||||
switch (_userInfo.RequestUrl)
|
||||
{
|
||||
case "ReadingImageTask/setTrialCriterionJudgeQuestionAnswerGroup":
|
||||
// switch (_userInfo.RequestUrl)
|
||||
// {
|
||||
// case "ReadingImageTask/setTrialCriterionJudgeQuestionAnswerGroup":
|
||||
|
||||
if (trialReadingQuestion.JudgeType == JudgeTypeEnum.None)
|
||||
{
|
||||
type = type + "/" + "Reset";
|
||||
}
|
||||
// if (trialReadingQuestion.JudgeType == JudgeTypeEnum.None)
|
||||
// {
|
||||
// type = type + "/" + "Reset";
|
||||
// }
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
// break;
|
||||
// }
|
||||
// break;
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue