Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: ERP Adapter response interface #418

Conversation

eschrewe
Copy link
Contributor

Description

  • added controller class for ERP adapter response interface
  • added ERP request entity, repository and service
  • added ItemStockErpAdapterService for handling incoming responses
  • added methods to ItemStockSammMapper that convert samm's to MaterialItemStock/ProductItemStock entities

Sample request body:

{
    "materialGlobalAssetId": null,
    "positions": [
        {
            "orderPositionReference": {
                "supplierOrderId": "M-Nbr-4711",
                "customerOrderId": "C-Nbr-4711",
                "customerOrderPositionId": "PositionId-01"
            },
            "allocatedStocks": [
                {
                    "isBlocked": false,
                    "stockLocationBPNA": "BPNA4444444444AA",
                    "lastUpdatedOnDateTime": "2023-04-28T14:23:00.123456+14:00",
                    "quantityOnAllocatedStock": {
                        "value": 22.0,
                        "unit": "unit:piece"
                    },
                    "stockLocationBPNS": "BPNS4444444444XX"
                }
            ]
        },
        {
            "orderPositionReference": {
                "supplierOrderId": "M-Nbr-4711",
                "customerOrderId": "C-Nbr-4711",
                "customerOrderPositionId": "PositionId-03"
            },
            "allocatedStocks": [
                {
                    "isBlocked": false,
                    "stockLocationBPNA": "BPNA4444444444AA",
                    "lastUpdatedOnDateTime": "2023-04-28T14:23:00.123456+14:00",
                    "quantityOnAllocatedStock": {
                        "value": 66.0,
                        "unit": "unit:piece"
                    },
                    "stockLocationBPNS": "BPNS4444444444XX"
                }
            ]
        },
                {
            "orderPositionReference": {
                "supplierOrderId": "M-Nbr-4711",
                "customerOrderId": "C-Nbr-4711",
                "customerOrderPositionId": "PositionId-02"
            },
            "allocatedStocks": [
                {
                    "isBlocked": true,
                    "stockLocationBPNA": "BPNA4444444444AA",
                    "lastUpdatedOnDateTime": "2023-04-28T14:23:00.123456+14:00",
                    "quantityOnAllocatedStock": {
                        "value": 44.0,
                        "unit": "unit:piece"
                    },
                    "stockLocationBPNS": "BPNS4444444444XX"
                }
            ]
        }
    ],
    "direction": "INBOUND"
}

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

Copy link
Contributor

@tom-rm-meyer-ISST tom-rm-meyer-ISST left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Mostly small things :) I created an issue for things we still should clarify and update afterwards

Copy link
Contributor

@tom-rm-meyer-ISST tom-rm-meyer-ISST left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fast implementation!

@tom-rm-meyer-ISST tom-rm-meyer-ISST merged commit 8d96e81 into eclipse-tractusx:main May 29, 2024
12 checks passed
@tom-rm-meyer-ISST tom-rm-meyer-ISST deleted the feat/erp_adapter_response_interface branch May 29, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants