Most működik egy tesztelhető verzió.

This commit is contained in:
2025-04-22 14:17:11 +02:00
parent cba9181a2d
commit 3c394f632d
12 changed files with 124 additions and 28 deletions
@@ -267,6 +267,33 @@ namespace WorkFlowCheck.MAUI.Services
{
}
return retVal;
}
public async Task<CheckPointDTO> GetNextCheckpointNotSend(CheckListHeaderDTO checkListHeaderDTO)
{
var retVal = new CheckPointDTO();
try
{
var firstUnansweredCheckPoint = await _dbContext.CheckListRows
.Include(i => i.CheckListTemplateRow)
.ThenInclude(i => i.CheckPoint)
.Where(w => w.CheckListHeaderId == checkListHeaderDTO.Id
&& string.IsNullOrEmpty(w.Answer.Trim()))
.Select(w => w.CheckListTemplateRow.CheckPoint)
.OrderBy(cp => cp.ShortName)
.FirstOrDefaultAsync();
if (firstUnansweredCheckPoint != null)
{
retVal = _mapper.Map<CheckPointDTO>(firstUnansweredCheckPoint);
}
}
catch (Exception ex)
{
}
return retVal;
}