3520_wareshouse_back #2218
|
@ -27,13 +27,13 @@ module.exports = Self => {
|
||||||
|
|
||||||
const result = await Self.rawSql(`
|
const result = await Self.rawSql(`
|
||||||
SELECT tc2.ticketFk
|
SELECT tc2.ticketFk
|
||||||
FROM vn.ticketCollection tc
|
FROM vn.ticketCollection tc
|
||||||
JOIN vn.ticketCollection tc2 ON tc2.collectionFk = tc.collectionFk
|
JOIN vn.ticketCollection tc2 ON tc2.collectionFk = tc.collectionFk
|
||||||
LEFT JOIN vn.ticketState ts ON ts.ticketFk = tc2.ticketFk
|
LEFT JOIN vn.ticketState ts ON ts.ticketFk = tc2.ticketFk
|
||||||
JOIN vn.state s ON s.id = ts.stateFk
|
JOIN vn.state s ON s.id = ts.stateFk
|
||||||
JOIN vn.state s2 ON s2.code = 'CHECKED'
|
JOIN vn.state s2 ON s2.code = 'CHECKED'
|
||||||
WHERE tc.ticketFk = ? AND s.order < s2.id
|
WHERE tc.ticketFk = ? AND s.order < s2.id
|
||||||
LIMIT 1;`,
|
LIMIT 1;`,
|
||||||
[ticketFk], myOptions);
|
[ticketFk], myOptions);
|
||||||
return result.length > 0 && result[0]['ticketFk'] > 0;
|
return result.length > 0 && result[0]['ticketFk'] > 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue