* Extended DataModels by Customer and CustomerTp

* Added new services and controllers for both models
This commit is contained in:
2025-08-21 05:39:08 +02:00
parent d7210417f5
commit f400c35c60
9 changed files with 374 additions and 297 deletions

View File

@@ -65,6 +65,14 @@ namespace SytelineSaAppEfDataModel.Services
return customerOrder;
}
public async Task<CustomerOrderDto?> GetByCustomerAndPo(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)).FirstOrDefaultAsync();
}
public async Task<IEnumerable<CustomerOrderLineItemDto>?> GetItemsByCoNumber(string customerOrderNumber)
{
List<CustomerOrderLineItemDto> customerOrderLineItems = await context.CustomerOrderLineItems