* Introduced MaterialTransactionsController

This commit is contained in:
2025-12-13 13:14:22 +01:00
parent 309044cb0c
commit da71596fad
3 changed files with 50 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ public interface IMaterialTransactionService
{
Task<IEnumerable<MaterialTransactionDto>> GetAll();
Task<MaterialTransactionDto?> GetByWzNumber(string wzNumber);
Task<IList<MaterialTransactionDto>> GetListByWzNumber(string wzNumber);
Task<IEnumerable<MaterialTransactionDto>> GetByWzNumbers(ISet<string> wzNumbers);
Task<IEnumerable<MaterialTransactionDto>> GetByOrderNumber(string orderNumber);
Task<IEnumerable<MaterialTransactionDto>> GetOrderNumbersByWz(ISet<string> wzNumbers);

View File

@@ -18,6 +18,13 @@ public class MaterialTransactionService(SytelineSaAppDbContext context, IMapper
.Where(x => x.MTGroupNum == wzNumber)
.Select(x => mapper.Map<MaterialTransactionDto>(x)).FirstOrDefaultAsync();
}
public async Task<IList<MaterialTransactionDto>> GetListByWzNumber(string wzNumber)
{
return await context.MaterialTransactions
.Where(x => x.MTGroupNum == wzNumber)
.Select(x => mapper.Map<MaterialTransactionDto>(x)).ToListAsync();
}
public async Task<IEnumerable<MaterialTransactionDto>> GetByWzNumbers(ISet<string> wzNumbers)
{