Most működik egy tesztelhető verzió.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user