new load recruits
This commit is contained in:
parent
e5319e4b95
commit
c46e306618
289 changed files with 22883 additions and 23936 deletions
103
mappings_old/connections/db_uat_to_here_mln.json
Normal file
103
mappings_old/connections/db_uat_to_here_mln.json
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"variables" : [ {
|
||||
"name" : "DB_PERSON_HOST",
|
||||
"value" : "10.10.30.118",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PORT",
|
||||
"value" : "5432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_NAME",
|
||||
"value" : "ervu_person_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_USERNAME",
|
||||
"value" : "ervu_person_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PASSWORD",
|
||||
"value" : "ervu_person_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_HOST",
|
||||
"value" : "10.10.31.119",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_PORT",
|
||||
"value" : "5432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_NAME",
|
||||
"value" : "ervu-dashboard-recr",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_USERNAME",
|
||||
"value" : "ervu-dashboard",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_PASSWORD",
|
||||
"value" : "ervu-dashboard",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_NAME",
|
||||
"value" : "ervu_appeal_document",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_NAME",
|
||||
"value" : "ervu_decision_document",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_NAME",
|
||||
"value" : "ervu_subpoena_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
} ]
|
||||
}
|
||||
|
|
@ -259,8 +259,8 @@ WHERE recording_date = current_date
|
|||
<sql>SELECT
|
||||
COALESCE(SUM(total_appeals), 0) total_appeals,
|
||||
COALESCE(SUM(resolved), 0) resolved,
|
||||
COALESCE(SUM(average_consideration), 0) average_consideration,
|
||||
COALESCE(SUM(average_rating), 0) average_rating,
|
||||
COALESCE(ROUND(AVG(average_consideration) FILTER (where average_consideration!=0),1), 0) average_consideration,
|
||||
COALESCE(ROUND(AVG(average_rating)FILTER (where average_rating!=0),1), 0) average_rating,
|
||||
COALESCE(SUM(average_to_face), 0) average_to_face,
|
||||
COALESCE(SUM("average_EPGU"), 0) average_epgu,
|
||||
COALESCE(
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ WHERE recording_date = current_date
|
|||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(total_appeals), 0) total_appeals,
|
||||
COALESCE(SUM(average_consideration), 0) average_consideration,
|
||||
coalesce(ROUND(avg(average_consideration) FILTER (where average_consideration!=0),1),0) as average_consideration,
|
||||
COALESCE(SUM(resolved), 0) resolved,
|
||||
COALESCE(SUM(not_resolved), 0) not_resolved,
|
||||
COALESCE(
|
||||
|
|
@ -275,7 +275,7 @@ WHERE recording_date = current_date
|
|||
0
|
||||
) not_resolved_percent,
|
||||
|
||||
COALESCE(SUM(average_rating), 0) average_rating,
|
||||
coalesce(ROUND(avg(average_rating) FILTER (where average_rating!=0),1),0) as average_rating,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_appeals) > 0
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,185 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_education_diplomas_received</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_organization</name>
|
||||
<rename>type_organization</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>name_edu_organization</name>
|
||||
<rename>name_edu_organization</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>inn</name>
|
||||
<rename>inn</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kpp</name>
|
||||
<rename>kpp</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>ogrn</name>
|
||||
<rename>ogrn</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>address_edu_organization</name>
|
||||
<rename>address_edu_organization</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>student_status</name>
|
||||
<rename>student_status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>education_level_org</name>
|
||||
<rename>education_level_org</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>course_training</name>
|
||||
<rename>course_training</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>receipt_date</name>
|
||||
<rename>receipt_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>order_number</name>
|
||||
<rename>order_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>order_date</name>
|
||||
<rename>order_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>restore_date</name>
|
||||
<rename>restore_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>order_number_restore</name>
|
||||
<rename>order_number_restore</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>order_date_restore</name>
|
||||
<rename>order_date_restore</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>928</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with vuz as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVUZ'->'vuz') as vuz,
|
||||
ri.recruit_id recruit_id
|
||||
from public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVUZ'->'vuz') = 'array'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
--limit 2
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
--vuz->'svedOrg'->>'kodTipOrg',
|
||||
vuz->'svedOrg'->>'naimTipOrg' as type_organization,
|
||||
vuz->'svedOrg'->>'naimOrg' as name_edu_organization,
|
||||
vuz->'svedOrg'->>'inn' as inn,
|
||||
vuz->'svedOrg'->>'kpp' as kpp,
|
||||
coalesce (vuz->'svedOrg'->>'ogrn', vuz->'svedOrg'->>'ogrnip') as ogrn,
|
||||
vuz->'svedOrg'->>'adresOrg' as address_edu_organization,
|
||||
|
||||
vuz->>'naimStatus' as student_status,
|
||||
vuz->>'naimUrovObr' as education_level_org,
|
||||
vuz->>'nomerKursa' as course_training,
|
||||
to_date(vuz->>'dataZachisl', 'YYYY-MM-DD') as receipt_date,
|
||||
--vuz->>'prPervObuch' ,
|
||||
vuz->>'nomPrikazZachisl' as order_number,
|
||||
to_date(vuz->>'dataPrikazZachisl', 'YYYY-MM-DD') as order_date,
|
||||
--vuz->'svedObrProg'->>'prVUSpecz',
|
||||
--vuz->'svedObrProg'->>'dataNachObuch',
|
||||
--vuz->'svedObrProg'->>'kodFormaObuch',
|
||||
--vuz->'svedObrProg'->>'naimFormaObuch',
|
||||
--vuz->'svedObrProg'->>'planDataOkonch',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinobr'->>'kodSpecz',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinobr'->>'naimSpecz',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinprosv'->>'kodSpecz',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinprosv'->>'naimSpecz',
|
||||
|
||||
to_date(vuz->'svedVosst'->>'dataVosst', 'YYYY-MM-DD') as restore_date,
|
||||
vuz->'svedVosst'->>'nomPrikazVosst' as order_number_restore,
|
||||
to_date(vuz->'svedVosst'->>'dataPrikazVosst', 'YYYY-MM-DD') as order_date_restore
|
||||
from public.recruits r
|
||||
join vuz on r.id = vuz.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -52,18 +52,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>citizenship_date</field>
|
||||
<name>citizenship_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship_foreign</table>
|
||||
|
|
@ -106,18 +108,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>residense_right_date</field>
|
||||
<name>residense_right_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship_foreign</table>
|
||||
|
|
@ -167,9 +171,9 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedIG') cit,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedIG') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,117 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu-dashboard</schema>
|
||||
<table>citizen_sports_categories</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date_category</name>
|
||||
<rename>start_date_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>end_date_category</name>
|
||||
<rename>end_date_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sports_category_name</name>
|
||||
<rename>sports_category_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_sport</name>
|
||||
<rename>type_sport</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sport_title</name>
|
||||
<rename>sport_title</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>having_sport_category</name>
|
||||
<rename>having_sport_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>having_sport_title</name>
|
||||
<rename>having_sport_title</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<sql>SELECT recruit_id,
|
||||
(sport_info->'sportRazr'->>'dataPrisv')::date start_date_category,
|
||||
(sport_info->'sportRazr'->>'dataDeistv')::date as end_date_category,
|
||||
sport_info->'sportRazr'->>'razryadNaim' as sports_category_name,
|
||||
sport_info->'sportRazr'->>'sportNaim' as type_sport,
|
||||
sport_info->>'sportZvan' as sport_title,
|
||||
case when sport_info->>'sportRazr' != 'null'
|
||||
then true else false end as having_sport_category,
|
||||
(case when sport_info->>'sportZvan' != 'null'
|
||||
then true else false end) as having_sport_title
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}',
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedSport'->'sport') AS sport_info
|
||||
WHERE info->'svedFL'->'svedSport'->>'sport' != 'null'
|
||||
and info->'svedFL'->'svedSport'->>'sport' != '[]';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>384</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_work_activity</name>
|
||||
<name>citizen_work_activity1</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
|
|
@ -20,7 +20,228 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_work_activity</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>date_hr_event</name>
|
||||
<rename>personnel_event_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_hr_event</name>
|
||||
<rename>personnel_event_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>job_title</name>
|
||||
<rename>position</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>organization_name</name>
|
||||
<rename>employer_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kpp</name>
|
||||
<rename>employer_kpp</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>employer_category</name>
|
||||
<rename>employer_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>inn</name>
|
||||
<rename>employer_inn</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>organization_address</name>
|
||||
<rename>employer_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>ogrn</name>
|
||||
<rename>employer_ogrnip</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_separate_division</name>
|
||||
<rename>employer_unit_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>address_separate_division</name>
|
||||
<rename>employer_unit_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date_parental_leave</name>
|
||||
<rename>parental_leave_start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>end_date_parental_leave</name>
|
||||
<rename>parental_leave_end_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>date_reg_ip</name>
|
||||
<rename>reg_ip_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>date_dereg_ip</name>
|
||||
<rename>dereg_ip_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>ogrn_ip</name>
|
||||
<rename>ogrnip_ip</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>date_reg_self</name>
|
||||
<rename>reg_self_employment_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>date_dereg_self</name>
|
||||
<rename>dereg_self_employment_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH trud_info AS (
|
||||
SELECT
|
||||
ri.info,
|
||||
ri.recruit_id::uuid,
|
||||
case when ri.info->'svedFL'->'svedTrud'->'trudDeyat' IS NULL THEN NULL
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
|
||||
(ri.info->'svedFL'->'svedTrud'->'trudDeyat'->0) end as trud_deyat,
|
||||
case when ri.info->'svedFL'->'svedTrud'->'trudDeyat' IS NULL THEN NULL
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedTrud'->'trudDeyat'->0->'svedUhodReb') = 'array'
|
||||
then ri.info->'svedFL'->'svedTrud'->'trudDeyat'->0->'svedUhodReb'->0 end AS parental_leave_info,
|
||||
coalesce(
|
||||
ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat',
|
||||
ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'predRabotodat'
|
||||
) AS employer,
|
||||
(CASE
|
||||
WHEN info->'svedFL'->'svedRegIP'->'regIP' IS NULL THEN NULL
|
||||
WHEN jsonb_typeof(info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN
|
||||
(info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP'->0)
|
||||
ELSE
|
||||
info->'svedFL'->'svedRegIP'->'regIP'->'predRegIP'
|
||||
END) AS reg_ip,
|
||||
COALESCE(
|
||||
ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD',
|
||||
ri.info->'svedFL'->'svedNPD'->'npd'->'predNPD'
|
||||
) AS self_employment
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
SELECT
|
||||
ti.recruit_id::uuid,
|
||||
(ti.trud_deyat->>'dataMeropr')::date AS personnel_event_date,
|
||||
ti.trud_deyat->>'naimTipKadrMeropr' AS personnel_event_type,
|
||||
case when ti.trud_deyat->>'prAktMestRab' = '1' then true else false end AS current_workplace,
|
||||
ti.trud_deyat->>'trudFunkcziya' AS position,
|
||||
ti.trud_deyat->'svedOrg'->>'naimOrg' AS employer_name,
|
||||
ti.employer->'svedYUL'->>'kpp' AS employer_kpp,
|
||||
CASE
|
||||
WHEN ti.employer->>'svedYUL' != 'null' THEN 'Юридическое лицо'
|
||||
WHEN ti.employer->>'svedIP' != 'null' THEN 'Индивидуальный предприниматель'
|
||||
END AS employer_category,
|
||||
COALESCE(
|
||||
ti.employer->'svedYUL'->>'innyul',
|
||||
ti.employer->'svedIP'->>'innyfl'
|
||||
) AS employer_inn,
|
||||
ti.employer->'svedYUL'->'svedOPK'->>'region' AS employer_address,
|
||||
COALESCE(
|
||||
ti.employer->'svedIP'->>'ogrnip',
|
||||
ti.employer->'svedYUL'->'extend'->>'ogrn'
|
||||
) AS employer_ogrnip,
|
||||
ti.employer->'extend'->>'tipPodrazdRabotodat' as employer_unit_type,
|
||||
ti.employer->'extend'->>'adresPodrazdRabotodat' as employer_unit_address,
|
||||
(ti.parental_leave_info->>'dataNachUhodReb')::date as parental_leave_start_date,
|
||||
(ti.parental_leave_info->>'dataKonUhodReb')::date as parental_leave_end_date,
|
||||
case when (ti.parental_leave_info->>'dataNachUhodReb')::date <= current_date
|
||||
and ((ti.parental_leave_info->>'dataKonUhodReb')::date is null
|
||||
or (ti.parental_leave_info->>'dataKonUhodReb')::date > current_date)
|
||||
then true
|
||||
else false end as parental_leave_active,
|
||||
(ti.reg_ip->>'dataRegIP')::date as reg_ip_date,
|
||||
(ti.reg_ip->>'dataINNNed')::date as dereg_ip_date,
|
||||
ti.reg_ip->>'ogrnip' as ogrnip_ip,
|
||||
case when ti.reg_ip != 'null'
|
||||
then true else false end as active_ip,
|
||||
ti.self_employment->>'dataUchNPD' as reg_self_employment_date,
|
||||
ti.self_employment->>'dataSnUchNPD' as dereg_self_employment_date,
|
||||
case when ti.self_employment != 'null'
|
||||
then true else false end as active_self_employment
|
||||
FROM trud_info ti
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -42,13 +42,14 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship</table>
|
||||
|
|
@ -129,10 +130,10 @@ ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_nu
|
|||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
join public.recruits r ON ri.recruit_id = r.id AND r.system_update_date >= '${UP_D}'
|
||||
where ri.info->'svedFL'->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
||||
(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
--AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
|
|||
235
mappings_old/info_recruits/deferments.hpl
Normal file
235
mappings_old/info_recruits/deferments.hpl
Normal file
|
|
@ -0,0 +1,235 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>deferments</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/20 11:21:19.116</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/20 11:21:19.116</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>deferment_right_input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>deferment_input</from>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_deferment_right</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>end_date</name>
|
||||
<rename>end_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>code</name>
|
||||
<rename>code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_deferment_right</name>
|
||||
<rename>has_deferment_right</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_deferment</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>decision_number</name>
|
||||
<rename>decision_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deferment_type</name>
|
||||
<rename>deferment_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>end_date</name>
|
||||
<rename>end_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>reason_code</name>
|
||||
<rename>reason_code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_active_deferment</name>
|
||||
<rename>has_active_deferment</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_exemption</name>
|
||||
<rename>has_exemption</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>active</name>
|
||||
<rename>active</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>deferment_input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
ddd.recruit_id,
|
||||
ddd.decision_number,
|
||||
ddd.type->>'value' as deferment_type,
|
||||
ddd.decision_date as start_date,
|
||||
ddd.postponement_date as end_date,
|
||||
ddd.base_deferment as reason_code,
|
||||
ddd.type->>'code' = '1' as has_active_deferment,
|
||||
ddd.type->>'code' = '2' as has_exemption,
|
||||
not ddd.hidden as active
|
||||
from decision_deferment_dto ddd
|
||||
join public.recruits r
|
||||
ON r.id = ddd.recruit_id
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
where hidden is false;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>272</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>deferment_right_input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
rd.recruit_id,
|
||||
rd.date_of_information as start_date,
|
||||
rd.postponement_date as end_date,
|
||||
erfd.code,
|
||||
true as has_deferment_right
|
||||
from recruits_deferment rd
|
||||
join ervu_reason_for_deferment erfd
|
||||
on erfd.id = rd.ervu_reason_for_deferment_id
|
||||
join public.recruits r
|
||||
ON r.id = rd.recruit_id
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
where rd.hidden is false;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>272</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -52,18 +52,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>deputy</field>
|
||||
<name>deputy</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deputy</table>
|
||||
|
|
@ -111,18 +113,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>deputy</field>
|
||||
<name>deputy</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deputy</table>
|
||||
|
|
@ -173,9 +177,9 @@ ri.info->'svedFL'->'svedDeputat'->'deputat'->>'srokiPolnomochii' period_office,
|
|||
to_date(ri.info->'svedFL'->'svedDeputat'->'deputat'->>'dataDosrochPrekr', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
join public.recruits r ON ri.recruit_id = r.id AND r.system_update_date >= '${UP_D}'
|
||||
where ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
--AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -202,9 +206,9 @@ to_date(ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'dataSnyatKandidat', 'YY
|
|||
ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'svedRegKandidata' information,
|
||||
false deputy
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
join public.recruits r ON ri.recruit_id = r.id AND r.system_update_date >= '${UP_D}'
|
||||
where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
--AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
|
|||
|
|
@ -52,18 +52,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disability</table>
|
||||
|
|
@ -121,18 +123,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disability</table>
|
||||
|
|
@ -156,6 +160,16 @@
|
|||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>disability</name>
|
||||
<rename>disability</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_incompetent</name>
|
||||
<rename>is_incompetent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -178,22 +192,23 @@
|
|||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
case when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид'
|
||||
end disability_group,
|
||||
ri.info->'svedFL'->'svedInvalid'->'invalid'->>'ustanOrg' organization_name,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date,
|
||||
true disability
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<sql>select
|
||||
recruit_id,
|
||||
case when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид'
|
||||
end disability_group,
|
||||
ri.info->'svedFL'->'svedInvalid'->'invalid'->>'ustanOrg' organization_name,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date,
|
||||
true disability
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
where ri.info->'svedFL'->'svedInvalid'->>'invalid' != 'null';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -215,15 +230,18 @@ where ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa' is not null
|
|||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' organization_name,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataPrisv', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<sql>select
|
||||
recruit_id,
|
||||
ri.info->'svedNedeesp'->'nedeesposob'->>'naimOrg' organization_name,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataPrisv', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date,
|
||||
false disability,
|
||||
true is_incompetent
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
where ri.info->'svedNedeesp'->>'nedeesposob' != 'null';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
|
|||
|
|
@ -42,18 +42,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>reg_date</field>
|
||||
<name>reg_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disease</table>
|
||||
|
|
@ -77,6 +79,11 @@
|
|||
<rename>reg_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_disease</name>
|
||||
<rename>has_disease</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -99,20 +106,27 @@
|
|||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with zdorov as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
z->>'kodZabol' code,
|
||||
z->>'naimZabol' name,
|
||||
to_date(z->>'dataDiagn', 'YYYY-MM-DD') reg_date
|
||||
from public.recruits r
|
||||
join zdorov on r.id = zdorov.recruit_id
|
||||
</sql>
|
||||
<sql>with zdorov as (select ri.recruit_id,
|
||||
jsonb_array_elements(
|
||||
ri.info -> 'svedFL' -> 'svedSostZdorov' -> 'svedZdorov' ->
|
||||
'sostZdorov') z,
|
||||
case
|
||||
when ri.info -> 'svedFL' -> 'svedSostZdorov' -> 'svedZdorov' ->>
|
||||
'priznakNalichSved' = '1'
|
||||
then true
|
||||
else false end as has_disease
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info -> 'svedFL' -> 'svedSostZdorov' -> 'svedZdorov' ->
|
||||
'sostZdorov') = 'array')
|
||||
select recruit_id,
|
||||
z ->> 'kodZabol' code,
|
||||
z ->> 'naimZabol' name,
|
||||
has_disease,
|
||||
to_date(z ->> 'dataDiagn', 'YYYY-MM-DD') reg_date
|
||||
from zdorov;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
|
|
@ -113,23 +113,26 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>tractor_driver</field>
|
||||
<name>tractor_driver</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>drivers_licence</table>
|
||||
|
|
@ -216,9 +219,9 @@
|
|||
from jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
join public.recruits_info ri on r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
@ -256,9 +259,9 @@ where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat')
|
|||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories,
|
||||
true tractor_driver
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
join public.recruits_info ri on r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not null
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ type_place_stay</note>
|
|||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<from>Table input(info_recruits)</from>
|
||||
<to>Select values 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
|
|
@ -90,13 +90,14 @@ type_place_stay</note>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -301,7 +302,7 @@ type_place_stay</note>
|
|||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<name>Table input(info_recruits)</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -317,6 +318,8 @@ type_place_stay</note>
|
|||
<sql>WITH
|
||||
base_recruit_data AS (
|
||||
SELECT
|
||||
distinct
|
||||
r.system_pgs_status,
|
||||
r.full_name,
|
||||
r.last_name,
|
||||
r.first_name,
|
||||
|
|
@ -332,6 +335,8 @@ base_recruit_data AS (
|
|||
ri.recruit_id,
|
||||
ri.info,
|
||||
r.vu_current_info,
|
||||
r.military_registration_date AS date_registration,
|
||||
r.vu_unset_date AS date_deregistration,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
|
||||
ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
|
||||
ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
|
||||
|
|
@ -352,11 +357,9 @@ base_recruit_data AS (
|
|||
ELSE
|
||||
false
|
||||
END AS uchet_pnd,
|
||||
CASE
|
||||
WHEN ddd.hidden IS false THEN ddd.hidden
|
||||
ELSE true
|
||||
END AS deferment_liberation, -- когда фолс отсрочка есть, когда тру или нулл - нет
|
||||
|
||||
CASE
|
||||
WHEN ddd.hidden IS false then ddd.hidden
|
||||
ELSE true END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
|
||||
CASE
|
||||
WHEN
|
||||
-- Условия для "true" (спортивная категория)
|
||||
|
|
@ -404,7 +407,7 @@ base_recruit_data AS (
|
|||
WHERE
|
||||
(
|
||||
-- Проверяем 'sportZvan' и если оно не существует или пусто
|
||||
sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = ''
|
||||
sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем 'sportRazr' и срок действия истек
|
||||
|
|
@ -559,7 +562,7 @@ base_recruit_data AS (
|
|||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' = '10'
|
||||
AND education->>'kodUrObr' = '10'
|
||||
)) THEN 'Среднее профессиональное'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
|
|
@ -575,7 +578,6 @@ base_recruit_data AS (
|
|||
WHEN ((ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1')) THEN 'Нет данных'
|
||||
ELSE 'Не указано' -- Добавлено условие по умолчанию
|
||||
END AS education,
|
||||
|
||||
(
|
||||
SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS childs
|
||||
|
|
@ -583,14 +585,31 @@ base_recruit_data AS (
|
|||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) < make_interval(years => 18)
|
||||
) AS number_children
|
||||
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
) AS number_children
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND r.system_update_date >= '${UP_D}'
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id and ddd.hidden is false
|
||||
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
|
||||
--JOIN public.recruits_history rh on rh.recruit_id=r.id
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id
|
||||
WHERE r.system_update_date >= '${UP_D}'
|
||||
--WHERE r.system_update_date >= '${UP_D}'
|
||||
),
|
||||
adresses as (
|
||||
SELECT
|
||||
r.id as recruit_id,
|
||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
|
||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
|
||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
|
||||
FROM
|
||||
public.recruits AS r
|
||||
LEFT JOIN
|
||||
LATERAL jsonb_array_elements(r.addresses) AS addr ON true AND r.system_update_date >= '${UP_D}'
|
||||
--WHERE r.system_update_date >= '${UP_D}'
|
||||
GROUP BY
|
||||
r.id
|
||||
),
|
||||
extracted_children AS (
|
||||
SELECT
|
||||
|
|
@ -696,16 +715,29 @@ SELECT
|
|||
r.recruit_id, -- ID рекрута
|
||||
r.recruitment_id,
|
||||
r.reason_registration, -- причина постановки на учет char
|
||||
r.date_registration, -- дата постановки на учет date
|
||||
r.date_deregistration, -- дата снятия с учета date
|
||||
r.sports_category, -- наличие спортивной категории bool
|
||||
dl.driver_license, -- категории водительских удостоверений char
|
||||
r.disability_group, -- группа инвалидности char
|
||||
r.tractor_license, -- наличие удостоверения тракториста bool
|
||||
r.criminal_prosecution AS is_wanted, -- наличие уголовного преследования bool
|
||||
r.employment_status AS employment, -- занятость char
|
||||
r.update_date
|
||||
r.update_date,
|
||||
adr.actualAddress as residence,
|
||||
adr.actualAddress_regDateStart as start_date_residence,
|
||||
adr.actualAddress_regDateEnd as end_date_residence,
|
||||
adr.residenceAddress as address_place_stay,
|
||||
adr.residenceAddress_regDateStart as start_date_place_stay,
|
||||
adr.residenceAddress_regDateEnd as end_date_place_stay,
|
||||
case when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
|
||||
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
|
||||
else null end as type_place_stay,
|
||||
r.system_pgs_status
|
||||
FROM base_recruit_data r
|
||||
LEFT JOIN children_count cc ON r.recruit_id = cc.recruit_id -- Присоединение для получения количества детей
|
||||
JOIN driver_license dl ON dl.recruit_id = r.recruit_id</sql>
|
||||
JOIN driver_license dl ON dl.recruit_id = r.recruit_id
|
||||
join adresses adr ON r.recruit_id=adr.recruit_id</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
|
|||
143
mappings_old/info_recruits/job_general_citizen.hwf
Normal file
143
mappings_old/info_recruits/job_general_citizen.hwf
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workflow>
|
||||
<name>job_general_citizen</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/14 16:31:08.086</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/14 16:31:08.086</modified_date>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<actions>
|
||||
<action>
|
||||
<name>Start</name>
|
||||
<description/>
|
||||
<type>SPECIAL</type>
|
||||
<attributes/>
|
||||
<DayOfMonth>1</DayOfMonth>
|
||||
<hour>12</hour>
|
||||
<intervalMinutes>60</intervalMinutes>
|
||||
<intervalSeconds>0</intervalSeconds>
|
||||
<minutes>0</minutes>
|
||||
<repeat>N</repeat>
|
||||
<schedulerType>0</schedulerType>
|
||||
<weekDay>1</weekDay>
|
||||
<parallel>N</parallel>
|
||||
<xloc>480</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_info_recruits.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/job_info_recruits.hwf</filename>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>688</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>supportive_count_citizen.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/supportive_count_citizen.hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1008</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1216</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>delete from public.count_citizen</sql>
|
||||
<sqlfilename/>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>864</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>job_info_recruits.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>supportive_count_citizen.hpl</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_info_recruits.hwf</from>
|
||||
<to>SQL</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL</from>
|
||||
<to>supportive_count_citizen.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
|
|
@ -1213,13 +1213,17 @@
|
|||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<exec_per_row>Y</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_education_diplomas_received.hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>UP_D</name>
|
||||
<stream_name>UPDATE_DATE</stream_name>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<params_from_previous>Y</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
|
|
@ -1355,6 +1359,42 @@
|
|||
<yloc>3264</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success deferment</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>2256</xloc>
|
||||
<yloc>3344</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>deferments</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/deferments.hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1856</xloc>
|
||||
<yloc>3344</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
|
|
@ -1864,21 +1904,21 @@
|
|||
<hop>
|
||||
<from>select_delta_time.hpl</from>
|
||||
<to>citizen_work_activity.hpl</to>
|
||||
<enabled>N</enabled>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_delta_time.hpl</from>
|
||||
<to>citizen_education_diplomas_received.hpl</to>
|
||||
<enabled>N</enabled>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_delta_time.hpl</from>
|
||||
<to>citizen_sports_categories.hpl</to>
|
||||
<enabled>N</enabled>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
|
|
@ -1931,6 +1971,20 @@
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>deferments</from>
|
||||
<to>Success deferment</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_delta_time.hpl</from>
|
||||
<to>deferments</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
<notepad>
|
||||
|
|
@ -1948,8 +2002,8 @@
|
|||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>26</height>
|
||||
<xloc>2336</xloc>
|
||||
<yloc>1552</yloc>
|
||||
<xloc>2352</xloc>
|
||||
<yloc>1616</yloc>
|
||||
<note>доработать дельту, сделать дельту для остальных таблиц</note>
|
||||
<width>325</width>
|
||||
</notepad>
|
||||
|
|
@ -1969,7 +2023,7 @@
|
|||
<fontsize>9</fontsize>
|
||||
<height>26</height>
|
||||
<xloc>2336</xloc>
|
||||
<yloc>1600</yloc>
|
||||
<yloc>1568</yloc>
|
||||
<note>status_change_date добавить колонку в ervu_dashboard.subpoena</note>
|
||||
<width>367</width>
|
||||
</notepad>
|
||||
|
|
|
|||
|
|
@ -52,18 +52,14 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>medical_authorities</table>
|
||||
|
|
@ -91,7 +87,7 @@
|
|||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<xloc>672</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -106,7 +102,7 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
|
|
@ -114,11 +110,6 @@
|
|||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>medical_authorities</table>
|
||||
<value>
|
||||
|
|
@ -141,11 +132,16 @@
|
|||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>registered_in_pnd</name>
|
||||
<rename>registered_in_pnd</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<xloc>672</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -164,19 +160,23 @@
|
|||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'dataPostUchet' start_date,
|
||||
u->>'dataSnyatUchet' close_date,
|
||||
u->>'dataPlan' change_date
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id
|
||||
|
||||
(select ri.recruit_id,
|
||||
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedPND' -> 'svedUchetDisp' ->
|
||||
'svedUchet') u,
|
||||
ri.info -> 'svedFL' -> 'svedPND' -> 'svedUchetDisp' -> 'svedUchet' ->>
|
||||
'priznakNalichSved' = '1' as registered_in_pnd
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info -> 'svedFL' -> 'svedPND' -> 'svedUchetDisp' -> 'svedUchet') =
|
||||
'array')
|
||||
select recruit_id,
|
||||
u ->> 'dataPostUchet' start_date,
|
||||
u ->> 'dataSnyatUchet' close_date,
|
||||
u ->> 'dataPlan' change_date,
|
||||
registered_in_pnd
|
||||
from uchet;
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
@ -200,19 +200,20 @@ join uchet on r.id = uchet.recruit_id
|
|||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
to_date(u->>'dataPostUchet', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
true HIV
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id
|
||||
</sql>
|
||||
(select ri.recruit_id,
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') u,
|
||||
ri.info->'svedFL'->'svedUchetVICH'->>'priznakNalichSved' = '1' has_vich
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') = 'array')
|
||||
select
|
||||
recruit_id,
|
||||
to_date(u->>'dataPostUchet', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
true HIV
|
||||
from uchet;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
|
|||
|
|
@ -42,13 +42,14 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_guardianship</table>
|
||||
|
|
|
|||
|
|
@ -52,23 +52,26 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_number</field>
|
||||
<name>passport_number</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_series</field>
|
||||
<name>passport_series</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>passport</table>
|
||||
|
|
@ -126,23 +129,26 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_number</field>
|
||||
<name>passport_number</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_series</field>
|
||||
<name>passport_series</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>passport</table>
|
||||
|
|
@ -215,11 +221,11 @@
|
|||
THEN TRUE ELSE FALSE
|
||||
END AS actual
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id AND r.system_update_date >= '${UP_D}'
|
||||
WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -72,23 +72,26 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
|
|
@ -141,23 +144,26 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
|
|
@ -210,23 +216,26 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
|
|
@ -279,23 +288,26 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
|
|
@ -370,9 +382,9 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVozTS'->'vozTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVozTS'->'vozTS') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -409,9 +421,9 @@ join prop on r.id = prop.recruit_id
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedNazTS'->'nazTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedNazTS'->'nazTS') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -451,9 +463,9 @@ join prop on r.id = prop.recruit_id
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedON'->'on') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedON'->'on') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -490,9 +502,9 @@ join prop on r.id = prop.recruit_id
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVodTS'->'vodTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVodTS'->'vodTS') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
|
|
@ -119,9 +119,9 @@
|
|||
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS u,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
|
|
@ -138,9 +138,9 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
--AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
|
|
|
|||
|
|
@ -42,18 +42,20 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>subpoena_id</field>
|
||||
<name>subpoena_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>status_change_date</field>
|
||||
<name>status_change_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>subpoena</table>
|
||||
|
|
|
|||
89
mappings_old/info_recruits/supportive_count_citizen.hpl
Normal file
89
mappings_old/info_recruits/supportive_count_citizen.hpl
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>supportive_count_citizen</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/14 16:34:33.840</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/14 16:34:33.840</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>count_citizen</field>
|
||||
<name>citizen_count</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>count_citizen</table>
|
||||
<value>
|
||||
<name>count_citizen</name>
|
||||
<rename>citizen_count</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT count(*) AS citizen_count FROM ervu_dashboard.citizen</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -42,13 +42,14 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>subpoena_id</field>
|
||||
<name>subpoena_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>temporary_measures</table>
|
||||
|
|
|
|||
119
mappings_old/job_copy_deferment_punishment_fz53_info.hwf
Normal file
119
mappings_old/job_copy_deferment_punishment_fz53_info.hwf
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workflow>
|
||||
<name>job_copy_deferment_punishment_fz53_info</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<workflow_status>0</workflow_status>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 17:38:51.703</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 17:38:51.703</modified_date>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<actions>
|
||||
<action>
|
||||
<name>Start 2</name>
|
||||
<description/>
|
||||
<type>SPECIAL</type>
|
||||
<attributes/>
|
||||
<DayOfMonth>1</DayOfMonth>
|
||||
<hour>12</hour>
|
||||
<intervalMinutes>60</intervalMinutes>
|
||||
<intervalSeconds>0</intervalSeconds>
|
||||
<minutes>0</minutes>
|
||||
<repeat>N</repeat>
|
||||
<schedulerType>0</schedulerType>
|
||||
<weekDay>1</weekDay>
|
||||
<parallel>N</parallel>
|
||||
<xloc>528</xloc>
|
||||
<yloc>320</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1408</xloc>
|
||||
<yloc>320</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>copy_punishment_and_deferment_once.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/jobs_once_a_day/copy_punishment_and_deferment_once.hwf</filename>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>800</xloc>
|
||||
<yloc>320</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>citizen_flags.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/jobs_once_a_day/citizen_flags.hwf</filename>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>320</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>Start 2</from>
|
||||
<to>copy_punishment_and_deferment_once.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>copy_punishment_and_deferment_once.hwf</from>
|
||||
<to>citizen_flags.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>citizen_flags.hwf</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<workflow_status>0</workflow_status>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/21 17:23:33.592</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
|
|
@ -50,6 +51,8 @@
|
|||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${Internal.Entry.Current.Folder}/job_pack.pub_recruitment.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
|
|
|
|||
|
|
@ -113,7 +113,9 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||
)
|
||||
select
|
||||
r.id::uuid recruit_id,
|
||||
ch->>'naimRodstvSvyazReb' kinship_type,
|
||||
|
|
@ -130,7 +132,7 @@ select
|
|||
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
|
||||
from public.recruits r
|
||||
join child on r.id = child.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
|
|
@ -148,7 +150,7 @@ join child on r.id = child.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -156,11 +158,14 @@ join child on r.id = child.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_child</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
106
mappings_old/jobs_once/children_flags.hpl
Normal file
106
mappings_old/jobs_once/children_flags.hpl
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>children_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:09:28.624</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:09:28.624</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>children_flags</from>
|
||||
<to>Update_children_flags</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_children_flags</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_dead_child</name>
|
||||
<rename>has_dead_child</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_minor_child</name>
|
||||
<rename>has_minor_child</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>minors_count</name>
|
||||
<rename>minors</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>128</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>children_flags</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH age_threshold AS (
|
||||
SELECT current_date - interval '18 years' AS cutoff
|
||||
)
|
||||
select
|
||||
recruit_id,
|
||||
COUNT(*) FILTER (WHERE birth_date > cutoff) AS minors,
|
||||
bool_or(death_date is not null) as has_dead_child,
|
||||
bool_or(birth_date > cutoff) as has_minor_child
|
||||
from citizen_child, age_threshold
|
||||
group by recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>128</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_appealing_violations_fz53_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:29:46.684</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:29:46.684</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruit_id,
|
||||
appeal_number AS number_appealed, -- номер обжалуемого решения
|
||||
appeal_date AS date_appealed, -- дата обжалуемого решения
|
||||
result_number AS case_number, -- номер принятого решения
|
||||
result_date AS decision_date, -- дата принятия решения
|
||||
CASE
|
||||
WHEN result = '1' THEN 'Удовлетворена'
|
||||
WHEN result = '2' THEN 'Частично удовлетворена'
|
||||
WHEN result = '3' THEN 'Отказано в удовлетворении'
|
||||
ELSE NULL
|
||||
END AS result_appeal, -- код рассмотрения
|
||||
commission_name AS name_commission, -- наименование комиссии, принявшей решение
|
||||
reason_for_add_entry AS grounds, -- основание для внесения записи
|
||||
true AS has_appealing_violations_fz53
|
||||
FROM public.appeal_document_dto
|
||||
WHERE hidden IS FALSE</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>608</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>case_number</column_name>
|
||||
<stream_name>case_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_appealed</column_name>
|
||||
<stream_name>date_appealed</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>decision_date</column_name>
|
||||
<stream_name>decision_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>grounds</column_name>
|
||||
<stream_name>grounds</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>name_commission</column_name>
|
||||
<stream_name>name_commission</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>number_appealed</column_name>
|
||||
<stream_name>number_appealed</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>result_appeal</column_name>
|
||||
<stream_name>result_appeal</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_appealing_violations_fz53</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>912</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_appealing_violations_fz53</name>
|
||||
<rename>has_appealing_violations_fz53</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>912</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
178
mappings_old/jobs_once/citizen_criminal_liability_fz53_once.hpl
Normal file
178
mappings_old/jobs_once/citizen_criminal_liability_fz53_once.hpl
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_criminal_liability_fz53_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:26:43.276</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:26:43.276</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input decision-document-service</from>
|
||||
<to>Table output ervu_dashboard.citizen_criminal_liability_fz53</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input decision-document-service</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input decision-document-service</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruit_id,
|
||||
--, -- сведения о факте уголовного преследования
|
||||
extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
|
||||
extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
|
||||
extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
|
||||
decision_number AS case_number, -- номер уголовного дела (судебный)
|
||||
decision_date AS sentence_date, -- дата приговора
|
||||
extra_info->>'court' AS court_decision, -- суд вынесший приговор
|
||||
CASE
|
||||
WHEN extra_info->>'punishment' = '1' THEN 'Штраф'
|
||||
WHEN extra_info->>'punishment' = '2' THEN 'Обязательные работы'
|
||||
WHEN extra_info->>'punishment' = '3' THEN 'Арест'
|
||||
WHEN extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
|
||||
ELSE NULL
|
||||
END AS type_punishment, -- вид наказания
|
||||
true has_criminal_liability_fz53
|
||||
FROM public.infringement
|
||||
WHERE hidden IS FALSE
|
||||
AND type = 'CRIMINAL'</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output ervu_dashboard.citizen_criminal_liability_fz53</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>case_number_before</column_name>
|
||||
<stream_name>case_number_before</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>court_decision</column_name>
|
||||
<stream_name>court_decision</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_initiation</column_name>
|
||||
<stream_name>date_initiation</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>body_initiated</column_name>
|
||||
<stream_name>body_initiated</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>sentence_date</column_name>
|
||||
<stream_name>sentence_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>type_punishment</column_name>
|
||||
<stream_name>type_punishment</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_criminal_liability_fz53</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_criminal_liability_fz53</name>
|
||||
<rename>has_criminal_liability_fz53</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>disease_once</name>
|
||||
<name>citizen_criminal_record_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
|
|
@ -13,16 +13,16 @@
|
|||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<created_date>2025/02/14 11:23:58.362</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<modified_date>2025/02/14 11:23:58.362</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<to>Table output ervu_dashboard.citizen_criminal_record</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
|
|
@ -40,27 +40,16 @@
|
|||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with zdorov as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
z->>'kodZabol' code,
|
||||
z->>'naimZabol' name,
|
||||
to_date(z->>'dataDiagn', 'YYYY-MM-DD') reg_date
|
||||
from public.recruits r
|
||||
join zdorov on r.id = zdorov.recruit_id;</sql>
|
||||
<sql>SELECT <values> FROM <table name> WHERE <conditions></sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<xloc>384</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<name>Table output ervu_dashboard.citizen_criminal_record</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -70,7 +59,7 @@ join zdorov on r.id = zdorov.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -78,19 +67,22 @@ join zdorov on r.id = zdorov.recruit_id;</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disease</table>
|
||||
<table>citizen_criminal_record</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<xloc>864</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
187
mappings_old/jobs_once/citizen_diploma_once.hpl
Normal file
187
mappings_old/jobs_once/citizen_diploma_once.hpl
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_diploma_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/29 15:56:35.792</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/29 15:56:35.792</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Dummy (do nothing)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Dummy (do nothing)</name>
|
||||
<type>Dummy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>608</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select ri.recruit_id,
|
||||
to_date(diploma_item->>'dataVyd', 'YYYY-MM-DD') as issue_date,
|
||||
diploma_item->>'naimOrg' as education_institution_name,
|
||||
diploma_item->>'kodUrObr' as education_level_code,
|
||||
diploma_item->>'regNomer' as reg_number,
|
||||
diploma_item->>'prVUSpecz' = '1' as vus_spec,
|
||||
diploma_item->>'nomerBlank' as blank_number,
|
||||
diploma_item->>'seriyaBlank' as blank_series,
|
||||
diploma_item->'vidDokMinobr'->>'kodVidDok' as doc_type_code_minobr,
|
||||
diploma_item->'vidDokMinprosv'->>'kodVidDok' as doc_type_code_minprosv,
|
||||
diploma_item->'svedSpeczMinobr'->>'kodSpecz' as education_speciality_minpobr_code,
|
||||
diploma_item->'svedSpeczMinprosv'->>'kodSpecz' as education_speciality_minprosv_code
|
||||
from recruits_info ri
|
||||
join recruits r
|
||||
ON ri.recruit_id = r.id
|
||||
and '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id),
|
||||
jsonb_array_elements(info->'svedFL'->'svedRObr'->'robr') as diploma_item
|
||||
where info->'svedFL'->'svedRObr'->'robr' != 'null';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>issue_date</column_name>
|
||||
<stream_name>issue_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_institution_name</column_name>
|
||||
<stream_name>education_institution_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_level_code</column_name>
|
||||
<stream_name>education_level_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>reg_number</column_name>
|
||||
<stream_name>reg_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>vus_spec</column_name>
|
||||
<stream_name>vus_spec</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>blank_number</column_name>
|
||||
<stream_name>blank_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>blank_series</column_name>
|
||||
<stream_name>blank_series</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>doc_type_code_minobr</column_name>
|
||||
<stream_name>doc_type_code_minobr</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>doc_type_code_minprosv</column_name>
|
||||
<stream_name>doc_type_code_minprosv</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_speciality_minpobr_code</column_name>
|
||||
<stream_name>education_speciality_minpobr_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_speciality_minprosv_code</column_name>
|
||||
<stream_name>education_speciality_minprosv_code</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_education_diploma</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>496</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Table output</source_transform>
|
||||
<target_transform>Dummy (do nothing)</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -44,7 +44,9 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVUZ'->'vuz') as vuz,
|
||||
ri.recruit_id recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVUZ'->'vuz') = 'array' limit 2)
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVUZ'->'vuz') = 'array' --limit 2
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
--vuz->'svedOrg'->>'kodTipOrg',
|
||||
|
|
@ -65,7 +67,7 @@ select
|
|||
--vuz->'svedObrProg'->>'prVUSpecz',
|
||||
--vuz->'svedObrProg'->>'dataNachObuch',
|
||||
--vuz->'svedObrProg'->>'kodFormaObuch',
|
||||
--vuz->'svedObrProg'->>'naimFormaObuch',
|
||||
--vuz->'svedObrProg'->>'naimFormaObuch',
|
||||
--vuz->'svedObrProg'->>'planDataOkonch',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinobr'->>'kodSpecz',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinobr'->>'naimSpecz',
|
||||
|
|
@ -78,7 +80,7 @@ select
|
|||
from public.recruits r
|
||||
join vuz on r.id = vuz.recruit_id
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>496</xloc>
|
||||
|
|
@ -96,7 +98,7 @@ join vuz on r.id = vuz.recruit_id
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -104,11 +106,14 @@ join vuz on r.id = vuz.recruit_id
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_education_diplomas_received</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -50,6 +50,16 @@
|
|||
<to>Update_deputy_flag</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>has_criminal_prosecution</from>
|
||||
<to>Update_has_criminal_prosecution</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>criminal_record</from>
|
||||
<to>Update_criminal_record</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_children_flags</name>
|
||||
|
|
@ -65,13 +75,11 @@
|
|||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -110,13 +118,11 @@
|
|||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -151,13 +157,11 @@
|
|||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -192,13 +196,11 @@
|
|||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -233,13 +235,11 @@
|
|||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -270,13 +270,11 @@
|
|||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -477,6 +475,144 @@ group by recruit_id;</sql>
|
|||
<yloc>800</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update_has_criminal_prosecution</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_criminal_prosecution</name>
|
||||
<rename>has_criminal_prosecution</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>1024</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>has_criminal_prosecution</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>
|
||||
SELECT
|
||||
distinct
|
||||
recruit_id,
|
||||
true as has_criminal_prosecution
|
||||
FROM prosecution
|
||||
where close_date is null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>1024</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update_criminal_record</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>serving_sentence</name>
|
||||
<rename>serving_sentence</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_sentence</name>
|
||||
<rename>has_sentence</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_criminal_record</name>
|
||||
<rename>has_criminal_record</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>1120</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>criminal_record</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruit_id,
|
||||
bool_or(start_date < current_date and (release_date isnull or release_date > current_date)) as serving_sentence,
|
||||
true as has_sentence,
|
||||
true as has_criminal_record
|
||||
FROM ervu_dashboard.punishment
|
||||
group by recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>1120</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
400
mappings_old/jobs_once/citizen_flags.hwf
Normal file
400
mappings_old/jobs_once/citizen_flags.hwf
Normal file
|
|
@ -0,0 +1,400 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workflow>
|
||||
<name>citizen_flags</name>
|
||||
<name_sync_with_filename>N</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<workflow_status>0</workflow_status>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:38:56.431</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:38:56.431</modified_date>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<actions>
|
||||
<action>
|
||||
<name>Start</name>
|
||||
<description/>
|
||||
<type>SPECIAL</type>
|
||||
<attributes/>
|
||||
<DayOfMonth>1</DayOfMonth>
|
||||
<hour>12</hour>
|
||||
<intervalMinutes>60</intervalMinutes>
|
||||
<intervalSeconds>0</intervalSeconds>
|
||||
<minutes>0</minutes>
|
||||
<repeat>N</repeat>
|
||||
<schedulerType>0</schedulerType>
|
||||
<weekDay>1</weekDay>
|
||||
<parallel>N</parallel>
|
||||
<xloc>304</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success sitizen_flags</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1760</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>children_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\children_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>480</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>opekun_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\opekun_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>624</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>driver_licenses_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\driver_licenses_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>citizenship_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\citizenship_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>928</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>property_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\property_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>deputy_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\deputy_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1200</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>criminal_prosecution_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\criminal_prosecution_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>criminal_record_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\criminal_record_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1184</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>temporary_measure_flag.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\temporary_measure_flag.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1376</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>subpoena_flags.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}\jobs_once\subpoena_flags.hpl</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1584</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>children_flags.hpl</from>
|
||||
<to>opekun_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>opekun_flags.hpl</from>
|
||||
<to>driver_licenses_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>driver_licenses_flags.hpl</from>
|
||||
<to>citizenship_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>citizenship_flags.hpl</from>
|
||||
<to>property_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>property_flags.hpl</from>
|
||||
<to>deputy_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>criminal_prosecution_flags.hpl</from>
|
||||
<to>criminal_record_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>criminal_prosecution_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>temporary_measure_flag.hpl</from>
|
||||
<to>subpoena_flags.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>criminal_record_flags.hpl</from>
|
||||
<to>temporary_measure_flag.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>subpoena_flags.hpl</from>
|
||||
<to>Success sitizen_flags</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
200
mappings_old/jobs_once/citizen_foreign_diploma_once.hpl
Normal file
200
mappings_old/jobs_once/citizen_foreign_diploma_once.hpl
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_foreign_diploma_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/29 16:01:18.326</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/29 16:01:18.326</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Dummy (do nothing)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Dummy (do nothing)</name>
|
||||
<type>Dummy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>928</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select ri.recruit_id,
|
||||
diploma_item->>'kvalif' as qualification,
|
||||
diploma_item->>'kodOKSM' as oksm_code,
|
||||
diploma_item->>'naprPod' as study_field,
|
||||
diploma_item->>'nomSved' as education_certificate_number,
|
||||
diploma_item->>'kodUrObr' as education_level_code,
|
||||
to_date(diploma_item->>'dataPriz', 'YYYY-MM-DD') as recognition_date,
|
||||
diploma_item->>'prVUSpecz' = '1' as vus_spec,
|
||||
diploma_item->>'regNomDok' as doc_reg_num,
|
||||
diploma_item->>'serNomDok' as doc_reg_series,
|
||||
diploma_item->>'naimInoDok' as foreign_doc_name,
|
||||
diploma_item->>'naimUchZaved' as education_institution_name,
|
||||
diploma_item->'svedSpeczMinobr'->>'kodSpecz' as education_speciality_minpobr_code,
|
||||
diploma_item->'svedSpeczMinprosv'->>'kodSpecz' as education_speciality_minprosv_code
|
||||
from recruits_info ri
|
||||
join recruits r
|
||||
ON ri.recruit_id = r.id
|
||||
and '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id),
|
||||
jsonb_array_elements(info->'svedFL'->'svedInObr'->'inObr') as diploma_item
|
||||
where info->'svedFL'->'svedInObr'->'inObr' != 'null';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>656</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>qualification</column_name>
|
||||
<stream_name>qualification</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>oksm_code</column_name>
|
||||
<stream_name>oksm_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>study_field</column_name>
|
||||
<stream_name>study_field</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_certificate_number</column_name>
|
||||
<stream_name>education_certificate_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_level_code</column_name>
|
||||
<stream_name>education_level_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>recognition_date</column_name>
|
||||
<stream_name>recognition_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>vus_spec</column_name>
|
||||
<stream_name>vus_spec</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>doc_reg_num</column_name>
|
||||
<stream_name>doc_reg_num</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>doc_reg_series</column_name>
|
||||
<stream_name>doc_reg_series</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>foreign_doc_name</column_name>
|
||||
<stream_name>foreign_doc_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_institution_name</column_name>
|
||||
<stream_name>education_institution_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_speciality_minpobr_code</column_name>
|
||||
<stream_name>education_speciality_minpobr_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_speciality_minprosv_code</column_name>
|
||||
<stream_name>education_speciality_minprosv_code</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_foreign_education_diploma</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>816</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Table output</source_transform>
|
||||
<target_transform>Dummy (do nothing)</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -49,6 +49,7 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedIG') cit,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedIG') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -57,7 +58,7 @@ select
|
|||
to_date(cit->>'dataPriobrIG', 'YYYY-MM-DD') citizenship_date
|
||||
from public.recruits r
|
||||
join citizen on r.id = citizen.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
|
|
@ -82,6 +83,7 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedPP') cit,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedPP') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -90,7 +92,7 @@ select
|
|||
to_date(cit->>'dataPriobrPP', 'YYYY-MM-DD') residense_right_date
|
||||
from public.recruits r
|
||||
join citizen on r.id = citizen.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
|
|
@ -108,7 +110,7 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -116,11 +118,14 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship_foreign</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -142,7 +147,7 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -150,11 +155,14 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship_foreign</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
283
mappings_old/jobs_once/citizen_kolledzh_once.hpl
Normal file
283
mappings_old/jobs_once/citizen_kolledzh_once.hpl
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_kolledzh_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/28 19:08:50.902</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/28 19:08:50.902</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Dummy (do nothing)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select ri.recruit_id,
|
||||
kolledzh_item->'svedOrg'->>'inn' as inn,
|
||||
kolledzh_item->'svedOrg'->>'kpp' as kpp,
|
||||
coalesce(kolledzh_item->'svedOrg'->>'ogrn', kolledzh_item->'svedOrg'->>'ogrnip') as ogrn,
|
||||
kolledzh_item->'svedOrg'->>'naimOrg' as educational_institution_name,
|
||||
kolledzh_item->'svedOrg'->>'adresOrg' as educational_institution_address,
|
||||
kolledzh_item->'svedOrg'->>'kodTipOrg' as educational_institution_type_code,
|
||||
kolledzh_item->>'kodStatus' as education_status_code,
|
||||
to_date(kolledzh_item->'svedVosst'->>'dataVosst', 'YYYY-MM-DD') as recovery_date,
|
||||
to_date(kolledzh_item->'svedVosst'->>'nomPrikazVosstnomPrikazVosst', 'YYYY-MM-DD') as recovery_order_date,
|
||||
kolledzh_item->'svedVosst'->>'nomPrikazVosst' recovery_order_number,
|
||||
kolledzh_item->>'kodUrovObr' as education_level_code,
|
||||
kolledzh_item->>'nomerKursa' as grade_number,
|
||||
to_date(kolledzh_item->'svedOtpusk'->0->>'dataNach', 'YYYY-MM-DD') as leave_start_date,
|
||||
to_date(kolledzh_item->'svedOtpusk'->0->>'dataOkonch', 'YYYY-MM-DD') as leave_end_date,
|
||||
kolledzh_item->'svedOtpusk'->0->>'kodPrichOtpusk' as leave_reason_code,
|
||||
to_date(kolledzh_item->>'dataZachisl', 'YYYY-MM-DD') as admission_date,
|
||||
kolledzh_item->>'prPervObuch' = '1' as first_education,
|
||||
kolledzh_item->'svedObrProg'->>'prVUSpecz' = '1' as vus_spec,
|
||||
to_date(kolledzh_item->'svedObrProg'->>'dataNachObuch', 'YYYY-MM-DD') as education_start_date,
|
||||
kolledzh_item->'svedObrProg'->>'kodFormaObuch' as education_form_code,
|
||||
to_date(kolledzh_item->'svedObrProg'->>'planDataOkonch', 'YYYY-MM-DD') as planned_education_end_date,
|
||||
kolledzh_item->'svedObrProg'->'svedSpeczMinobr'->>'kodSpecz' as minobr_spec_code,
|
||||
kolledzh_item->'svedObrProg'->'svedSpeczMinprosv'->>'kodSpecz' as minprosv_spec_code,
|
||||
to_date(kolledzh_item->'svedObrProg'->'svedOtchisl'->>'dataOtchisl', 'YYYY-MM-DD') as expulsion_date,
|
||||
to_date(kolledzh_item->'svedObrProg'->'svedOtchisl'->>'dataPrikazOtchisl', 'YYYY-MM-DD') as expulsion_order_date,
|
||||
kolledzh_item->'svedObrProg'->'svedOtchisl'->>'nomPrikazOtchisl' as expulsion_order_number,
|
||||
to_date(kolledzh_item->'svedVoenObuch'->>'dataNach', 'YYYY-MM-DD') as military_education_start_date,
|
||||
to_date(kolledzh_item->'svedVoenObuch'->>'dataOkonch', 'YYYY-MM-DD') as military_education_end_date,
|
||||
to_date(kolledzh_item->>'dataPrikazZachisl', 'YYYY-MM-DD') as admission_order_date,
|
||||
kolledzh_item->>'nomPrikazZachisl' as admission_order_number
|
||||
from recruits_info ri
|
||||
join recruits r
|
||||
ON ri.recruit_id = r.id
|
||||
and '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id),
|
||||
jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') as kolledzh_item
|
||||
where info->'svedFL'->'svedKolledzh'->'kolledzh' != 'null';
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>384</xloc>
|
||||
<yloc>192</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>inn</column_name>
|
||||
<stream_name>inn</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>kpp</column_name>
|
||||
<stream_name>kpp</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>ogrn</column_name>
|
||||
<stream_name>ogrn</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_name</column_name>
|
||||
<stream_name>educational_institution_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_address</column_name>
|
||||
<stream_name>educational_institution_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_type_code</column_name>
|
||||
<stream_name>educational_institution_type_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_status_code</column_name>
|
||||
<stream_name>education_status_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>recovery_date</column_name>
|
||||
<stream_name>recovery_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>recovery_order_date</column_name>
|
||||
<stream_name>recovery_order_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>recovery_order_number</column_name>
|
||||
<stream_name>recovery_order_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_level_code</column_name>
|
||||
<stream_name>education_level_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>grade_number</column_name>
|
||||
<stream_name>grade_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>leave_start_date</column_name>
|
||||
<stream_name>leave_start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>leave_end_date</column_name>
|
||||
<stream_name>leave_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>leave_reason_code</column_name>
|
||||
<stream_name>leave_reason_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_date</column_name>
|
||||
<stream_name>admission_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>first_education</column_name>
|
||||
<stream_name>first_education</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>vus_spec</column_name>
|
||||
<stream_name>vus_spec</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_start_date</column_name>
|
||||
<stream_name>education_start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_form_code</column_name>
|
||||
<stream_name>education_form_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>planned_education_end_date</column_name>
|
||||
<stream_name>planned_education_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>minobr_spec_code</column_name>
|
||||
<stream_name>minobr_spec_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>minprosv_spec_code</column_name>
|
||||
<stream_name>minprosv_spec_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>expulsion_date</column_name>
|
||||
<stream_name>expulsion_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>expulsion_order_date</column_name>
|
||||
<stream_name>expulsion_order_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>expulsion_order_number</column_name>
|
||||
<stream_name>expulsion_order_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>military_education_start_date</column_name>
|
||||
<stream_name>military_education_start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>military_education_end_date</column_name>
|
||||
<stream_name>military_education_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_order_date</column_name>
|
||||
<stream_name>admission_order_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_order_number</column_name>
|
||||
<stream_name>admission_order_number</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_education</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>560</xloc>
|
||||
<yloc>192</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Dummy (do nothing)</name>
|
||||
<type>Dummy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>656</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Table output</source_transform>
|
||||
<target_transform>Dummy (do nothing)</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
209
mappings_old/jobs_once/citizen_liability_fz53_once.hpl
Normal file
209
mappings_old/jobs_once/citizen_liability_fz53_once.hpl
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_liability_fz53_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/22 17:49:36.858</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/22 17:49:36.858</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input decision-document-service</from>
|
||||
<to>Table output ervu_dashboard.citizen_liability_fz53</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input decision-document-service</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input decision-document-service</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruit_id,
|
||||
extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
|
||||
extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
|
||||
extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
|
||||
decision_number AS case_number, -- номер дела об административном правонарушении
|
||||
decision_date AS date_resolution, -- дата постановления
|
||||
extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
|
||||
extra_info->>'court' AS court_decision, -- суд, вынесший постановление
|
||||
extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
|
||||
CASE
|
||||
WHEN decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
|
||||
WHEN decision_reason = '2' THEN 'Уклонение от медицинского обследования'
|
||||
WHEN decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
|
||||
ELSE NULL
|
||||
END AS reason_use, -- причина применения
|
||||
extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
|
||||
extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
|
||||
CASE
|
||||
WHEN extra_info->>'punishment' = '1' THEN 'Предупреждение'
|
||||
WHEN extra_info->>'punishment' = '2' THEN 'Административный штраф'
|
||||
ELSE NULL
|
||||
END AS type_punishment, -- вид наказания
|
||||
true AS has_liability_fz53
|
||||
FROM public.infringement
|
||||
WHERE hidden IS FALSE
|
||||
AND type = 'ADMINISTRATIVE'</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>608</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output ervu_dashboard.citizen_liability_fz53</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>article_koap_rf</column_name>
|
||||
<stream_name>article_koap_rf</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>body_initiated</column_name>
|
||||
<stream_name>body_initiated</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>case_number</column_name>
|
||||
<stream_name>case_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>case_number_before</column_name>
|
||||
<stream_name>case_number_before</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>court_decision</column_name>
|
||||
<stream_name>court_decision</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_initiation</column_name>
|
||||
<stream_name>date_initiation</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_resolution</column_name>
|
||||
<stream_name>date_resolution</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>name_vc</column_name>
|
||||
<stream_name>name_vc</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>reason_use</column_name>
|
||||
<stream_name>reason_use</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>size_term_punishment</column_name>
|
||||
<stream_name>size_term_punishment</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>start_date</column_name>
|
||||
<stream_name>start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>type_punishment</column_name>
|
||||
<stream_name>type_punishment</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_liability_fz53</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1008</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_liability_fz53</name>
|
||||
<rename>has_liability_fz53</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1008</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
193
mappings_old/jobs_once/citizen_school_once.hpl
Normal file
193
mappings_old/jobs_once/citizen_school_once.hpl
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_school_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/28 19:08:48.700</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/28 19:08:48.700</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Dummy (do nothing)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select ri.recruit_id,
|
||||
shkola_item->'svedOrg'->>'inn' as inn,
|
||||
shkola_item->'svedOrg'->>'kpp' as kpp,
|
||||
coalesce(shkola_item->'svedOrg'->>'ogrn', shkola_item->'svedOrg'->>'ogrnip') as ogrn,
|
||||
shkola_item->'svedOrg'->>'naimOrg' as educational_institution_name,
|
||||
shkola_item->'svedOrg'->>'adresOrg' as educational_institution_address,
|
||||
shkola_item->>'kodStatus' as education_status_code,
|
||||
'9' as education_level_code, -- костыль
|
||||
shkola_item->>'klass' as grade_number,
|
||||
to_date(shkola_item->>'dataPostup', 'YYYY-MM-DD') as admission_date,
|
||||
to_date(shkola_item->>'dataOkonch', 'YYYY-MM-DD') as planned_education_end_date,
|
||||
to_date(shkola_item->>'dataPrikazZachisl', 'YYYY-MM-DD') as admission_order_date,
|
||||
shkola_item->>'nomPrikazZachisl' as admission_order_number
|
||||
from recruits_info ri
|
||||
join recruits r
|
||||
ON ri.recruit_id = r.id
|
||||
and '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id),
|
||||
jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') as shkola_item
|
||||
where info->'svedFL'->'svedSHkola'->'shkola' != 'null';
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>inn</column_name>
|
||||
<stream_name>inn</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>kpp</column_name>
|
||||
<stream_name>kpp</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>ogrn</column_name>
|
||||
<stream_name>ogrn</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_name</column_name>
|
||||
<stream_name>educational_institution_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_address</column_name>
|
||||
<stream_name>educational_institution_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_status_code</column_name>
|
||||
<stream_name>education_status_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_level_code</column_name>
|
||||
<stream_name>education_level_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>grade_number</column_name>
|
||||
<stream_name>grade_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_date</column_name>
|
||||
<stream_name>admission_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>planned_education_end_date</column_name>
|
||||
<stream_name>planned_education_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_order_date</column_name>
|
||||
<stream_name>admission_order_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_order_number</column_name>
|
||||
<stream_name>admission_order_number</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_education</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Dummy (do nothing)</name>
|
||||
<type>Dummy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>608</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Table output</source_transform>
|
||||
<target_transform>Dummy (do nothing)</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
172
mappings_old/jobs_once/citizen_sports_categories_once.hpl
Normal file
172
mappings_old/jobs_once/citizen_sports_categories_once.hpl
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_sports_categories_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:19:01.880</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:19:01.880</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<sql>SELECT recruit_id,
|
||||
(sport_info->'sportRazr'->>'dataPrisv')::date start_date_category,
|
||||
(sport_info->'sportRazr'->>'dataDeistv')::date as end_date_category,
|
||||
sport_info->'sportRazr'->>'razryadNaim' as sports_category_name,
|
||||
sport_info->'sportRazr'->>'sportNaim' as type_sport,
|
||||
sport_info->>'sportZvan' as sport_title,
|
||||
case when sport_info->>'sportRazr' != 'null'
|
||||
then true else false end as having_sport_category,
|
||||
(case when sport_info->>'sportZvan' != 'null'
|
||||
then true else false end) as having_sport_title
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}'),
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedSport'->'sport') AS sport_info
|
||||
WHERE info->'svedFL'->'svedSport'->>'sport' != 'null'
|
||||
and info->'svedFL'->'svedSport'->>'sport' != '[]';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>start_date_category</column_name>
|
||||
<stream_name>start_date_category</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>end_date_category</column_name>
|
||||
<stream_name>end_date_category</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>sports_category_name</column_name>
|
||||
<stream_name>sports_category_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>type_sport</column_name>
|
||||
<stream_name>type_sport</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>sport_title</column_name>
|
||||
<stream_name>sport_title</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_sports_categories</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>sports_category</name>
|
||||
<rename>having_sport_category</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>having_sport_title</name>
|
||||
<rename>having_sport_title</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
283
mappings_old/jobs_once/citizen_vuz_education_once.hpl
Normal file
283
mappings_old/jobs_once/citizen_vuz_education_once.hpl
Normal file
|
|
@ -0,0 +1,283 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_vuz_education_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/27 19:55:49.026</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/27 19:55:49.026</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>vuz_input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Dummy (do nothing)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Dummy (do nothing)</name>
|
||||
<type>Dummy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>624</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>inn</column_name>
|
||||
<stream_name>inn</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>kpp</column_name>
|
||||
<stream_name>kpp</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>ogrn</column_name>
|
||||
<stream_name>ogrn</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_name</column_name>
|
||||
<stream_name>educational_institution_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_address</column_name>
|
||||
<stream_name>educational_institution_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>educational_institution_type_code</column_name>
|
||||
<stream_name>educational_institution_type_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_status_code</column_name>
|
||||
<stream_name>education_status_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>recovery_date</column_name>
|
||||
<stream_name>recovery_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>recovery_order_date</column_name>
|
||||
<stream_name>recovery_order_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>recovery_order_number</column_name>
|
||||
<stream_name>recovery_order_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_level_code</column_name>
|
||||
<stream_name>education_level_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>grade_number</column_name>
|
||||
<stream_name>grade_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>leave_start_date</column_name>
|
||||
<stream_name>leave_start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>leave_end_date</column_name>
|
||||
<stream_name>leave_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>leave_reason_code</column_name>
|
||||
<stream_name>leave_reason_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_date</column_name>
|
||||
<stream_name>admission_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>first_education</column_name>
|
||||
<stream_name>first_education</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>vus_spec</column_name>
|
||||
<stream_name>vus_spec</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_start_date</column_name>
|
||||
<stream_name>education_start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>education_form_code</column_name>
|
||||
<stream_name>education_form_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>planned_education_end_date</column_name>
|
||||
<stream_name>planned_education_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>minobr_spec_code</column_name>
|
||||
<stream_name>minobr_spec_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>minprosv_spec_code</column_name>
|
||||
<stream_name>minprosv_spec_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>expulsion_date</column_name>
|
||||
<stream_name>expulsion_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>expulsion_order_date</column_name>
|
||||
<stream_name>expulsion_order_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>expulsion_order_number</column_name>
|
||||
<stream_name>expulsion_order_number</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>military_education_start_date</column_name>
|
||||
<stream_name>military_education_start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>military_education_end_date</column_name>
|
||||
<stream_name>military_education_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_order_date</column_name>
|
||||
<stream_name>admission_order_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>admission_order_number</column_name>
|
||||
<stream_name>admission_order_number</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_education</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>vuz_input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select ri.recruit_id,
|
||||
vuz_item->'svedOrg'->>'inn' as inn,
|
||||
vuz_item->'svedOrg'->>'kpp' as kpp,
|
||||
coalesce(vuz_item->'svedOrg'->>'ogrn', vuz_item->'svedOrg'->>'ogrnip') as ogrn,
|
||||
vuz_item->'svedOrg'->>'naimOrg' as educational_institution_name,
|
||||
vuz_item->'svedOrg'->>'adresOrg' as educational_institution_address,
|
||||
vuz_item->'svedOrg'->>'kodTipOrg' as educational_institution_type_code,
|
||||
vuz_item->>'kodStatus' as education_status_code,
|
||||
to_date(vuz_item->'svedVosst'->>'dataVosst', 'YYYY-MM-DD') as recovery_date,
|
||||
to_date(vuz_item->'svedVosst'->>'nomPrikazVosstnomPrikazVosst', 'YYYY-MM-DD') as recovery_order_date,
|
||||
vuz_item->'svedVosst'->>'nomPrikazVosst' recovery_order_number,
|
||||
vuz_item->>'kodUrovObr' as education_level_code,
|
||||
vuz_item->>'nomerKursa' as grade_number,
|
||||
to_date(vuz_item->'svedOtpusk'->0->>'dataNach', 'YYYY-MM-DD') as leave_start_date,
|
||||
to_date(vuz_item->'svedOtpusk'->0->>'dataOkonch', 'YYYY-MM-DD') as leave_end_date,
|
||||
vuz_item->'svedOtpusk'->0->>'kodPrichOtpusk' as leave_reason_code,
|
||||
to_date(vuz_item->>'dataZachisl', 'YYYY-MM-DD') as admission_date,
|
||||
vuz_item->>'prPervObuch' = '1' as first_education,
|
||||
vuz_item->'svedObrProg'->>'prVUSpecz' = '1' as vus_spec,
|
||||
to_date(vuz_item->'svedObrProg'->>'dataNachObuch', 'YYYY-MM-DD') as education_start_date,
|
||||
vuz_item->'svedObrProg'->>'kodFormaObuch' as education_form_code,
|
||||
to_date(vuz_item->'svedObrProg'->>'planDataOkonch', 'YYYY-MM-DD') as planned_education_end_date,
|
||||
vuz_item->'svedObrProg'->'svedSpeczMinobr'->>'kodSpecz' as minobr_spec_code,
|
||||
vuz_item->'svedObrProg'->'svedSpeczMinprosv'->>'kodSpecz' as minprosv_spec_code,
|
||||
to_date(vuz_item->'svedObrProg'->'svedOtchisl'->>'dataOtchisl', 'YYYY-MM-DD') as expulsion_date,
|
||||
to_date(vuz_item->'svedObrProg'->'svedOtchisl'->>'dataPrikazOtchisl', 'YYYY-MM-DD') as expulsion_order_date,
|
||||
vuz_item->'svedObrProg'->'svedOtchisl'->>'nomPrikazOtchisl' as expulsion_order_number,
|
||||
to_date(vuz_item->'svedVoenObuch'->>'dataNach', 'YYYY-MM-DD') as military_education_start_date,
|
||||
to_date(vuz_item->'svedVoenObuch'->>'dataOkonch', 'YYYY-MM-DD') as military_education_end_date,
|
||||
to_date(vuz_item->>'dataPrikazZachisl', 'YYYY-MM-DD') as admission_order_date,
|
||||
vuz_item->>'nomPrikazZachisl' as admission_order_number
|
||||
from recruits_info ri
|
||||
join recruits r
|
||||
ON ri.recruit_id = r.id
|
||||
and '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id),
|
||||
jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') as vuz_item
|
||||
where info->'svedFL'->'svedVUZ'->'vuz' != 'null';
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>304</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Table output</source_transform>
|
||||
<target_transform>Dummy (do nothing)</target_transform>
|
||||
<is_enabled>N</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
289
mappings_old/jobs_once/citizen_work_activity_once.hpl
Normal file
289
mappings_old/jobs_once/citizen_work_activity_once.hpl
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_work_activity_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:02:25.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:02:25.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH trud_info AS (
|
||||
SELECT
|
||||
ri.info,
|
||||
ri.recruit_id::uuid,
|
||||
case when ri.info->'svedFL'->'svedTrud'->'trudDeyat' IS NULL THEN NULL
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
|
||||
(ri.info->'svedFL'->'svedTrud'->'trudDeyat'->0) end as trud_deyat,
|
||||
case when ri.info->'svedFL'->'svedTrud'->'trudDeyat' IS NULL THEN NULL
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedTrud'->'trudDeyat'->0->'svedUhodReb') = 'array'
|
||||
then ri.info->'svedFL'->'svedTrud'->'trudDeyat'->0->'svedUhodReb'->0 end AS parental_leave_info,
|
||||
coalesce(
|
||||
ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat',
|
||||
ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'predRabotodat'
|
||||
) AS employer,
|
||||
(CASE
|
||||
WHEN info->'svedFL'->'svedRegIP'->'regIP' IS NULL THEN NULL
|
||||
WHEN jsonb_typeof(info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN
|
||||
(info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP'->0)
|
||||
ELSE
|
||||
info->'svedFL'->'svedRegIP'->'regIP'->'predRegIP'
|
||||
END) AS reg_ip,
|
||||
COALESCE(
|
||||
ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD',
|
||||
ri.info->'svedFL'->'svedNPD'->'npd'->'predNPD'
|
||||
) AS self_employment
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
)
|
||||
SELECT
|
||||
ti.recruit_id::uuid,
|
||||
(ti.trud_deyat->>'dataMeropr')::date AS personnel_event_date,
|
||||
ti.trud_deyat->>'naimTipKadrMeropr' AS personnel_event_type,
|
||||
case when ti.trud_deyat->>'prAktMestRab' = '1' then true else false end AS current_workplace,
|
||||
ti.trud_deyat->>'trudFunkcziya' AS position,
|
||||
ti.trud_deyat->'svedOrg'->>'naimOrg' AS employer_name,
|
||||
ti.employer->'svedYUL'->>'kpp' AS employer_kpp,
|
||||
CASE
|
||||
WHEN ti.employer->>'svedYUL' != 'null' THEN 'Юридическое лицо'
|
||||
WHEN ti.employer->>'svedIP' != 'null' THEN 'Индивидуальный предприниматель'
|
||||
END AS employer_category,
|
||||
COALESCE(
|
||||
ti.employer->'svedYUL'->>'innyul',
|
||||
ti.employer->'svedIP'->>'innyfl'
|
||||
) AS employer_inn,
|
||||
ti.employer->'svedYUL'->'svedOPK'->>'region' AS employer_address,
|
||||
COALESCE(
|
||||
ti.employer->'svedIP'->>'ogrnip',
|
||||
ti.employer->'svedYUL'->'extend'->>'ogrn'
|
||||
) AS employer_ogrnip,
|
||||
ti.employer->'extend'->>'tipPodrazdRabotodat' as employer_unit_type,
|
||||
ti.employer->'extend'->>'adresPodrazdRabotodat' as employer_unit_address,
|
||||
(ti.parental_leave_info->>'dataNachUhodReb')::date as parental_leave_start_date,
|
||||
(ti.parental_leave_info->>'dataKonUhodReb')::date as parental_leave_end_date,
|
||||
case when (ti.parental_leave_info->>'dataNachUhodReb')::date <= current_date
|
||||
and ((ti.parental_leave_info->>'dataKonUhodReb')::date is null
|
||||
or (ti.parental_leave_info->>'dataKonUhodReb')::date > current_date)
|
||||
then true
|
||||
else false end as parental_leave_active,
|
||||
(ti.reg_ip->>'dataRegIP')::date as reg_ip_date,
|
||||
(ti.reg_ip->>'dataINNNed')::date as dereg_ip_date,
|
||||
ti.reg_ip->>'ogrnip' as ogrnip_ip,
|
||||
case when ti.reg_ip != 'null'
|
||||
then true else false end as active_ip,
|
||||
ti.self_employment->>'dataUchNPD' as reg_self_employment_date,
|
||||
ti.self_employment->>'dataSnUchNPD' as dereg_self_employment_date,
|
||||
case when ti.self_employment != 'null'
|
||||
then true else false end as active_self_employment
|
||||
FROM trud_info ti
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>0</xloc>
|
||||
<yloc>0</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>employer_category</column_name>
|
||||
<stream_name>employer_category</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>organization_name</column_name>
|
||||
<stream_name>employer_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>inn</column_name>
|
||||
<stream_name>employer_inn</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>ogrn</column_name>
|
||||
<stream_name>employer_ogrnip</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>kpp</column_name>
|
||||
<stream_name>employer_kpp</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>organization_address</column_name>
|
||||
<stream_name>employer_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>type_separate_division</column_name>
|
||||
<stream_name>employer_unit_type</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>address_separate_division</column_name>
|
||||
<stream_name>employer_unit_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>type_hr_event</column_name>
|
||||
<stream_name>personnel_event_type</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_hr_event</column_name>
|
||||
<stream_name>personnel_event_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>job_title</column_name>
|
||||
<stream_name>position</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>start_date_parental_leave</column_name>
|
||||
<stream_name>parental_leave_start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>end_date_parental_leave</column_name>
|
||||
<stream_name>parental_leave_end_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>ogrn_ip</column_name>
|
||||
<stream_name>ogrnip_ip</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_reg_ip</column_name>
|
||||
<stream_name>reg_ip_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_dereg_ip</column_name>
|
||||
<stream_name>dereg_ip_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_reg_self</column_name>
|
||||
<stream_name>reg_self_employment_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>date_dereg_self</column_name>
|
||||
<stream_name>dereg_self_employment_date</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_work_activity</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>144</xloc>
|
||||
<yloc>0</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>employed</name>
|
||||
<rename>current_workplace</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>active_reg_ip</name>
|
||||
<rename>active_ip</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>active_parental_leave</name>
|
||||
<rename>parental_leave_active</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>self_employed</name>
|
||||
<rename>active_self_employment</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>320</xloc>
|
||||
<yloc>0</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
104
mappings_old/jobs_once/citizenship_flags.hpl
Normal file
104
mappings_old/jobs_once/citizenship_flags.hpl
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizenship_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:12:27.341</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:12:27.341</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>citizenship_flag_output</from>
|
||||
<to>Update_citizenship_flag</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_citizenship_flag</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_russian_citizenship</name>
|
||||
<rename>has_russian_citizenship</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_foreign_citizenship</name>
|
||||
<rename>has_foreign_citizenship</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizenship_flag_output</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with foreign_citizenship as (
|
||||
select recruit_id, true as has_foreign_citizenship
|
||||
from citizenship_foreign
|
||||
)
|
||||
select
|
||||
citizenship.recruit_id,
|
||||
true as has_russian_citizenship,
|
||||
coalesce(has_foreign_citizenship, false) as has_foreign_citizenship
|
||||
from citizenship
|
||||
left join foreign_citizenship
|
||||
on foreign_citizenship.recruit_id = citizenship.recruit_id
|
||||
where renunciation_number is null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -50,10 +50,10 @@ ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_nu
|
|||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where ri.info->'svedFL'->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
||||
(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
|
|
@ -71,7 +71,7 @@ where ri.info->'svedFL'->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -79,11 +79,14 @@ where ri.info->'svedFL'->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
1357
mappings_old/jobs_once/copy_punishment_and_deferment_once.hwf
Normal file
1357
mappings_old/jobs_once/copy_punishment_and_deferment_once.hwf
Normal file
File diff suppressed because it is too large
Load diff
95
mappings_old/jobs_once/criminal_prosecution_flags.hpl
Normal file
95
mappings_old/jobs_once/criminal_prosecution_flags.hpl
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>criminal_prosecution_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:19:11.456</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:19:11.456</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>has_criminal_prosecution</from>
|
||||
<to>Update_has_criminal_prosecution</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_has_criminal_prosecution</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_criminal_prosecution</name>
|
||||
<rename>has_criminal_prosecution</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>592</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>has_criminal_prosecution</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>
|
||||
SELECT
|
||||
distinct
|
||||
recruit_id,
|
||||
true as has_criminal_prosecution
|
||||
FROM prosecution
|
||||
where close_date is null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>368</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
103
mappings_old/jobs_once/criminal_record_flags.hpl
Normal file
103
mappings_old/jobs_once/criminal_record_flags.hpl
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>criminal_record_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:20:20.487</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:20:20.487</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>criminal_record</from>
|
||||
<to>Update_criminal_record</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_criminal_record</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>serving_sentence</name>
|
||||
<rename>serving_sentence</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_sentence</name>
|
||||
<rename>has_sentence</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_criminal_record</name>
|
||||
<rename>has_criminal_record</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>816</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>criminal_record</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruit_id,
|
||||
bool_or(start_date < current_date and (release_date isnull or release_date > current_date)) as serving_sentence,
|
||||
true as has_sentence,
|
||||
true as has_criminal_record
|
||||
FROM ervu_dashboard.punishment
|
||||
group by recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>592</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -22,10 +22,55 @@
|
|||
<order>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output</to>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>code</field>
|
||||
<name>code</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deferment_reason</table>
|
||||
<value>
|
||||
<name>code</name>
|
||||
<rename>code</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>value</name>
|
||||
<rename>value</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>actual</name>
|
||||
<rename>actual</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>496</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -53,55 +98,6 @@
|
|||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>code</column_name>
|
||||
<stream_name>code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>value</column_name>
|
||||
<stream_name>value</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>actual</column_name>
|
||||
<stream_name>actual</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>deferment_reason</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
@ -40,7 +40,29 @@
|
|||
<to>Update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>deferment_output</from>
|
||||
<to>Dummy (do nothing)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Dummy (do nothing)</name>
|
||||
<type>Dummy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
|
|
@ -111,7 +133,7 @@
|
|||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<xloc>768</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -142,7 +164,7 @@
|
|||
from decision_deferment_dto ddd
|
||||
join public.recruits r
|
||||
ON r.id = ddd.recruit_id
|
||||
AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
AND '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id)
|
||||
where hidden is false;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
@ -238,7 +260,7 @@ from recruits_deferment rd
|
|||
on erfd.id = rd.ervu_reason_for_deferment_id
|
||||
join public.recruits r
|
||||
ON r.id = rd.recruit_id
|
||||
AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
AND '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id)
|
||||
where rd.hidden is false;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
@ -302,6 +324,18 @@ where rd.hidden is false;</sql>
|
|||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>deferment_output</source_transform>
|
||||
<target_transform>Dummy (do nothing)</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
98
mappings_old/jobs_once/deputy_flags.hpl
Normal file
98
mappings_old/jobs_once/deputy_flags.hpl
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>deputy_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:15:05.259</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:15:05.259</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>deputy_input</from>
|
||||
<to>Update_deputy_flag</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_deputy_flag</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>is_deputy</name>
|
||||
<rename>is_deputy</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_deputy_candidate</name>
|
||||
<rename>is_deputy_candidate</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>560</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>deputy_input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>
|
||||
SELECT
|
||||
recruit_id,
|
||||
COALESCE(deputy.deputy, false) AS is_deputy,
|
||||
NOT COALESCE(deputy.deputy, false) AS is_deputy_candidate
|
||||
FROM deputy;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>384</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -104,9 +104,9 @@ ri.info->'svedFL'->'svedDeputat'->'deputat'->>'srokiPolnomochii' period_office,
|
|||
to_date(ri.info->'svedFL'->'svedDeputat'->'deputat'->>'dataDosrochPrekr', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
|
|
@ -132,9 +132,9 @@ to_date(ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'dataSnyatKandidat', 'YY
|
|||
ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'svedRegKandidata' information,
|
||||
false deputy
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
|
|
@ -152,7 +152,7 @@ where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -160,11 +160,14 @@ where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>deputy</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -186,7 +189,7 @@ where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -194,11 +197,14 @@ where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>deputy</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
312
mappings_old/jobs_once/disability_once.hpl
Normal file
312
mappings_old/jobs_once/disability_once.hpl
Normal file
|
|
@ -0,0 +1,312 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>disability_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output 2</from>
|
||||
<to>Update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
recruit_id,
|
||||
case when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид'
|
||||
end disability_group,
|
||||
ri.info->'svedFL'->'svedInvalid'->'invalid'->>'ustanOrg' organization_name,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date,
|
||||
true disability
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND (r.target_recruitment_id = '${RCRT_C}' or
|
||||
r.current_recruitment_id = '${RCRT_C}')
|
||||
where ri.info->'svedFL'->'svedInvalid'->>'invalid' != 'null';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
recruit_id,
|
||||
ri.info->'svedNedeesp'->'nedeesposob'->>'naimOrg' organization_name,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataPrisv', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date,
|
||||
false disability,
|
||||
true is_incompetent
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND (r.target_recruitment_id = '${RCRT_C}' or
|
||||
r.current_recruitment_id = '${RCRT_C}')
|
||||
where ri.info->'svedNedeesp'->>'nedeesposob' != 'null';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>disability_group</column_name>
|
||||
<stream_name>disability_group</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>organization_name</column_name>
|
||||
<stream_name>organization_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>start_date</column_name>
|
||||
<stream_name>start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>close_date</column_name>
|
||||
<stream_name>close_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>confirmation_date</column_name>
|
||||
<stream_name>confirmation_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>disability</column_name>
|
||||
<stream_name>disability</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>organization_name</column_name>
|
||||
<stream_name>organization_name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>start_date</column_name>
|
||||
<stream_name>start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>close_date</column_name>
|
||||
<stream_name>close_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>disability</column_name>
|
||||
<stream_name>disability</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_disability</name>
|
||||
<rename>disability</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>576</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update 2</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>is_incompetent</name>
|
||||
<rename>is_incompetent</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>576</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>medical_authorities_once</name>
|
||||
<name>disease_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
|
|
@ -21,18 +21,18 @@
|
|||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input hiv</from>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<from>Table output</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -45,52 +45,29 @@
|
|||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'dataPostUchet' start_date,
|
||||
u->>'dataSnyatUchet' close_date,
|
||||
u->>'dataPlan' change_date
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input hiv</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
to_date(u->>'dataPostUchet', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
true HIV
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<sql>with zdorov as (select ri.recruit_id,
|
||||
jsonb_array_elements(
|
||||
ri.info -> 'svedFL' -> 'svedSostZdorov' -> 'svedZdorov' ->
|
||||
'sostZdorov') z,
|
||||
case
|
||||
when ri.info -> 'svedFL' -> 'svedSostZdorov' -> 'svedZdorov' ->>
|
||||
'priznakNalichSved' = '1'
|
||||
then true
|
||||
else false end as has_disease
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND (r.target_recruitment_id = '${RCRT_C}' or
|
||||
r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info -> 'svedFL' -> 'svedSostZdorov' -> 'svedZdorov' ->
|
||||
'sostZdorov') = 'array')
|
||||
select recruit_id,
|
||||
z ->> 'kodZabol' code,
|
||||
z ->> 'naimZabol' name,
|
||||
has_disease,
|
||||
to_date(z ->> 'dataDiagn', 'YYYY-MM-DD') reg_date
|
||||
from zdorov;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
|
|
@ -108,19 +85,38 @@ join uchet on r.id = uchet.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>code</column_name>
|
||||
<stream_name>code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>name</column_name>
|
||||
<stream_name>name</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>reg_date</column_name>
|
||||
<stream_name>reg_date</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>disease</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -132,8 +128,8 @@ join uchet on r.id = uchet.recruit_id;</sql>
|
|||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -144,25 +140,26 @@ join uchet on r.id = uchet.recruit_id;</sql>
|
|||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_disease</name>
|
||||
<rename>has_disease</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>352</yloc>
|
||||
<xloc>592</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
98
mappings_old/jobs_once/driver_licenses_flags.hpl
Normal file
98
mappings_old/jobs_once/driver_licenses_flags.hpl
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>driver_licenses_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:11:28.008</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:11:28.008</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>driver_licence_output</from>
|
||||
<to>Update_driver_licence_flag</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_driver_licence_flag</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>tractor_license</name>
|
||||
<rename>has_tractor_licence</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_driver_license</name>
|
||||
<rename>has_driver_license</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>driver_licence_output</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
recruit_id,
|
||||
bool_or(not tractor_driver) as has_driver_license,
|
||||
bool_or(tractor_driver) as has_tractor_licence
|
||||
from drivers_licence
|
||||
group by recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>288</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -56,9 +56,9 @@
|
|||
from jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
join public.recruits_info ri on r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
|
|
@ -94,9 +94,9 @@ where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat')
|
|||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories,
|
||||
true tractor_driver
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
join public.recruits_info ri on r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not null</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
|
|
@ -114,7 +114,7 @@ where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -122,11 +122,14 @@ where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>drivers_licence</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -148,7 +151,7 @@ where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -156,11 +159,14 @@ where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>drivers_licence</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
1029
mappings_old/jobs_once/education_constants_once.hpl
Normal file
1029
mappings_old/jobs_once/education_constants_once.hpl
Normal file
File diff suppressed because it is too large
Load diff
91
mappings_old/jobs_once/id_ern_once.hpl
Normal file
91
mappings_old/jobs_once/id_ern_once.hpl
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>id_ern_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/26 13:25:08.953</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/26 13:25:08.953</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select id, system_id_ern as id_ern
|
||||
from recruits as r
|
||||
where '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id);</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>id_ern</name>
|
||||
<rename>id_ern</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -61,11 +61,31 @@ took_break
|
|||
type_place_stay</note>
|
||||
<width>163</width>
|
||||
</notepad>
|
||||
<notepad>
|
||||
<backgroundcolorblue>251</backgroundcolorblue>
|
||||
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||
<backgroundcolorred>201</backgroundcolorred>
|
||||
<bordercolorblue>90</bordercolorblue>
|
||||
<bordercolorgreen>58</bordercolorgreen>
|
||||
<bordercolorred>14</bordercolorred>
|
||||
<fontbold>N</fontbold>
|
||||
<fontcolorblue>90</fontcolorblue>
|
||||
<fontcolorgreen>58</fontcolorgreen>
|
||||
<fontcolorred>14</fontcolorred>
|
||||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>26</height>
|
||||
<xloc>687</xloc>
|
||||
<yloc>482</yloc>
|
||||
<note>+target_recruitment_id</note>
|
||||
<width>132</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Select values 4</from>
|
||||
<to>Table output</to>
|
||||
<to>Table output (citizen)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
|
|
@ -317,7 +337,8 @@ type_place_stay</note>
|
|||
<sql>WITH
|
||||
base_recruit_data AS (
|
||||
SELECT
|
||||
distinct
|
||||
distinct
|
||||
r.system_pgs_status,
|
||||
r.full_name,
|
||||
r.last_name,
|
||||
r.first_name,
|
||||
|
|
@ -341,10 +362,11 @@ base_recruit_data AS (
|
|||
ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
|
||||
r.system_update_date AS update_date,
|
||||
CASE
|
||||
WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
|
||||
WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
|
||||
ELSE 'NOTCONVICT'
|
||||
END AS convicts,
|
||||
COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
|
||||
r.current_recruitment_id AS recruitment_id,
|
||||
r.target_recruitment_id,
|
||||
CASE
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
|
||||
EXISTS (
|
||||
|
|
@ -395,7 +417,7 @@ base_recruit_data AS (
|
|||
ri.info->'svedFL'->'svedSport'->'sport' IS NULL -- Если 'sport' = NULL
|
||||
OR (
|
||||
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedFL'->'svedSport'->'sport') = 'array' -- Поле 'sport' должно быть массивом
|
||||
AND jsonb_typeof(ri.info->'svedFL'->'svedSport'->'sport') = 'array' -- Поле 'sport' должно быть массивом
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
)
|
||||
)
|
||||
|
|
@ -466,7 +488,7 @@ base_recruit_data AS (
|
|||
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
|
|
@ -586,7 +608,7 @@ base_recruit_data AS (
|
|||
) AS number_children
|
||||
FROM public.recruits AS r
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id and ddd.hidden is false
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
|
||||
--JOIN public.recruits_history rh on rh.recruit_id=r.id
|
||||
),
|
||||
|
|
@ -604,6 +626,7 @@ FROM
|
|||
public.recruits AS r
|
||||
LEFT JOIN
|
||||
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
|
||||
WHERE r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}'
|
||||
GROUP BY
|
||||
r.id
|
||||
),
|
||||
|
|
@ -654,7 +677,7 @@ SELECT
|
|||
r.first_name,
|
||||
r.middle_name,
|
||||
r.gender,
|
||||
r.snils,
|
||||
regexp_replace(r.snils, '[^0-9]', '', 'g') AS snils,
|
||||
r.inn,
|
||||
r.birth_date,
|
||||
r.age,
|
||||
|
|
@ -709,7 +732,8 @@ SELECT
|
|||
r.passport_series,
|
||||
r.issue_date,
|
||||
r.recruit_id, -- ID рекрута
|
||||
r.recruitment_id,
|
||||
r.recruitment_id, -- текущий вк
|
||||
r.target_recruitment_id, -- целевой вк
|
||||
r.reason_registration, -- причина постановки на учет char
|
||||
r.date_registration, -- дата постановки на учет date
|
||||
r.date_deregistration, -- дата снятия с учета date
|
||||
|
|
@ -728,7 +752,8 @@ SELECT
|
|||
adr.residenceAddress_regDateEnd as end_date_place_stay,
|
||||
case when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
|
||||
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
|
||||
else null end as type_place_stay
|
||||
else null end as type_place_stay,
|
||||
r.system_pgs_status
|
||||
FROM base_recruit_data r
|
||||
LEFT JOIN children_count cc ON r.recruit_id = cc.recruit_id -- Присоединение для получения количества детей
|
||||
JOIN driver_license dl ON dl.recruit_id = r.recruit_id
|
||||
|
|
@ -741,7 +766,7 @@ join adresses adr ON r.recruit_id=adr.recruit_id</sql>
|
|||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<name>Table output (citizen)</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -751,7 +776,7 @@ join adresses adr ON r.recruit_id=adr.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -759,11 +784,14 @@ join adresses adr ON r.recruit_id=adr.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
File diff suppressed because it is too large
Load diff
300
mappings_old/jobs_once/medical_authorities_once.hpl
Normal file
300
mappings_old/jobs_once/medical_authorities_once.hpl
Normal file
|
|
@ -0,0 +1,300 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>medical_authorities_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input hiv</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output 2</from>
|
||||
<to>Update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select ri.recruit_id,
|
||||
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedPND' -> 'svedUchetDisp' ->
|
||||
'svedUchet') u,
|
||||
ri.info -> 'svedFL' -> 'svedPND' -> 'svedUchetDisp' -> 'svedUchet' ->>
|
||||
'priznakNalichSved' = '1' as registered_in_pnd
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND (r.target_recruitment_id = '${RCRT_C}' or
|
||||
r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info -> 'svedFL' -> 'svedPND' -> 'svedUchetDisp' -> 'svedUchet') =
|
||||
'array')
|
||||
select recruit_id,
|
||||
u ->> 'dataPostUchet' start_date,
|
||||
u ->> 'dataSnyatUchet' close_date,
|
||||
u ->> 'dataPlan' change_date,
|
||||
registered_in_pnd
|
||||
from uchet;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input hiv</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select ri.recruit_id,
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') u,
|
||||
ri.info->'svedFL'->'svedUchetVICH'->>'priznakNalichSved' = '1' has_vich
|
||||
from public.recruits_info ri
|
||||
join public.recruits r
|
||||
ON r.id = ri.recruit_id
|
||||
AND (r.target_recruitment_id = '${RCRT_C}' or
|
||||
r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') = 'array')
|
||||
select
|
||||
recruit_id,
|
||||
to_date(u->>'dataPostUchet', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
true HIV
|
||||
from uchet;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>start_date</column_name>
|
||||
<stream_name>start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>close_date</column_name>
|
||||
<stream_name>close_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>hiv</column_name>
|
||||
<stream_name>has_vich</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>start_date</column_name>
|
||||
<stream_name>start_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>close_date</column_name>
|
||||
<stream_name>close_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>change_date</column_name>
|
||||
<stream_name>change_date</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_vich</name>
|
||||
<rename>has_vich</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>576</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update 2</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>registered_in_pnd</name>
|
||||
<rename>registered_in_pnd</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>576</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,35 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>select_recruitments_milcom(m_c)</name>
|
||||
<name>opekun_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:58:19.728</created_date>
|
||||
<created_date>2025/04/25 13:10:21.355</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:58:19.728</modified_date>
|
||||
<modified_date>2025/04/25 13:10:21.355</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input/регион</from>
|
||||
<to>Copy rows to result</to>
|
||||
<from>opekun_flag</from>
|
||||
<to>Update_opekun_flag</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<name>Update_opekun_flag</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -38,14 +37,32 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>is_guardian</name>
|
||||
<rename>is_guardian</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<xloc>688</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input/регион</name>
|
||||
<name>opekun_flag</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -57,23 +74,15 @@
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
idm_id AS RECRUITMENT_ID,
|
||||
parent_id AS PARENT_ID,
|
||||
CASE
|
||||
WHEN schema = 'Department' THEN 'Department'
|
||||
WHEN schema = 'Organization' THEN 'REG_LVL'
|
||||
WHEN schema = 'Region' THEN 'MD_LVL'
|
||||
ELSE schema -- на случай, если появится неизвестное значение
|
||||
END AS SCHEMA
|
||||
FROM
|
||||
ervu_dashboard.recruitment
|
||||
WHERE schema = 'Department' OR schema = 'Organization' OR schema = 'Region'</sql>
|
||||
<limit>0</limit>
|
||||
<sql>select distinct
|
||||
recruit_id,
|
||||
true as is_guardian
|
||||
from citizen_guardianship;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<xloc>512</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -98,6 +98,7 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -109,8 +110,9 @@ select
|
|||
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
|
||||
ch->>'snils' snils
|
||||
from public.recruits r
|
||||
join person on r.id = person.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
join person on r.id = person.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>288</xloc>
|
||||
|
|
@ -128,7 +130,7 @@ join person on r.id = person.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -136,11 +138,14 @@ join person on r.id = person.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_guardianship</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -57,11 +57,11 @@
|
|||
THEN TRUE ELSE FALSE
|
||||
END AS actual
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
|
|
@ -112,7 +112,7 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -120,11 +120,14 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>passport</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -146,7 +149,7 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -154,11 +157,14 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>passport</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
104
mappings_old/jobs_once/property_flags.hpl
Normal file
104
mappings_old/jobs_once/property_flags.hpl
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>property_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 13:13:44.087</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 13:13:44.087</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>citizenship_flag_output</from>
|
||||
<to>Update_citizenship_flag</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Update_citizenship_flag</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_russian_citizenship</name>
|
||||
<rename>has_russian_citizenship</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_foreign_citizenship</name>
|
||||
<rename>has_foreign_citizenship</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>176</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizenship_flag_output</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with foreign_citizenship as (
|
||||
select recruit_id, true as has_foreign_citizenship
|
||||
from citizenship_foreign
|
||||
)
|
||||
select
|
||||
citizenship.recruit_id,
|
||||
true as has_russian_citizenship,
|
||||
coalesce(has_foreign_citizenship, false) as has_foreign_citizenship
|
||||
from citizenship
|
||||
left join foreign_citizenship
|
||||
on foreign_citizenship.recruit_id = citizenship.recruit_id
|
||||
where renunciation_number is null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>176</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -59,6 +59,7 @@
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedON'->'on') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedON'->'on') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -69,7 +70,7 @@ select
|
|||
'realty' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
|
|
@ -94,6 +95,7 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedNazTS'->'nazTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedNazTS'->'nazTS') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -107,7 +109,7 @@ select
|
|||
'ground_transportation' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
|
|
@ -132,6 +134,7 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVozTS'->'vozTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVozTS'->'vozTS') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -142,7 +145,7 @@ select
|
|||
'air_vehicles' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
|
|
@ -167,6 +170,7 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVodTS'->'vodTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVodTS'->'vodTS') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
|
|
@ -177,7 +181,7 @@ select
|
|||
'water_vehicles' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
|
|
@ -195,7 +199,7 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -203,11 +207,14 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -229,7 +236,7 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -237,11 +244,14 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -263,7 +273,7 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -271,11 +281,14 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -297,7 +310,7 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -305,11 +318,14 @@ join prop on r.id = prop.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
169
mappings_old/jobs_once/prosecution_once.hpl
Normal file
169
mappings_old/jobs_once/prosecution_once.hpl
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>prosecution_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
<notepad>
|
||||
<backgroundcolorblue>251</backgroundcolorblue>
|
||||
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||
<backgroundcolorred>201</backgroundcolorred>
|
||||
<bordercolorblue>90</bordercolorblue>
|
||||
<bordercolorgreen>58</bordercolorgreen>
|
||||
<bordercolorred>14</bordercolorred>
|
||||
<fontbold>N</fontbold>
|
||||
<fontcolorblue>90</fontcolorblue>
|
||||
<fontcolorgreen>58</fontcolorgreen>
|
||||
<fontcolorred>14</fontcolorred>
|
||||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>328</height>
|
||||
<xloc>976</xloc>
|
||||
<yloc>144</yloc>
|
||||
<note>архив
|
||||
WITH ugol AS (
|
||||
SELECT
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS u,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
u->'sledSud'->>'naimSud' AS kind,
|
||||
TO_DATE(u->'sledSud'->>'dataVozbUD', 'YYYY-MM-DD') AS create_date,
|
||||
TO_DATE(u->'sledSud'->'svedSnyat'->>'dataSnyatSud', 'YYYY-MM-DD') AS close_date,
|
||||
u->'sledSud'->>'naimOrgan' AS authority_name,
|
||||
STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point,
|
||||
u->'sledSud'->'svedSnyat'->>'osnSnyatSud' AS termination_basis
|
||||
FROM public.recruits r
|
||||
JOIN ugol ON r.id = ugol.recruit_id
|
||||
LEFT JOIN LATERAL jsonb_array_elements_text(u->'sledSud'->'statiUK') AS law(f) ON true
|
||||
GROUP BY r.id, kind, create_date, close_date, authority_name, termination_basis;</note>
|
||||
<width>486</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (prosecution)</from>
|
||||
<to>Table output (prosecution)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input (prosecution)</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ugolov_presl AS (
|
||||
SELECT
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
|
||||
ri.recruit_id
|
||||
--'prOtsSvedUgolovPresl'
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
--up->'sledSud'->>'uk', -- уголовный кодекс?
|
||||
up->'sledSud'->'extend'->>'nomerUDPredv' AS case_number, -- номер уголовного дела (предварительный)
|
||||
up->'sledSud'->'extend'->>'svedPerekvalif' AS reclassification, -- сведения о переквалификации деяния
|
||||
--up->'sledSud'->'extend'->>'kodVidUgolovPresl', --
|
||||
up->'sledSud'->'extend'->>'naimVidUgolovPresl' AS kind, -- наименование вида уголовного преследования
|
||||
CASE
|
||||
WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true -- передано в суд
|
||||
ELSE false -- нет или нет инфы
|
||||
END AS transfer_to_court, -- признак передачи в суд уголовного дела в отношении гражданина?
|
||||
|
||||
--up->'sledSud'->>'naimSud', -- Наименование суда???
|
||||
up->'sledSud'->>'nomerUD' AS case_number_court, -- номер уголовного дела??? номер уголовного дела (судебный)
|
||||
STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point, -- статьи уголовного кодекса
|
||||
up->'sledSud'->>'naimOrgan' AS authority_name, -- наименование органа принявшего решение
|
||||
--up->'sledSud'->'svedSnyat'->>'osnSnyatSud', -- основание прекращения уголовного преследования???
|
||||
--up->'sledSud'->'svedSnyat'->>'dataSnyatSud', -- дата прекращения уголовного преследования
|
||||
--up->'sledSud'->'svedSnyat'->>'dataOsuzhd', -- дата осуждения??? =
|
||||
up->'sledSud'->'svedSnyat'->>'dataVozbUD' AS create_date, -- дата возбуждения уголовного дела
|
||||
up->'sledSud'->'svedSnyat'->>'osnPrekrUD' AS termination_basis, -- основания прекращения уголовного дела = основания прекращения уголовного преследования?
|
||||
--up->'sledSud'->'svedSnyat'->>'statusNaim' , -- ????
|
||||
up->'sledSud'->'svedSnyat'->>'dataPrekrUD' AS close_date--, -- дата прекращения уголовного дела
|
||||
--up->>'sledSudTekst', -- ???
|
||||
--up->>'sledSudPriznak' -- ???
|
||||
--'UG_PRESL' AS info_type
|
||||
FROM public.recruits r
|
||||
JOIN ugolov_presl up ON r.id = up.recruit_id
|
||||
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
||||
GROUP BY r.id, up</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output (prosecution)</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>prosecution</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -37,13 +37,15 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>local_ervu_person_registry</connection>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ugol AS (SELECT ri.recruit_id,
|
||||
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz
|
||||
FROM public.recruits_info ri
|
||||
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null')
|
||||
JOIN public.recruits r ON r.id = ri.recruit_id
|
||||
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
||||
AND '${RCRT_C}' IN (r.target_recruitment_id, r.current_recruitment_id))
|
||||
SELECT recruit_id,
|
||||
nakaz ->> 'naimSud' AS authority_name,
|
||||
nakaz ->> 'srokNakaz' AS sentence,
|
||||
|
|
@ -54,13 +56,10 @@ SELECT recruit_id,
|
|||
TO_DATE(nakaz ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date,
|
||||
TO_DATE(nakaz ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date,
|
||||
TO_DATE(nakaz ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date,
|
||||
string_agg(statiuk_elem::text, ', ') AS law_point,
|
||||
nakaz ->> 'osnOsvob' release_reason
|
||||
string_agg(statiuk_elem, ', ') AS law_point,
|
||||
nakaz ->> 'osnOsvob' AS release_reason
|
||||
FROM ugol
|
||||
LEFT JOIN LATERAL jsonb_path_query(nakaz, '$.statiUK[*]') AS statiuk_elem ON true
|
||||
join public.recruits r ON r.id = ugol.recruit_id AND
|
||||
(r.target_recruitment_id = '${RCRT_C}' or
|
||||
r.current_recruitment_id = '${RCRT_C}')
|
||||
LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true
|
||||
GROUP BY recruit_id, nakaz;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
143
mappings_old/jobs_once/recruit_ervu_status_once.hpl
Normal file
143
mappings_old/jobs_once/recruit_ervu_status_once.hpl
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruit_ervu_status_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/26 14:56:32.115</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/26 14:56:32.115</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update</from>
|
||||
<to>Dummy (do nothing)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
code,
|
||||
value,
|
||||
description,
|
||||
not hidden as actual
|
||||
from recruit_ervu_status;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>304</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>code</field>
|
||||
<name>code</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>recruit_ervu_status</table>
|
||||
<value>
|
||||
<name>code</name>
|
||||
<rename>code</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>value</name>
|
||||
<rename>value</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>description</name>
|
||||
<rename>description</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>actual</name>
|
||||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Dummy (do nothing)</name>
|
||||
<type>Dummy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Insert / update</source_transform>
|
||||
<target_transform>Dummy (do nothing)</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
94
mappings_old/jobs_once/recruitment_code_once.hpl
Normal file
94
mappings_old/jobs_once/recruitment_code_once.hpl
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruitment_code_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/26 16:42:00.557</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/26 16:42:00.557</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
id,
|
||||
code
|
||||
from recruitment;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>idm_id</field>
|
||||
<name>id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>recruitment</table>
|
||||
<value>
|
||||
<name>code</name>
|
||||
<rename>code</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -206,6 +206,7 @@
|
|||
END AS information_excluded,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON r.id = ri.recruit_id AND (r.target_recruitment_id= '${RCRT_C}' or r.current_recruitment_id = '${RCRT_C}')
|
||||
JOIN LATERAL (
|
||||
SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
|
||||
|
|
@ -233,7 +234,7 @@ SELECT
|
|||
information_excluded
|
||||
FROM public.recruits r
|
||||
JOIN suprug ON r.id = suprug.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>192</xloc>
|
||||
|
|
@ -251,7 +252,7 @@ JOIN suprug ON r.id = suprug.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>20000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -259,11 +260,14 @@ JOIN suprug ON r.id = suprug.recruit_id</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_spouse</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
110
mappings_old/jobs_once/subpoena_flags.hpl
Normal file
110
mappings_old/jobs_once/subpoena_flags.hpl
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>subpoena_flags</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 16:50:55.585</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 16:50:55.585</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT distinct on (recruit_id)
|
||||
recruit_id,
|
||||
send_date is not null AS has_sent_summons,
|
||||
subpoena_status = 'Повестка вручена' AS has_served_summons,
|
||||
visit_date_true is not null AS appeared_to_recruitment_center,
|
||||
date_recognition_reason is not null AS not_appeared_by_valid_excuse
|
||||
FROM subpoena
|
||||
order by recruit_id, send_date desc;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>272</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_sent_summons</name>
|
||||
<rename>has_sent_summons</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>has_served_summons</name>
|
||||
<rename>has_served_summons</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared_to_recruitment_center</name>
|
||||
<rename>appeared_to_recruitment_center</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared_by_valid_excuse</name>
|
||||
<rename>not_appeared_by_valid_excuse</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -118,7 +118,7 @@ LEFT JOIN public.subpoena_appearance AS sa
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>5000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>row_idm_schema</name>
|
||||
<name>recruitment_rows</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
|
|
@ -13,9 +13,9 @@
|
|||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/17 12:15:03.930</created_date>
|
||||
<created_date>2025/04/18 09:48:01.970</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/17 12:15:03.930</modified_date>
|
||||
<modified_date>2025/04/18 09:48:01.970</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -26,6 +26,23 @@
|
|||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>832</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,32 +57,13 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT idm_id AS ROW_ID_MIL_COM,
|
||||
schema AS ROW_SCHEMA
|
||||
FROM ervu_dashboard.recruitment
|
||||
</sql>
|
||||
<sql>SELECT idm_id AS RECRUITMENT_CITIZEN FROM ervu_dashboard.recruitment
|
||||
--limit 3</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>336</yloc>
|
||||
<xloc>464</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
94
mappings_old/jobs_once/temporary_measure_flag.hpl
Normal file
94
mappings_old/jobs_once/temporary_measure_flag.hpl
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>temporary_measure_flag</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/25 16:48:10.260</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/25 16:48:10.260</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
recruit_id,
|
||||
status_measure != 'Временные меры отменены' as has_active_temporary_measure
|
||||
from temporary_measures;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>256</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_active_temporary_measure</name>
|
||||
<rename>has_active_temporary_measure</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -100,7 +100,7 @@ LEFT JOIN public.subpoena AS s
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<commit>5000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_appealing_violations_fz53_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:29:46.684</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:29:46.684</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_criminal_liability_fz53_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:26:43.276</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:26:43.276</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_criminal_record_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:23:58.362</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:23:58.362</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_sports_categories_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:19:01.880</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:19:01.880</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_work_activity_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/02/14 11:02:25.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:02:25.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>disability_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
case when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид'
|
||||
end disability_group,
|
||||
ri.info->'svedFL'->'svedInvalid'->'invalid'->>'ustanOrg' organization_name,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date,
|
||||
true disability
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' organization_name,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataPrisv', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>prosecution_once</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ugol AS (
|
||||
SELECT
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS u,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
u->'sledSud'->>'naimSud' AS kind,
|
||||
TO_DATE(u->'sledSud'->>'dataVozbUD', 'YYYY-MM-DD') AS create_date,
|
||||
TO_DATE(u->'sledSud'->'svedSnyat'->>'dataSnyatSud', 'YYYY-MM-DD') AS close_date,
|
||||
u->'sledSud'->>'naimOrgan' AS authority_name,
|
||||
STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point,
|
||||
u->'sledSud'->'svedSnyat'->>'osnSnyatSud' AS termination_basis
|
||||
FROM public.recruits r
|
||||
JOIN ugol ON r.id = ugol.recruit_id
|
||||
LEFT JOIN LATERAL jsonb_array_elements_text(u->'sledSud'->'statiUK') AS law(f) ON true
|
||||
GROUP BY r.id, kind, create_date, close_date, authority_name, termination_basis;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>prosecution</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -46,48 +46,6 @@
|
|||
<yloc>1552</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>main_dashboard.appeals(m_c).hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>Y</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/mil_com/main_dashboard.appeals(m_c).hpl</filename>
|
||||
<logext>txt</logext>
|
||||
<logfile>${Internal.Entry.Current.Folder}/\logs\appeals</logfile>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>ARR_MC</name>
|
||||
<stream_name>ARRAY_MIL_COM</stream_name>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>Y</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1840</xloc>
|
||||
<yloc>944</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>2048</xloc>
|
||||
<yloc>944</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success 2</name>
|
||||
<description/>
|
||||
|
|
@ -522,46 +480,6 @@
|
|||
<yloc>1824</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>recruitment_campaign.appeals(m_c).hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>Y</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/mil_com/recruitment_campaign.appeals(m_c).hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>ARR_MC</name>
|
||||
<stream_name>ARRAY_MIL_COM</stream_name>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>Y</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>320</xloc>
|
||||
<yloc>1968</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success 16</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>0</xloc>
|
||||
<yloc>1968</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>array_recruitments.hpl</name>
|
||||
<description/>
|
||||
|
|
@ -588,16 +506,6 @@
|
|||
<yloc>1552</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Dummy</name>
|
||||
<description/>
|
||||
<type>DUMMY</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1648</xloc>
|
||||
<yloc>944</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL total_registered.reg_mil_cat</name>
|
||||
<description/>
|
||||
|
|
@ -775,23 +683,6 @@ WHERE recording_date = current_date
|
|||
<yloc>1824</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL recruitment_campaign.appeals</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM recruitment_campaign.appeals
|
||||
WHERE recording_date = current_date
|
||||
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>624</xloc>
|
||||
<yloc>1968</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>main_dashboard.recruitment_campaign(m_c).hwf</name>
|
||||
<description/>
|
||||
|
|
@ -801,7 +692,9 @@ WHERE recording_date = current_date
|
|||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c).hwf</filename>
|
||||
<filename>${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
|
|
@ -1817,20 +1710,6 @@ WHERE recording_date = current_date
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>recruitment_campaign.appeals(m_c).hpl</from>
|
||||
<to>Success 16</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>main_dashboard.appeals(m_c).hpl</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>array_recruitments.hpl</to>
|
||||
|
|
@ -1838,20 +1717,6 @@ WHERE recording_date = current_date
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>array_recruitments.hpl</from>
|
||||
<to>Dummy</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Dummy</from>
|
||||
<to>main_dashboard.appeals(m_c).hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>array_recruitments.hpl</from>
|
||||
<to>SQL total_registered.reg_mil_cat</to>
|
||||
|
|
@ -1992,20 +1857,6 @@ WHERE recording_date = current_date
|
|||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>array_recruitments.hpl</from>
|
||||
<to>SQL recruitment_campaign.appeals</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL recruitment_campaign.appeals</from>
|
||||
<to>recruitment_campaign.appeals(m_c).hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>main_dashboard.recruitment_campaign(m_c).hwf</to>
|
||||
|
|
|
|||
|
|
@ -1,314 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>main_dashboard.appeals(m_c)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (appeal_document) регионы</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Execute SQL script</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<arguments>
|
||||
</arguments>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<delete_field/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<insert_field/>
|
||||
<quoteString>N</quoteString>
|
||||
<read_field/>
|
||||
<replace_variables>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM main_dashboard.appeals
|
||||
WHERE recording_date = current_date
|
||||
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
|
||||
</sql>
|
||||
<update_field/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>224</xloc>
|
||||
<yloc>192</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 3 2</name>
|
||||
<type>GetVariable</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>REС_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>SCM</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.appeals) 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>appeals</table>
|
||||
<value>
|
||||
<name>total_appeals</name>
|
||||
<rename>total_appeals</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_consideration</name>
|
||||
<rename>average_consideration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>resolved</name>
|
||||
<rename>resolved</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_rating</name>
|
||||
<rename>average_rating</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_to_face</name>
|
||||
<rename>average_to_face</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"average_EPGU"</name>
|
||||
<rename>average_epgu</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_to_face_percent</name>
|
||||
<rename>average_to_face_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"average_EPGU_percent"</name>
|
||||
<rename>average_epgu_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>192</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 3 2</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>REС_ID</name>
|
||||
<rename>REС_ID</rename>
|
||||
<type>String</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask/>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
<meta>
|
||||
<name>SCM</name>
|
||||
<rename>SCM</rename>
|
||||
<type>String</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask/>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>816</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (appeal_document) регионы</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.appeal-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
t1 AS (
|
||||
SELECT
|
||||
COUNT(*) AS total_appeals,
|
||||
vk_id::uuid AS recruitment_id
|
||||
FROM public.appeal_document
|
||||
WHERE vk_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
GROUP BY vk_id
|
||||
),
|
||||
t2 AS (
|
||||
SELECT
|
||||
ROUND(AVG((TRIM(BOTH '"' FROM (ad.extra_info ->> 'resultDate')::text)::date - ad.appeal_date)), 2) AS average_consideration,
|
||||
vk_id::uuid AS recruitment_id
|
||||
FROM public.appeal_document ad
|
||||
WHERE vk_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
AND ad.extra_info ->> 'resultDate' IS NOT NULL
|
||||
AND ad.extra_info ->> 'resultDate' != ''
|
||||
GROUP BY vk_id
|
||||
),
|
||||
resolved AS (
|
||||
SELECT
|
||||
COUNT(*) AS resolved,
|
||||
vk_id::uuid AS recruitment_id
|
||||
FROM public.appeal_document ad
|
||||
WHERE ad.extra_info ->> 'result' = '1'
|
||||
AND vk_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
GROUP BY vk_id
|
||||
)
|
||||
SELECT
|
||||
COALESCE(t1.total_appeals, 0) AS total_appeals,
|
||||
COALESCE(t2.average_consideration, 0) AS average_consideration,
|
||||
COALESCE(resolved.resolved, 0) AS resolved,
|
||||
ids.recruitment_id,
|
||||
current_date AS recording_date,
|
||||
0 AS average_rating,
|
||||
0 AS average_to_face,
|
||||
0 AS average_epgu,
|
||||
0 AS average_to_face_percent,
|
||||
0 AS average_epgu_percent
|
||||
FROM ids
|
||||
LEFT JOIN t1 ON ids.recruitment_id = t1.recruitment_id
|
||||
LEFT JOIN t2 ON ids.recruitment_id = t2.recruitment_id
|
||||
LEFT JOIN resolved ON ids.recruitment_id = resolved.recruitment_id;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>192</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,378 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>main_dashboard.recruitment_campaign(m_c)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 4 3</from>
|
||||
<to>Select values 4 3</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) регион/осень</from>
|
||||
<to>Get variables 4 3</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4 3</from>
|
||||
<to>Insert / update (main_dashboard.recruitment_campaign)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) регион/осень</from>
|
||||
<to>Insert / update (main_dashboard.recruitment_campaign)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 4 3</name>
|
||||
<type>GetVariable</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>REC_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>SCM</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.recruitment_campaign)</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>recruitment_campaign</table>
|
||||
<value>
|
||||
<name>subpoenas_sent</name>
|
||||
<rename>count_subpoena</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared_on_subpoenas</name>
|
||||
<rename>count_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared_on_subpoenas</name>
|
||||
<rename>count_not_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>new_recruits</name>
|
||||
<rename>new_recruits</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_granted</name>
|
||||
<rename>postponement_granted</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared_on_subpoenas_percent</name>
|
||||
<rename>appeared_on_subpoenas_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared_on_subpoenas_percent</name>
|
||||
<rename>not_appeared_on_subpoenas_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_have_right_percent</name>
|
||||
<rename>postponement_have_right_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_granted_percent</name>
|
||||
<rename>postponement_granted_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>spring_autumn</name>
|
||||
<rename>spring_autumn</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4 3</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>REC_ID</name>
|
||||
<rename>REC_ID</rename>
|
||||
<type>String</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask/>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
<meta>
|
||||
<name>SCM</name>
|
||||
<rename>SCM</rename>
|
||||
<type>String</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask/>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>608</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (subpoena) регион/осень</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
subpoena_data AS (
|
||||
SELECT
|
||||
s.id AS subpoena_id,
|
||||
s.create_date,
|
||||
s.department_id AS recruitment_id,
|
||||
s.status_id,
|
||||
sr.type,
|
||||
ssh.code AS sub_stat_hist,
|
||||
s.send_date,
|
||||
sh.date_time::timestamp AS history_date,
|
||||
rdi.restriction_document_cancel_id AS restr_dc,
|
||||
rdi.applied_date AS ap_date,
|
||||
rdi.id AS rdi_id,
|
||||
ssi.delivery_code AS d_code,
|
||||
ROW_NUMBER() OVER (PARTITION BY s.id ORDER BY sh.date_time DESC) AS rn
|
||||
FROM public.subpoena s
|
||||
JOIN public.subpoena_history AS sh ON sh.subpoena_id = s.id
|
||||
JOIN public.subpoena_status AS ss ON ss.id = s.status_id
|
||||
JOIN public.subpoena_status AS ssh ON ssh.id = sh.status_id
|
||||
JOIN public.subpoena_reason AS sr ON sr.id = s.reason_id
|
||||
LEFT JOIN public.restriction_document AS rd ON rd.subpoena_id = s.id
|
||||
LEFT JOIN public.restriction_document_item AS rdi ON rdi.restriction_document_create_id = rd.id
|
||||
LEFT JOIN public.subpoena_send_info AS ssi ON ssi.subpoena_id = s.id
|
||||
WHERE sr.type = '3'
|
||||
AND ssh.code NOT IN ('3.14', '3.7', '3.72', '3.71')
|
||||
AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
),
|
||||
last_status AS (
|
||||
SELECT *
|
||||
FROM subpoena_data
|
||||
WHERE rn = 1
|
||||
),
|
||||
season_separations AS (
|
||||
/*
|
||||
Осенний призыв:
|
||||
Начало: 1 октября
|
||||
Конец: 31 декабря
|
||||
Весенний призыв:
|
||||
Начало: 1 апреля
|
||||
Конец: 15 июля
|
||||
|
||||
Весна
|
||||
|
||||
Если текущий период с 1 янаваря по 30 сентября текущего года ТО
|
||||
обрезаем текущую дату до начала года, прибавляем 3 месяца(это начало весеннего призыва) И
|
||||
обрезаем текущую дату до начала года, прибавляем 6 месяца и 15 дней(это конец весеннего призыва))//
|
||||
|
||||
Если текущий период с 1 октября по 31 декабря текущего года ТО
|
||||
обрезаем текущую дату до начала года, прибавляем 3 месяца(это начало весеннего призыва) И
|
||||
обрезаем текущую дату до начала года, прибавляем 6 месяца и 15 дней(это конец весеннего призыва))
|
||||
|
||||
Осень
|
||||
|
||||
Если текущий период с 1 января по 30 сентября текущего года ТО
|
||||
create_date >= 1 октября прошлого года
|
||||
create_date <= 31 декабря прошлого года)
|
||||
|
||||
Если текущий период с 1 октября по 31 декабря текущего года ТО
|
||||
create_date >= 1 октября текущего года
|
||||
create_date <= 31 декабря текущего года)
|
||||
должно быть что-то похожее, но данных пока нет на текущие периоды
|
||||
*/
|
||||
SELECT
|
||||
ls.recruitment_id,
|
||||
ls.create_date,
|
||||
CASE
|
||||
WHEN EXTRACT(MONTH FROM ls.create_date) BETWEEN 1 AND 6 THEN 'Весна'
|
||||
WHEN EXTRACT(MONTH FROM ls.create_date) BETWEEN 7 AND 12 THEN 'Осень'
|
||||
END AS spring_autumn
|
||||
FROM last_status ls
|
||||
),
|
||||
t1 AS (
|
||||
SELECT
|
||||
ss.recruitment_id,
|
||||
ss.spring_autumn,
|
||||
COUNT(DISTINCT subpoena_id) AS count_subpoena
|
||||
FROM season_separations ss
|
||||
JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id
|
||||
WHERE sub_stat_hist IS NOT NULL
|
||||
GROUP BY ss.recruitment_id, ss.spring_autumn
|
||||
),
|
||||
t2 AS (
|
||||
SELECT
|
||||
ss.recruitment_id,
|
||||
ss.spring_autumn,
|
||||
COUNT(DISTINCT subpoena_id) AS count_appeared
|
||||
FROM season_separations ss
|
||||
JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id
|
||||
WHERE sub_stat_hist IN ('4.1', '4.2')
|
||||
GROUP BY ss.recruitment_id, ss.spring_autumn
|
||||
),
|
||||
t3 AS (
|
||||
SELECT
|
||||
ss.recruitment_id,
|
||||
ss.spring_autumn,
|
||||
COUNT(DISTINCT subpoena_id) AS count_not_appeared
|
||||
FROM season_separations ss
|
||||
JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id
|
||||
WHERE sub_stat_hist = '5'
|
||||
GROUP BY ss.recruitment_id, ss.spring_autumn
|
||||
)
|
||||
SELECT
|
||||
current_date AS recording_date,
|
||||
COALESCE(t1.count_subpoena, 0) AS count_subpoena,
|
||||
COALESCE(t2.count_appeared, 0) AS count_appeared,
|
||||
COALESCE(t3.count_not_appeared, 0) AS count_not_appeared,
|
||||
COALESCE(ROUND(COALESCE(t2.count_appeared, 0) * 100.0 / NULLIF(COALESCE(t1.count_subpoena, 0), 0), 2), 0) AS appeared_on_subpoenas_percent,
|
||||
COALESCE(ROUND(COALESCE(t3.count_not_appeared, 0) * 100.0 / NULLIF(COALESCE(t1.count_subpoena, 0), 0), 2), 0) AS not_appeared_on_subpoenas_percent,
|
||||
0 AS new_recruits,
|
||||
0 AS postponement_have_right,
|
||||
0 AS postponement_granted,
|
||||
0 AS postponement_have_right_percent,
|
||||
0 AS postponement_granted_percent,
|
||||
ss.spring_autumn,
|
||||
ss.recruitment_id
|
||||
FROM season_separations ss
|
||||
LEFT JOIN t1 ON ss.recruitment_id = t1.recruitment_id AND ss.spring_autumn = t1.spring_autumn
|
||||
LEFT JOIN t2 ON ss.recruitment_id = t2.recruitment_id AND ss.spring_autumn = t2.spring_autumn
|
||||
LEFT JOIN t3 ON ss.recruitment_id = t3.recruitment_id AND ss.spring_autumn = t3.spring_autumn;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -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,
|
||||
|
|
@ -81,7 +81,8 @@ SELECT
|
|||
current_date AS recording_date
|
||||
FROM last_status ls
|
||||
WHERE ls.recruitment_id IS NOT NULL
|
||||
AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months'
|
||||
AND ((ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') or
|
||||
(ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days'))
|
||||
GROUP BY spring_autumn, ls.recruitment_id</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
@ -122,10 +123,6 @@ GROUP BY spring_autumn, ls.recruitment_id</sql>
|
|||
</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>
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ ids AS (
|
|||
-- Преобразуем строковый массив в таблицу UUID
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
/*
|
||||
last_status as (select recruit_id,
|
||||
max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time
|
||||
from recruits_history
|
||||
|
|
@ -60,12 +61,29 @@ registered as (
|
|||
where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025
|
||||
--and rh.source is not null
|
||||
),
|
||||
vse AS (
|
||||
*/
|
||||
last_status_n as (select recruit_id,
|
||||
max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time
|
||||
from recruits_history
|
||||
where status in ('1', '12.7', '8.2', '8.3')
|
||||
group by recruit_id
|
||||
),
|
||||
notregistered as (
|
||||
select
|
||||
distinct rh.recruit_id,
|
||||
rh.id as recruit_history_id
|
||||
from recruits_history rh
|
||||
join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
|
||||
where rh.status in ('1', '12.7', '8.2', '8.3')
|
||||
--and rh.source is not null
|
||||
),
|
||||
recruit_data AS (
|
||||
SELECT
|
||||
r.id AS r_id,
|
||||
ri.recruit_id AS recruit_id,
|
||||
r.gender,
|
||||
coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
|
||||
r.gender,
|
||||
r.current_recruitment_id AS recruitment_id,
|
||||
-- coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
|
||||
CASE
|
||||
WHEN (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
THEN 'Весна'
|
||||
|
|
@ -73,34 +91,127 @@ vse AS (
|
|||
THEN 'Осень'
|
||||
END AS spring_autumn,
|
||||
r.birth_date,
|
||||
ddd.hidden--, -- когда фолс отсрочка есть, когда тру или нулл - нет
|
||||
--ri.info
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
-- JOIN public.recruits_history rh ON rh.recruit_id=r.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn,
|
||||
ddd.recruit_id,
|
||||
ddd.hidden
|
||||
FROM decision_deferment_dto ddd
|
||||
WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв)
|
||||
) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1
|
||||
WHERE r.gender = 'MALE' AND
|
||||
/*
|
||||
r.id in (SELECT recruit_id FROM registered) and
|
||||
rh.id in (SELECT recruit_history_id FROM registered) and
|
||||
coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
|
||||
*/
|
||||
r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
AND
|
||||
((r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
OR
|
||||
(r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30')))
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
r.id AS r_id,
|
||||
ri.recruit_id AS recruit_id,
|
||||
r.gender,
|
||||
--r.current_recruitment_id AS recruitment_id,
|
||||
coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
|
||||
CASE
|
||||
WHEN ddd.hidden IS false THEN ddd.hidden
|
||||
ELSE true
|
||||
END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет
|
||||
ri.info
|
||||
WHEN (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
THEN 'Весна'
|
||||
WHEN (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30'))
|
||||
THEN 'Осень'
|
||||
END AS spring_autumn,
|
||||
r.birth_date,
|
||||
ddd.hidden--, -- когда фолс отсрочка есть, когда тру или нулл - нет
|
||||
--ri.info
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
JOIN public.recruits_history rh ON rh.recruit_id=r.id
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn,
|
||||
ddd.recruit_id,
|
||||
ddd.hidden
|
||||
FROM decision_deferment_dto ddd
|
||||
WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв)
|
||||
) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1
|
||||
WHERE r.gender = 'MALE' AND
|
||||
r.id in (SELECT recruit_id FROM registered) and
|
||||
rh.id in (SELECT recruit_history_id FROM registered) and
|
||||
coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
|
||||
AND
|
||||
((r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
|
||||
r.id in (SELECT recruit_id FROM notregistered) and
|
||||
rh.id in (SELECT recruit_history_id FROM notregistered) and
|
||||
coalesce(r.target_recruitment_id, rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
|
||||
AND r.current_recruitment_id is null
|
||||
-- r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
AND
|
||||
((r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
OR
|
||||
(r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30')))
|
||||
(r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30')))
|
||||
|
||||
),
|
||||
vse as (
|
||||
SELECT
|
||||
rd.hidden as postponement,
|
||||
'Весна' AS spring_autumn,
|
||||
--COALESCE(dd.updated_at, dd.created_at) AS postponement_date,
|
||||
r.recruit_id,
|
||||
rd.postponement_date,
|
||||
r.recruitment_id,
|
||||
r.hidden
|
||||
FROM recruit_data r
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn,
|
||||
rd.recruit_id,
|
||||
rd.hidden,
|
||||
rd.postponement_date
|
||||
FROM recruits_deferment rd
|
||||
WHERE rd.hidden is false
|
||||
AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days')
|
||||
-- AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months')
|
||||
) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1
|
||||
WHERE r.spring_autumn = 'Весна'
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
rd.hidden as postponement,
|
||||
'Осень' AS spring_autumn,
|
||||
--COALESCE(dd.updated_at, dd.created_at) AS postponement_date,
|
||||
r.recruit_id,
|
||||
rd.postponement_date,
|
||||
r.recruitment_id,
|
||||
r.hidden
|
||||
FROM recruit_data r
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn,
|
||||
rd.recruit_id,
|
||||
rd.hidden,
|
||||
rd.postponement_date
|
||||
FROM recruits_deferment rd
|
||||
WHERE rd.hidden is false
|
||||
-- AND (rs.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days')
|
||||
AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months')
|
||||
) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1
|
||||
WHERE r.spring_autumn = 'Осень'
|
||||
)
|
||||
SELECT
|
||||
ri.recruitment_id,
|
||||
ri.spring_autumn,
|
||||
current_date AS recording_date,
|
||||
COUNT(DISTINCT ri.recruit_id) FILTER (
|
||||
WHERE
|
||||
ri.hidden IS true -- нет отсрочки и нет освобождения от службы
|
||||
) AS recruit
|
||||
FROM vse AS ri
|
||||
GROUP BY ri.recruitment_id, ri.spring_autumn</sql>
|
||||
r.recruitment_id,
|
||||
r.spring_autumn,
|
||||
current_date as recording_date,
|
||||
COUNT(r.recruit_id) FILTER (WHERE r.hidden IS NOT true) AS recruit,
|
||||
COUNT(r.recruit_id) FILTER (WHERE r.postponement IS NOT null) AS postponement_have_right
|
||||
FROM vse r
|
||||
GROUP BY recruitment_id, spring_autumn</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -144,6 +255,10 @@ GROUP BY ri.recruitment_id, ri.spring_autumn</sql>
|
|||
<name>new_recruits</name>
|
||||
<rename>recruit</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>m_d.rec_cam(m_c)_to_person_registry_postponement</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (person_registry) регион/осень</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input (person_registry) регион/осень</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
vse AS(
|
||||
SELECT
|
||||
CASE
|
||||
WHEN dd.hidden is true THEN 'true'
|
||||
ELSE 'false'
|
||||
END AS postponement,
|
||||
--COALESCE(dd.updated_at, dd.created_at) AS postponement_date,
|
||||
dd.recruit_id,
|
||||
dd.postponement_date,
|
||||
COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
|
||||
ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.system_update_date, dd.system_create_date) DESC) AS rn
|
||||
FROM recruits r
|
||||
JOIN recruits_deferment dd ON dd.recruit_id = r.id
|
||||
WHERE COALESCE(r.current_recruitment_id, r.target_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids)
|
||||
),
|
||||
last_status AS(
|
||||
SELECT *
|
||||
FROM vse
|
||||
WHERE rn = 1
|
||||
)
|
||||
SELECT
|
||||
COALESCE(COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false'), 0) AS postponement_have_right,
|
||||
CASE
|
||||
WHEN (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days')
|
||||
THEN 'Весна'
|
||||
WHEN (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months')
|
||||
THEN 'Осень'
|
||||
END AS spring_autumn,
|
||||
ls.recruitment_id,
|
||||
current_date AS recording_date
|
||||
FROM last_status ls
|
||||
WHERE ls.recruitment_id IS NOT NULL
|
||||
AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months'
|
||||
GROUP BY spring_autumn, ls.recruitment_id</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>recruitment_campaign</table>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>m_d.rec_cam(m_c)_to_person_registry_postponement_uniq</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (person_registry) регион/осень</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input (person_registry) регион/осень</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
-- Весенние ID
|
||||
SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id,
|
||||
'Весна' AS spring_autumn
|
||||
UNION ALL
|
||||
-- Осенние ID
|
||||
SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id,
|
||||
'Осень' AS spring_autumn
|
||||
),
|
||||
vse AS(
|
||||
SELECT
|
||||
CASE
|
||||
WHEN dd.hidden is true THEN 'true'
|
||||
ELSE 'false'
|
||||
END AS postponement,
|
||||
--COALESCE(dd.updated_at, dd.created_at) AS postponement_date,
|
||||
dd.recruit_id,
|
||||
dd.postponement_date,
|
||||
COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
|
||||
ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.system_update_date, dd.system_create_date) DESC) AS rn
|
||||
FROM recruits r
|
||||
JOIN recruits_deferment dd ON dd.recruit_id = r.id
|
||||
WHERE COALESCE(r.current_recruitment_id, r.target_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
CASE
|
||||
WHEN dd.hidden is true THEN 'true'
|
||||
ELSE 'false'
|
||||
END AS postponement,
|
||||
--COALESCE(dd.updated_at, dd.created_at) AS postponement_date,
|
||||
dd.recruit_id,
|
||||
dd.postponement_date,
|
||||
COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
|
||||
ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.system_update_date, dd.system_create_date) DESC) AS rn
|
||||
FROM recruits r
|
||||
JOIN recruits_deferment dd ON dd.recruit_id = r.id
|
||||
WHERE COALESCE(r.current_recruitment_id, r.target_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
|
||||
),
|
||||
last_status AS(
|
||||
SELECT *
|
||||
FROM vse
|
||||
WHERE rn = 1
|
||||
)
|
||||
SELECT
|
||||
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,
|
||||
CURRENT_DATE AS recording_date
|
||||
FROM last_status ls
|
||||
WHERE ls.recruitment_id IS NOT NULL
|
||||
AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days' -- 15 июля текущего года
|
||||
AND ls.season = 'Весна'
|
||||
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 = 'false') AS postponement_granted,
|
||||
'Осень' AS spring_autumn,
|
||||
ls.recruitment_id,
|
||||
CURRENT_DATE AS recording_date
|
||||
FROM last_status ls
|
||||
WHERE ls.recruitment_id IS NOT NULL
|
||||
AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months' -- 1 января следующего года
|
||||
AND ls.season = 'Осень'
|
||||
GROUP BY ls.recruitment_id;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>N</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>recruitment_campaign</table>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>N</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -51,6 +51,7 @@ ids AS (
|
|||
SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id,
|
||||
'Осень' AS spring_autumn
|
||||
),
|
||||
/*
|
||||
last_status as (select recruit_id,
|
||||
max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time
|
||||
from recruits_history
|
||||
|
|
@ -65,12 +66,100 @@ registered as (
|
|||
where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025
|
||||
--and rh.source is not null
|
||||
),
|
||||
vse AS (
|
||||
*/
|
||||
last_status_n as (select recruit_id,
|
||||
max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time
|
||||
from recruits_history
|
||||
where status in ('1', '12.7', '8.2', '8.3')
|
||||
group by recruit_id
|
||||
),
|
||||
notregistered as (
|
||||
select
|
||||
distinct rh.recruit_id,
|
||||
rh.id as recruit_history_id
|
||||
from recruits_history rh
|
||||
join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
|
||||
where rh.status in ('1', '12.7', '8.2', '8.3')
|
||||
--and rh.source is not null
|
||||
),
|
||||
recruit_data AS (
|
||||
SELECT
|
||||
r.id AS r_id,
|
||||
ri.recruit_id AS recruit_id,
|
||||
r.gender,
|
||||
coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
|
||||
--coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
|
||||
r.current_recruitment_id AS recruitment_id,
|
||||
'Весна' AS spring_autumn,
|
||||
r.birth_date,
|
||||
CASE
|
||||
WHEN ddd.hidden IS false THEN ddd.hidden
|
||||
ELSE true
|
||||
END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет
|
||||
ri.info
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
--JOIN public.recruits_history rh ON rh.recruit_id=r.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn,
|
||||
ddd.recruit_id,
|
||||
ddd.hidden
|
||||
FROM decision_deferment_dto ddd
|
||||
WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв)
|
||||
) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1
|
||||
WHERE r.gender = 'MALE' AND
|
||||
/*
|
||||
r.id in (SELECT recruit_id FROM registered) and
|
||||
rh.id in (SELECT recruit_history_id FROM registered) and
|
||||
coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
|
||||
*/
|
||||
r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
|
||||
AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
r.id AS r_id,
|
||||
ri.recruit_id AS recruit_id,
|
||||
r.gender,
|
||||
--coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
|
||||
r.current_recruitment_id AS recruitment_id,
|
||||
'Осень' AS spring_autumn,
|
||||
r.birth_date,
|
||||
CASE
|
||||
WHEN ddd.hidden IS false THEN ddd.hidden
|
||||
ELSE true
|
||||
END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет
|
||||
ri.info
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
--JOIN public.recruits_history rh ON rh.recruit_id=r.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn,
|
||||
ddd.recruit_id,
|
||||
ddd.hidden
|
||||
FROM decision_deferment_dto ddd
|
||||
WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв)
|
||||
) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1
|
||||
WHERE r.gender = 'MALE' AND
|
||||
/*
|
||||
r.id in (SELECT recruit_id FROM registered) and
|
||||
rh.id in (SELECT recruit_history_id FROM registered) and
|
||||
coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
|
||||
*/
|
||||
r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
|
||||
AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30'))
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
r.id AS r_id,
|
||||
ri.recruit_id AS recruit_id,
|
||||
r.gender,
|
||||
coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
|
||||
--r.current_recruitment_id AS recruitment_id,
|
||||
'Весна' AS spring_autumn,
|
||||
r.birth_date,
|
||||
CASE
|
||||
|
|
@ -81,13 +170,23 @@ vse AS (
|
|||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
JOIN public.recruits_history rh ON rh.recruit_id=r.id
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn,
|
||||
ddd.recruit_id,
|
||||
ddd.hidden
|
||||
FROM decision_deferment_dto ddd
|
||||
WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв)
|
||||
) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1
|
||||
WHERE r.gender = 'MALE' AND
|
||||
r.id in (SELECT recruit_id FROM registered) and
|
||||
rh.id in (SELECT recruit_history_id FROM registered) and
|
||||
coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
|
||||
AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
|
||||
--/*
|
||||
r.id in (SELECT recruit_id FROM notregistered) and
|
||||
rh.id in (SELECT recruit_history_id FROM notregistered) and
|
||||
coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
|
||||
--*/
|
||||
--AND r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
|
||||
AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13'))
|
||||
AND r.current_recruitment_id is null
|
||||
|
||||
UNION ALL
|
||||
|
||||
|
|
@ -95,7 +194,8 @@ vse AS (
|
|||
r.id AS r_id,
|
||||
ri.recruit_id AS recruit_id,
|
||||
r.gender,
|
||||
coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
|
||||
coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
|
||||
--r.current_recruitment_id AS recruitment_id,
|
||||
'Осень' AS spring_autumn,
|
||||
r.birth_date,
|
||||
CASE
|
||||
|
|
@ -106,23 +206,80 @@ vse AS (
|
|||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
JOIN public.recruits_history rh ON rh.recruit_id=r.id
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn,
|
||||
ddd.recruit_id,
|
||||
ddd.hidden
|
||||
FROM decision_deferment_dto ddd
|
||||
WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв)
|
||||
) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1
|
||||
WHERE r.gender = 'MALE' AND
|
||||
r.id in (SELECT recruit_id FROM registered) and
|
||||
rh.id in (SELECT recruit_history_id FROM registered) and
|
||||
coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
|
||||
AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30'))
|
||||
--/*
|
||||
r.id in (SELECT recruit_id FROM notregistered) and
|
||||
rh.id in (SELECT recruit_history_id FROM notregistered) and
|
||||
coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
|
||||
--*/
|
||||
--AND r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
|
||||
AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30'))
|
||||
AND r.current_recruitment_id is null
|
||||
|
||||
),
|
||||
vse as (
|
||||
SELECT
|
||||
rd.hidden as postponement,
|
||||
'Весна' AS spring_autumn,
|
||||
--COALESCE(dd.updated_at, dd.created_at) AS postponement_date,
|
||||
r.recruit_id,
|
||||
rd.postponement_date,
|
||||
r.recruitment_id,
|
||||
r.hidden
|
||||
FROM recruit_data r
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn,
|
||||
rd.recruit_id,
|
||||
rd.hidden,
|
||||
rd.postponement_date
|
||||
FROM recruits_deferment rd
|
||||
WHERE rd.hidden is false
|
||||
AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days')
|
||||
-- AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months')
|
||||
) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1
|
||||
WHERE r.spring_autumn = 'Весна'
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
rd.hidden as postponement,
|
||||
'Осень' AS spring_autumn,
|
||||
--COALESCE(dd.updated_at, dd.created_at) AS postponement_date,
|
||||
r.recruit_id,
|
||||
rd.postponement_date,
|
||||
r.recruitment_id,
|
||||
r.hidden
|
||||
FROM recruit_data r
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn,
|
||||
rd.recruit_id,
|
||||
rd.hidden,
|
||||
rd.postponement_date
|
||||
FROM recruits_deferment rd
|
||||
WHERE rd.hidden is false
|
||||
-- AND (rs.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days')
|
||||
AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months')
|
||||
) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1
|
||||
WHERE r.spring_autumn = 'Осень'
|
||||
)
|
||||
SELECT
|
||||
ri.recruitment_id,
|
||||
ri.spring_autumn,
|
||||
current_date AS recording_date,
|
||||
COUNT(DISTINCT ri.recruit_id) FILTER (
|
||||
WHERE
|
||||
ri.hidden IS true -- нет отсрочки и нет освобождения от службы
|
||||
) AS recruit
|
||||
FROM vse AS ri
|
||||
GROUP BY ri.recruitment_id, ri.spring_autumn</sql>
|
||||
r.recruitment_id,
|
||||
r.spring_autumn,
|
||||
current_date as recording_date,
|
||||
COUNT(r.recruit_id) FILTER (WHERE r.hidden IS NOT true) AS recruit,
|
||||
COUNT(r.recruit_id) FILTER (WHERE r.postponement IS NOT null) AS postponement_have_right
|
||||
FROM vse r
|
||||
GROUP BY recruitment_id, spring_autumn</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -144,25 +301,21 @@ GROUP BY ri.recruitment_id, ri.spring_autumn</sql>
|
|||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>N</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>
|
||||
|
|
@ -170,6 +323,10 @@ GROUP BY ri.recruitment_id, ri.spring_autumn</sql>
|
|||
<name>new_recruits</name>
|
||||
<rename>recruit</rename>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>N</skip_lookup>
|
||||
<use_batch>N</use_batch>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue