Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
2a532a8ee6
|
@ -100,6 +100,9 @@ namespace IRaCIS.Application.Contracts
|
|||
public Guid Id { get; set; }
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
public int Count { get; set; }
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
@ -248,17 +248,22 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<GetCriterionDictionaryListOutDto>> GetCriterionDictionaryList(GetCriterionDictionaryListInDto inDto)
|
||||
{
|
||||
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 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()
|
||||
{
|
||||
Code = x.Code,
|
||||
ShowOrder = x.ShowOrder,
|
||||
Description = x.Description
|
||||
}).ToListAsync();
|
||||
|
||||
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();
|
||||
});
|
||||
|
||||
|
|
|
@ -1489,7 +1489,7 @@ namespace IRaCIS.Application.Services
|
|||
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
|
||||
rowInfo.NumberOfFrames = inDto.NumberOfFrames;
|
||||
rowInfo.FristAddTaskNum = taskinfo.VisitTaskNum;
|
||||
rowInfo.FristAddTaskId = rowInfo.Id;
|
||||
rowInfo.FristAddTaskId = inDto.VisitTaskId;
|
||||
rowInfo.PicturePath = inDto.PicturePath;
|
||||
rowInfo.RowIndex = inDto.RowIndex;
|
||||
rowInfo.OrganInfoId = inDto.OrganInfoId;
|
||||
|
|
Loading…
Reference in New Issue