Test.EIImageViewer
hang 2023-02-08 17:15:01 +08:00
commit 2a532a8ee6
3 changed files with 13 additions and 5 deletions

View File

@ -100,6 +100,9 @@ namespace IRaCIS.Application.Contracts
public Guid Id { get; set; } public Guid Id { get; set; }
public string Code { get; set; } = string.Empty; public string Code { get; set; } = string.Empty;
public int Count { get; set; }
public int ShowOrder { get; set; }
public string Description { get; set; } = string.Empty; public string Description { get; set; } = string.Empty;
} }

View File

@ -236,7 +236,7 @@ namespace IRaCIS.Application.Services
/// <returns></returns> /// <returns></returns>
public async Task<List<BasicDicSelect>> GetBasicConfigSelect(string searchKey) public async Task<List<BasicDicSelect>> GetBasicConfigSelect(string searchKey)
{ {
var searchList = await _dicRepository.Where(t => t.ConfigDictionary.Code == searchKey && t.ParentId == null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).OrderBy(x=>x.Code).ToListAsync(); var searchList = await _dicRepository.Where(t => t.ConfigDictionary.Code == searchKey && t.ParentId == null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder).ToListAsync();
return searchList; return searchList;
} }
@ -248,17 +248,22 @@ namespace IRaCIS.Application.Services
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto) public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto)
{ {
var criterionCodes= await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).ToListAsync(); var criterionCodes= await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).ToListAsync();
var parentCodes = await _readingCriterionDictionaryRepository.Where(x => x.CriterionId== inDto.SystemCriterionId).Select(x => x.ParentCode).ToListAsync();
var codes = criterionCodes.Select(x=>x.Code).ToList(); var codes = criterionCodes.Select(x=>x.Code).ToList();
var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code)) var dictionaryList = await _dicRepository.Where(x => codes.Contains(x.Code) && x.ParentId == null)
.OrderBy(x => x.ShowOrder).Select(x => new GetCriterionDictionaryListOutDto() .OrderBy(x => x.ShowOrder).Select(x => new GetCriterionDictionaryListOutDto()
{ {
Code = x.Code, Code = x.Code,
ShowOrder = x.ShowOrder,
Description = x.Description Description = x.Description
}).ToListAsync(); }).ToListAsync();
dictionaryList.ForEach(x => { dictionaryList.ForEach(x => {
x.Count = parentCodes.Count(y => y == x.Code);
x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault(); x.Id = criterionCodes.Where(y => y.Code == x.Code).Select(x => x.Id).FirstOrDefault();
}); });

View File

@ -1489,7 +1489,7 @@ namespace IRaCIS.Application.Services
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd; rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
rowInfo.NumberOfFrames = inDto.NumberOfFrames; rowInfo.NumberOfFrames = inDto.NumberOfFrames;
rowInfo.FristAddTaskNum = taskinfo.VisitTaskNum; rowInfo.FristAddTaskNum = taskinfo.VisitTaskNum;
rowInfo.FristAddTaskId = rowInfo.Id; rowInfo.FristAddTaskId = inDto.VisitTaskId;
rowInfo.PicturePath = inDto.PicturePath; rowInfo.PicturePath = inDto.PicturePath;
rowInfo.RowIndex = inDto.RowIndex; rowInfo.RowIndex = inDto.RowIndex;
rowInfo.OrganInfoId = inDto.OrganInfoId; rowInfo.OrganInfoId = inDto.OrganInfoId;