-postponement_have_right
This commit is contained in:
parent
a9e84be4e8
commit
98bc567555
3 changed files with 14 additions and 14 deletions
|
|
@ -304,7 +304,7 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1808</xloc>
|
||||
<xloc>1984</xloc>
|
||||
<yloc>368</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
|
|
@ -344,7 +344,7 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>2064</xloc>
|
||||
<xloc>2240</xloc>
|
||||
<yloc>368</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
|
|
|
|||
|
|
@ -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</sql>
|
|||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>recruitment_campaign</table>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_granted</name>
|
||||
<rename>postponement_granted</rename>
|
||||
|
|
|
|||
|
|
@ -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;</sql>
|
|||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>recruitment_campaign</table>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_granted</name>
|
||||
<rename>postponement_granted</rename>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue