Merge pull request 'deprecated alertLevel.alertLevel now using alertLevel.id' (#682) from 2950-alertlevel_to_alertlevel_id into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #682 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
5d38488ac1
|
@ -254,7 +254,7 @@ module.exports = Self => {
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped
|
SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped
|
||||||
FROM tmp.filter f
|
FROM tmp.filter f
|
||||||
LEFT JOIN alertLevel al ON al.alertLevel = f.alertLevel
|
LEFT JOIN alertLevel al ON al.id = f.alertLevel
|
||||||
WHERE (al.code = 'FREE' OR f.alertLevel IS NULL)
|
WHERE (al.code = 'FREE' OR f.alertLevel IS NULL)
|
||||||
AND f.shipped >= CURDATE()`);
|
AND f.shipped >= CURDATE()`);
|
||||||
stmts.push('CALL ticket_getProblems(FALSE)');
|
stmts.push('CALL ticket_getProblems(FALSE)');
|
||||||
|
|
|
@ -273,7 +273,7 @@ module.exports = Self => {
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped
|
SELECT f.id ticketFk, f.clientFk, f.warehouseFk, f.shipped
|
||||||
FROM tmp.filter f
|
FROM tmp.filter f
|
||||||
LEFT JOIN alertLevel al ON al.alertLevel = f.alertLevel
|
LEFT JOIN alertLevel al ON al.id = f.alertLevel
|
||||||
WHERE (al.code = 'FREE' OR f.alertLevel IS NULL)
|
WHERE (al.code = 'FREE' OR f.alertLevel IS NULL)
|
||||||
AND f.shipped >= CURDATE()`);
|
AND f.shipped >= CURDATE()`);
|
||||||
stmts.push('CALL ticket_getProblems(FALSE)');
|
stmts.push('CALL ticket_getProblems(FALSE)');
|
||||||
|
|
|
@ -9,13 +9,12 @@
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"code": {
|
"code": {
|
||||||
"type": "String",
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
"id": true,
|
"id": true,
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
|
||||||
"alertLevel": {
|
|
||||||
"type": "Number",
|
|
||||||
"id": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"acls": [
|
"acls": [
|
||||||
|
|
|
@ -9,23 +9,23 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"id": true,
|
"id": true,
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"forceId": false
|
"forceId": false
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"order": {
|
"order": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"alertLevel": {
|
"alertLevel": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"required": false
|
"required": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"ticketFk": {
|
"ticketFk": {
|
||||||
"id": true,
|
"id": true,
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"forceId": false
|
"forceId": false
|
||||||
},
|
},
|
||||||
"updated": {
|
"updated": {
|
||||||
"type": "Date"
|
"type": "date"
|
||||||
},
|
},
|
||||||
"alertLevel": {
|
"alertLevel": {
|
||||||
"type": "Number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -21,7 +21,7 @@ module.exports = app => {
|
||||||
JOIN ticket t ON t.id = e.ticketFk
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
JOIN warehouse wh ON wh.id = t.warehouseFk AND wh.hasComission
|
JOIN warehouse wh ON wh.id = t.warehouseFk AND wh.hasComission
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN alertLevel al ON al.alertLevel = ts.alertLevel
|
JOIN alertLevel al ON al.id = ts.alertLevel
|
||||||
WHERE al.code = 'PACKED'
|
WHERE al.code = 'PACKED'
|
||||||
AND DATE(t.shipped) BETWEEN DATE_ADD(?, INTERVAL -2 DAY)
|
AND DATE(t.shipped) BETWEEN DATE_ADD(?, INTERVAL -2 DAY)
|
||||||
AND util.dayEnd(?)
|
AND util.dayEnd(?)
|
||||||
|
@ -33,7 +33,7 @@ module.exports = app => {
|
||||||
await db.rawSql(`
|
await db.rawSql(`
|
||||||
UPDATE ticket t
|
UPDATE ticket t
|
||||||
JOIN ticketState ts ON t.id = ts.ticketFk
|
JOIN ticketState ts ON t.id = ts.ticketFk
|
||||||
JOIN alertLevel al ON al.alertLevel = ts.alertLevel
|
JOIN alertLevel al ON al.id = ts.alertLevel
|
||||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||||
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
||||||
JOIN zone z ON z.id = t.zoneFk
|
JOIN zone z ON z.id = t.zoneFk
|
||||||
|
@ -64,7 +64,7 @@ module.exports = app => {
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN ticket t ON t.id = e.ticketFk
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN alertLevel al ON al.alertLevel = ts.alertLevel
|
JOIN alertLevel al ON al.id = ts.alertLevel
|
||||||
WHERE al.code = 'PACKED'
|
WHERE al.code = 'PACKED'
|
||||||
AND t.id = ?
|
AND t.id = ?
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
|
@ -100,7 +100,7 @@ module.exports = app => {
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN ticket t ON t.id = e.ticketFk
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN alertLevel al ON al.alertLevel = ts.alertLevel
|
JOIN alertLevel al ON al.id = ts.alertLevel
|
||||||
WHERE al.code = 'PACKED'
|
WHERE al.code = 'PACKED'
|
||||||
AND t.agencyModeFk IN(?)
|
AND t.agencyModeFk IN(?)
|
||||||
AND t.warehouseFk = ?
|
AND t.warehouseFk = ?
|
||||||
|
@ -137,7 +137,7 @@ module.exports = app => {
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN ticket t ON t.id = e.ticketFk
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN alertLevel al ON al.alertLevel = ts.alertLevel
|
JOIN alertLevel al ON al.id = ts.alertLevel
|
||||||
WHERE al.code = 'PACKED'
|
WHERE al.code = 'PACKED'
|
||||||
AND t.routeFk = ?
|
AND t.routeFk = ?
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
|
|
Loading…
Reference in New Issue