Skip to main content

Acheminement direct du PRED à l'installation de traitement

graph LR AO(NO STATE) -->|createBsdasri| A(INITIAL) A -->|"signBsdasri (EMISSION)"| B(SIGNED_BY_PRODUCER) B -->|updateBsdasri| B B -->|"signBsdasri (TRANSPORT)"| C(SENT) C -->|updateBsdasri| C C -->|"signBsdasri (RECEPTION)"| D(RECEIVED) D -->|updateBsdasri| D D -->|"signBsdasri (OPERATION)"| PROCESSED

Les informations du BSDASRI (PRED, transporteur, destinataire, déchets) sont remplies.
mutation CreateBsdasri($input: BsdasriCreateInput!) {  createBsdasri(input: $input) {    id    status  }}
{  "input": {    "emitter": {      "company": {        "siret": "SIRET_PRODUCTEUR",        "name": "Hopital Saint Denis",        "address": "40 rue du médecin, 93200 Saint Denis",        "mail": "contact@hsd.fr",        "contact": "Docteur Brun",        "phone": "06 06 06 06 06"      },      "type": "PRODUCER"    },    "emission": {      "wasteCode": "18 01 03*",      "wasteDetails": {        "quantity": {          "value": 1,          "type": "REAL"        },        "onuCode": "non soumis",        "packagingInfos": [          {            "type": "BOITE_CARTON",            "quantity": 1,            "volume": 1          }        ]      }    },    "recipient": {      "company": {        "siret": "SIRET_TRAITEUR",        "name": "Traiteur Inc",        "address": "14 rue des acacias, 68100 Mulhouse",        "mail": "contact@traiteur.co",        "contact": "Bob Lapointe",        "phone": "07 01 00 00 00"      }    },    "transporter": {      "company": {        "siret": "SIRET_TRANSPORTEUR",        "name": "Transport Inc",        "address": "6 rue des 7 chemins, 07100 ANNONAY",        "mail": "contact@transport.co",        "phone": "07 00 00 00 00",        "contact": "John Antoine"      },      "receipt": "KIH-458-87",      "receiptDepartment": "07",      "receiptValidityLimit": "2022-01-01"    }  }}
L'émetteur signe le BSDASRI
mutation SignBsdasri($id: ID!, $input: BsdasriSignatureInput!) {  signBsdasri(id: $id, input: $input) {    id    status  }}
{  "id": "ID_BSD",  "input": {    "type": "EMISSION",    "author": "Dr Brun"  }}
Les informations de transport sont complétées
mutation UpdateBsdasri($id: ID!, $input: BsdasriUpdateInput!) {  updateBsdasri(id: $id, input: $input) {    id    status  }}
{  "id": "ID_BSD",  "input": {    "transport": {      "wasteAcceptation": {        "status": "ACCEPTED"      },      "wasteDetails": {        "quantity": {          "value": 1,          "type": "REAL"        },        "packagingInfos": [          {            "type": "BOITE_CARTON",            "quantity": 1,            "volume": 1          }        ]      },      "takenOverAt": "2022-04-27"    }  }}
Le transporteur signe le BSDASRI
mutation SignBsdasri($id: ID!, $input: BsdasriSignatureInput!) {  signBsdasri(id: $id, input: $input) {    id    status  }}
{  "id": "ID_BSD",  "input": {    "type": "TRANSPORT",    "author": "John"  }}
Les informations de réception sont complétées
mutation UpdateBsdasri($id: ID!, $input: BsdasriUpdateInput!) {  updateBsdasri(id: $id, input: $input) {    id    status  }}
{  "id": "ID_BSD",  "input": {    "reception": {      "wasteAcceptation": {        "status": "ACCEPTED"      },      "wasteDetails": {        "volume": 1,        "packagingInfos": [          {            "type": "BOITE_CARTON",            "quantity": 1,            "volume": 1          }        ]      },      "receivedAt": "2021-04-27"    }  }}
Le traiteur signe les informations de réception
mutation SignBsdasri($id: ID!, $input: BsdasriSignatureInput!) {  signBsdasri(id: $id, input: $input) {    id    status  }}
{  "id": "ID_BSD",  "input": {    "type": "RECEPTION",    "author": "Bob"  }}
Les informations de l'opération sont complétées
mutation UpdateBsdasri($id: ID!, $input: BsdasriUpdateInput!) {  updateBsdasri(id: $id, input: $input) {    id    status  }}
{  "id": "ID_BSD",  "input": {    "operation": {      "quantity": {        "value": 1,        "type": "REAL"      },      "processingOperation": "D10",      "processedAt": "2020-04-28"    }  }}
Le traiteur signe les informations de l'opération
mutation SignBsdasri($id: ID!, $input: BsdasriSignatureInput!) {  signBsdasri(id: $id, input: $input) {    id    status  }}
{  "id": "ID_BSD",  "input": {    "type": "OPERATION",    "author": "John"  }}