Version merge
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
gitea/salix/pipeline/head Something is wrong with the build of this commit
Details
This commit is contained in:
parent
031051abcb
commit
d17a61d4c1
|
@ -1,4 +1,13 @@
|
||||||
|
|
||||||
|
UPDATE `salix`.`ACL` SET `principalId` = 'deliveryBoss' WHERE (`id` = '194');
|
||||||
|
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '97');
|
||||||
|
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '100');
|
||||||
|
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '103');
|
||||||
|
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '202');
|
||||||
|
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Supplier', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Supplier', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Supplier', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Supplier', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SupplierLog', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SupplierLog', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SupplierContact', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SupplierContact', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
||||||
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Town', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
||||||
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Province', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
|
@ -1,94 +0,0 @@
|
||||||
drop procedure `vn2008`.travelDetail;
|
|
||||||
|
|
||||||
create definer = root@`%` procedure `vn2008`.travelDetail__()
|
|
||||||
BEGIN
|
|
||||||
|
|
||||||
DECLARE vDateFrom DATE DEFAULT TIMESTAMPADD(WEEK,-12,CURDATE());
|
|
||||||
|
|
||||||
SELECT IFNULL(CONCAT(" ",Entrada),travel) travelAndEntry,
|
|
||||||
travel,
|
|
||||||
Entrada,
|
|
||||||
IsTravel,
|
|
||||||
Agencia,
|
|
||||||
ref,
|
|
||||||
shipment,
|
|
||||||
OrigenCajas,
|
|
||||||
landing,
|
|
||||||
Destino,
|
|
||||||
Etiquetas,
|
|
||||||
Notas_Eva,
|
|
||||||
kg,
|
|
||||||
loadedKg,
|
|
||||||
volumeKg,
|
|
||||||
loadPriority,
|
|
||||||
Notas,
|
|
||||||
Carguera
|
|
||||||
FROM(SELECT
|
|
||||||
1 as IsTravel,
|
|
||||||
tr.id as travel,
|
|
||||||
NULL as Entrada,
|
|
||||||
ag.Agencia,
|
|
||||||
tr.ref,
|
|
||||||
tr.shipment,
|
|
||||||
wo.name as OrigenCajas,
|
|
||||||
tr.landing,
|
|
||||||
w.name as Destino,
|
|
||||||
sum(c.Etiquetas) as Etiquetas,
|
|
||||||
NULL as Notas_Eva,
|
|
||||||
kg,
|
|
||||||
cast(sum(a.density * c.Etiquetas * IF(cb.Volumen, cb.Volumen, cb.X * cb.Y * cb.Z) / 1000000 ) as DECIMAL(10,0)) as loadedKg,
|
|
||||||
cast(sum(167.5 * c.Etiquetas * IF(cb.Volumen, cb.Volumen, cb.X * cb.Y * cb.Z) / 1000000 ) as DECIMAL(10,0)) as volumeKg,
|
|
||||||
NULL as loadPriority,
|
|
||||||
NULL as Notas,
|
|
||||||
pc.Alias as Carguera
|
|
||||||
FROM travel tr
|
|
||||||
LEFT JOIN Proveedores pc ON pc.Id_Proveedor = tr.cargoSupplierFk
|
|
||||||
LEFT JOIN Entradas e ON e.travel_id = tr.id
|
|
||||||
LEFT JOIN Compres c ON c.Id_Entrada = e.Id_Entrada
|
|
||||||
LEFT JOIN Cubos cb ON cb.Id_Cubo = c.Id_Cubo
|
|
||||||
LEFT JOIN Articles a ON a.Id_Article = c.Id_Article
|
|
||||||
LEFT JOIN Tipos tp ON tp.tipo_id = a.tipo_id
|
|
||||||
JOIN warehouse w ON w.id = tr.warehouse_id
|
|
||||||
JOIN warehouse wo ON wo.id = tr.warehouse_id_out
|
|
||||||
JOIN Agencias ag ON ag.Id_Agencia = tr.agency_id
|
|
||||||
WHERE tr.landing >= vDateFrom AND (wo.name="Colombia" OR wo.name="Ecuador")
|
|
||||||
GROUP BY tr.id
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
0 as IsTravel,
|
|
||||||
e.travel_id as travel,
|
|
||||||
e.Id_Entrada,
|
|
||||||
p.Proveedor,
|
|
||||||
e.Referencia,
|
|
||||||
tr.shipment,
|
|
||||||
wo.name as OrigenCajas,
|
|
||||||
tr.landing,
|
|
||||||
w.name as Destino,
|
|
||||||
sum(Etiquetas) as Etiquetas,
|
|
||||||
e.Notas_Eva,
|
|
||||||
NULL as kg,
|
|
||||||
cast(sum(a.density * c.Etiquetas * IF(cb.Volumen, cb.Volumen, cb.X * cb.Y * cb.Z) / 1000000 ) as DECIMAL(10,0)) as loadedkg,
|
|
||||||
cast(sum(167.5 * c.Etiquetas * IF(cb.Volumen, cb.Volumen, cb.X * cb.Y * cb.Z) / 1000000 ) as DECIMAL(10,0)) as volumeKg,
|
|
||||||
loadPriority,
|
|
||||||
e.Notas,
|
|
||||||
pc.Alias as carguera
|
|
||||||
|
|
||||||
FROM Entradas e
|
|
||||||
JOIN Compres c ON c.Id_Entrada = e.Id_Entrada
|
|
||||||
JOIN Cubos cb ON cb.Id_Cubo = c.Id_Cubo
|
|
||||||
JOIN Articles a ON a.Id_Article = c.Id_Article
|
|
||||||
JOIN Tipos tp ON tp.tipo_id = a.tipo_id
|
|
||||||
JOIN Proveedores p ON p.Id_Proveedor = e.Id_Proveedor
|
|
||||||
JOIN travel tr ON tr.id = e.travel_id
|
|
||||||
LEFT JOIN Proveedores pc ON pc.Id_Proveedor = tr.cargoSupplierFk
|
|
||||||
JOIN warehouse w ON w.id = tr.warehouse_id
|
|
||||||
JOIN warehouse wo ON wo.id = tr.warehouse_id_out
|
|
||||||
WHERE tr.landing >= vDateFrom AND (wo.name="Colombia" OR wo.name="Ecuador")
|
|
||||||
GROUP BY e.Id_Entrada
|
|
||||||
) sub
|
|
||||||
ORDER BY landing ASC, shipment ASC,travel, IsTravel DESC, (loadPriority > 0) DESC,loadPriority, Agencia, Notas_Eva ;
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
UPDATE `salix`.`ACL` SET `principalId` = 'deliveryBoss' WHERE (`id` = '194');
|
|
||||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '97');
|
|
||||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '100');
|
|
||||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '103');
|
|
||||||
UPDATE `salix`.`ACL` SET `principalId` = 'claimManager' WHERE (`id` = '202');
|
|
||||||
|
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Town', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Province', '*', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss');
|
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('supplier', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
|
||||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('SupplierContact', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative');
|
|
Loading…
Reference in New Issue