Skip to main content

Acheminement d'un centre VHU vers un broyeur

graph LR AO(NO STATE) -->|createBsvhu| A(INITIAL) A -->|"signBsvhu (EMISSION)"| B(SIGNED_BY_PRODUCTER) B -->|updateBsvhu| B B -->|"signBsvhu (TRANSPORT)"| C(SENT) C -->|updateBsvhu| C C -->|"signBsvhu (OPERATION)"| D(PROCESSED)

Création du BSVHU
mutation CreateBsvhu($input: BsvhuInput!) {
createBsvhu(input: $input) {
id
status
}
}
{
"input": {
"emitter": {
"agrementNumber": "1234",
"company": {
"siret": "SIRET_PRODUCTEUR",
"name": "Casse auto",
"address": "1 rue de paradis, 75010 PARIS",
"contact": "Jean Voiture",
"phone": "01 00 00 00 00",
"mail": "jean.voiture@vhu.fr"
}
},
"wasteCode": "16 01 06",
"packaging": "UNITE",
"identification": {
"numbers": [
"123",
"456"
],
"type": "NUMERO_ORDRE_REGISTRE_POLICE"
},
"quantity": 2,
"weight": {
"value": 1.3,
"isEstimate": false
},
"transporter": {
"company": {
"siret": "SIRET_TRANSPORTEUR",
"name": "Transport Inc",
"address": "1 rue des 6 chemins, 07100 Annonay",
"contact": "Jean Dupont",
"phone": "01 00 00 00 00",
"mail": "transport.dupont@transporter.fr"
}
},
"destination": {
"type": "BROYEUR",
"agrementNumber": "456",
"plannedOperationCode": "R 12",
"company": {
"siret": "SIRET_BROYEUR",
"name": "Broyeur du Sud Est",
"address": "4 boulevard Longchamp, 13001 Marseille",
"contact": "Tom Broyeur",
"phone": "01 00 00 00 00",
"mail": "tom@broyeur.fr"
}
}
}
}
Le producteur procède ensuite à la signature
mutation SignBsvhu($id: ID!, $input: BsvhuSignatureInput!) {
signBsvhu(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"type": "EMISSION",
"author": "Jean VHU"
}
}
Le transporteur complète ensuite ses données
mutation UpdateBsvhu($id: ID!, $input: BsvhuInput!) {
updateBsvhu(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"transporter": {
"recepisse": {
"isExempted": false,
"number": "recepisse number",
"department": "75",
"validityLimit": "2020-06-30"
}
}
}
}
Le producteur procède ensuite à la signature
mutation SignBsvhu($id: ID!, $input: BsvhuSignatureInput!) {
signBsvhu(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"type": "TRANSPORT",
"author": "Patrick"
}
}
Le broyeur édite ses données
mutation UpdateBsvhu($id: ID!, $input: BsvhuInput!) {
updateBsvhu(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"destination": {
"reception": {
"weight": 1.4,
"acceptationStatus": "ACCEPTED"
},
"operation": {
"date": "2021-04-27",
"code": "R 12"
}
}
}
}
Le broyeur procède ensuite à la signature
mutation SignBsvhu($id: ID!, $input: BsvhuSignatureInput!) {
signBsvhu(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"type": "OPERATION",
"author": "Henri Broyeur"
}
}