Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7407-workerMedical
This commit is contained in:
commit
313c05f654
|
@ -21,6 +21,9 @@ BEGIN
|
|||
|
||||
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
|
||||
|
||||
-- Añadido temporalmente para que no se cuelgue la db
|
||||
SET vShowType = TRUE;
|
||||
|
||||
WITH itemTags AS (
|
||||
SELECT i.id,
|
||||
typeFk,
|
||||
|
@ -35,7 +38,7 @@ BEGIN
|
|||
t.name,
|
||||
it.value
|
||||
FROM vn.item i
|
||||
LEFT JOIN vn.itemTag it FORCE INDEX(itemTagItemPriority) ON it.itemFk = i.id
|
||||
LEFT JOIN vn.itemTag it ON it.itemFk = i.id
|
||||
AND it.priority = vPriority
|
||||
LEFT JOIN vn.tag t ON t.id = it.tagFk
|
||||
WHERE i.id = vSelf
|
||||
|
@ -65,7 +68,7 @@ BEGIN
|
|||
iss.visible located,
|
||||
b.price2
|
||||
FROM vn.item i
|
||||
JOIN cache.available a FORCE INDEX (calc_id_4) ON a.item_id = i.id
|
||||
JOIN cache.available a ON a.item_id = i.id
|
||||
AND a.calc_id = vCalcFk
|
||||
LEFT JOIN vn.itemProposal ip ON ip.mateFk = i.id
|
||||
AND ip.itemFk = vSelf
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
CREATE TABLE IF NOT EXISTS vn.travelKgPercentage (
|
||||
value INT(3) PRIMARY KEY,
|
||||
className VARCHAR(50)
|
||||
);
|
||||
|
||||
INSERT INTO vn.travelKgPercentage (value, className)
|
||||
VALUES
|
||||
(80, 'primary'),
|
||||
(100, 'alert');
|
||||
|
||||
INSERT INTO salix.ACL
|
||||
SET model = 'TravelKgPercentage',
|
||||
property = '*',
|
||||
accessType = 'READ',
|
||||
permission = 'ALLOW',
|
||||
principalType = 'ROLE',
|
||||
principalId = 'employee';
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.ticketPackaging DROP FOREIGN KEY ticketPackaging_fk3;
|
||||
ALTER TABLE vn.ticketPackaging DROP COLUMN workerFk;
|
|
@ -138,7 +138,19 @@ module.exports = Self => {
|
|||
b.stickers *
|
||||
IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000
|
||||
) as DECIMAL(10,0)
|
||||
) as volumeKg
|
||||
) as volumeKg,
|
||||
GREATEST(
|
||||
CAST(SUM(b.weight * b.stickers) AS INT),
|
||||
CAST(
|
||||
SUM(vc.aerealVolumetricDensity *
|
||||
b.stickers *
|
||||
IF(pkg.volume,
|
||||
pkg.volume,
|
||||
pkg.width * pkg.depth * pkg.height
|
||||
) / 1000000
|
||||
) AS INT
|
||||
)
|
||||
/ t.kg * 100, 0) percentageKg
|
||||
FROM travel t
|
||||
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
||||
LEFT JOIN entry e ON e.travelFk = t.id
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
"Thermograph": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TravelKgPercentage": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"TravelThermograph": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "TravelKgPercentage",
|
||||
"base": "VnModel",
|
||||
"mixins": {
|
||||
"Loggable": true
|
||||
},
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "travelKgPercentage"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"value": {
|
||||
"type": "number",
|
||||
"id": true
|
||||
},
|
||||
"className": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue