feat: #7013 muestra solo clientes asegurados
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
c46e7227e7
commit
a24d38128b
|
@ -2,18 +2,17 @@ DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`solunionRiskRequest`()
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`solunionRiskRequest`()
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.client_list;
|
CREATE OR REPLACE TEMPORARY TABLE tmp.client_list
|
||||||
CREATE TEMPORARY TABLE tmp.client_list
|
|
||||||
(PRIMARY KEY (Id_Cliente))
|
(PRIMARY KEY (Id_Cliente))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT * FROM (
|
SELECT * FROM (
|
||||||
SELECT cc.client, ci.grade
|
SELECT cc.client Id_Cliente, ci.grade
|
||||||
FROM creditClassification cc
|
FROM creditClassification cc
|
||||||
JOIN creditInsurance ci ON cc.id = ci.creditClassification
|
JOIN creditInsurance ci ON cc.id = ci.creditClassification
|
||||||
WHERE dateEnd IS NULL
|
WHERE dateEnd IS NULL
|
||||||
ORDER BY ci.creationDate DESC
|
ORDER BY ci.creationDate DESC
|
||||||
LIMIT 10000000000000000000) t1
|
LIMIT 10000000000000000000) t1
|
||||||
GROUP BY client;
|
GROUP BY Id_Cliente;
|
||||||
|
|
||||||
CALL vn2008.risk_vs_client_list(util.VN_CURDATE());
|
CALL vn2008.risk_vs_client_list(util.VN_CURDATE());
|
||||||
|
|
||||||
|
@ -29,9 +28,9 @@ BEGIN
|
||||||
ci.grade,
|
ci.grade,
|
||||||
c2.country
|
c2.country
|
||||||
FROM tmp.client_list ci
|
FROM tmp.client_list ci
|
||||||
LEFT JOIN tmp.risk r ON r.Id_Cliente = ci.client
|
LEFT JOIN tmp.risk r ON r.Id_Cliente = ci.Id_Cliente
|
||||||
JOIN client c ON c.id = ci.client
|
JOIN client c ON c.id = ci.Id_Cliente
|
||||||
JOIN bs.clientAnnualConsumption cac ON c.id = cac.Id_Cliente
|
JOIN bs.clientAnnualConsumption cac ON c.id = cac.clientFk
|
||||||
JOIN vn.country c2 ON c2.id = c.countryFk
|
JOIN vn.country c2 ON c2.id = c.countryFk
|
||||||
GROUP BY c.id;
|
GROUP BY c.id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue