perf(salix): refs #6321 #7677 itemLackDetail

This commit is contained in:
Javier Segarra 2024-09-21 00:26:55 +02:00
parent 5e38d18fed
commit 2cb57225ff
3 changed files with 9 additions and 6 deletions

View File

@ -3969,7 +3969,6 @@ INSERT INTO vn.accountDetailType (id, description, code)
(5, 'Referencia Nominas', 'payRef'),
(6, 'ABA', 'aba');
<<<<<<< HEAD
INSERT INTO vn.accountDetailType
(id, description, code)
VALUES
@ -3980,8 +3979,6 @@ VALUES
(5, 'Referencia Nominas', 'payRef'),
(6, 'ABA', 'aba');
=======
>>>>>>> dev
INSERT IGNORE INTO ormConfig
SET id =1,
selectLimit = 1000;

View File

@ -30,8 +30,14 @@ module.exports = Self => {
new Date().toLocaleDateString('es-ES', {year: 'numeric',
month: '2-digit',
day: '2-digit'});
const query = [where.itemFk, where.warehouseFk, where.date ?? today, where.showType ?? true];
const [results] = await Self.rawSql('CALL vn.item_getSimilar(?, ?, ?, ?)', query, myOptions);
const query = [
where.itemFk,
where.warehouseFk,
where.date ?? today,
where.showType ?? true,
where.scopeDays ?? 2
];
const [results] = await Self.rawSql('CALL vn.item_getSimilar(?, ?, ?, ?, ?)', query, myOptions);
return [
{

View File

@ -385,6 +385,6 @@ module.exports = Self => {
const sql = ParameterizedSQL.join(stmts, ';');
const result = await conn.executeStmt(sql, myOptions);
return result[ticketsIndex];
return Array(19).fill().flatMap(() => result[ticketsIndex]);
};
};