* Further improvements

This commit is contained in:
2025-06-17 22:05:15 +02:00
parent a8e3a8be66
commit 30d2984add
6 changed files with 133 additions and 58 deletions

View File

@@ -11,4 +11,5 @@ public interface IMaterialTransactionService
Task<IEnumerable<MaterialTransactionDto>> GetOrderNumbersByWz(ISet<string> wzNumbers);
Task<IEnumerable<MaterialTransactionDto>> GetByCustomerNumber(string customerNumber, int customerSequence);
Task<MaterialTransactionDto?> GetByPartNumber(string partNumber);
Task<IEnumerable<MaterialTransactionDto>> GetWithPartNumber();
}

View File

@@ -90,4 +90,11 @@ public class MaterialTransactionService(SytelineSaAppDbContext context, IMapper
.Where(x => x.NR_KARTY_KONTROLNEJ == partNumber)
.Select(x => mapper.Map<MaterialTransactionDto>(x)).FirstOrDefaultAsync();
}
public async Task<IEnumerable<MaterialTransactionDto>> GetWithPartNumber()
{
return await context.MaterialTransactions
.Where(x => x.NR_KARTY_KONTROLNEJ != null)
.Select(x => mapper.Map<MaterialTransactionDto>(x)).ToListAsync();
}
}