From 98bc56755597ae3c9ff6f29d9eaab8080c20f40f Mon Sep 17 00:00:00 2001 From: Ruslan Date: Tue, 8 Apr 2025 12:50:02 +0300 Subject: [PATCH] -postponement_have_right --- .../main_dashboard.recruitment_campaign(m_c).hwf | 4 ++-- .../m_d.rec_cam(m_c)_to_decision_service.hpl | 12 ++++++------ .../m_d.rec_cam(m_c)_to_decision_service_uniq.hpl | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hwf b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hwf index 25924ce..f42b79b 100644 --- a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hwf +++ b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hwf @@ -304,7 +304,7 @@ N Y N - 1808 + 1984 368 @@ -344,7 +344,7 @@ SUCCESS N - 2064 + 2240 368 diff --git a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl index 965c3c7..c0afd4c 100644 --- a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl +++ b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl @@ -58,7 +58,7 @@ vse AS( ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.updated_at, dd.created_at) DESC) AS rn FROM recruit r JOIN deferment_decision dd ON dd.recruit_id = r.id - JOIN deferment_decision_type ddt on ddt.id = dd.type_id AND ddt.code = '1' + JOIN deferment_decision_type ddt on ddt.id = dd.type_id AND ddt.code in ('1', '2') WHERE COALESCE(r.current_recruitment, r.target_recruitment)::uuid IN (SELECT recruitment_id FROM ids) ), last_status AS( @@ -67,7 +67,7 @@ last_status AS( WHERE rn = 1 ) SELECT - COALESCE(COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true'), 0) AS postponement_have_right, + --COALESCE(COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true'), 0) AS postponement_have_right, COALESCE(COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false'), 0) AS postponement_granted, --COALESCE((COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') * 100 / NULLIF(COUNT(ls.postponement), 0)), 0) AS postponement_have_right_percent, --COALESCE((COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') * 100 / NULLIF(COUNT(ls.postponement), 0)), 0) AS postponement_granted_percent, @@ -104,28 +104,28 @@ GROUP BY spring_autumn, ls.recruitment_id 100 ervu-dashboard Y + = recruitment_id recruitment_id + = spring_autumn spring_autumn + = recording_date recording_date + main_dashboard recruitment_campaign
- - postponement_have_right - postponement_have_right - postponement_granted postponement_granted diff --git a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl index 522ade4..8a4475b 100644 --- a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl +++ b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl @@ -92,7 +92,7 @@ last_status AS( WHERE rn = 1 ) SELECT - COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, + --COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') AS postponement_granted, 'Весна' AS spring_autumn, ls.recruitment_id, @@ -106,7 +106,7 @@ GROUP BY ls.recruitment_id UNION ALL SELECT - COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, + --COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') AS postponement_granted, 'Осень' AS spring_autumn, ls.recruitment_id, @@ -137,28 +137,28 @@ GROUP BY ls.recruitment_id; 100 ervu-dashboard Y + = recruitment_id recruitment_id + = spring_autumn spring_autumn + = recording_date recording_date + main_dashboard recruitment_campaign
- - postponement_have_right - postponement_have_right - postponement_granted postponement_granted