refs #5630 feat: borrar expediciones de GLS
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a477bb32ad
commit
a499f7c633
|
@ -35,6 +35,11 @@ module.exports = Self => {
|
|||
try {
|
||||
const promises = [];
|
||||
for (let expeditionId of expeditionIds) {
|
||||
const glsExpedition = await models.GlsExpedition.findById(expeditionId);
|
||||
if (glsExpedition) {
|
||||
const barcode = glsExpedition.barcode;
|
||||
}
|
||||
|
||||
const deletedExpedition = models.Expedition.destroyById(expeditionId, myOptions);
|
||||
promises.push(deletedExpedition);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
"ExpeditionState": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"GlsExpedition": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Packaging": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "GlsExpedition",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "glsExpedition"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"expeditionFk": {
|
||||
"id": true,
|
||||
"type": "number",
|
||||
"description": "Identifier"
|
||||
},
|
||||
"barcode": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"expedition": {
|
||||
"type": "belongsTo",
|
||||
"model": "Expedition",
|
||||
"foreignKey": "expeditionFk"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue