3520_wareshouse_back #2218
|
@ -19,7 +19,12 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.getUncheckedTicket = async ticketFk => {
|
||||
Self.getUncheckedTicket = async(ticketFk, options) => {
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
const result = await Self.rawSql(`
|
||||
SELECT tc2.ticketFk
|
||||
FROM vn.ticketCollection tc
|
||||
|
@ -29,7 +34,7 @@ module.exports = Self => {
|
|||
JOIN vn.state s2 ON s2.code = 'CHECKED'
|
||||
WHERE tc.ticketFk = ? AND s.order < s2.id
|
||||
LIMIT 1;`,
|
||||
[ticketFk]);
|
||||
[ticketFk], myOptions);
|
||||
return result.length > 0 && result[0]['ticketFk'] > 0;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue