feat: refs #7531 Added address_hasDelivery
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
gitea/salix/pipeline/pr-master There was a failure building this commit
Details
This commit is contained in:
parent
c2ca9cfbe5
commit
69b78b6bf1
|
@ -1,5 +1,9 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`address_hasDelivery`(vSelf INT, vLanded DATE)
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`address_hasDelivery`(
|
||||
vSelf INT,
|
||||
vAgencyModeFk INT,
|
||||
vLanded DATE
|
||||
)
|
||||
RETURNS BOOL
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
|
@ -15,7 +19,11 @@ BEGIN
|
|||
|
||||
CALL zone_getAgency(vSelf, vLanded);
|
||||
|
||||
SELECT EXISTS (SELECT TRUE FROM tmp.zoneGetAgency) INTO vHasDelivery;
|
||||
SELECT EXISTS(
|
||||
SELECT TRUE
|
||||
FROM tmp.zoneGetAgency
|
||||
WHERE agencyModeFk = vAgencyModeFk
|
||||
) INTO vHasDelivery;
|
||||
|
||||
RETURN vHasDelivery;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`zone_getAddresses`(
|
||||
vSelf INT,
|
||||
vAgencyModeFk INT,
|
||||
vShipped DATE,
|
||||
vDepartmentFk INT
|
||||
)
|
||||
|
@ -52,7 +53,7 @@ BEGIN
|
|||
AND ct.code = 'normal'
|
||||
AND bt.code <> 'worker'
|
||||
AND (d.id = vDepartmentFk OR vDepartmentFk IS NULL)
|
||||
AND vn.address_hasDelivery(c.defaultAddressFk, vShipped)
|
||||
AND vn.address_hasDelivery(c.defaultAddressFk, vAgencyModeFk, vShipped)
|
||||
GROUP BY c.id;
|
||||
|
||||
DROP TEMPORARY TABLE tmp.zoneNodes;
|
||||
|
|
Loading…
Reference in New Issue