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: BsdasriInput!) {
createBsdasri(input: $input) {
id
status
}
}
{
"input": {
"waste": {
"code": "18 01 03*",
"adr": "non soumis"
},
"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"
},
"emission": {
"weight": {
"value": 1,
"isEstimate": false
},
"packagings": [
{
"type": "BOITE_CARTON",
"quantity": 1,
"volume": 1
}
]
}
},
"destination": {
"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"
}
}
}
}
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: BsdasriInput!) {
updateBsdasri(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"transporter": {
"transport": {
"acceptation": {
"status": "ACCEPTED"
},
"weight": {
"value": 1,
"isEstimate": false
},
"packagings": [
{
"type": "BOITE_CARTON",
"quantity": 1,
"volume": 1
}
],
"plates": [
"XX-000-XX"
],
"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: BsdasriInput!) {
updateBsdasri(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"destination": {
"reception": {
"acceptation": {
"status": "ACCEPTED"
},
"packagings": [
{
"type": "BOITE_CARTON",
"quantity": 1,
"volume": 1
}
],
"date": "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: BsdasriInput!) {
updateBsdasri(id: $id, input: $input) {
id
status
}
}
{
"id": "ID_BSD",
"input": {
"destination": {
"operation": {
"weight": {
"value": 1
},
"code": "D10",
"mode": "ELIMINATION",
"date": "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"
}
}