fix(monitor): changed order to prevent row duplication
gitea/salix/pipeline/head This commit looks good Details

Refs: 3458
This commit is contained in:
Joan Sanchez 2021-12-17 12:40:23 +01:00
parent 2fb1c72887
commit 4cb346c2a8
2 changed files with 4 additions and 4 deletions

View File

@ -160,7 +160,7 @@ module.exports = Self => {
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.filter');
stmt = new ParameterizedSQL(
`CREATE TEMPORARY TABLE tmp.filter
(INDEX (id))
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT
t.id,
@ -221,7 +221,7 @@ module.exports = Self => {
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt');
stmts.push(`
CREATE TEMPORARY TABLE tmp.clientGetDebt
(INDEX (clientFk))
(PRIMARY KEY (clientFk))
ENGINE = MEMORY
SELECT DISTINCT clientFk FROM tmp.filter`);
@ -232,7 +232,7 @@ module.exports = Self => {
stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.tickets');
stmt = new ParameterizedSQL(`
CREATE TEMPORARY TABLE tmp.tickets
(INDEX (id))
(PRIMARY KEY (id))
ENGINE = MEMORY
SELECT f.*, r.risk AS debt
FROM tmp.filter f

View File

@ -2,7 +2,7 @@
vn-id="model"
url="SalesMonitors/salesFilter"
limit="20"
order="shippedDate DESC, preparationHour ASC, zoneLanding ASC, id">
order="shippedDate DESC, theoreticalhour, id">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar