-
Notifications
You must be signed in to change notification settings - Fork 10
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: implemented days of supply edc integration #694
feat: implemented days of supply edc integration #694
Conversation
...src/main/java/org/eclipse/tractusx/puris/backend/demand/logic/services/OwnDemandService.java
Fixed
Show fixed
Hide fixed
.../java/org/eclipse/tractusx/puris/backend/supply/logic/dto/daysofsupplysamm/DaysOfSupply.java
Dismissed
Show dismissed
Hide dismissed
...a/org/eclipse/tractusx/puris/backend/supply/logic/service/DaysOfSupplyRequestApiService.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, and sorry for the late review. Got some smaller changes. Likely we should instead of solving a few things open issues to do a refactoring.
The updates broke the following test cases of the bruno collection
- Test_02-EDC/Check from Customer POV/Query catalog for Submodel Assets
- Test_02-EDC/Check from Supplier POV/Query catalog for Submodel Assets
The test, Test_01-MAD/01_01-Init/Customer/MAD/Get All Partners has been missed by me during a recent fix. - Also the ShellDescriptors should be checked regarding the new submodels
I'm wondering if this should also be handled with a separate pr and if we should do the PR also against a feature branch. Then we could handle the quick things in this pr. Additional stuff (update bruno collection, some javadoc) on the branch, too and we just merge the feature fully. Feel free to also reach out to me via MS teams to quickly align here.
backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/domain/model/AssetType.java
Outdated
Show resolved
Hide resolved
...main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/org/eclipse/tractusx/puris/backend/common/util/VariablesService.java
Outdated
Show resolved
Hide resolved
...a/org/eclipse/tractusx/puris/backend/supply/controller/DaysOfSupplyRequestApiController.java
Outdated
Show resolved
Hide resolved
...main/java/org/eclipse/tractusx/puris/backend/supply/logic/service/CustomerSupplyService.java
Show resolved
Hide resolved
...a/org/eclipse/tractusx/puris/backend/supply/logic/service/DaysOfSupplyRequestApiService.java
Show resolved
Hide resolved
if (direction == DirectionCharacteristic.OUTBOUND) { | ||
List<List<OwnSupplierSupply>> suppliesBySite = new ArrayList<>(); | ||
for (var site : sites) { | ||
var supplierSupply = supplierSupplyService.calculateSupplierDaysOfSupply( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very often mix up the perspective. Some Javadoc would be nice, if this doesn't explode the pr length. Else it could be a follow up issue. Also e.g. Javadoc in Controller SupplyController
is confusing. Endpoint description for method getCustomerDaysOfSupply
leaves room to interpretation. It's the endpoint to calculate your own days of supply with direction inbound for a supplier partner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the handling of DirectionCharacteristic and the role perspectives need to be checked separately. While developing other features and investigating bugs I came across potential issues with inconsistencies in the logic. We should try to make an effort to make sure it's always consistent and more transparent.
for (var reportedCustomerSupply : reportedCustomerSupplies) { | ||
var supplyPartner = reportedCustomerSupply.getPartner(); | ||
var supplyMaterial = reportedCustomerSupply.getMaterial(); | ||
if (!partner.equals(supplyPartner) || !material.equals(supplyMaterial)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, regarding my comment in DaysOfSupplySammMapper)
: we're consistent with other handlings. I'm wondering if we should handle this validation within the samm mapper or the validation of the entity. Currently it's to some extent distributed and I don't remember a reason (could be historic growing). But this refactoring is not part of this pr.
...main/java/org/eclipse/tractusx/puris/backend/supply/logic/service/SupplierSupplyService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for incorporating. Just a small version change missing. You can directly commit via suggestion! Re-request review for merge
backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/domain/model/AssetType.java
Outdated
Show resolved
Hide resolved
...main/java/org/eclipse/tractusx/puris/backend/supply/logic/service/CustomerSupplyService.java
Show resolved
Hide resolved
...ain/java/org/eclipse/tractusx/puris/backend/supply/logic/adapter/DaysOfSupplySammMapper.java
Show resolved
Hide resolved
...ain/java/org/eclipse/tractusx/puris/backend/supply/logic/adapter/DaysOfSupplySammMapper.java
Show resolved
Hide resolved
Co-authored-by: Tom Meyer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, issues for remaining comments will be creaed by @ReneSchroederLJ (feel free to link the pr and close the issues).
Helm-Chart Link is ignored on purpose. Version Bump will be done during release.
1bf86a2
into
eclipse-tractusx:main
Description
reolves #312
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review: