forked from eclipse-tractusx/traceability-foss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug(tx-backend): #546 fix issue with one type of bom lifecycle in imp…
…ort file
- Loading branch information
1 parent
5642f9d
commit b16a5df
Showing
5 changed files
with
211 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
tx-backend/src/test/resources/testdata/importfiles/validImportFile-onlyAsBuiltAsset.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"assets": [ | ||
{ | ||
"assetMetaInfo": { | ||
"catenaXId": "urn:uuid:6b2296cc-26c0-4f38-8a22-092338c36111" | ||
}, | ||
"submodels": [ | ||
{ | ||
"aspectType": "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart", | ||
"payload": { | ||
"localIdentifiers": [ | ||
{ | ||
"value": "BPNL00000003AXS3", | ||
"key": "manufacturerId" | ||
}, | ||
{ | ||
"value": "3500011-11", | ||
"key": "manufacturerPartId" | ||
}, | ||
{ | ||
"value": "OMAOYGBDTSRCMYSCX", | ||
"key": "partInstanceId" | ||
}, | ||
{ | ||
"value": "OMAOYGBDTSRCMYSCX", | ||
"key": "van" | ||
} | ||
], | ||
"manufacturingInformation": { | ||
"date": "2024-01-15T04:15:57.000Z", | ||
"country": "DEU" | ||
}, | ||
"catenaXId": "urn:uuid:6b2296cc-26c0-4f38-8a22-092338c36111", | ||
"partTypeInformation": { | ||
"manufacturerPartId": "3500011-11", | ||
"classification": "product", | ||
"nameAtManufacturer": "a/dev Test Produkt AB" | ||
} | ||
} | ||
}, | ||
{ | ||
"aspectType": "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt", | ||
"payload": { | ||
"catenaXId": "urn:uuid:6b2296cc-26c0-4f38-8a22-092338c36111", | ||
"childItems": [ | ||
{ | ||
"quantity": { | ||
"quantityNumber": 1, | ||
"measurementUnit": "unit:piece" | ||
}, | ||
"hasAlternatives": true, | ||
"createdOn": "2022-02-03T14:48:54.709Z", | ||
"lastModifiedOn": "2022-02-03T14:48:54.709Z", | ||
"catenaXId": "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd", | ||
"businessPartner": "BPNL00000003CNKC" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"aspectType": "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt", | ||
"payload": { | ||
"catenaXId": "urn:uuid:6b2296cc-26c0-4f38-8a22-092338c36111", | ||
"customers": [ | ||
{ | ||
"parentItems": [ | ||
{ | ||
"quantity": { | ||
"quantityNumber": 1, | ||
"measurementUnit": "unit:piece" | ||
}, | ||
"catenaXId": "urn:uuid:f11ddc62-3bd5-468f-b7b0-110fe13ed0cd", | ||
"createdOn": "2023-04-13T14:48:54.709Z", | ||
"lastModifiedOn": "2023-02-03T14:48:54.709Z" | ||
} | ||
], | ||
"businessPartner": "BPNL00000003CNKC", | ||
"createdOn": "2023-02-03T14:48:54.709Z", | ||
"lastModifiedOn": "2023-02-03T14:48:54.709Z" | ||
} | ||
] | ||
} | ||
} | ||
|
||
] | ||
} | ||
] | ||
} |
62 changes: 62 additions & 0 deletions
62
tx-backend/src/test/resources/testdata/importfiles/validImportFile-onlyAsPlannedAsset.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"assets" : [ | ||
{ | ||
"assetMetaInfo" : { | ||
"catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01" | ||
}, | ||
"submodels" : [ | ||
{ | ||
"aspectType" : "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned", | ||
"payload" : { | ||
"validityPeriod" : { | ||
"validFrom" : "2019-04-04T03:19:03.000Z", | ||
"validTo" : "2024-12-29T10:25:12.000Z" | ||
}, | ||
"catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01", | ||
"partTypeInformation" : { | ||
"manufacturerPartId" : "7805659-25", | ||
"classification" : "product", | ||
"nameAtManufacturer" : "b/test Vehicle Model B" | ||
} | ||
} | ||
}, | ||
{ | ||
"aspectType" : "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned", | ||
"payload" : { | ||
"catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01", | ||
"childItems" : [ | ||
{ | ||
"validityPeriod" : { | ||
"validFrom" : "2023-03-21T08:17:29.187+01:00", | ||
"validTo" : "2024-07-01T16:10:00.000+01:00" | ||
}, | ||
"quantity" : { | ||
"quantityNumber" : 1, | ||
"measurementUnit" : "unit:piece" | ||
}, | ||
"createdOn" : "2022-09-03T14:48:54.709Z", | ||
"lastModifiedOn" : "2022-02-03T14:48:54.709Z", | ||
"catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4da01", | ||
"businessPartner" : "BPNL00000003CML1" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"aspectType" : "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned", | ||
"payload" : { | ||
"catenaXId" : "urn:uuid:0733946c-59c6-41ae-9570-cb43a6e4eb01", | ||
"sites" : [ | ||
{ | ||
"functionValidUntil" : "2025-02-08T04:30:48.000Z", | ||
"function" : "production", | ||
"functionValidFrom" : "2019-08-21T02:10:36.000Z", | ||
"catenaXSiteId" : "BPNS000004711DMY" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |