fix: refs #6321 getSimilar
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
10eef6d1b6
commit
a93e8b28db
|
@ -25,91 +25,91 @@ module.exports = Self => {
|
|||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
const where = filter.where;
|
||||
const {where} = filter;
|
||||
const today =
|
||||
new Date().toLocaleDateString('es-ES', {year: 'numeric',
|
||||
new Date().toLocaleDateString('en-US', {year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit'});
|
||||
const query = [
|
||||
where.itemFk,
|
||||
filter.itemFk,
|
||||
where.warehouseFk,
|
||||
where.date ?? today,
|
||||
where.date ?? '2025-01-28',
|
||||
where.showType ?? true,
|
||||
where.scopeDays ?? 2
|
||||
];
|
||||
const [results] = await Self.rawSql('CALL vn.item_getSimilar(?, ?, ?, ?, ?)', query, myOptions);
|
||||
return results
|
||||
// return [
|
||||
// {
|
||||
// 'id': 1,
|
||||
// 'longName': 'Ranged weapon longbow 50cm',
|
||||
// 'subName': 'Stark Industries',
|
||||
// 'tag5': 'Color',
|
||||
// 'value5': 'Brown',
|
||||
// 'match5': 0,
|
||||
// 'match6': 0,
|
||||
// 'match7': 0,
|
||||
// 'match8': 1,
|
||||
// 'tag6': 'Categoria',
|
||||
// 'value6': '+1 precission',
|
||||
// 'tag7': 'Tallos',
|
||||
// 'value7': '1',
|
||||
// 'tag8': null,
|
||||
// 'value8': null,
|
||||
// 'available': 20,
|
||||
// 'calc_id': 6,
|
||||
// 'counter': 0,
|
||||
// 'minQuantity': 1,
|
||||
// 'visible': null,
|
||||
// 'price2': 1
|
||||
// },
|
||||
// {
|
||||
// 'id': 2,
|
||||
// 'longName': 'Ranged weapon longbow 100cm',
|
||||
// 'subName': 'Stark Industries',
|
||||
// 'tag5': 'Color',
|
||||
// 'value5': 'Brown',
|
||||
// 'match5': 0,
|
||||
// 'match6': 1,
|
||||
// 'match7': 0,
|
||||
// 'match8': 1,
|
||||
// 'tag6': 'Categoria',
|
||||
// 'value6': '+1 precission',
|
||||
// 'tag7': 'Tallos',
|
||||
// 'value7': '1',
|
||||
// 'tag8': null,
|
||||
// 'value8': null,
|
||||
// 'available': 50,
|
||||
// 'calc_id': 6,
|
||||
// 'counter': 1,
|
||||
// 'minQuantity': 5,
|
||||
// 'visible': null,
|
||||
// 'price2': 10
|
||||
// },
|
||||
// {
|
||||
// 'id': 3,
|
||||
// 'longName': 'Ranged weapon longbow 200cm',
|
||||
// 'subName': 'Stark Industries',
|
||||
// 'tag5': 'Color',
|
||||
// 'value5': 'Brown',
|
||||
// 'match5': 1,
|
||||
// 'match6': 1,
|
||||
// 'match7': 1,
|
||||
// 'match8': 1,
|
||||
// 'tag6': 'Categoria',
|
||||
// 'value6': '+1 precission',
|
||||
// 'tag7': 'Tallos',
|
||||
// 'value7': '1',
|
||||
// 'tag8': null,
|
||||
// 'value8': null,
|
||||
// 'available': 185,
|
||||
// 'calc_id': 6,
|
||||
// 'counter': 10,
|
||||
// 'minQuantity': 10,
|
||||
// 'visible': null,
|
||||
// 'price2': 100
|
||||
// }
|
||||
|
||||
return [
|
||||
{
|
||||
'id': 1,
|
||||
'longName': 'Ranged weapon longbow 50cm',
|
||||
'subName': 'Stark Industries',
|
||||
'tag5': 'Color',
|
||||
'value5': 'Brown',
|
||||
'match5': 0,
|
||||
'match6': 0,
|
||||
'match7': 0,
|
||||
'match8': 1,
|
||||
'tag6': 'Categoria',
|
||||
'value6': '+1 precission',
|
||||
'tag7': 'Tallos',
|
||||
'value7': '1',
|
||||
'tag8': null,
|
||||
'value8': null,
|
||||
'available': 20,
|
||||
'calc_id': 6,
|
||||
'counter': 0,
|
||||
'minQuantity': 1,
|
||||
'visible': null,
|
||||
'price2': 1
|
||||
},
|
||||
{
|
||||
'id': 2,
|
||||
'longName': 'Ranged weapon longbow 100cm',
|
||||
'subName': 'Stark Industries',
|
||||
'tag5': 'Color',
|
||||
'value5': 'Brown',
|
||||
'match5': 0,
|
||||
'match6': 1,
|
||||
'match7': 0,
|
||||
'match8': 1,
|
||||
'tag6': 'Categoria',
|
||||
'value6': '+1 precission',
|
||||
'tag7': 'Tallos',
|
||||
'value7': '1',
|
||||
'tag8': null,
|
||||
'value8': null,
|
||||
'available': 50,
|
||||
'calc_id': 6,
|
||||
'counter': 1,
|
||||
'minQuantity': 5,
|
||||
'visible': null,
|
||||
'price2': 10
|
||||
},
|
||||
{
|
||||
'id': 3,
|
||||
'longName': 'Ranged weapon longbow 200cm',
|
||||
'subName': 'Stark Industries',
|
||||
'tag5': 'Color',
|
||||
'value5': 'Brown',
|
||||
'match5': 1,
|
||||
'match6': 1,
|
||||
'match7': 1,
|
||||
'match8': 1,
|
||||
'tag6': 'Categoria',
|
||||
'value6': '+1 precission',
|
||||
'tag7': 'Tallos',
|
||||
'value7': '1',
|
||||
'tag8': null,
|
||||
'value8': null,
|
||||
'available': 185,
|
||||
'calc_id': 6,
|
||||
'counter': 10,
|
||||
'minQuantity': 10,
|
||||
'visible': null,
|
||||
'price2': 100
|
||||
}
|
||||
|
||||
];
|
||||
// ];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue