* Introduced MaterialTransactionsController
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user