* Additional Functions added to services

* Changes in MaterialTransaction mapping
This commit is contained in:
2025-04-02 21:25:13 +02:00
parent 3f0da4ba79
commit 94c4586c35
9 changed files with 86 additions and 58 deletions

View File

@@ -17,6 +17,13 @@ public class MaterialTransactionService(SytelineSaAppDbContext context, IMapper
.Where(x => x.MTGroupNum == wzNumber)
.Select(x => mapper.Map<MaterialTransactionDto>(x)).FirstOrDefaultAsync();
}
public async Task<IEnumerable<MaterialTransactionDto?>> GetByWzNumbers(ISet<string> wzNumbers)
{
return await context.MaterialTransactions
.Where(x => !string.IsNullOrWhiteSpace(x.MTGroupNum) && wzNumbers.Contains(x.MTGroupNum))
.Select(x => mapper.Map<MaterialTransactionDto>(x)).ToListAsync();
}
public async Task<IEnumerable<MaterialTransactionDto?>> GetByOrderNumber(string orderNumber)
{