字典修改
parent
b97f9f8f12
commit
552e7a430d
|
@ -91,6 +91,8 @@ namespace IRaCIS.Application.Contracts
|
||||||
public class GetBasicDataAllSelectInDto
|
public class GetBasicDataAllSelectInDto
|
||||||
{
|
{
|
||||||
public Guid? TrialReadingCriterionId { get; set; }
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
|
public Guid? SystemReadingCriterionId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace IRaCIS.Application.Services
|
||||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||||
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
||||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||||
|
private readonly IRepository<ReadingSystemCriterionDictionary> _readingSystemCriterionDictionaryRepository;
|
||||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||||
|
@ -34,6 +34,7 @@ namespace IRaCIS.Application.Services
|
||||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||||
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
||||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||||
|
IRepository<ReadingSystemCriterionDictionary> readingSystemCriterionDictionaryRepository,
|
||||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial
|
||||||
|
@ -49,6 +50,7 @@ namespace IRaCIS.Application.Services
|
||||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||||
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
||||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||||
|
this._readingSystemCriterionDictionaryRepository = readingSystemCriterionDictionaryRepository;
|
||||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||||
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
||||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||||
|
@ -462,11 +464,11 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var result = searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
var result = searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||||
|
|
||||||
if (inDto.TrialReadingCriterionId == null)
|
if (inDto.TrialReadingCriterionId == null && inDto.SystemReadingCriterionId == null)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else
|
else if (inDto.TrialReadingCriterionId != null)
|
||||||
{
|
{
|
||||||
var trialCriterionType = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
var trialCriterionType = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||||
if (trialCriterionType == CriterionType.SelfDefine)
|
if (trialCriterionType == CriterionType.SelfDefine)
|
||||||
|
@ -520,8 +522,52 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<string> selectCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemReadingCriterionId).Select(x => x.Code).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var criterionCode = await _dicRepository.Where(x => x.ConfigDictionary.Code == "Reading_eCRF_Criterion").Select(x => x.Code).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
foreach (var item in criterionCode)
|
||||||
|
{
|
||||||
|
if (result.ContainsKey(item))
|
||||||
|
{
|
||||||
|
result[item] = new List<BasicDicSelect>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var criterionDictionList = await _readingSystemCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SystemReadingCriterionId).Select(x => new BasicDicSelect()
|
||||||
|
{
|
||||||
|
ChildGroup = x.Dictionary.ChildGroup,
|
||||||
|
Code = x.Dictionary.Code,
|
||||||
|
Description = x.Dictionary.Description,
|
||||||
|
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||||
|
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||||
|
ShowOrder = x.Dictionary.ShowOrder,
|
||||||
|
ParentCode = x.ParentCode,
|
||||||
|
Id = x.DictionaryId,
|
||||||
|
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||||
|
ParentId = x.Dictionary.ParentId,
|
||||||
|
Value = x.Dictionary.Value,
|
||||||
|
ValueCN = x.Dictionary.ValueCN
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
criterionDictionList = criterionDictionList.Where(x => selectCode.Contains(x.ParentCode)).ToList();
|
||||||
|
|
||||||
|
var criterionDic = criterionDictionList.GroupBy(x => x.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||||
|
|
||||||
|
foreach (var item in criterionDic)
|
||||||
|
{
|
||||||
|
result[item.Key] = item.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 稽查相关
|
#region 稽查相关
|
||||||
|
|
Loading…
Reference in New Issue