From bfd6e1f39843abb02694fa2ebdb52e95df4f2bd4 Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 16 Nov 2023 08:29:00 +0100 Subject: [PATCH 1/7] refactor: refs #4502 Deleted zoneEstimatedDelivery --- .../back/methods/sales-monitor/salesFilter.js | 71 ++++++++----- modules/order/back/methods/order/filter.js | 99 ++++++++++++------- modules/zone/back/model-config.json | 3 - .../back/models/zone-estimated-delivery.json | 44 --------- 4 files changed, 112 insertions(+), 105 deletions(-) delete mode 100644 modules/zone/back/models/zone-estimated-delivery.json diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 693ae122f..85945a57d 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -163,17 +163,14 @@ module.exports = Self => { const stmts = []; let stmt; - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter'); - stmts.push(`SET @_optimizer_search_depth = @@optimizer_search_depth`); stmts.push(`SET SESSION optimizer_search_depth = 0`); - stmt = new ParameterizedSQL( - `CREATE TEMPORARY TABLE tmp.filter + stmt = new ParameterizedSQL(` + CREATE OR REPLACE TEMPORARY TABLE tmp.filter (PRIMARY KEY (id)) ENGINE = MEMORY - SELECT - t.id, + SELECT t.id, t.shipped, CAST(DATE(t.shipped) AS CHAR) AS shippedDate, t.nickname, @@ -183,27 +180,27 @@ module.exports = Self => { t.clientFk, t.totalWithoutVat, t.totalWithVat, - io.id AS invoiceOutId, + io.id invoiceOutId, a.provinceFk, - p.name AS province, - w.name AS warehouse, - am.name AS agencyMode, - am.id AS agencyModeFk, - st.name AS state, - wk.lastName AS salesPerson, - ts.stateFk AS stateFk, - ts.alertLevel AS alertLevel, - ts.code AS alertLevelCode, - u.name AS userName, + p.name province, + w.name warehouse, + am.name agencyMode, + am.id agencyModeFk, + st.name state, + wk.lastName salesPerson, + ts.stateFk stateFk, + ts.alertLevel alertLevel, + ts.code alertLevelCode, + u.name userName, c.salesPersonFk, c.credit, - z.hour AS zoneLanding, - z.name AS zoneName, - z.id AS zoneFk, + z.hour zoneLanding, + z.name zoneName, + z.id zoneFk, st.classColor, - TIME_FORMAT(t.shipped, '%H:%i') AS preparationHour, - TIME_FORMAT(z.hour, '%H:%i') AS theoreticalhour, - TIME_FORMAT(zed.etc, '%H:%i') AS practicalHour + TIME_FORMAT(t.shipped, '%H:%i') preparationHour, + TIME_FORMAT(z.hour, '%H:%i') theoreticalhour, + TIME_FORMAT(zed.etc, '%H:%i') practicalHour FROM ticket t LEFT JOIN invoiceOut io ON t.refFk = io.ref LEFT JOIN zone z ON z.id = t.zoneFk @@ -216,7 +213,33 @@ module.exports = Self => { LEFT JOIN client c ON c.id = t.clientFk LEFT JOIN worker wk ON wk.id = c.salesPersonFk LEFT JOIN account.user u ON u.id = wk.id - LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`); + LEFT JOIN ( + SELECT zoneFk, + CAST(zoneHour + remainingVolume * 60 / speed AS time) etc + FROM ( + SELECT t.zoneFk, + IFNULL(zc.hour, z.hour) zoneHour, + SUM(IF(al.hasToRecalcPrice, sv.volume, 0)) remainingVolume, + GREATEST(IFNULL(lhp.m3, 0), IFNULL(dl.minSpeed, 0)) speed + FROM ticket t + JOIN ticketStateToday tst ON tst.ticket = t.id + JOIN state s ON s.id = tst.state + JOIN saleVolume sv ON sv.ticketFk = t.id + LEFT JOIN lastHourProduction lhp ON lhp.warehouseFk = t.warehouseFk + JOIN warehouse w ON w.id = t.warehouseFk + JOIN warehouseAlias wa ON wa.id = w.aliasFk + STRAIGHT_JOIN zone z ON z.id = t.zoneFk + LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk + AND zc.dated = util.VN_CURDATE() + LEFT JOIN cache.departure_limit dl ON dl.warehouse_id = t.warehouseFk + AND dl.fecha = util.VN_CURDATE() + JOIN alertLevel al ON al.id = s.alertLevel + WHERE w.hasProduction + AND DATE(t.shipped) = util.VN_CURDATE() + GROUP BY t.zoneFk + ) sub + ) zed ON zed.zoneFk = t.zoneFk` + ); if (args.orderFk) { stmt.merge({ diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 44d8ccb10..27484acb9 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -140,40 +140,71 @@ module.exports = Self => { const stmts = []; let stmt; - stmt = new ParameterizedSQL( - `CREATE OR REPLACE TEMPORARY TABLE tmp.filter - (INDEX (id)) - ENGINE = MEMORY - SELECT - o.id, - o.total, - o.date_send landed, - o.date_make created, - o.customer_id clientFk, - o.agency_id agencyModeFk, - o.address_id addressFk, - o.company_id companyFk, - o.source_app sourceApp, - o.confirmed isConfirmed, - c.name clientName, - c.salesPersonFk, - u.nickname workerNickname, - u.name name, - co.code companyCode, - zed.zoneFk, - zed.hourTheoretical, - zed.hourEffective, - am.name AS agencyName - FROM hedera.order o - LEFT JOIN address a ON a.id = o.address_id - LEFT JOIN agencyMode am ON am.id = o.agency_id - LEFT JOIN client c ON c.id = o.customer_id - LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.id - LEFT JOIN company co ON co.id = o.company_id - LEFT JOIN orderTicket ot ON ot.orderFk = o.id - LEFT JOIN ticket t ON t.id = ot.ticketFk - LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`); + stmt = new ParameterizedSQL(` + CREATE OR REPLACE TEMPORARY TABLE tmp.filter + (INDEX (id)) + ENGINE = MEMORY + SELECT o.id, + o.total, + o.date_send landed, + o.date_make created, + o.customer_id clientFk, + o.agency_id agencyModeFk, + o.address_id addressFk, + o.company_id companyFk, + o.source_app sourceApp, + o.confirmed isConfirmed, + c.name clientName, + c.salesPersonFk, + u.nickname workerNickname, + u.name name, + co.code companyCode, + zed.zoneFk, + zed.hourTheoretical, + zed.hourEffective, + am.name agencyName + FROM hedera.order o + LEFT JOIN address a ON a.id = o.address_id + LEFT JOIN agencyMode am ON am.id = o.agency_id + LEFT JOIN client c ON c.id = o.customer_id + LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN account.user u ON u.id = wk.id + LEFT JOIN company co ON co.id = o.company_id + LEFT JOIN orderTicket ot ON ot.orderFk = o.id + LEFT JOIN ticket t ON t.id = ot.ticketFk + LEFT JOIN ( + SELECT zoneFk, + CAST( + util.VN_CURDATE() + + INTERVAL HOUR(zoneHour) * 60 + MINUTE(zoneHour) MINUTE + AS time + ) hourTheoretical, + CAST(zoneHour + remainingVolume * 60 / speed AS time) hourEffective + FROM ( + SELECT t.zoneFk, + IFNULL(zc.hour, z.hour) zoneHour, + CAST(SUM(sv.volume) AS DECIMAL(5, 1)) totalVolume, + SUM(IF(al.hasToRecalcPrice, sv.volume, 0)) remainingVolume, + GREATEST(IFNULL(lhp.m3, 0), IFNULL(dl.minSpeed, 0)) speed + FROM ticket t + JOIN ticketStateToday tst ON tst.ticket = t.id + JOIN state s ON s.id = tst.state + JOIN saleVolume sv ON sv.ticketFk = t.id + LEFT JOIN lastHourProduction lhp ON lhp.warehouseFk = t.warehouseFk + JOIN warehouse w ON w.id = t.warehouseFk + JOIN warehouseAlias wa ON wa.id = w.aliasFk + STRAIGHT_JOIN zone z ON z.id = t.zoneFk + LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk + AND zc.dated = util.VN_CURDATE() + LEFT JOIN cache.departure_limit dl ON dl.warehouse_id = t.warehouseFk + AND dl.fecha = util.VN_CURDATE() + JOIN alertLevel al ON al.id = s.alertLevel + WHERE w.hasProduction + AND DATE(t.shipped) = util.VN_CURDATE() + GROUP BY t.zoneFk + ) sub + ) zed ON zed.zoneFk = t.zoneFk + `); stmt.merge(conn.makeWhere(filter.where)); stmt.merge(`GROUP BY id`); diff --git a/modules/zone/back/model-config.json b/modules/zone/back/model-config.json index 261a89902..43d2cb570 100644 --- a/modules/zone/back/model-config.json +++ b/modules/zone/back/model-config.json @@ -35,9 +35,6 @@ "ZoneWarehouse": { "dataSource": "vn" }, - "ZoneEstimatedDelivery": { - "dataSource": "vn" - }, "ZoneLog": { "dataSource": "vn" } diff --git a/modules/zone/back/models/zone-estimated-delivery.json b/modules/zone/back/models/zone-estimated-delivery.json deleted file mode 100644 index 399de8f58..000000000 --- a/modules/zone/back/models/zone-estimated-delivery.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "ZoneEstimatedDelivery", - "base": "VnModel", - "options": { - "mysql": { - "table": "zoneEstimatedDelivery" - } - }, - "properties": { - "zoneFk": { - "id": true, - "type": "number" - }, - "hourTheoretical": { - "type": "date" - }, - "totalVolume": { - "type": "number" - }, - "remainingVolume": { - "type": "number" - }, - "speed": { - "type": "number" - }, - "hourEffective": { - "type": "date" - }, - "minutesLess": { - "type": "date" - }, - "etc": { - "type": "date" - } - - }, - "relations": { - "zone": { - "type": "belongsTo", - "model": "Zone", - "foreignKey": "zoneFk" - } - } -} \ No newline at end of file From 2f611391b98c39e3d5b0480dbc634f659d961535 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 17 Nov 2023 07:17:29 +0100 Subject: [PATCH 2/7] Revert "refactor: refs #4502 Deleted zoneEstimatedDelivery" This reverts commit bfd6e1f39843abb02694fa2ebdb52e95df4f2bd4. --- .../back/methods/sales-monitor/salesFilter.js | 71 +++++-------- modules/order/back/methods/order/filter.js | 99 +++++++------------ modules/zone/back/model-config.json | 3 + .../back/models/zone-estimated-delivery.json | 44 +++++++++ 4 files changed, 105 insertions(+), 112 deletions(-) create mode 100644 modules/zone/back/models/zone-estimated-delivery.json diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 85945a57d..693ae122f 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -163,14 +163,17 @@ module.exports = Self => { const stmts = []; let stmt; + stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter'); + stmts.push(`SET @_optimizer_search_depth = @@optimizer_search_depth`); stmts.push(`SET SESSION optimizer_search_depth = 0`); - stmt = new ParameterizedSQL(` - CREATE OR REPLACE TEMPORARY TABLE tmp.filter + stmt = new ParameterizedSQL( + `CREATE TEMPORARY TABLE tmp.filter (PRIMARY KEY (id)) ENGINE = MEMORY - SELECT t.id, + SELECT + t.id, t.shipped, CAST(DATE(t.shipped) AS CHAR) AS shippedDate, t.nickname, @@ -180,27 +183,27 @@ module.exports = Self => { t.clientFk, t.totalWithoutVat, t.totalWithVat, - io.id invoiceOutId, + io.id AS invoiceOutId, a.provinceFk, - p.name province, - w.name warehouse, - am.name agencyMode, - am.id agencyModeFk, - st.name state, - wk.lastName salesPerson, - ts.stateFk stateFk, - ts.alertLevel alertLevel, - ts.code alertLevelCode, - u.name userName, + p.name AS province, + w.name AS warehouse, + am.name AS agencyMode, + am.id AS agencyModeFk, + st.name AS state, + wk.lastName AS salesPerson, + ts.stateFk AS stateFk, + ts.alertLevel AS alertLevel, + ts.code AS alertLevelCode, + u.name AS userName, c.salesPersonFk, c.credit, - z.hour zoneLanding, - z.name zoneName, - z.id zoneFk, + z.hour AS zoneLanding, + z.name AS zoneName, + z.id AS zoneFk, st.classColor, - TIME_FORMAT(t.shipped, '%H:%i') preparationHour, - TIME_FORMAT(z.hour, '%H:%i') theoreticalhour, - TIME_FORMAT(zed.etc, '%H:%i') practicalHour + TIME_FORMAT(t.shipped, '%H:%i') AS preparationHour, + TIME_FORMAT(z.hour, '%H:%i') AS theoreticalhour, + TIME_FORMAT(zed.etc, '%H:%i') AS practicalHour FROM ticket t LEFT JOIN invoiceOut io ON t.refFk = io.ref LEFT JOIN zone z ON z.id = t.zoneFk @@ -213,33 +216,7 @@ module.exports = Self => { LEFT JOIN client c ON c.id = t.clientFk LEFT JOIN worker wk ON wk.id = c.salesPersonFk LEFT JOIN account.user u ON u.id = wk.id - LEFT JOIN ( - SELECT zoneFk, - CAST(zoneHour + remainingVolume * 60 / speed AS time) etc - FROM ( - SELECT t.zoneFk, - IFNULL(zc.hour, z.hour) zoneHour, - SUM(IF(al.hasToRecalcPrice, sv.volume, 0)) remainingVolume, - GREATEST(IFNULL(lhp.m3, 0), IFNULL(dl.minSpeed, 0)) speed - FROM ticket t - JOIN ticketStateToday tst ON tst.ticket = t.id - JOIN state s ON s.id = tst.state - JOIN saleVolume sv ON sv.ticketFk = t.id - LEFT JOIN lastHourProduction lhp ON lhp.warehouseFk = t.warehouseFk - JOIN warehouse w ON w.id = t.warehouseFk - JOIN warehouseAlias wa ON wa.id = w.aliasFk - STRAIGHT_JOIN zone z ON z.id = t.zoneFk - LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk - AND zc.dated = util.VN_CURDATE() - LEFT JOIN cache.departure_limit dl ON dl.warehouse_id = t.warehouseFk - AND dl.fecha = util.VN_CURDATE() - JOIN alertLevel al ON al.id = s.alertLevel - WHERE w.hasProduction - AND DATE(t.shipped) = util.VN_CURDATE() - GROUP BY t.zoneFk - ) sub - ) zed ON zed.zoneFk = t.zoneFk` - ); + LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`); if (args.orderFk) { stmt.merge({ diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 27484acb9..44d8ccb10 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -140,71 +140,40 @@ module.exports = Self => { const stmts = []; let stmt; - stmt = new ParameterizedSQL(` - CREATE OR REPLACE TEMPORARY TABLE tmp.filter - (INDEX (id)) - ENGINE = MEMORY - SELECT o.id, - o.total, - o.date_send landed, - o.date_make created, - o.customer_id clientFk, - o.agency_id agencyModeFk, - o.address_id addressFk, - o.company_id companyFk, - o.source_app sourceApp, - o.confirmed isConfirmed, - c.name clientName, - c.salesPersonFk, - u.nickname workerNickname, - u.name name, - co.code companyCode, - zed.zoneFk, - zed.hourTheoretical, - zed.hourEffective, - am.name agencyName - FROM hedera.order o - LEFT JOIN address a ON a.id = o.address_id - LEFT JOIN agencyMode am ON am.id = o.agency_id - LEFT JOIN client c ON c.id = o.customer_id - LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.id - LEFT JOIN company co ON co.id = o.company_id - LEFT JOIN orderTicket ot ON ot.orderFk = o.id - LEFT JOIN ticket t ON t.id = ot.ticketFk - LEFT JOIN ( - SELECT zoneFk, - CAST( - util.VN_CURDATE() + - INTERVAL HOUR(zoneHour) * 60 + MINUTE(zoneHour) MINUTE - AS time - ) hourTheoretical, - CAST(zoneHour + remainingVolume * 60 / speed AS time) hourEffective - FROM ( - SELECT t.zoneFk, - IFNULL(zc.hour, z.hour) zoneHour, - CAST(SUM(sv.volume) AS DECIMAL(5, 1)) totalVolume, - SUM(IF(al.hasToRecalcPrice, sv.volume, 0)) remainingVolume, - GREATEST(IFNULL(lhp.m3, 0), IFNULL(dl.minSpeed, 0)) speed - FROM ticket t - JOIN ticketStateToday tst ON tst.ticket = t.id - JOIN state s ON s.id = tst.state - JOIN saleVolume sv ON sv.ticketFk = t.id - LEFT JOIN lastHourProduction lhp ON lhp.warehouseFk = t.warehouseFk - JOIN warehouse w ON w.id = t.warehouseFk - JOIN warehouseAlias wa ON wa.id = w.aliasFk - STRAIGHT_JOIN zone z ON z.id = t.zoneFk - LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk - AND zc.dated = util.VN_CURDATE() - LEFT JOIN cache.departure_limit dl ON dl.warehouse_id = t.warehouseFk - AND dl.fecha = util.VN_CURDATE() - JOIN alertLevel al ON al.id = s.alertLevel - WHERE w.hasProduction - AND DATE(t.shipped) = util.VN_CURDATE() - GROUP BY t.zoneFk - ) sub - ) zed ON zed.zoneFk = t.zoneFk - `); + stmt = new ParameterizedSQL( + `CREATE OR REPLACE TEMPORARY TABLE tmp.filter + (INDEX (id)) + ENGINE = MEMORY + SELECT + o.id, + o.total, + o.date_send landed, + o.date_make created, + o.customer_id clientFk, + o.agency_id agencyModeFk, + o.address_id addressFk, + o.company_id companyFk, + o.source_app sourceApp, + o.confirmed isConfirmed, + c.name clientName, + c.salesPersonFk, + u.nickname workerNickname, + u.name name, + co.code companyCode, + zed.zoneFk, + zed.hourTheoretical, + zed.hourEffective, + am.name AS agencyName + FROM hedera.order o + LEFT JOIN address a ON a.id = o.address_id + LEFT JOIN agencyMode am ON am.id = o.agency_id + LEFT JOIN client c ON c.id = o.customer_id + LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN account.user u ON u.id = wk.id + LEFT JOIN company co ON co.id = o.company_id + LEFT JOIN orderTicket ot ON ot.orderFk = o.id + LEFT JOIN ticket t ON t.id = ot.ticketFk + LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`); stmt.merge(conn.makeWhere(filter.where)); stmt.merge(`GROUP BY id`); diff --git a/modules/zone/back/model-config.json b/modules/zone/back/model-config.json index 43d2cb570..261a89902 100644 --- a/modules/zone/back/model-config.json +++ b/modules/zone/back/model-config.json @@ -35,6 +35,9 @@ "ZoneWarehouse": { "dataSource": "vn" }, + "ZoneEstimatedDelivery": { + "dataSource": "vn" + }, "ZoneLog": { "dataSource": "vn" } diff --git a/modules/zone/back/models/zone-estimated-delivery.json b/modules/zone/back/models/zone-estimated-delivery.json new file mode 100644 index 000000000..399de8f58 --- /dev/null +++ b/modules/zone/back/models/zone-estimated-delivery.json @@ -0,0 +1,44 @@ +{ + "name": "ZoneEstimatedDelivery", + "base": "VnModel", + "options": { + "mysql": { + "table": "zoneEstimatedDelivery" + } + }, + "properties": { + "zoneFk": { + "id": true, + "type": "number" + }, + "hourTheoretical": { + "type": "date" + }, + "totalVolume": { + "type": "number" + }, + "remainingVolume": { + "type": "number" + }, + "speed": { + "type": "number" + }, + "hourEffective": { + "type": "date" + }, + "minutesLess": { + "type": "date" + }, + "etc": { + "type": "date" + } + + }, + "relations": { + "zone": { + "type": "belongsTo", + "model": "Zone", + "foreignKey": "zoneFk" + } + } +} \ No newline at end of file From 3d1c69be5618abd37848dee6d20986840d193806 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 17 Nov 2023 07:43:32 +0100 Subject: [PATCH 3/7] refactor: refs #4502 zoneEstimatedDelivery --- .../back/methods/sales-monitor/salesFilter.js | 104 ++++++++++-------- modules/order/back/methods/order/filter.js | 84 ++++++++------ .../back/models/zone-estimated-delivery.json | 24 ++-- 3 files changed, 117 insertions(+), 95 deletions(-) diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 693ae122f..2c62977f3 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -168,55 +168,65 @@ module.exports = Self => { stmts.push(`SET @_optimizer_search_depth = @@optimizer_search_depth`); stmts.push(`SET SESSION optimizer_search_depth = 0`); - stmt = new ParameterizedSQL( - `CREATE TEMPORARY TABLE tmp.filter + stmt = new ParameterizedSQL(` + CREATE TEMPORARY TABLE tmp.filter (PRIMARY KEY (id)) ENGINE = MEMORY - SELECT - t.id, - t.shipped, - CAST(DATE(t.shipped) AS CHAR) AS shippedDate, - t.nickname, - t.refFk, - t.routeFk, - t.warehouseFk, - t.clientFk, - t.totalWithoutVat, - t.totalWithVat, - io.id AS invoiceOutId, - a.provinceFk, - p.name AS province, - w.name AS warehouse, - am.name AS agencyMode, - am.id AS agencyModeFk, - st.name AS state, - wk.lastName AS salesPerson, - ts.stateFk AS stateFk, - ts.alertLevel AS alertLevel, - ts.code AS alertLevelCode, - u.name AS userName, - c.salesPersonFk, - c.credit, - z.hour AS zoneLanding, - z.name AS zoneName, - z.id AS zoneFk, - st.classColor, - TIME_FORMAT(t.shipped, '%H:%i') AS preparationHour, - TIME_FORMAT(z.hour, '%H:%i') AS theoreticalhour, - TIME_FORMAT(zed.etc, '%H:%i') AS practicalHour - FROM ticket t - LEFT JOIN invoiceOut io ON t.refFk = io.ref - LEFT JOIN zone z ON z.id = t.zoneFk - LEFT JOIN address a ON a.id = t.addressFk - LEFT JOIN province p ON p.id = a.provinceFk - LEFT JOIN warehouse w ON w.id = t.warehouseFk - LEFT JOIN agencyMode am ON am.id = t.agencyModeFk - LEFT JOIN ticketState ts ON ts.ticketFk = t.id - LEFT JOIN state st ON st.id = ts.stateFk - LEFT JOIN client c ON c.id = t.clientFk - LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.id - LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`); + SELECT t.id, + t.shipped, + CAST(DATE(t.shipped) AS CHAR) shippedDate, + t.nickname, + t.refFk, + t.routeFk, + t.warehouseFk, + t.clientFk, + t.totalWithoutVat, + t.totalWithVat, + io.id invoiceOutId, + a.provinceFk, + p.name province, + w.name warehouse, + am.name agencyMode, + am.id agencyModeFk, + st.name state, + wk.lastName salesPerson, + ts.stateFk stateFk, + ts.alertLevel alertLevel, + ts.code alertLevelCode, + u.name userName, + c.salesPersonFk, + c.credit, + z.hour zoneLanding, + z.name zoneName, + z.id zoneFk, + st.classColor, + TIME_FORMAT(t.shipped, '%H:%i') preparationHour, + TIME_FORMAT(z.hour, '%H:%i') theoreticalhour, + TIME_FORMAT(zed.etc, '%H:%i') practicalHour + FROM ticket t + LEFT JOIN invoiceOut io ON t.refFk = io.ref + LEFT JOIN zone z ON z.id = t.zoneFk + LEFT JOIN address a ON a.id = t.addressFk + LEFT JOIN province p ON p.id = a.provinceFk + LEFT JOIN warehouse w ON w.id = t.warehouseFk + LEFT JOIN agencyMode am ON am.id = t.agencyModeFk + LEFT JOIN ticketState ts ON ts.ticketFk = t.id + LEFT JOIN state st ON st.id = ts.stateFk + LEFT JOIN client c ON c.id = t.clientFk + LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN account.user u ON u.id = wk.id + LEFT JOIN ( + SELECT zoneFk, + CAST( + IFNULL(zoneClosureHour, zoneHour) + + SUM(IF(hasToRecalcPrice, volume, 0)) * 60 / + GREATEST(IFNULL(m3, 0), IFNULL(minSpeed, 0)) + AS time + ) etc + FROM zoneEstimatedDelivery + GROUP BY zoneFk + ) zed ON zed.zoneFk = t.zoneFk + `); if (args.orderFk) { stmt.merge({ diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 44d8ccb10..97fca5c10 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -140,40 +140,56 @@ module.exports = Self => { const stmts = []; let stmt; - stmt = new ParameterizedSQL( - `CREATE OR REPLACE TEMPORARY TABLE tmp.filter - (INDEX (id)) - ENGINE = MEMORY - SELECT - o.id, - o.total, - o.date_send landed, - o.date_make created, - o.customer_id clientFk, - o.agency_id agencyModeFk, - o.address_id addressFk, - o.company_id companyFk, - o.source_app sourceApp, - o.confirmed isConfirmed, - c.name clientName, - c.salesPersonFk, - u.nickname workerNickname, - u.name name, - co.code companyCode, - zed.zoneFk, - zed.hourTheoretical, - zed.hourEffective, - am.name AS agencyName - FROM hedera.order o - LEFT JOIN address a ON a.id = o.address_id - LEFT JOIN agencyMode am ON am.id = o.agency_id - LEFT JOIN client c ON c.id = o.customer_id - LEFT JOIN worker wk ON wk.id = c.salesPersonFk - LEFT JOIN account.user u ON u.id = wk.id - LEFT JOIN company co ON co.id = o.company_id - LEFT JOIN orderTicket ot ON ot.orderFk = o.id - LEFT JOIN ticket t ON t.id = ot.ticketFk - LEFT JOIN zoneEstimatedDelivery zed ON zed.zoneFk = t.zoneFk`); + stmt = new ParameterizedSQL(` + CREATE OR REPLACE TEMPORARY TABLE tmp.filter + (INDEX (id)) + ENGINE = MEMORY + SELECT o.id, + o.total, + o.date_send landed, + o.date_make created, + o.customer_id clientFk, + o.agency_id agencyModeFk, + o.address_id addressFk, + o.company_id companyFk, + o.source_app sourceApp, + o.confirmed isConfirmed, + c.name clientName, + c.salesPersonFk, + u.nickname workerNickname, + u.name name, + co.code companyCode, + zed.zoneFk, + zed.hourTheoretical, + zed.hourEffective, + am.name agencyName + FROM hedera.order o + LEFT JOIN address a ON a.id = o.address_id + LEFT JOIN agencyMode am ON am.id = o.agency_id + LEFT JOIN client c ON c.id = o.customer_id + LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN account.user u ON u.id = wk.id + LEFT JOIN company co ON co.id = o.company_id + LEFT JOIN orderTicket ot ON ot.orderFk = o.id + LEFT JOIN ticket t ON t.id = ot.ticketFk + LEFT JOIN ( + SELECT zoneFk, + CAST( + util.VN_CURDATE() + + INTERVAL HOUR(IFNULL(zoneClosureHour, zoneHour)) * 60 + + MINUTE(IFNULL(zoneClosureHour, zoneHour)) MINUTE + AS time + ) hourTheoretical, + CAST( + IFNULL(zoneClosureHour, zoneHour) + + SUM(IF(hasToRecalcPrice, volume, 0)) * 60 / + GREATEST(IFNULL(m3, 0), IFNULL(minSpeed, 0)) + AS time + ) hourEffective + FROM zoneEstimatedDelivery + GROUP BY zoneFk + ) zed ON zed.zoneFk = t.zoneFk + `); stmt.merge(conn.makeWhere(filter.where)); stmt.merge(`GROUP BY id`); diff --git a/modules/zone/back/models/zone-estimated-delivery.json b/modules/zone/back/models/zone-estimated-delivery.json index 399de8f58..a01754484 100644 --- a/modules/zone/back/models/zone-estimated-delivery.json +++ b/modules/zone/back/models/zone-estimated-delivery.json @@ -11,28 +11,24 @@ "id": true, "type": "number" }, - "hourTheoretical": { + "zoneClosureHour": { "type": "date" }, - "totalVolume": { + "zoneHour": { + "type": "date" + }, + "volume": { "type": "number" }, - "remainingVolume": { + "hasToRecalcPrice": { + "type": "boolean" + }, + "m3": { "type": "number" }, - "speed": { + "minSpeed": { "type": "number" - }, - "hourEffective": { - "type": "date" - }, - "minutesLess": { - "type": "date" - }, - "etc": { - "type": "date" } - }, "relations": { "zone": { From 8da36569f77ca87810a97d7cf2b3e742a4265c45 Mon Sep 17 00:00:00 2001 From: guillermo Date: Fri, 17 Nov 2023 07:44:43 +0100 Subject: [PATCH 4/7] refactor: refs #4502 zoneEstimatedDelivery --- modules/monitor/back/methods/sales-monitor/salesFilter.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/monitor/back/methods/sales-monitor/salesFilter.js b/modules/monitor/back/methods/sales-monitor/salesFilter.js index 2c62977f3..301e4ac35 100644 --- a/modules/monitor/back/methods/sales-monitor/salesFilter.js +++ b/modules/monitor/back/methods/sales-monitor/salesFilter.js @@ -162,14 +162,12 @@ module.exports = Self => { const stmts = []; let stmt; - - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter'); - + stmts.push(`SET @_optimizer_search_depth = @@optimizer_search_depth`); stmts.push(`SET SESSION optimizer_search_depth = 0`); stmt = new ParameterizedSQL(` - CREATE TEMPORARY TABLE tmp.filter + CREATE OR REPLACE TEMPORARY TABLE tmp.filter (PRIMARY KEY (id)) ENGINE = MEMORY SELECT t.id, From 61b2d4c5fdc06d0e7fdb312a3b1e3d71de51d9dc Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 20 Nov 2023 09:47:57 +0100 Subject: [PATCH 5/7] refactor: refs #4502 zoneEstimatedDelivery --- db/dump/structure.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dump/structure.sql b/db/dump/structure.sql index 3d6156580..e90367682 100644 --- a/db/dump/structure.sql +++ b/db/dump/structure.sql @@ -82151,7 +82151,7 @@ USE `vn`; /*!50001 SET collation_connection = utf8mb4_unicode_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `zoneEstimatedDelivery` AS select `t`.`zoneFk` AS `zoneFk`,cast(`util`.`VN_CURDATE`() + interval hour(ifnull(`zc`.`hour`,`z`.`hour`)) * 60 + minute(ifnull(`zc`.`hour`,`z`.`hour`)) minute as time) AS `hourTheoretical`,cast(sum(`sv`.`volume`) as decimal(5,1)) AS `totalVolume`,cast(sum(if(`s`.`alertLevel` < 2,`sv`.`volume`,0)) as decimal(5,1)) AS `remainingVolume`,greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0)) AS `speed`,cast(`zc`.`hour` + interval -sum(if(`s`.`alertLevel` < 2,`sv`.`volume`,0)) * 60 / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0)) minute as time) AS `hourEffective`,floor(-sum(if(`s`.`alertLevel` < 2,`sv`.`volume`,0)) * 60 / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0))) AS `minutesLess`,cast(`zc`.`hour` + interval -sum(if(`s`.`alertLevel` < 2,`sv`.`volume`,0)) * 60 / greatest(ifnull(`lhp`.`m3`,0),ifnull(`dl`.`minSpeed`,0)) minute as time) AS `etc` from (((((((((`vn`.`ticket` `t` join `vn`.`ticketStateToday` `tst` on(`tst`.`ticket` = `t`.`id`)) join `vn`.`state` `s` on(`s`.`id` = `tst`.`state`)) join `vn`.`saleVolume` `sv` on(`sv`.`ticketFk` = `t`.`id`)) left join `vn`.`lastHourProduction` `lhp` on(`lhp`.`warehouseFk` = `t`.`warehouseFk`)) join `vn`.`warehouse` `w` on(`w`.`id` = `t`.`warehouseFk`)) join `vn`.`warehouseAlias` `wa` on(`wa`.`id` = `w`.`aliasFk`)) straight_join `vn`.`zone` `z` on(`z`.`id` = `t`.`zoneFk`)) left join `vn`.`zoneClosure` `zc` on(`zc`.`zoneFk` = `t`.`zoneFk` and `zc`.`dated` = `util`.`VN_CURDATE`())) left join `cache`.`departure_limit` `dl` on(`dl`.`warehouse_id` = `t`.`warehouseFk` and `dl`.`fecha` = `util`.`VN_CURDATE`())) where `w`.`hasProduction` <> 0 and cast(`t`.`shipped` as date) = `util`.`VN_CURDATE`() group by `t`.`zoneFk` */; +/*!50001 VIEW `zoneEstimatedDelivery` AS SELECT `t`.`zoneFk` AS `zoneFk`, `zc`.`hour` AS `zoneClosureHour`, `z`.`hour` AS `zoneHour`, `sv`.`volume` AS `volume`, `al`.`hasToRecalcPrice` AS `hasToRecalcPrice`, `lhp`.`m3` AS `m3`, `dl`.`minSpeed` AS `minSpeed` FROM ((((((((((`vn`.`ticket` `t` JOIN `vn`.`ticketStateToday` `tst` ON (`tst`.`ticket` = `t`.`id`)) JOIN `vn`.`state` `s` ON (`s`.`id` = `tst`.`state`)) JOIN `vn`.`saleVolume` `sv` ON (`sv`.`ticketFk` = `t`.`id`)) LEFT JOIN `vn`.`lastHourProduction` `lhp` ON (`lhp`.`warehouseFk` = `t`.`warehouseFk`)) JOIN `vn`.`warehouse` `w` ON (`w`.`id` = `t`.`warehouseFk`)) JOIN `vn`.`warehouseAlias` `wa` ON (`wa`.`id` = `w`.`aliasFk`)) STRAIGHT_JOIN `vn`.`zone` `z` ON (`z`.`id` = `t`.`zoneFk`)) LEFT JOIN `vn`.`zoneClosure` `zc` ON (`zc`.`zoneFk` = `t`.`zoneFk` AND `zc`.`dated` = `util`.`VN_CURDATE`())) LEFT JOIN `cache`.`departure_limit` `dl` ON (`dl`.`warehouse_id` = `t`.`warehouseFk` AND `dl`.`fecha` = `util`.`VN_CURDATE`())) JOIN `vn`.`alertLevel` `al` ON (`al`.`id` = `s`.`alertLevel`)) WHERE `w`.`hasProduction` <> 0 AND CAST(`t`.`shipped` AS date) = `util`.`VN_CURDATE`() */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; From f4fabb9fff0f95506c289834adbef3e6af58e713 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 23 Nov 2023 08:26:14 +0100 Subject: [PATCH 6/7] refs #6491 refactor(order_filter): optimized --- CHANGELOG.md | 1 + modules/order/back/methods/order/filter.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08a62f044..1f16511b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - (Ticket -> Adelantar) Permite mover lineas sin generar negativos - (Ticket -> Adelantar) Permite modificar la fecha de los tickets +- (Trabajadores -> Notificaciones) Nueva sección (lilium) ### Changed ### Fixed diff --git a/modules/order/back/methods/order/filter.js b/modules/order/back/methods/order/filter.js index 97fca5c10..592ed11e6 100644 --- a/modules/order/back/methods/order/filter.js +++ b/modules/order/back/methods/order/filter.js @@ -139,6 +139,8 @@ module.exports = Self => { filter = mergeFilters(filter, {where}); const stmts = []; let stmt; + stmts.push(`SET @_optimizer_search_depth = @@optimizer_search_depth`); + stmts.push(`SET SESSION optimizer_search_depth = 0`); stmt = new ParameterizedSQL(` CREATE OR REPLACE TEMPORARY TABLE tmp.filter @@ -195,6 +197,7 @@ module.exports = Self => { stmt.merge(`GROUP BY id`); stmt.merge(conn.makePagination(filter)); stmts.push(stmt); + stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`); stmt = new ParameterizedSQL(`SELECT * FROM tmp.filter`); stmt.merge(conn.makeOrderBy(filter.order)); From 217aa1ac770ffb1e3e13cc76188cf800671af8bc Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 23 Nov 2023 08:35:08 +0100 Subject: [PATCH 7/7] refs #6491 deploy(2350) init version --- CHANGELOG.md | 7 +++++++ db/{changes => .archive}/233001/.gitkeep | 0 db/{changes => .archive}/233001/00-aclSaleTracking.sql | 0 db/{changes => .archive}/233001/00-clientSms.sql | 0 db/{changes => .archive}/233001/00-company.sql | 0 db/{changes => .archive}/233001/00-fixACLVehicle.sql | 0 db/{changes => .archive}/233001/00-itemRecycle.sql | 0 .../233001/00-itemShelving_inventory.sql | 0 db/{changes => .archive}/233001/00-noUniqueSocialName.sql | 0 db/{changes => .archive}/233001/00-roadmap.sql | 0 db/{changes => .archive}/233001/00-roadmapACL.sql | 0 db/{changes => .archive}/233001/00-ticketWeight.sql | 0 db/{changes => .archive}/233201/.gitkeep | 0 .../233201/00-acl_viaexpressConfig.sql | 0 db/{changes => .archive}/233201/00-transferClient.sql | 0 db/{changes => .archive}/233201/00-updatePrice.sql | 0 db/{changes => .archive}/233201/00-viaexpress.sql | 0 db/{changes => .archive}/233201/00-workerDocuware.sql | 0 db/{changes => .archive}/233202/00-client_create_upper.sql | 0 db/{changes => .archive}/233202/00-ticketSmsACL.sql | 0 db/{changes => .archive}/233401/00-setDeleted_acl.sql | 0 db/{changes => .archive}/233601/.gitkeep | 0 db/{changes => .archive}/233601/00-aclWorker.sql | 0 db/{changes => .archive}/233601/00-addExpeditionState.sql | 0 db/{changes => .archive}/233601/00-department.sql | 0 db/{changes => .archive}/233601/00-saleGroupDetail.sql | 0 db/{changes => .archive}/233801/.gitkeep | 0 db/{changes => .archive}/233801/00-firstScript.sql | 0 db/{changes => .archive}/233801/01-deviceLog_acl.sql | 0 db/{changes => .archive}/233802/.gitkeep | 0 .../233802/00-collectionGetTicketsACL.sql | 0 db/changes/235001/.gitkeep | 0 package-lock.json | 4 ++-- package.json | 2 +- 34 files changed, 10 insertions(+), 3 deletions(-) rename db/{changes => .archive}/233001/.gitkeep (100%) rename db/{changes => .archive}/233001/00-aclSaleTracking.sql (100%) rename db/{changes => .archive}/233001/00-clientSms.sql (100%) rename db/{changes => .archive}/233001/00-company.sql (100%) rename db/{changes => .archive}/233001/00-fixACLVehicle.sql (100%) rename db/{changes => .archive}/233001/00-itemRecycle.sql (100%) rename db/{changes => .archive}/233001/00-itemShelving_inventory.sql (100%) rename db/{changes => .archive}/233001/00-noUniqueSocialName.sql (100%) rename db/{changes => .archive}/233001/00-roadmap.sql (100%) rename db/{changes => .archive}/233001/00-roadmapACL.sql (100%) rename db/{changes => .archive}/233001/00-ticketWeight.sql (100%) rename db/{changes => .archive}/233201/.gitkeep (100%) rename db/{changes => .archive}/233201/00-acl_viaexpressConfig.sql (100%) rename db/{changes => .archive}/233201/00-transferClient.sql (100%) rename db/{changes => .archive}/233201/00-updatePrice.sql (100%) rename db/{changes => .archive}/233201/00-viaexpress.sql (100%) rename db/{changes => .archive}/233201/00-workerDocuware.sql (100%) rename db/{changes => .archive}/233202/00-client_create_upper.sql (100%) rename db/{changes => .archive}/233202/00-ticketSmsACL.sql (100%) rename db/{changes => .archive}/233401/00-setDeleted_acl.sql (100%) rename db/{changes => .archive}/233601/.gitkeep (100%) rename db/{changes => .archive}/233601/00-aclWorker.sql (100%) rename db/{changes => .archive}/233601/00-addExpeditionState.sql (100%) rename db/{changes => .archive}/233601/00-department.sql (100%) rename db/{changes => .archive}/233601/00-saleGroupDetail.sql (100%) rename db/{changes => .archive}/233801/.gitkeep (100%) rename db/{changes => .archive}/233801/00-firstScript.sql (100%) rename db/{changes => .archive}/233801/01-deviceLog_acl.sql (100%) rename db/{changes => .archive}/233802/.gitkeep (100%) rename db/{changes => .archive}/233802/00-collectionGetTicketsACL.sql (100%) create mode 100644 db/changes/235001/.gitkeep diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f16511b6..d8d040fd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2350.01] - 2023-12-14 + +### Added +### Changed +### Fixed + + ## [2348.01] - 2023-11-30 ### Added diff --git a/db/changes/233001/.gitkeep b/db/.archive/233001/.gitkeep similarity index 100% rename from db/changes/233001/.gitkeep rename to db/.archive/233001/.gitkeep diff --git a/db/changes/233001/00-aclSaleTracking.sql b/db/.archive/233001/00-aclSaleTracking.sql similarity index 100% rename from db/changes/233001/00-aclSaleTracking.sql rename to db/.archive/233001/00-aclSaleTracking.sql diff --git a/db/changes/233001/00-clientSms.sql b/db/.archive/233001/00-clientSms.sql similarity index 100% rename from db/changes/233001/00-clientSms.sql rename to db/.archive/233001/00-clientSms.sql diff --git a/db/changes/233001/00-company.sql b/db/.archive/233001/00-company.sql similarity index 100% rename from db/changes/233001/00-company.sql rename to db/.archive/233001/00-company.sql diff --git a/db/changes/233001/00-fixACLVehicle.sql b/db/.archive/233001/00-fixACLVehicle.sql similarity index 100% rename from db/changes/233001/00-fixACLVehicle.sql rename to db/.archive/233001/00-fixACLVehicle.sql diff --git a/db/changes/233001/00-itemRecycle.sql b/db/.archive/233001/00-itemRecycle.sql similarity index 100% rename from db/changes/233001/00-itemRecycle.sql rename to db/.archive/233001/00-itemRecycle.sql diff --git a/db/changes/233001/00-itemShelving_inventory.sql b/db/.archive/233001/00-itemShelving_inventory.sql similarity index 100% rename from db/changes/233001/00-itemShelving_inventory.sql rename to db/.archive/233001/00-itemShelving_inventory.sql diff --git a/db/changes/233001/00-noUniqueSocialName.sql b/db/.archive/233001/00-noUniqueSocialName.sql similarity index 100% rename from db/changes/233001/00-noUniqueSocialName.sql rename to db/.archive/233001/00-noUniqueSocialName.sql diff --git a/db/changes/233001/00-roadmap.sql b/db/.archive/233001/00-roadmap.sql similarity index 100% rename from db/changes/233001/00-roadmap.sql rename to db/.archive/233001/00-roadmap.sql diff --git a/db/changes/233001/00-roadmapACL.sql b/db/.archive/233001/00-roadmapACL.sql similarity index 100% rename from db/changes/233001/00-roadmapACL.sql rename to db/.archive/233001/00-roadmapACL.sql diff --git a/db/changes/233001/00-ticketWeight.sql b/db/.archive/233001/00-ticketWeight.sql similarity index 100% rename from db/changes/233001/00-ticketWeight.sql rename to db/.archive/233001/00-ticketWeight.sql diff --git a/db/changes/233201/.gitkeep b/db/.archive/233201/.gitkeep similarity index 100% rename from db/changes/233201/.gitkeep rename to db/.archive/233201/.gitkeep diff --git a/db/changes/233201/00-acl_viaexpressConfig.sql b/db/.archive/233201/00-acl_viaexpressConfig.sql similarity index 100% rename from db/changes/233201/00-acl_viaexpressConfig.sql rename to db/.archive/233201/00-acl_viaexpressConfig.sql diff --git a/db/changes/233201/00-transferClient.sql b/db/.archive/233201/00-transferClient.sql similarity index 100% rename from db/changes/233201/00-transferClient.sql rename to db/.archive/233201/00-transferClient.sql diff --git a/db/changes/233201/00-updatePrice.sql b/db/.archive/233201/00-updatePrice.sql similarity index 100% rename from db/changes/233201/00-updatePrice.sql rename to db/.archive/233201/00-updatePrice.sql diff --git a/db/changes/233201/00-viaexpress.sql b/db/.archive/233201/00-viaexpress.sql similarity index 100% rename from db/changes/233201/00-viaexpress.sql rename to db/.archive/233201/00-viaexpress.sql diff --git a/db/changes/233201/00-workerDocuware.sql b/db/.archive/233201/00-workerDocuware.sql similarity index 100% rename from db/changes/233201/00-workerDocuware.sql rename to db/.archive/233201/00-workerDocuware.sql diff --git a/db/changes/233202/00-client_create_upper.sql b/db/.archive/233202/00-client_create_upper.sql similarity index 100% rename from db/changes/233202/00-client_create_upper.sql rename to db/.archive/233202/00-client_create_upper.sql diff --git a/db/changes/233202/00-ticketSmsACL.sql b/db/.archive/233202/00-ticketSmsACL.sql similarity index 100% rename from db/changes/233202/00-ticketSmsACL.sql rename to db/.archive/233202/00-ticketSmsACL.sql diff --git a/db/changes/233401/00-setDeleted_acl.sql b/db/.archive/233401/00-setDeleted_acl.sql similarity index 100% rename from db/changes/233401/00-setDeleted_acl.sql rename to db/.archive/233401/00-setDeleted_acl.sql diff --git a/db/changes/233601/.gitkeep b/db/.archive/233601/.gitkeep similarity index 100% rename from db/changes/233601/.gitkeep rename to db/.archive/233601/.gitkeep diff --git a/db/changes/233601/00-aclWorker.sql b/db/.archive/233601/00-aclWorker.sql similarity index 100% rename from db/changes/233601/00-aclWorker.sql rename to db/.archive/233601/00-aclWorker.sql diff --git a/db/changes/233601/00-addExpeditionState.sql b/db/.archive/233601/00-addExpeditionState.sql similarity index 100% rename from db/changes/233601/00-addExpeditionState.sql rename to db/.archive/233601/00-addExpeditionState.sql diff --git a/db/changes/233601/00-department.sql b/db/.archive/233601/00-department.sql similarity index 100% rename from db/changes/233601/00-department.sql rename to db/.archive/233601/00-department.sql diff --git a/db/changes/233601/00-saleGroupDetail.sql b/db/.archive/233601/00-saleGroupDetail.sql similarity index 100% rename from db/changes/233601/00-saleGroupDetail.sql rename to db/.archive/233601/00-saleGroupDetail.sql diff --git a/db/changes/233801/.gitkeep b/db/.archive/233801/.gitkeep similarity index 100% rename from db/changes/233801/.gitkeep rename to db/.archive/233801/.gitkeep diff --git a/db/changes/233801/00-firstScript.sql b/db/.archive/233801/00-firstScript.sql similarity index 100% rename from db/changes/233801/00-firstScript.sql rename to db/.archive/233801/00-firstScript.sql diff --git a/db/changes/233801/01-deviceLog_acl.sql b/db/.archive/233801/01-deviceLog_acl.sql similarity index 100% rename from db/changes/233801/01-deviceLog_acl.sql rename to db/.archive/233801/01-deviceLog_acl.sql diff --git a/db/changes/233802/.gitkeep b/db/.archive/233802/.gitkeep similarity index 100% rename from db/changes/233802/.gitkeep rename to db/.archive/233802/.gitkeep diff --git a/db/changes/233802/00-collectionGetTicketsACL.sql b/db/.archive/233802/00-collectionGetTicketsACL.sql similarity index 100% rename from db/changes/233802/00-collectionGetTicketsACL.sql rename to db/.archive/233802/00-collectionGetTicketsACL.sql diff --git a/db/changes/235001/.gitkeep b/db/changes/235001/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/package-lock.json b/package-lock.json index b66279ae3..78ef93987 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "salix-back", - "version": "23.48.01", + "version": "23.50.01", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "salix-back", - "version": "23.48.01", + "version": "23.50.01", "license": "GPL-3.0", "dependencies": { "axios": "^1.2.2", diff --git a/package.json b/package.json index 04fcb008b..586c963dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-back", - "version": "23.48.01", + "version": "23.50.01", "author": "Verdnatura Levante SL", "description": "Salix backend", "license": "GPL-3.0",