* Added new Enrichers

* Added new Translators
* Changed in DTOs
* Further development
This commit is contained in:
2025-08-25 14:25:16 +02:00
parent cd3d939efe
commit 8b67aa3851
7 changed files with 94 additions and 10 deletions

View File

@@ -73,6 +73,29 @@ namespace SytelineSaAppEfDataModel.Services
.Select(x => mapper.Map<CustomerOrderDto>(x)).FirstOrDefaultAsync();
}
public async Task<IList<CustomerOrderDto>> GetListByCustomerAndPo(string customerNumber, int customerSequence,
string poNumber)
{
return await context.CustomerOrders
.Where(x => x.CustNum == customerNumber && x.CustSeq == customerSequence && x.CustPo == poNumber)
.Select(x => mapper.Map<CustomerOrderDto>(x)).ToListAsync();
}
public async Task<List<CustomerOrderDto>> GetListByCustomer(string customerNumber, int customerSequence)
{
return await context.CustomerOrders.Where(x => x.CustNum == customerNumber && x.CustSeq == customerSequence)
.Select(x => mapper.Map<CustomerOrderDto>(x)).ToListAsync();
}
public async Task<IEnumerable<CustomerOrderLineDto>?> GetLinesByCoNumber(string customerOrderNumber)
{
List<CustomerOrderLineDto> customerOrderLines = await context.CustomerOrderLines
.Where(x => x.CoNum == customerOrderNumber).Select(x => mapper.Map<CustomerOrderLineDto>(x))
.ToListAsync();
return customerOrderLines;
}
public async Task<IEnumerable<CustomerOrderLineItemDto>?> GetItemsByCoNumber(string customerOrderNumber)
{
List<CustomerOrderLineItemDto> customerOrderLineItems = await context.CustomerOrderLineItems

View File

@@ -13,6 +13,12 @@ namespace SytelineSaAppEfDataModel.Services
Task<CustomerOrderDto?> GetByOrderNumber(Guid orderNumber);
Task<CustomerOrderDto?> GetByCoNumber(string orderNumber);
Task<CustomerOrderDto?> GetByCustomerAndPo(string customerNumber, int customerSequence, string poNumber);
Task<IList<CustomerOrderDto>> GetListByCustomerAndPo(string customerNumber, int customerSequence,
string poNumber);
Task<List<CustomerOrderDto>> GetListByCustomer(string customerNumber, int customerSequence);
Task<IEnumerable<CustomerOrderLineDto>?> GetLinesByCoNumber(string customerOrderNumber);
Task<IEnumerable<CustomerOrderLineItemDto>?> GetItemsByCoNumber(string customerOrderNumber);
}
}