refs #6321 perf: minor change
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
586f37afd2
commit
cc3f2da639
|
@ -2,11 +2,11 @@ const {ParameterizedSQL} = require('loopback-connector');
|
|||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('itemLackDetail', {
|
||||
description: 'Download a ticket delivery note document',
|
||||
description: 'Retrieve detail from ticket',
|
||||
accessType: 'READ',
|
||||
accepts: [
|
||||
{
|
||||
arg: 'id',
|
||||
arg: 'itemFk',
|
||||
type: 'number',
|
||||
description: 'The item id',
|
||||
},
|
||||
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
|||
},
|
||||
});
|
||||
|
||||
Self.itemLackDetail = async(id, options) => {
|
||||
Self.itemLackDetail = async(itemFk, options) => {
|
||||
const conn = Self.dataSource.connector;
|
||||
|
||||
const myOptions = {};
|
||||
|
@ -71,7 +71,7 @@ module.exports = Self => {
|
|||
AND t.landed >= util.VN_CURDATE()
|
||||
AND t.landed < util.VN_CURDATE() + INTERVAL ? + 1 DAY
|
||||
`,
|
||||
[id, 2]);
|
||||
[itemFk, 2]);
|
||||
|
||||
const sql = ParameterizedSQL.join([stmt], ';');
|
||||
const result = await conn.executeStmt(sql, myOptions);
|
||||
|
|
Loading…
Reference in New Issue