Skip to content

Commit

Permalink
Merge pull request #180 from catenax-ng/DST_PIP10_Sprint1_batch_2.0.0
Browse files Browse the repository at this point in the history
Support Batch 2.0.0 changes
  • Loading branch information
adityagajbhiye9 authored Aug 25, 2023
2 parents 3eac752 + 15af2f1 commit e54e9c9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 45 deletions.
12 changes: 5 additions & 7 deletions modules/sde-submodules/batch/batch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
This module use for Batch submodel specification and descriptors. It's contain the codes related to Batch to validate, parse and transfer data for DigitalTwins and EDC to create aspect twins and data offer.

---
#### Version: 1.0.2
#### Batch Aspect Model URN: urn:bamm:io.catenax.batch:1.0.2#Batch
#### Semantic Id: urn:bamm:io.catenax.batch:1.0.2
#### Version: 2.0.0
#### Batch Aspect Model URN: urn:bamm:io.catenax.batch:2.0.0#Batch
#### Semantic Id: urn:samm:io.catenax.batch:2.0.0
---

### Schema
Expand All @@ -27,10 +27,8 @@ Please find below links for schema details:
| manufacturing_date | Yes | 4 |
| manufacturing_country | No | 5 |
| manufacturer_part_id | Yes | 6 |
| customer_part_id | No | 7 |
| classification | Yes | 8 |
| name_at_manufacturer | Yes | 9 |
| name_at_customer | No | 10 |
| classification | Yes | 7 |
| name_at_manufacturer | Yes | 8 |


#### [CSV Sample File Link]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,10 @@ public class BatchEntity implements Serializable {
private String manufacturingCountry;
@Column(name = "manufacturer_part_id")
private String manufacturerPartId;
@Column(name = "customer_part_id")
private String customerPartId;
@Column(name = "classification")
private String classification;
@Column(name = "name_at_manufacturer")
private String nameAtManufacturer;
@Column(name = "name_at_customer")
private String nameAtCustomer;
@Column(name = "shell_id")
private String shellId;
@Column(name = "sub_model_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ public JsonObject mapToResponse(BatchEntity entity) {

PartTypeInformation partTypeInformation = PartTypeInformation.builder()
.manufacturerPartId(entity.getManufacturerPartId())
.customerPartId(entity.getCustomerPartId())
.classification(entity.getClassification())
.nameAtManufacturer(entity.getNameAtManufacturer())
.nameAtCustomer(entity.getNameAtCustomer())
.build();

return new Gson().toJsonTree(SubmodelResultResponse.builder().localIdentifiers(localIdentifiers)
Expand Down
4 changes: 2 additions & 2 deletions modules/sde-submodules/batch/src/main/resources/batch.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
uuid;batch_id;part_instance_id;manufacturing_date;manufacturing_country;manufacturer_part_id;customer_part_id;classification;name_at_manufacturer;name_at_customer;optional_identifier_key;optional_identifier_value
urn:uuid:8eea5f45-0823-48ce-a4fc-c3bf1f8ff4c2;BIDNO345678;PIDNO678905;2022-02-05T14:48:54;HUR;122-0.740-3430-A;PRT-NO345;product;Mirror left;side element A;;
uuid;batch_id;part_instance_id;manufacturing_date;manufacturing_country;manufacturer_part_id;classification;name_at_manufacturer;
urn:uuid:8eea5f45-0823-48ce-a4fc-c3bf1f8ff4c2;BIDNO345678;PIDNO678905;2022-02-05T14:48:54;HUR;122-0.740-3430-A;product;Mirror left
32 changes: 4 additions & 28 deletions modules/sde-submodules/batch/src/main/resources/batch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"type": "array",
"id": "batch",
"idShort": "Batch",
"version": "1.0.2",
"semantic_id": "urn:bamm:io.catenax.batch:1.0.2#Batch",
"version": "2.0.0",
"semantic_id": "urn:samm:io.catenax.batch:2.0.0#Batch",
"title": "Batch",
"shortDescription": "BoM AsBuilt - Submodel Batch",
"description": "A batch is a quantity of (semi-) finished products or (raw) material product that have been produced under the same circumstances (e.g. same production location), as specified groups or amounts, within a certain time frame. Every batch can differ in the number or amount of products. Different batches can have varied specifications, e.g., different colors. A batch is identified via a Batch ID.",
Expand Down Expand Up @@ -280,17 +280,6 @@
"37754B7-76"
]
},
"customer_part_id": {
"type": [
"string",
"null"
],
"title": "Customer Part ID",
"description": "Part ID as assigned by the manufacturer of the part. The Part ID identifies the part (as designed) in the customer`s dataspace. The Part ID does not reference a specific instance of a part and thus should not be confused with the serial number or batch number. Note: This property may only be populated in case there is a single customer for the batch.",
"examples": [
"37754B7-76"
]
},
"classification": {
"type": [
"string"
Expand Down Expand Up @@ -319,32 +308,19 @@
"examples": [
"Sensor"
]
},
"name_at_customer": {
"type": [
"string",
"null"
],
"title": "Name At Customer",
"description": "Name of the part as assigned by the customer",
"examples": [
"Customer"
]
}
}
},
"examples": [
{
"uuid": "urn:uuid:8eea5f45-0823-48ce-a4fc-c3bf1cdfa4c2",
"batch_id": "NO-159040131155901488695376",
"part_instance_id":"PINO-34634534535",
"part_instance_id": "PINO-34634534535",
"manufacturing_date": "2022-02-04T14:48:54.709Z",
"manufacturing_country": "DEU",
"manufacturer_part_id": "37754B7-76",
"customer_part_id": "37754B7-76",
"classification": "component",
"name_at_manufacturer": "Sensor",
"name_at_customer": "Sensor"
"name_at_manufacturer": "Sensor"
}
]
}
4 changes: 2 additions & 2 deletions modules/sde-submodules/submodules.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Currently SDE supports below submodels.
### Supported Models

#### [serial-part-typization in Version 1.1.1]
#### [batch in Version 1.0.2]
#### [batch in Version 2.0.0]
#### [assembly-part-relationship in Version 1.1.1]
#### [partAsPlanned in Version 1.0.0]
#### [singleLevelBoMAsPlanned in Version 1.0.1]
Expand All @@ -36,7 +36,7 @@ Once your maven module ready just do the clean build and install so submodel wil


[serial-part-typization in Version 1.1.1]: serial-part-typization/serial-part-typization.md
[batch in Version 1.0.2]: batch/batch.md
[batch in Version 2.0.0]: batch/batch.md
[assembly-part-relationship in Version 1.1.1]: assembly-part-relationship/assembly-part-relationship.md
[partAsPlanned in Version 1.0.0]: part-as-planned/part-as-planned.md
[singleLevelBoMAsPlanned in Version 1.0.1]: single-level-bom-as-planned/single-level-bom-as-planned.md
Expand Down

0 comments on commit e54e9c9

Please sign in to comment.