+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ average_appeared
+ average_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ electron
+ count_electron
+ Y
+
+
+ paper
+ count_paper
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ electron_percent
+ electron_percent
+ Y
+
+
+ paper_percent
+ paper_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ schema
+ schema
+ N
+
+
+ N
+
+
+ 1248
+ 256
+
+
+
+ Select values 2 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REG_ID
+ REG_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ VK_ARRAY
+ VK_ARRAY
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 992
+ 256
+
+
+
+ Table input (subpoena)РФ/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(SUM(subpoena), 0) count_subpoena,
+ COALESCE(SUM(appeared), 0) count_appeared,
+ COALESCE(SUM(average_appeared), 0) average_appeared,
+ COALESCE(SUM(not_appeared), 0) count_not_appeared,
+ COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason,
+ COALESCE(SUM(introduced_measures), 0) count_introduced_measures,
+ COALESCE(SUM(ap_not_required), 0) count_ap_not_required,
+ COALESCE(SUM(electron), 0) count_electron,
+ COALESCE(SUM(paper), 0) count_paper,
+ COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) appeared_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) not_appeared_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) not_ap_good_reason_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) ap_not_required_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(electron) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) electron_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(paper) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) paper_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) restrictions_applied_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) introduced_measures_percent,
+
+ COALESCE(SUM(count_not_delivery), 0) count_not_delivery,
+ COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good,
+
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) not_delivery_percent,
+ COALESCE(
+ CASE
+ WHEN SUM(subpoena) > 0
+ THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2)
+ ELSE 0
+ END,
+ 0
+ ) appear_date_is_good_percent,
+ '${REG_ID}' AS recruitment_id,
+ mil_reg,
+ 'Ministry' AS schema
+FROM total_registered.subpoenas
+WHERE recruitment_id = ANY ('${VK_ARRAY}')
+AND schema = 'Region'
+AND recording_date = CURRENT_DATE
+GROUP BY mil_reg;
+ Y
+
+
+ 560
+ 256
+
+
+
+
+
+
diff --git a/map_v1/dummy/clearing_recruits/clearing_recruits_from_citizen_table.hpl b/map_v1/dummy/clearing_recruits/clearing_recruits_from_citizen_table.hpl
new file mode 100644
index 0000000..5cb30a4
--- /dev/null
+++ b/map_v1/dummy/clearing_recruits/clearing_recruits_from_citizen_table.hpl
@@ -0,0 +1,193 @@
+
+
+
+ clearing_recruits_from_citizen_table
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/20 11:08:52.517
+ -
+ 2025/05/20 11:08:52.517
+
+
+
+
+
+ Dummy (do nothing)
+ Copy rows to result
+ Y
+
+
+ Dummy (do nothing) 2
+ Table input
+ Y
+
+
+ Dummy (do nothing) 3
+ Execute SQL script delete citizen
+ Y
+
+
+
+ Execute SQL script delete citizen
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ N
+ N
+ N
+ delete from ervu_dashboard.citizen where recruit_id = '${}'
+
+
+ 1648
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+/*
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
+),
+*/
+citizen AS (
+ SELECT
+ '${RCRT_C}'::uuid AS recruitment_id,
+ unnest(string_to_array(trim(both '{}'
+ from '${CITIZ_ARR}'
+ ), ','))::uuid AS recruit_id
+),
+recruits AS (
+ SELECT
+ '${RCRT_C}'::uuid AS recruitment_id,
+ unnest(string_to_array(trim(both '{}'
+ from '${RECR_ARR}'
+ ), ','))::uuid AS recruit_id
+),
+except_result AS (
+ SELECT
+ recruit_id,
+ recruitment_id
+ FROM citizen
+ EXCEPT
+ SELECT
+ recruit_id,
+ recruitment_id
+ FROM recruits
+)
+SELECT
+ recruitment_id AS RECRUITMENT_ID,
+ array_agg(recruit_id) AS RECRUITS_ARRAY
+FROM except_result
+group by recruitment_id
+ Y
+
+
+ 960
+ 400
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 384
+ 240
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 576
+ 240
+
+
+
+ Dummy (do nothing) 2
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 720
+ 400
+
+
+
+ Dummy (do nothing) 3
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 1328
+ 416
+
+
+
+
+
+
diff --git a/map_v1/dummy/clearing_recruits/job_clearing_recruits_from_citizen_table.hwf b/map_v1/dummy/clearing_recruits/job_clearing_recruits_from_citizen_table.hwf
new file mode 100644
index 0000000..fd44ffb
--- /dev/null
+++ b/map_v1/dummy/clearing_recruits/job_clearing_recruits_from_citizen_table.hwf
@@ -0,0 +1,61 @@
+
+
+ job_clearing_recruits_from_citizen_table
+ Y
+
+
+
+ -
+ 2025/05/20 11:23:47.379
+ -
+ 2025/05/20 11:23:47.379
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 672
+ 352
+
+
+
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 58
+ 736
+ 208
+ селектим id военкоматов и создаем массив рекрутов внутри этого военкомата из бд ervu_person_registry (таблица recruits) и
+селектим id военкоматов и создаем массив рекрутов внутри этого военкомата из бд ervu_dashboard (таблица citizen)
+-> затем с помощью except зачищаем лишние данные
+ 700
+
+
+
+
diff --git a/map_v1/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl b/map_v1/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl
new file mode 100644
index 0000000..9f5eafc
--- /dev/null
+++ b/map_v1/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl
@@ -0,0 +1,131 @@
+
+
+
+ checkpoinnt_raw_info_recruits_err
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 10:26:03.910
+ -
+ 2025/05/21 10:26:03.910
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 496
+ 256
+ определение рекрута и военкомата на котором остановилась загрузка данных
+ 445
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+rows AS (
+ SELECT
+ recruit_id,
+ --ROW_NUMBER() OVER (ORDER BY recruit_id) AS
+ rn_recruit,
+ COALESCE(recruitment_id,target_recruitment_id) AS recruitment_id,
+ --ROW_NUMBER() OVER (ORDER BY COALESCE(recruitment_id,target_recruitment_id)) AS
+ rn_recruitment
+ FROM ervu_dashboard.citizen
+ WHERE (recruitment_id is not null or target_recruitment_id is not null) AND recruit_id IS NOT NULL
+)
+SELECT
+ 'job_if_err_raw_inf_recr' AS job_name,
+ CURRENT_TIMESTAMP AS last_update,
+ recruit_id AS last_recruit_id,
+ rn_recruit,
+ recruitment_id AS last_recruitment_id,
+ rn_recruitment,
+ 'ERROR' AS status
+FROM rows
+WHERE rn_recruitment = (SELECT MAX(rn_recruitment) FROM rows)
+ORDER BY rn_recruit DESC
+LIMIT 1;
+ N
+
+
+ 512
+ 352
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 928
+ 352
+
+
+
+
+
+
diff --git a/map_v1/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl b/map_v1/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl
new file mode 100644
index 0000000..d2ec458
--- /dev/null
+++ b/map_v1/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl
@@ -0,0 +1,131 @@
+
+
+
+ checkpoint_raw_info_recruits_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 10:25:24.598
+ -
+ 2025/05/21 10:25:24.598
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 528
+ 288
+ определение рекрута и военкомата на котором остановилась загрузка данных
+ 445
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+rows AS (
+ SELECT
+ recruit_id,
+ --ROW_NUMBER() OVER (ORDER BY recruit_id) AS
+ rn_recruit,
+ COALESCE(recruitment_id,target_recruitment_id) AS recruitment_id,
+ --ROW_NUMBER() OVER (ORDER BY COALESCE(recruitment_id,target_recruitment_id)) AS
+ rn_recruitment
+ FROM ervu_dashboard.citizen
+ WHERE (recruitment_id is not null or target_recruitment_id is not null) AND recruit_id IS NOT NULL
+)
+SELECT
+ 'job_if_err_raw_inf_recr' AS job_name,
+ CURRENT_TIMESTAMP AS last_update,
+ recruit_id AS last_recruit_id,
+ rn_recruit,
+ recruitment_id AS last_recruitment_id,
+ rn_recruitment,
+ 'SUCCESS' AS status
+FROM rows
+WHERE rn_recruitment = (SELECT MAX(rn_recruitment) FROM rows)
+ORDER BY rn_recruit DESC
+LIMIT 1;
+ N
+
+
+ 544
+ 384
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 960
+ 384
+
+
+
+
+
+
diff --git a/map_v1/dummy/raw_info_recruits/job_if_err_raw_inf_recr.hwf b/map_v1/dummy/raw_info_recruits/job_if_err_raw_inf_recr.hwf
new file mode 100644
index 0000000..e1bf4c6
--- /dev/null
+++ b/map_v1/dummy/raw_info_recruits/job_if_err_raw_inf_recr.hwf
@@ -0,0 +1,242 @@
+
+
+ job_if_err_raw_inf_recr
+ Y
+
+
+
+ -
+ 2025/05/21 10:31:44.924
+ -
+ 2025/05/21 10:31:44.924
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 496
+ 368
+
+
+
+ checkpoint_recruitment_recruit.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/jobs_once/supportive_jobs/checkpoint_recruitment_recruit.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 656
+ 256
+
+
+
+ info_recruits_once.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/jobs_once/info_recruits_once.hpl
+ Basic
+
+
+ RCRT_C
+ RECRUITMENT_CITIZEN
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1152
+ 368
+
+
+
+ Success JOB IF ERROR
+
+ SUCCESS
+
+ N
+ 1728
+ 368
+
+
+
+ recruitment_rows_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/jobs_once/supportive_jobs/recruitment_rows_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 912
+ 368
+
+
+
+ ERROR JOB IF ERROR
+
+ SUCCESS
+
+ N
+ 1728
+ 480
+
+
+
+ checkpoint_recruitment_recruit_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/jobs_once/supportive_jobs/checkpoint_recruitment_recruit_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1408
+ 368
+
+
+
+ checkpoint_recruitment_recruit_err.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/jobs_once/supportive_jobs/checkpoint_recruitment_recruit_err.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1408
+ 480
+
+
+
+
+
+ checkpoint_recruitment_recruit.hpl
+ recruitment_rows_if_error.hpl
+ N
+ Y
+ N
+
+
+ info_recruits_once.hpl
+ checkpoint_recruitment_recruit_success.hpl
+ Y
+ Y
+ N
+
+
+ info_recruits_once.hpl
+ checkpoint_recruitment_recruit_err.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_if_error.hpl
+ info_recruits_once.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_recruitment_recruit_success.hpl
+ Success JOB IF ERROR
+ Y
+ Y
+ Y
+
+
+ checkpoint_recruitment_recruit_err.hpl
+ ERROR JOB IF ERROR
+ Y
+ Y
+ Y
+
+
+ Start
+ recruitment_rows_if_error.hpl
+ Y
+ Y
+ Y
+
+
+
+
+
+
diff --git a/map_v1/dummy/raw_info_recruits/job_raw_info_recruits.hwf b/map_v1/dummy/raw_info_recruits/job_raw_info_recruits.hwf
new file mode 100644
index 0000000..c54d0c0
--- /dev/null
+++ b/map_v1/dummy/raw_info_recruits/job_raw_info_recruits.hwf
@@ -0,0 +1,266 @@
+
+
+ job_raw_info_recruits
+ Y
+
+
+
+ -
+ 2025/05/21 10:06:15.097
+ -
+ 2025/05/21 10:06:15.097
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 336
+ 320
+
+
+
+ SQL delete ervu_person_registry_raw.recruits_info
+
+ SQL
+
+ ervu-dashboard
+ N
+ delete from ervu_person_registry_raw.recruits_info
+ N
+ N
+ N
+ 528
+ 208
+
+
+
+ raw_info_recruits.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/dummy/raw_info_recruits/raw_info_recruits.hpl
+ Basic
+
+
+ RCRT_C
+ RECRUITMENT_CITIZEN
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1232
+ 320
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1936
+ 320
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1936
+ 448
+
+
+
+ checkpoint_raw_info_recruits_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 320
+
+
+
+ checkpoinnt_raw_info_recruits_err.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 448
+
+
+
+ job_row_recruit_id.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/jobs_once/supportive_jobs/job_row_recruit_id.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 208
+
+
+
+ recruitment_rows.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/jobs_once/supportive_jobs/recruitment_rows.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 960
+ 320
+
+
+
+
+
+ checkpoint_raw_info_recruits_success.hpl
+ Success
+ Y
+ Y
+ N
+
+
+ checkpoinnt_raw_info_recruits_err.hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ raw_info_recruits.hpl
+ checkpoint_raw_info_recruits_success.hpl
+ Y
+ Y
+ N
+
+
+ raw_info_recruits.hpl
+ checkpoinnt_raw_info_recruits_err.hpl
+ Y
+ N
+ N
+
+
+ Start
+ SQL delete ervu_person_registry_raw.recruits_info
+ Y
+ Y
+ Y
+
+
+ job_row_recruit_id.hwf
+ recruitment_rows.hpl
+ Y
+ N
+ Y
+
+
+ SQL delete ervu_person_registry_raw.recruits_info
+ job_row_recruit_id.hwf
+ Y
+ Y
+ N
+
+
+ recruitment_rows.hpl
+ raw_info_recruits.hpl
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/dummy/raw_info_recruits/raw_info_recruits.hpl b/map_v1/dummy/raw_info_recruits/raw_info_recruits.hpl
new file mode 100644
index 0000000..a526fdb
--- /dev/null
+++ b/map_v1/dummy/raw_info_recruits/raw_info_recruits.hpl
@@ -0,0 +1,76 @@
+
+
+
+ raw_info_recruits
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 10:09:54.850
+ -
+ 2025/05/21 10:09:54.850
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+ 0
+ SELECT <values> FROM <table name> WHERE <conditions>
+ N
+
+
+ 384
+ 240
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+
+
+
+
+ job_name
+ job_name
+ N
+
+
+ status
+ status
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ N
+
+
+ 928
+ 144
+
+
+
+ JSON input state_job_general_info_recruits.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/checkpoints/state_job_general_info_recruits.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 560
+ 384
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1136
+ 144
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_general_info_recruits') AS job_name,
+ COALESCE(status, 'SUCCESS') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_general_info_recruits'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_general_info_recruits'
+ )
+) t
+ N
+
+
+ 400
+ 144
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl
new file mode 100644
index 0000000..ba1084b
--- /dev/null
+++ b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_job_general_info_recruits_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 15:29:36.938
+ -
+ 2025/06/16 15:29:36.938
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1216
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'job_general_info_recruits' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 848
+ 384
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl
new file mode 100644
index 0000000..019ec56
--- /dev/null
+++ b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_job_general_info_recruits_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 15:29:36.938
+ -
+ 2025/06/16 15:29:36.938
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1200
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'job_general_info_recruits' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 832
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl b/map_v1/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl
new file mode 100644
index 0000000..1daa60f
--- /dev/null
+++ b/map_v1/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl
@@ -0,0 +1,200 @@
+
+
+
+ check_status_job_info_recruits_from_json
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 16:12:10.826
+ -
+ 2025/06/16 16:12:10.826
+
+
+
+
+
+ Insert / update
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 384
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1296
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'job_child',
+ 'job_citizen_guardianship',
+ 'job_passport',
+ 'job_citizen_spouse',
+ 'job_prosecution',
+ 'job_punishment',
+ 'job_snils_inn',
+ 'job_citizen_liability_fz53',
+ 'job_citizen_criminal_liability_fz53',
+ 'job_citizen_appealing_violations_fz53'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'job_child',
+ 'job_citizen_guardianship',
+ 'job_passport',
+ 'job_citizen_spouse',
+ 'job_prosecution',
+ 'job_punishment',
+ 'job_snils_inn',
+ 'job_citizen_liability_fz53',
+ 'job_citizen_criminal_liability_fz53',
+ 'job_citizen_appealing_violations_fz53'
+ )
+ ) = 10 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_info_recruits_from_json' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 688
+ 384
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 1552
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl b/map_v1/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl
new file mode 100644
index 0000000..f686db8
--- /dev/null
+++ b/map_v1/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl
@@ -0,0 +1,184 @@
+
+
+
+ check_status_parallel_recruits_info_citizen
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 15:43:53.832
+ -
+ 2025/06/16 15:43:53.832
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+ Insert / update
+ Set variables
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1088
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'job_citizen',
+ 'job_recruits_info'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'job_citizen',
+ 'job_recruits_info'
+ )
+ ) = 2 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_parallel_recruits_info_citizen' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 720
+ 288
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1328
+ 288
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 1584
+ 160
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/branching_child.hpl b/map_v1/info_recruits/citizen_tables/child/branching_child.hpl
new file mode 100644
index 0000000..d25a7a0
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/branching_child.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_child
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_child'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/branching_child_delta.hpl b/map_v1/info_recruits/citizen_tables/child/branching_child_delta.hpl
new file mode 100644
index 0000000..382688b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/branching_child_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_child_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_child_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_child_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_child_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl
new file mode 100644
index 0000000..7678021
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_child_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl
new file mode 100644
index 0000000..4339f92
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_child_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl
new file mode 100644
index 0000000..9f51e25
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_child_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl
new file mode 100644
index 0000000..ab2f474
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_child_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl
new file mode 100644
index 0000000..23987c6
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_child_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl
new file mode 100644
index 0000000..5732590
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_child_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl
new file mode 100644
index 0000000..95b5598
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_child_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl
new file mode 100644
index 0000000..8878838
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_child_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl
new file mode 100644
index 0000000..cd555b8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_child_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl
new file mode 100644
index 0000000..83181a2
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_child_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl
new file mode 100644
index 0000000..782c038
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl
new file mode 100644
index 0000000..7a7dc06
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl
new file mode 100644
index 0000000..a420549
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl
new file mode 100644
index 0000000..0c50fd3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl
new file mode 100644
index 0000000..16a7007
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl
new file mode 100644
index 0000000..96e5db8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl
new file mode 100644
index 0000000..c39e38f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl
new file mode 100644
index 0000000..381c4fc
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl
new file mode 100644
index 0000000..460b876
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl
new file mode 100644
index 0000000..8035bc7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..3b69421
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_child' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..64b8f84
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_child' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl
new file mode 100644
index 0000000..a2bc69c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_child_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_child') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_child'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_child'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_child_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_child_error.hpl
new file mode 100644
index 0000000..0f593da
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_child_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_child_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl
new file mode 100644
index 0000000..06568da
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_child
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'child_flow1',
+ 'child_flow2',
+ 'child_flow3',
+ 'child_flow4',
+ 'child_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'child_flow1',
+ 'child_flow2',
+ 'child_flow3',
+ 'child_flow4',
+ 'child_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_child' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl
new file mode 100644
index 0000000..9097bd1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_child_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_child_flow1',
+ 'delta_child_flow2',
+ 'delta_child_flow3',
+ 'delta_child_flow4',
+ 'delta_child_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_child_flow1',
+ 'delta_child_flow2',
+ 'delta_child_flow3',
+ 'delta_child_flow4',
+ 'delta_child_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_child_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf
new file mode 100644
index 0000000..b31ca9f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf
@@ -0,0 +1,235 @@
+
+
+ job_create_files_child
+ Y
+
+
+
+ -
+ 2025/05/26 16:48:00.210
+ -
+ 2025/05/26 16:48:00.210
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 576
+ 496
+
+
+
+ state_child_flow2_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow2"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+ N
+ 848
+ 416
+
+
+
+ state_child_flow1_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow1"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+ N
+ 848
+ 336
+
+
+
+ state_child_flow3_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow3"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+ N
+ 848
+ 496
+
+
+
+ state_child_flow4_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow4"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+ N
+ 848
+ 576
+
+
+
+ state_child_flow5_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow5"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+ N
+ 848
+ 656
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1120
+ 496
+
+
+
+ Delete file state_job_child
+
+ DELETE_FILE
+
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json
+ N
+ 848
+ 256
+
+
+
+
+
+ Start
+ state_child_flow3_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow2_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow1_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow4_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow5_new
+ Y
+ Y
+ Y
+
+
+ state_child_flow5_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow4_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow3_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow2_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow1_new
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ Delete file state_job_child
+ Y
+ Y
+ Y
+
+
+ Delete file state_job_child
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/job_child.hwf b/map_v1/info_recruits/citizen_tables/child/job_child.hwf
new file mode 100644
index 0000000..9dd20b8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/job_child.hwf
@@ -0,0 +1,2478 @@
+
+
+ job_child
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_child.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_child.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ child_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ child_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ child_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ child_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ child_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new citizen
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_child.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/branching_child.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple child WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1696
+ 1712
+
+
+
+ Simple child WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ child_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ child_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ child_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ child_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ child_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ delta_child_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1776
+
+
+
+ check_if_job_child_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 544
+ 400
+
+
+
+ Simple job_child_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 784
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 576
+
+
+
+ change_status_child_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_child_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_child_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_child_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_child_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_child_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_child_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_child_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_child_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_child_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_child.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ Success child after error
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_child_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_child_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_child_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_child_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_child_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_child_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_child_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_child_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_child_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_child_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_child.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+ change_status_to_processing.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2416
+ 1472
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2320
+ 2304
+
+
+
+ change_status_delta_child_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1776
+
+
+
+ change_status_delta_child_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1856
+
+
+
+ recruitment_rows_five_flow_child.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2416
+ 2096
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2256
+ 2208
+
+
+
+ Simple delta_child WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2048
+ 2096
+
+
+
+ delta_child success
+
+ SUCCESS
+
+ N
+ 2144
+ 1904
+
+
+
+ branching_child_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/branching_child_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1792
+ 2096
+
+
+
+ checkpoint_job_child_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 2096
+
+
+
+ child_delta success
+
+ SUCCESS
+
+ N
+ 3712
+ 2096
+
+
+
+ delta_child_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1936
+
+
+
+ change_status_delta_child_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1936
+
+
+
+ change_status_delta_child_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2016
+
+
+
+ delta_child_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 2096
+
+
+
+ change_status_delta_child_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2096
+
+
+
+ change_status_delta_child_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2176
+
+
+
+ delta_child_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 2256
+
+
+
+ change_status_delta_child_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2256
+
+
+
+ change_status_delta_child_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2336
+
+
+
+ delta_child_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 2416
+
+
+
+ change_status_delta_child_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2416
+
+
+
+ change_status_delta_child_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2496
+
+
+
+
+
+ recruitment_rows_five_flow_child.hpl
+ child_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl
+ child_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl
+ child_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl
+ child_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl
+ child_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_child.hpl
+ Simple child WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_child.hpl
+ Simple child WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ child_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ child_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ child_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ child_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ child_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+ Start
+ check_if_job_child_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_child_exists.hpl
+ Simple job_child_exists check NEW
+ Y
+ Y
+ N
+
+
+ child_flow1.hpl
+ change_status_child_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ child_flow1.hpl
+ change_status_child_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ child_flow2.hpl
+ change_status_child_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ child_flow2.hpl
+ change_status_child_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ child_flow3.hpl
+ change_status_child_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ child_flow3.hpl
+ change_status_child_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ child_flow4.hpl
+ change_status_child_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ child_flow4.hpl
+ change_status_child_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ child_flow5.hpl
+ change_status_child_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ child_flow5.hpl
+ change_status_child_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_child_flow5_error.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow5_success.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow4_error.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow4_success.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow3_error.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow3_success.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow2_error.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow2_success.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow1_error.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ change_status_child_flow1_success.hpl
+ checkpoint_job_child.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_child.hpl
+ Success new citizen
+ Y
+ Y
+ N
+
+
+ change_status_child_flow1_success.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow1_error.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow2_success.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow2_error.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow3_success.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow3_error.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow4_success.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow4_error.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow5_success.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_child_flow5_error.hpl 2
+ checkpoint_job_child.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_child.hpl 2
+ Success child after error
+ Y
+ Y
+ N
+
+
+ child_flow1.hpl 2
+ change_status_child_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ child_flow1.hpl 2
+ change_status_child_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ child_flow2.hpl 2
+ change_status_child_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ child_flow2.hpl 2
+ change_status_child_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ child_flow3.hpl 2
+ change_status_child_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ child_flow3.hpl 2
+ change_status_child_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ child_flow4.hpl 2
+ change_status_child_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ child_flow4.hpl 2
+ change_status_child_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ child_flow5.hpl 2
+ change_status_child_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ child_flow5.hpl 2
+ change_status_child_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ checkpoint_job_child.hpl (2)
+ branching_child.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_child_exists check NEW
+ checkpoint_job_child.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_child_flow1.hpl
+ change_status_delta_child_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow1.hpl
+ change_status_delta_child_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ Simple job_child_exists check NEW
+ recruitment_rows_five_flow_child.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple child WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ Abort workflow 2 2
+ Y
+ Y
+ N
+
+
+ Simple delta_child WHERE ERROR
+ delta_child success
+ Y
+ N
+ N
+
+
+ Simple delta_child WHERE ERROR
+ recruitment_rows_five_flow_child.hpl 2
+ Y
+ Y
+ Y
+
+
+ Simple child WHERE SUCCESS
+ branching_child_delta.hpl
+ Y
+ Y
+ N
+
+
+ branching_child_delta.hpl
+ Simple delta_child WHERE ERROR
+ Y
+ Y
+ Y
+
+
+ checkpoint_job_child_delta.hpl
+ child_delta success
+ Y
+ Y
+ N
+
+
+ change_status_delta_child_flow1_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow1_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ delta_child_flow2.hpl
+ change_status_delta_child_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow2.hpl
+ change_status_delta_child_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_child_flow3.hpl
+ change_status_delta_child_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow3.hpl
+ change_status_delta_child_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_child_flow4.hpl
+ change_status_delta_child_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow4.hpl
+ change_status_delta_child_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_child_flow5.hpl
+ change_status_delta_child_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow5.hpl
+ change_status_delta_child_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow5.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_child_flow2_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow3_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow2_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow3_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow4_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow4_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow5_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow5_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/child_flow1.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow1.hpl
new file mode 100644
index 0000000..527cc57
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow1.hpl
@@ -0,0 +1,229 @@
+
+
+
+ child_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Select values 4 2
+ N
+
+
+ Select values 4 2
+ Get variables
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ recruitment_id
+ -1
+ none
+ String
+ ID_F1
+
+
+
+
+ 976
+ 400
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1040
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 560
+ 368
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/delta_child.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl
similarity index 94%
rename from mappings/info_recruits/citizen_tables/child/delta_child.hpl
rename to map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl
index c367eaf..8008a21 100644
--- a/mappings/info_recruits/citizen_tables/child/delta_child.hpl
+++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl
@@ -1,7 +1,7 @@
- delta_child
+ delta_child_flow1Y
@@ -108,8 +108,8 @@
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
-join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
- --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl
new file mode 100644
index 0000000..c108637
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl
new file mode 100644
index 0000000..7908b8e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl
new file mode 100644
index 0000000..32b4002
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl
new file mode 100644
index 0000000..1a55d69
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..0a663c3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('child_flow1', 'child_flow2', 'child_flow3', 'child_flow4', 'child_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen/branching_citizen.hpl b/map_v1/info_recruits/citizen_tables/citizen/branching_citizen.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/branching_citizen.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/branching_citizen.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf
rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf
diff --git a/map_v1/info_recruits/citizen_tables/citizen/delta_citizen.hpl b/map_v1/info_recruits/citizen_tables/citizen/delta_citizen.hpl
new file mode 100644
index 0000000..e5be261
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen/delta_citizen.hpl
@@ -0,0 +1,318 @@
+
+
+
+ delta_citizen
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
citizen
+
+ recruit_id
+ recruit_id
+ N
+
+
+ system_pgs_status
+ system_pgs_status
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ last_name
+ last_name
+ Y
+
+
+ first_name
+ first_name
+ Y
+
+
+ middle_name
+ middle_name
+ Y
+
+
+ gender
+ gender
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ age
+ age
+ Y
+
+
+ birth_place
+ birth_place
+ Y
+
+
+ phone
+ phone
+ Y
+
+
+ email
+ email
+ Y
+
+
+ date_registration
+ date_registration
+ Y
+
+
+ date_deregistration
+ date_deregistration
+ Y
+
+
+ recruit_create_date
+ recruit_create_date
+ Y
+
+
+ update_date
+ update_date
+ Y
+
+
+ vu_current_info
+ vu_current_info
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ Y
+
+
+ target_recruitment_id
+ target_recruitment_id
+ Y
+
+
+ deferment_liberation
+ deferment_liberation
+ Y
+
+
+ reason_registration
+ reason_registration
+ Y
+
+
+ residence
+ residence
+ Y
+
+
+ start_date_residence
+ start_date_residence
+ Y
+
+
+ end_date_residence
+ end_date_residence
+ Y
+
+
+ address_place_stay
+ address_place_stay
+ Y
+
+
+ start_date_place_stay
+ start_date_place_stay
+ Y
+
+
+ end_date_place_stay
+ end_date_place_stay
+ Y
+
+
+ type_place_stay
+ type_place_stay
+ Y
+
+
+ id_ern
+ id_ern
+ Y
+
+
+ N
+
+
+ 1104
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ with
+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
+WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date
+ AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
+GROUP BY
+ r.id
+)
+SELECT
+ r.system_pgs_status,
+ r.full_name,
+ r.last_name,
+ r.first_name,
+ r.middle_name,
+ r.gender,
+ --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils,
+ --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn,
+ r.birth_date,
+ EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
+ r.birth_place,
+ r.phone,
+ r.email,
+ r.id AS recruit_id, --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,
+ --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
+ r.system_create_date AS recruit_create_date,
+ r.system_update_date AS update_date,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ r.current_recruitment_id AS recruitment_id,
+ r.target_recruitment_id,
+ CASE
+ WHEN ddd.hidden IS false then ddd.hidden
+ ELSE true
+ END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
+ mrr.value AS reason_registration
+ 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, -- тип регистрации
+ -- address_actual -- Адрес фактического проживания ***1
+ -- source_info_actual -- Источник сведений о месте фактического проживания ***1
+ -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
+ -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
+ system_id_ern AS id_ern -- id единого регистра населения
+FROM public.recruits AS r
+JOIN public.recruits_info AS ri ON ri.recruit_id = r.id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date
+ AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
+LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn,
+ recruit_id,
+ hidden
+ FROM public.decision_deferment_dto
+ ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 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
+--WHERE r.system_update_date >= '${UP_D}'
+join adresses adr ON r.recruit_id=adr.recruit_id
+
+-- ***1 - страница личные сведения есть поле, нет данных
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen/job_citizen.hwf b/map_v1/info_recruits/citizen_tables/citizen/job_citizen.hwf
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/job_citizen.hwf
rename to map_v1/info_recruits/citizen_tables/citizen/job_citizen.hwf
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl
diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl
similarity index 100%
rename from mappings/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl
rename to map_v1/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl
new file mode 100644
index 0000000..894af88
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_citizen_appealing_violations_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_appealing_violations_fz53'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl
new file mode 100644
index 0000000..35eb784
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_citizen_appealing_violations_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_appealing_violations_fz53_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_citizen_appealing_violations_fz53_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_appealing_violations_fz53_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl
new file mode 100644
index 0000000..17b638f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_appealing_violations_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
new file mode 100644
index 0000000..7cca14e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_appealing_violations_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
new file mode 100644
index 0000000..20d3515
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
new file mode 100644
index 0000000..4c86e09
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
new file mode 100644
index 0000000..eff6309
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
new file mode 100644
index 0000000..dde1f6c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
new file mode 100644
index 0000000..b8ea516
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
new file mode 100644
index 0000000..d615e08
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
new file mode 100644
index 0000000..25d529e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
new file mode 100644
index 0000000..64c33fa
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
new file mode 100644
index 0000000..57bec30
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
new file mode 100644
index 0000000..5a31b60
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
new file mode 100644
index 0000000..2bb7cb2
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
new file mode 100644
index 0000000..02f1d71
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
new file mode 100644
index 0000000..bad8452
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
new file mode 100644
index 0000000..c52e330
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
new file mode 100644
index 0000000..e5b0f66
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
new file mode 100644
index 0000000..ed8c6b6
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
new file mode 100644
index 0000000..b368dc1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
new file mode 100644
index 0000000..5f711e1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..6e63a1c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_appealing_violations_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..6ace1f9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_snils_inn' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl
new file mode 100644
index 0000000..fc0f6b5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_appealing_violations_fz53_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_appealing_violations_fz53') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_appealing_violations_fz53'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_appealing_violations_fz53'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl
new file mode 100644
index 0000000..c4c46a7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_citizen_appealing_violations_fz53_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
new file mode 100644
index 0000000..5483bad
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_appealing_violations_fz53_flow1',
+ 'citizen_appealing_violations_fz53_flow2',
+ 'citizen_appealing_violations_fz53_flow3',
+ 'citizen_appealing_violations_fz53_flow4',
+ 'citizen_appealing_violations_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_appealing_violations_fz53_flow1',
+ 'citizen_appealing_violations_fz53_flow2',
+ 'citizen_appealing_violations_fz53_flow3',
+ 'citizen_appealing_violations_fz53_flow4',
+ 'citizen_appealing_violations_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_appealing_violations_fz53' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
new file mode 100644
index 0000000..6c9fc6a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_snils_inn_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf
new file mode 100644
index 0000000..7151cc4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf
@@ -0,0 +1,2478 @@
+
+
+ job_citizen_appealing_violations_fz53
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 272
+ 400
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2832
+ 400
+
+
+
+ citizen_appealing_violations_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 80
+
+
+
+ citizen_appealing_violations_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 240
+
+
+
+ citizen_appealing_violations_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 400
+
+
+
+ citizen_appealing_violations_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 560
+
+
+
+ citizen_appealing_violations_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2816
+ 208
+
+
+
+ Success new citizen_appealing_violations_fz53
+
+ SUCCESS
+
+ N
+ 4720
+ 432
+
+
+
+ branching_citizen_appealing_violations_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple citizen_appealing_violations_fz53 WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1696
+ 1680
+
+
+
+ Simple citizen_appealing_violations_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2048
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2864
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2768
+ 1040
+
+
+
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1792
+
+
+
+ check_if_job_citizen_appealing_violations_fz53_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 528
+ 400
+
+
+
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 992
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2848
+ 560
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 80
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 160
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 240
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 320
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 400
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 480
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 560
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 640
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 720
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 800
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4320
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2848
+ 1424
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2864
+ 2304
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1792
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1872
+
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2832
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2816
+ 1952
+
+
+
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1952
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1952
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2032
+
+
+
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2112
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2112
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2192
+
+
+
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2272
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2272
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2352
+
+
+
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2432
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2432
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2512
+
+
+
+ branching_citizen_appealing_violations_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1824
+ 2112
+
+
+
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2256
+ 2112
+
+
+
+ delta_citizen_appealing_violations_fz53 success
+
+ SUCCESS
+
+ N
+ 2368
+ 1904
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4384
+ 2112
+
+
+
+ Success delta_citizen_appealing_violations_fz53
+
+ SUCCESS
+
+ N
+ 4784
+ 2112
+
+
+
+ citizen_appealing_violations_fz53_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 960
+
+
+
+ citizen_appealing_violations_fz53_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1120
+
+
+
+ citizen_appealing_violations_fz53_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1280
+
+
+
+ citizen_appealing_violations_fz53_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1440
+
+
+
+ citizen_appealing_violations_fz53_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1600
+
+
+
+ Success citizen_appealing_violations_fz53 after error
+
+ SUCCESS
+
+ N
+ 4720
+ 1312
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 960
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1040
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1120
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1200
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1280
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1360
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1440
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1520
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1600
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1680
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4320
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_appealing_violations_fz53.hpl
+ Simple citizen_appealing_violations_fz53 WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_appealing_violations_fz53.hpl
+ Simple citizen_appealing_violations_fz53 WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_citizen_appealing_violations_fz53_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_citizen_appealing_violations_fz53_exists.hpl
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Success new citizen_appealing_violations_fz53
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl (2)
+ branching_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+ checkpoint_job_citizen_appealing_violations_fz53.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple citizen_appealing_violations_fz53 WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple citizen_appealing_violations_fz53 WHERE SUCCESS
+ branching_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+ delta_citizen_appealing_violations_fz53 success
+ Y
+ N
+ N
+
+
+ branching_citizen_appealing_violations_fz53_delta.hpl
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Success delta_citizen_appealing_violations_fz53
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Success citizen_appealing_violations_fz53 after error
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
new file mode 100644
index 0000000..d1ca18f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
@@ -0,0 +1,161 @@
+
+
+
+ citizen_appealing_violations_fz53_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 448
+ 288
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ =
+ create_date
+ create_date
+
+
+ ervu_dashboard
+
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 928
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 512
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
new file mode 100644
index 0000000..8ce8203
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
@@ -0,0 +1,158 @@
+
+
+
+ citizen_appealing_violations_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 992
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 576
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
new file mode 100644
index 0000000..1446dc1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
@@ -0,0 +1,158 @@
+
+
+
+ citizen_appealing_violations_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 896
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 480
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
new file mode 100644
index 0000000..5614a92
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
@@ -0,0 +1,158 @@
+
+
+
+ citizen_appealing_violations_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1104
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 688
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl
new file mode 100644
index 0000000..d065de7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 976
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 560
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl
new file mode 100644
index 0000000..1c9afd1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1056
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 640
+ 336
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl
new file mode 100644
index 0000000..648df28
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1120
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 704
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl
new file mode 100644
index 0000000..7eef578
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1056
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 640
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl
new file mode 100644
index 0000000..950b9b0
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1008
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 592
+ 320
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..4b469b9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('citizen_appealing_violations_fz53_flow1', 'citizen_appealing_violations_fz53_flow2', 'citizen_appealing_violations_fz53_flow3', 'citizen_appealing_violations_fz53_flow4', 'citizen_appealing_violations_fz53_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl
new file mode 100644
index 0000000..e077078
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_citizen_criminal_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_criminal_liability_fz53'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl
new file mode 100644
index 0000000..4402413
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_citizen_criminal_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_criminal_liability_fz53_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_citizen_criminal_liability_fz53_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_criminal_liability_fz53_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..4095df7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_criminal_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..3ef1f41
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_criminal_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..e729ca5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..896e5f7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..63d1db3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..cdaf266
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..0d74917
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..1c4519b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..bf0f099
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..c7e8c88
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..748f1fd
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..3985742
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..d3a3687
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..c729385
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..0baf42b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..0cfddb3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..edaee70
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..c3ad66d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..db5a6de
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..e773802
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..e422b79
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_criminal_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..9aea55f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_citizen_criminal_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl
new file mode 100644
index 0000000..c8d9198
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_criminal_liability_fz53_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_criminal_liability_fz53') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_criminal_liability_fz53'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_criminal_liability_fz53'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl
new file mode 100644
index 0000000..6dec012
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_citizen_criminal_liability_fz53_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
new file mode 100644
index 0000000..dd178f2
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_criminal_liability_fz53_flow1',
+ 'citizen_criminal_liability_fz53_flow2',
+ 'citizen_criminal_liability_fz53_flow3',
+ 'citizen_criminal_liability_fz53_flow4',
+ 'citizen_criminal_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_criminal_liability_fz53_flow1',
+ 'citizen_criminal_liability_fz53_flow2',
+ 'citizen_criminal_liability_fz53_flow3',
+ 'citizen_criminal_liability_fz53_flow4',
+ 'citizen_criminal_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_criminal_liability_fz53' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
new file mode 100644
index 0000000..658a967
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_citizen_criminal_liability_fz53_flow1',
+ 'delta_citizen_criminal_liability_fz53_flow2',
+ 'delta_citizen_criminal_liability_fz53_flow3',
+ 'delta_citizen_criminal_liability_fz53_flow4',
+ 'delta_citizen_criminal_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_citizen_criminal_liability_fz53_flow1',
+ 'delta_citizen_criminal_liability_fz53_flow2',
+ 'delta_citizen_criminal_liability_fz53_flow3',
+ 'delta_citizen_criminal_liability_fz53_flow4',
+ 'delta_citizen_criminal_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_criminal_liability_fz53_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf
new file mode 100644
index 0000000..05ee576
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf
@@ -0,0 +1,2482 @@
+
+
+ job_citizen_criminal_liability_fz53
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 96
+ 400
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ citizen_criminal_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 80
+
+
+
+ citizen_criminal_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 240
+
+
+
+ citizen_criminal_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 400
+
+
+
+ citizen_criminal_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 560
+
+
+
+ citizen_criminal_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new citizen_criminal_liability_fz53
+
+ SUCCESS
+
+ N
+ 3920
+ 432
+
+
+
+ branching_citizen_criminal_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple citizen_criminal_liability_fz53 WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1632
+ 1680
+
+
+
+ Simple citizen_criminal_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1984
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 1792
+
+
+
+ check_if_job_citizen_criminal_liability_fz53_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 448
+ 400
+
+
+
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 560
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 80
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 160
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 240
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 320
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 400
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 480
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 560
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 640
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 720
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 800
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3600
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2304
+ 1440
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2480
+ 2304
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1792
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1872
+
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2480
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2432
+ 1952
+
+
+
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 1952
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1952
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2032
+
+
+
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 2112
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2112
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2192
+
+
+
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 2272
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2272
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2352
+
+
+
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 2432
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2432
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2512
+
+
+
+ branching_citizen_criminal_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1632
+ 2112
+
+
+
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2032
+ 2112
+
+
+
+ delta_citizen_criminal_liability_fz53 success
+
+ SUCCESS
+
+ N
+ 2160
+ 1952
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3792
+ 2112
+
+
+
+ Success delta_citizen_criminal_liability_fz53
+
+ SUCCESS
+
+ N
+ 4208
+ 2112
+
+
+
+ citizen_criminal_liability_fz53_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 960
+
+
+
+ citizen_criminal_liability_fz53_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1120
+
+
+
+ citizen_criminal_liability_fz53_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1280
+
+
+
+ citizen_criminal_liability_fz53_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1440
+
+
+
+ citizen_criminal_liability_fz53_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1600
+
+
+
+ Success citizen_criminal_liability_fz53 after error
+
+ SUCCESS
+
+ N
+ 3968
+ 1312
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 960
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1040
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1120
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1200
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1280
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1360
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1440
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1520
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1600
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1680
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3600
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_criminal_liability_fz53.hpl
+ Simple citizen_criminal_liability_fz53 WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_criminal_liability_fz53.hpl
+ Simple citizen_criminal_liability_fz53 WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_citizen_criminal_liability_fz53_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_citizen_criminal_liability_fz53_exists.hpl
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Success new citizen_criminal_liability_fz53
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl (2)
+ branching_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+ checkpoint_job_citizen_criminal_liability_fz53.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple citizen_criminal_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple citizen_criminal_liability_fz53 WHERE SUCCESS
+ branching_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+ delta_citizen_criminal_liability_fz53 success
+ Y
+ N
+ N
+
+
+ branching_citizen_criminal_liability_fz53_delta.hpl
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Success delta_citizen_criminal_liability_fz53
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Success citizen_criminal_liability_fz53 after error
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..7593fb2
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
@@ -0,0 +1,183 @@
+
+
+
+ citizen_criminal_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ =
+ created_at
+ created_at
+
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 448
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..29c6100
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 880
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 448
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..17ccb53
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1120
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 688
+ 384
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..67ebd63
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1104
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 672
+ 416
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..811495c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 944
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 512
+ 384
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..bd7d195
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 928
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 496
+ 336
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..eb09efe
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1040
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 608
+ 384
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..1fa9fe1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1056
+ 224
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 624
+ 224
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..f15f7f6
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 960
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 528
+ 416
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..99a4d0a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1184
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 752
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..b7e3e03
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('citizen_criminal_liability_fz53_flow1', 'citizen_criminal_liability_fz53_flow2', 'citizen_criminal_liability_fz53_flow3', 'citizen_criminal_liability_fz53_flow4', 'citizen_criminal_liability_fz53_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl
new file mode 100644
index 0000000..06f8364
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_citizen_guardianship
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1040
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_guardianship'
+ N
+
+
+ 800
+ 416
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1264
+ 416
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl
new file mode 100644
index 0000000..e6a5f14
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_guardianship_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_guardianship_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl
new file mode 100644
index 0000000..571a7cf
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_guardianship_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_guardianship_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl
new file mode 100644
index 0000000..7b836c5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_guardianship_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl
new file mode 100644
index 0000000..5ce643b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_guardianship_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl
new file mode 100644
index 0000000..4046d93
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_guardianship_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl
new file mode 100644
index 0000000..ba9817b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_guardianship_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl
new file mode 100644
index 0000000..09bc827
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_guardianship_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl
new file mode 100644
index 0000000..4d21654
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_guardianship_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl
new file mode 100644
index 0000000..88fd368
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_guardianship_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl
new file mode 100644
index 0000000..0807eed
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_guardianship_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_guardianship_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl
new file mode 100644
index 0000000..62e0d8a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl
@@ -0,0 +1,110 @@
+
+
+
+ change_status_delta_citizen_guardianship_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_guardianship' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+union all
+
+ SELECT
+ 'job_citizen_guardianship' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl
new file mode 100644
index 0000000..5628f74
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl
@@ -0,0 +1,110 @@
+
+
+
+ change_status_delta_citizen_guardianship_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_guardianship' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+union all
+
+ SELECT
+ 'job_citizen_guardianship' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..68d82dc
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_guardianship' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_guardianship_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_guardianship_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_guardianship_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_guardianship_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_guardianship_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..8be76b7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_child' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl
new file mode 100644
index 0000000..64a9b1d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_guardianship_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_guardianship') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_guardianship'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_guardianship'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_citizen_guardianship_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_citizen_guardianship_error.hpl
new file mode 100644
index 0000000..a1db818
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_citizen_guardianship_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_citizen_guardianship_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl
new file mode 100644
index 0000000..0413a04
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_guardianship
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 336
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1312
+ 272
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_guardianship_flow1',
+ 'citizen_guardianship_flow2',
+ 'citizen_guardianship_flow3',
+ 'citizen_guardianship_flow4',
+ 'citizen_guardianship_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_guardianship_flow1',
+ 'citizen_guardianship_flow2',
+ 'citizen_guardianship_flow3',
+ 'citizen_guardianship_flow4',
+ 'citizen_guardianship_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_guardianship' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 944
+ 272
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/job_create_files_citizen_guardianship.hwf b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/job_create_files_citizen_guardianship.hwf
new file mode 100644
index 0000000..1a90995
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/job_create_files_citizen_guardianship.hwf
@@ -0,0 +1,235 @@
+
+
+ job_create_files_citizen_guardianship
+ Y
+
+
+
+ -
+ 2025/05/26 16:48:00.210
+ -
+ 2025/05/26 16:48:00.210
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 576
+ 496
+
+
+
+ state_child_flow2_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow2"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+ N
+ 848
+ 416
+
+
+
+ state_child_flow1_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow1"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+ N
+ 848
+ 336
+
+
+
+ state_child_flow3_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow3"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+ N
+ 848
+ 496
+
+
+
+ state_child_flow4_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow4"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+ N
+ 848
+ 576
+
+
+
+ state_child_flow5_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow5"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+ N
+ 848
+ 656
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1120
+ 496
+
+
+
+ Delete file state_job_child
+
+ DELETE_FILE
+
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json
+ N
+ 848
+ 256
+
+
+
+
+
+ Start
+ state_child_flow3_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow2_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow1_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow4_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow5_new
+ Y
+ Y
+ Y
+
+
+ state_child_flow5_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow4_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow3_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow2_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow1_new
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ Delete file state_job_child
+ Y
+ Y
+ Y
+
+
+ Delete file state_job_child
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl
new file mode 100644
index 0000000..d8ed97e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl
@@ -0,0 +1,122 @@
+
+
+
+ delta_citizen_guardianship
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_guardianship
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ snils
+ snils
+ Y
+
+
+ N
+
+
+ 1072
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with person as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
+select
+ r.recruit_id AS recruit_id,
+ concat_ws(' ', ch->'fioOpek'->>'familiya',
+ ch->'fioOpek'->>'imya',
+ ch->'fioOpek'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
+ ch->>'snils' snils
+from ervu_dashboard.citizen r
+join person on r.recruit_id = person.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf b/map_v1/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf
new file mode 100644
index 0000000..3e49ea5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf
@@ -0,0 +1,1811 @@
+
+
+ job_citizen_guardianship
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 416
+ 400
+
+
+
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_guardianship.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 400
+
+
+
+ citizen_guardianship_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 80
+
+
+
+ citizen_guardianship_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 240
+
+
+
+ citizen_guardianship_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 400
+
+
+
+ citizen_guardianship_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 560
+
+
+
+ citizen_guardianship_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2368
+ 208
+
+
+
+ checkpoint_job_citizen_guardianship.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3424
+ 416
+
+
+
+ Success new citizen
+
+ SUCCESS
+
+ N
+ 3872
+ 416
+
+
+
+ branching_citizen_guardianship.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple child WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1888
+ 1792
+
+
+
+ Simple child WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_citizen_guardianship.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 1792
+
+
+
+ Success delta_citizen
+
+ SUCCESS
+
+ N
+ 3328
+ 1792
+
+
+
+ error delta_citizen
+
+ SUCCESS
+
+ N
+ 3328
+ 1872
+
+
+
+ check_if_job_citizen_guardianship_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 656
+ 400
+
+
+
+ Simple job_citizen_guardianship_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1008
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1424
+ 400
+
+
+
+ change_status_citizen_guardianship_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 80
+
+
+
+ change_status_citizen_guardianship_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 160
+
+
+
+ change_status_citizen_guardianship_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 240
+
+
+
+ change_status_citizen_guardianship_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 320
+
+
+
+ change_status_citizen_guardianship_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 400
+
+
+
+ change_status_citizen_guardianship_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 480
+
+
+
+ change_status_citizen_guardianship_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 560
+
+
+
+ change_status_citizen_guardianship_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 640
+
+
+
+ change_status_citizen_guardianship_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 720
+
+
+
+ change_status_citizen_guardianship_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 800
+
+
+
+ checkpoint_job_citizen_guardianship.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1296
+ 1280
+
+
+
+ citizen_guardianship_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 960
+
+
+
+ citizen_guardianship_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 1120
+
+
+
+ citizen_guardianship_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 1280
+
+
+
+ citizen_guardianship_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 1440
+
+
+
+ citizen_guardianship_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2704
+ 1600
+
+
+
+ checkpoint_job_citizen_guardianship.hpl 3
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3424
+ 1296
+
+
+
+ Success new citizen 2
+
+ SUCCESS
+
+ N
+ 3728
+ 1296
+
+
+
+ change_status_citizen_guardianship_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 960
+
+
+
+ change_status_citizen_guardianship_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1040
+
+
+
+ change_status_citizen_guardianship_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1120
+
+
+
+ change_status_citizen_guardianship_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1200
+
+
+
+ change_status_citizen_guardianship_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1280
+
+
+
+ change_status_citizen_guardianship_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1360
+
+
+
+ change_status_citizen_guardianship_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1440
+
+
+
+ change_status_citizen_guardianship_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1520
+
+
+
+ change_status_citizen_guardianship_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1600
+
+
+
+ change_status_citizen_guardianship_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1680
+
+
+
+ change_status_to_processing.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2096
+ 1280
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2160
+ 1792
+
+
+
+ change_status_delta_citizen_guardianship_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1792
+
+
+
+ change_status_delta_citizen_guardianship_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3024
+ 1872
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+ citizen_guardianship_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+ citizen_guardianship_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+ citizen_guardianship_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+ citizen_guardianship_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+ citizen_guardianship_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_guardianship.hpl
+ Simple child WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ check_if_job_citizen_guardianship_exists.hpl
+ Simple job_citizen_guardianship_exists check NEW
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_guardianship_exists check NEW
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl
+ recruitment_rows_five_flow_citizen_guardianship.hpl
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow1.hpl
+ change_status_citizen_guardianship_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow1.hpl
+ change_status_citizen_guardianship_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow2.hpl
+ change_status_citizen_guardianship_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow2.hpl
+ change_status_citizen_guardianship_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow3.hpl
+ change_status_citizen_guardianship_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow3.hpl
+ change_status_citizen_guardianship_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow4.hpl
+ change_status_citizen_guardianship_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow4.hpl
+ change_status_citizen_guardianship_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow5.hpl
+ change_status_citizen_guardianship_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow5.hpl
+ change_status_citizen_guardianship_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_guardianship_flow1_success.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow1_error.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow2_success.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow2_error.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow3_success.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow3_error.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow4_success.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow4_error.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow5_success.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow5_error.hpl
+ checkpoint_job_citizen_guardianship.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_guardianship.hpl
+ Success new citizen
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_guardianship_exists check NEW
+ checkpoint_job_citizen_guardianship.hpl 2
+ Y
+ N
+ N
+
+
+ checkpoint_job_citizen_guardianship.hpl 2
+ branching_citizen_guardianship.hpl
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow1.hpl 2
+ change_status_citizen_guardianship_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow1.hpl 2
+ change_status_citizen_guardianship_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow2.hpl 2
+ change_status_citizen_guardianship_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow2.hpl 2
+ change_status_citizen_guardianship_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow3.hpl 2
+ change_status_citizen_guardianship_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow3.hpl 2
+ change_status_citizen_guardianship_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow4.hpl 2
+ change_status_citizen_guardianship_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow4.hpl 2
+ change_status_citizen_guardianship_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_guardianship_flow5.hpl 2
+ change_status_citizen_guardianship_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_guardianship_flow5.hpl 2
+ change_status_citizen_guardianship_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ checkpoint_job_citizen_guardianship.hpl 3
+ Success new citizen 2
+ Y
+ Y
+ N
+
+
+ change_status_citizen_guardianship_flow1_success.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow1_error.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow2_success.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow2_error.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow3_success.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow3_error.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow4_success.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow4_error.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow5_success.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ change_status_citizen_guardianship_flow5_error.hpl 2
+ checkpoint_job_citizen_guardianship.hpl 3
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_guardianship_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_guardianship_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_guardianship_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_guardianship_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_guardianship_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl 2
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple child WHERE ERROR
+ change_status_to_processing.hpl 2
+ Y
+ Y
+ N
+
+
+ branching_citizen_guardianship.hpl
+ Simple child WHERE ERROR
+ Y
+ N
+ Y
+
+
+ Simple child WHERE SUCCESS
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_guardianship.hpl
+ change_status_delta_citizen_guardianship_success.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_guardianship_success.hpl
+ Success delta_citizen
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_guardianship_error.hpl
+ error delta_citizen
+ Y
+ Y
+ N
+
+
+ change_status_to_processing_delta.hpl
+ delta_citizen_guardianship.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_guardianship.hpl
+ change_status_delta_citizen_guardianship_error.hpl
+ Y
+ N
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl
new file mode 100644
index 0000000..5db084f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl
@@ -0,0 +1,228 @@
+
+
+
+ citizen_guardianship_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 560
+ 208
+ сведения о лице опекаемом или находящемся на попечении
+ 349
+
+
+
+
+ Table input
+ Select values 4 2
+ N
+
+
+ Select values 4 2
+ Get variables
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ recruitment_id
+ -1
+ none
+ String
+ ID_F1
+
+
+
+
+ 976
+ 400
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_guardianship
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ snils
+ snils
+ Y
+
+
+ N
+
+
+ 960
+ 288
+
+
+
+ Select values 4 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ ID_F1
+ ID_F1
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 720
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with person as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
+select
+ r.recruit_id AS recruit_id,
+ concat_ws(' ', ch->'fioOpek'->>'familiya',
+ ch->'fioOpek'->>'imya',
+ ch->'fioOpek'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
+ ch->>'snils' snils
+from ervu_dashboard.citizen r
+join person on r.recruit_id = person.recruit_id
+ Y
+
+
+ 448
+ 288
+
+
+
+
+ Select values 4 2
+ Get variables
+ Y
+
+
+
+
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl
new file mode 100644
index 0000000..ecb257f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl
@@ -0,0 +1,141 @@
+
+
+
+ citizen_guardianship_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 656
+ 208
+ сведения о лице опекаемом или находящемся на попечении
+ 349
+
+
+
+
+ Table input
+ Insert / update 2
+ Y
+
+
+
+ Insert / update 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_guardianship
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ snils
+ snils
+ Y
+
+
+ N
+
+
+ 1056
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with person as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
+select
+ r.recruit_id AS recruit_id,
+ concat_ws(' ', ch->'fioOpek'->>'familiya',
+ ch->'fioOpek'->>'imya',
+ ch->'fioOpek'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
+ ch->>'snils' snils
+from ervu_dashboard.citizen r
+join person on r.recruit_id = person.recruit_id
+ Y
+
+
+ 560
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl
new file mode 100644
index 0000000..7e5f328
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl
@@ -0,0 +1,141 @@
+
+
+
+ citizen_guardianship_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 800
+ 256
+ сведения о лице опекаемом или находящемся на попечении
+ 349
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_guardianship
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ snils
+ snils
+ Y
+
+
+ N
+
+
+ 1216
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with person as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
+select
+ r.recruit_id AS recruit_id,
+ concat_ws(' ', ch->'fioOpek'->>'familiya',
+ ch->'fioOpek'->>'imya',
+ ch->'fioOpek'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
+ ch->>'snils' snils
+from ervu_dashboard.citizen r
+join person on r.recruit_id = person.recruit_id
+ Y
+
+
+ 672
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl
new file mode 100644
index 0000000..9c52b48
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl
@@ -0,0 +1,141 @@
+
+
+
+ citizen_guardianship_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 640
+ 240
+ сведения о лице опекаемом или находящемся на попечении
+ 349
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_guardianship
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ snils
+ snils
+ Y
+
+
+ N
+
+
+ 1088
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with person as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
+select
+ r.recruit_id AS recruit_id,
+ concat_ws(' ', ch->'fioOpek'->>'familiya',
+ ch->'fioOpek'->>'imya',
+ ch->'fioOpek'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
+ ch->>'snils' snils
+from ervu_dashboard.citizen r
+join person on r.recruit_id = person.recruit_id
+ Y
+
+
+ 528
+ 320
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl
new file mode 100644
index 0000000..a26e744
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl
@@ -0,0 +1,141 @@
+
+
+
+ citizen_guardianship_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 704
+ 256
+ сведения о лице опекаемом или находящемся на попечении
+ 349
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_guardianship
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ snils
+ snils
+ Y
+
+
+ N
+
+
+ 1024
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with person as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
+select
+ r.recruit_id AS recruit_id,
+ concat_ws(' ', ch->'fioOpek'->>'familiya',
+ ch->'fioOpek'->>'imya',
+ ch->'fioOpek'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
+ ch->>'snils' snils
+from ervu_dashboard.citizen r
+join person on r.recruit_id = person.recruit_id
+ Y
+
+
+ 560
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..e5f247b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,261 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+remains as (
+ select
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at
+ ELSE null
+ END as cr_flow1,
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id
+ ELSE null
+ END as idm_flow1,
+
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at
+ ELSE null
+ END as cr_flow2,
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id
+ ELSE null
+ END as idm_flow2,
+
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at
+ ELSE null
+ END as cr_flow3,
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id
+ ELSE null
+ END as idm_flow3,
+
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at
+ ELSE null
+ END as cr_flow4,
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id
+ ELSE null
+ END as idm_flow4,
+
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at
+ ELSE null
+ END as cr_flow5,
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id
+ ELSE null
+ END as idm_flow5
+ from splitted
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl
new file mode 100644
index 0000000..8ad6911
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_citizen_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_liability_fz53'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl
new file mode 100644
index 0000000..45f831f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_citizen_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_liability_fz53_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_citizen_liability_fz53_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_liability_fz53_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..51525dd
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..516b012
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..5765a9e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..f68afc4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..4436574
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..8988f0c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..3f3c5b7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..8e16f42
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..8b54d7e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..ba11212
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..84f72b4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..81381cb
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..543c8ef
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..24c35d7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..4fd1742
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..463529d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..2c43fdf
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..4e3ac61
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..87c2807
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..befcfd5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..688659d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..46b50cc
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_citizen_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl
new file mode 100644
index 0000000..e27b362
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_liability_fz53_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_liability_fz53') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_liability_fz53'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_liability_fz53'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl
new file mode 100644
index 0000000..0d9cb80
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_snils_inn_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
new file mode 100644
index 0000000..a261d64
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_liability_fz53_flow1',
+ 'citizen_liability_fz53_flow2',
+ 'citizen_liability_fz53_flow3',
+ 'citizen_liability_fz53_flow4',
+ 'citizen_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_liability_fz53_flow1',
+ 'citizen_liability_fz53_flow2',
+ 'citizen_liability_fz53_flow3',
+ 'citizen_liability_fz53_flow4',
+ 'citizen_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_liability_fz53' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl
new file mode 100644
index 0000000..e5f3aa0
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_citizen_liability_fz53_flow1',
+ 'delta_citizen_liability_fz53_flow2',
+ 'delta_citizen_liability_fz53_flow3',
+ 'delta_citizen_liability_fz53_flow4',
+ 'delta_citizen_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_citizen_liability_fz53_flow1',
+ 'delta_citizen_liability_fz53_flow2',
+ 'delta_citizen_liability_fz53_flow3',
+ 'delta_citizen_liability_fz53_flow4',
+ 'delta_citizen_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_liability_fz53_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf
new file mode 100644
index 0000000..b6fe762
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf
@@ -0,0 +1,2480 @@
+
+
+ job_citizen_liability_fz53
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_citizen_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ citizen_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ citizen_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ citizen_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ citizen_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ citizen_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new citizen_liability_fz53
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_citizen_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1536
+ 1280
+
+
+
+ Simple citizen_liability_fz53 WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1584
+ 1680
+
+
+
+ Simple citizen_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2320
+ 1040
+
+
+
+ delta_citizen_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1792
+
+
+
+ check_if_job_citizen_liability_fz53_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 576
+ 400
+
+
+
+ Simple job_citizen_liability_fz53_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 560
+
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_citizen_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2288
+ 1424
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2384
+ 2304
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1792
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1872
+
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2320
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2336
+ 1952
+
+
+
+ delta_citizen_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1952
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1952
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2032
+
+
+
+ delta_citizen_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2112
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2112
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2192
+
+
+
+ delta_citizen_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2272
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2272
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2352
+
+
+
+ delta_citizen_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2432
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2432
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2512
+
+
+
+ branching_citizen_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1616
+ 2112
+
+
+
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1936
+ 2112
+
+
+
+ delta_citizen_liability_fz53 success
+
+ SUCCESS
+
+ N
+ 2160
+ 1952
+
+
+
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3440
+ 2112
+
+
+
+ Success delta_citizen_liability_fz53
+
+ SUCCESS
+
+ N
+ 3728
+ 2112
+
+
+
+ citizen_liability_fz53_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ citizen_liability_fz53_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ citizen_liability_fz53_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ citizen_liability_fz53_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ citizen_liability_fz53_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ Success citizen_liability_fz53 after error
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_citizen_liability_fz53.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_liability_fz53.hpl
+ Simple citizen_liability_fz53 WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_liability_fz53.hpl
+ Simple citizen_liability_fz53 WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_citizen_liability_fz53_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_citizen_liability_fz53_exists.hpl
+ Simple job_citizen_liability_fz53_exists check NEW
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl
+ change_status_citizen_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl
+ change_status_citizen_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow2.hpl
+ change_status_citizen_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow2.hpl
+ change_status_citizen_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow3.hpl
+ change_status_citizen_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow3.hpl
+ change_status_citizen_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow4.hpl
+ change_status_citizen_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow4.hpl
+ change_status_citizen_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow5.hpl
+ change_status_citizen_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow5.hpl
+ change_status_citizen_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_liability_fz53.hpl
+ Success new citizen_liability_fz53
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_liability_fz53.hpl (2)
+ branching_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_citizen_liability_fz53_exists check NEW
+ checkpoint_job_citizen_liability_fz53.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow1.hpl
+ change_status_delta_citizen_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow1.hpl
+ change_status_delta_citizen_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_liability_fz53_exists check NEW
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple citizen_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow2.hpl
+ change_status_delta_citizen_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow2.hpl
+ change_status_delta_citizen_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow3.hpl
+ change_status_delta_citizen_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow3.hpl
+ change_status_delta_citizen_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow4.hpl
+ change_status_delta_citizen_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow4.hpl
+ change_status_delta_citizen_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow5.hpl
+ change_status_delta_citizen_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow5.hpl
+ change_status_delta_citizen_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple citizen_liability_fz53 WHERE SUCCESS
+ branching_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+ delta_citizen_liability_fz53 success
+ Y
+ N
+ N
+
+
+ branching_citizen_liability_fz53_delta.hpl
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Success delta_citizen_liability_fz53
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl 2
+ change_status_citizen_liability_fz53_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl 2
+ change_status_citizen_liability_fz53_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow2.hpl 2
+ change_status_citizen_liability_fz53_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow2.hpl 2
+ change_status_citizen_liability_fz53_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow3.hpl 2
+ change_status_citizen_liability_fz53_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow3.hpl 2
+ change_status_citizen_liability_fz53_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow4.hpl 2
+ change_status_citizen_liability_fz53_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow4.hpl 2
+ change_status_citizen_liability_fz53_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow5.hpl 2
+ change_status_citizen_liability_fz53_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow5.hpl 2
+ change_status_citizen_liability_fz53_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Success citizen_liability_fz53 after error
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..61d564c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
@@ -0,0 +1,205 @@
+
+
+
+ citizen_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ =
+ created_at
+ created_at
+
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 448
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..1950156
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 960
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 528
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..cb454d6
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1056
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..49a4f14
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1008
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 576
+ 384
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..88a3711
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1072
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 640
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..d336de5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1168
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 736
+ 336
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..15704f1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1056
+ 240
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 624
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..e1fe0b5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1152
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 720
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..19d16e5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1104
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 672
+ 336
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..f18a7f4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1184
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 752
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..92f9426
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('citizen_liability_fz53_flow1', 'citizen_liability_fz53_flow2', 'citizen_liability_fz53_flow3', 'citizen_liability_fz53_flow4', 'citizen_liability_fz53_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl
new file mode 100644
index 0000000..a4251dd
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_citizen_spouse
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_spouse'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl
new file mode 100644
index 0000000..dc19556
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_spouse_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_spouse_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl
new file mode 100644
index 0000000..645816b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_spouse_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_spouse_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl
new file mode 100644
index 0000000..8380623
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_spouse_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl
new file mode 100644
index 0000000..baa3bbb
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_spouse_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl
new file mode 100644
index 0000000..495f0f1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_spouse_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl
new file mode 100644
index 0000000..e399fd1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_spouse_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl
new file mode 100644
index 0000000..5deb8d0
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_spouse_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl
new file mode 100644
index 0000000..f8024a0
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_spouse_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl
new file mode 100644
index 0000000..32fcfb9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_spouse_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl
new file mode 100644
index 0000000..1bf12a5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_spouse_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_spouse_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl
new file mode 100644
index 0000000..dcc34fb
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl
@@ -0,0 +1,110 @@
+
+
+
+ change_status_delta_citizen_spouse_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_spouse' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+union all
+
+ SELECT
+ 'job_citizen_spouse' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl
new file mode 100644
index 0000000..d704ea8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl
@@ -0,0 +1,110 @@
+
+
+
+ change_status_delta_citizen_spouse_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_spouse' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+union all
+
+ SELECT
+ 'job_citizen_spouse' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..3ad2861
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_spouse' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_spouse_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_spouse_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_spouse_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_spouse_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_spouse_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..3619918
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_citizen_spouse' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl
new file mode 100644
index 0000000..d1c2864
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_spouse_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_spouse') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_spouse'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_spouse'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_citizen_spouse_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_citizen_spouse_error.hpl
new file mode 100644
index 0000000..11ad83c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_citizen_spouse_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_citizen_spouse_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl
new file mode 100644
index 0000000..ed32b9f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_spouse
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_spouse_flow1',
+ 'citizen_spouse_flow2',
+ 'citizen_spouse_flow3',
+ 'citizen_spouse_flow4',
+ 'citizen_spouse_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_spouse_flow1',
+ 'citizen_spouse_flow2',
+ 'citizen_spouse_flow3',
+ 'citizen_spouse_flow4',
+ 'citizen_spouse_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_spouse' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/xxjob_create_files_child.hwf
new file mode 100644
index 0000000..b31ca9f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/xxjob_create_files_child.hwf
@@ -0,0 +1,235 @@
+
+
+ job_create_files_child
+ Y
+
+
+
+ -
+ 2025/05/26 16:48:00.210
+ -
+ 2025/05/26 16:48:00.210
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 576
+ 496
+
+
+
+ state_child_flow2_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow2"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+ N
+ 848
+ 416
+
+
+
+ state_child_flow1_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow1"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+ N
+ 848
+ 336
+
+
+
+ state_child_flow3_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow3"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+ N
+ 848
+ 496
+
+
+
+ state_child_flow4_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow4"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+ N
+ 848
+ 576
+
+
+
+ state_child_flow5_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow5"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+ N
+ 848
+ 656
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1120
+ 496
+
+
+
+ Delete file state_job_child
+
+ DELETE_FILE
+
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json
+ N
+ 848
+ 256
+
+
+
+
+
+ Start
+ state_child_flow3_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow2_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow1_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow4_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow5_new
+ Y
+ Y
+ Y
+
+
+ state_child_flow5_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow4_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow3_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow2_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow1_new
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ Delete file state_job_child
+ Y
+ Y
+ Y
+
+
+ Delete file state_job_child
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl
new file mode 100644
index 0000000..ee470cb
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl
@@ -0,0 +1,181 @@
+
+
+
+ delta_citizen_spouse
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH suprug AS (
+ SELECT
+ supr.supri AS supr,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
+ CASE
+ WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
+ ELSE false
+ END AS information_excluded,
+ ri.recruit_id
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+ JOIN LATERAL (
+ SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
+ ) AS supr ON true
+)
+SELECT
+ r.recruit_id AS recruit_id,
+ supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
+ CONCAT_WS(' ',
+ supr->'svedFLBS'->'fio'->>'familiya',
+ supr->'svedFLBS'->'fio'->>'imya',
+ supr->'svedFLBS'->'fio'->>'otchestvo'
+ ) AS full_name,
+ MAKE_DATE(
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
+ ) AS birth_date,
+ (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
+ supr->'svedSmert'->>'nomerZapis' AS death_az_number,
+ marriage_az_number,
+ marriage_date::date,
+ divorce_az_number,
+ divorce_date::date,
+ information_excluded
+FROM ervu_dashboard.citizen r
+JOIN suprug ON r.recruit_id = suprug.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_spouse
+
+ recruit_id
+ recruit_id
+ N
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ marriage_az_number
+ marriage_az_number
+ Y
+
+
+ marriage_date
+ marriage_date
+ Y
+
+
+ divorce_az_number
+ divorce_az_number
+ Y
+
+
+ divorce_date
+ divorce_date
+ Y
+
+
+ information_excluded
+ information_excluded
+ Y
+
+
+ N
+
+
+ 1024
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf b/map_v1/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf
new file mode 100644
index 0000000..c3c8681
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf
@@ -0,0 +1,1841 @@
+
+
+ job_citizen_spouse
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_citizen_spouse.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_citizen_spouse.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_spouse.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ citizen_spouse_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ citizen_spouse_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ citizen_spouse_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ citizen_spouse_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ citizen_spouse_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new citizen
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_citizen_spouse.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple citizen_spouse WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1792
+
+
+
+ Simple citizen_spouse WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_citizen_spouse.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1792
+
+
+
+ Success delta_citizen
+
+ SUCCESS
+
+ N
+ 3280
+ 1792
+
+
+
+ error delta_citizen
+
+ SUCCESS
+
+ N
+ 3280
+ 1872
+
+
+
+ check_if_job_citizen_spouse_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 576
+ 400
+
+
+
+ Simple job_citizen_spouse_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1264
+ 400
+
+
+
+ change_status_citizen_spouse_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_citizen_spouse_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_citizen_spouse_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_citizen_spouse_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_citizen_spouse_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_citizen_spouse_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_citizen_spouse_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_citizen_spouse_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_citizen_spouse_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_citizen_spouse_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_citizen_spouse.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2112
+ 1280
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2144
+ 1792
+
+
+
+ change_status_delta_citizen_spouse_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1792
+
+
+
+ change_status_delta_citizen_spouse_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1872
+
+
+
+ citizen_spouse_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ citizen_spouse_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ citizen_spouse_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ citizen_spouse_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ citizen_spouse_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ Success new citizen 2
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_citizen_spouse_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_citizen_spouse_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_citizen_spouse_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_citizen_spouse_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_citizen_spouse_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_citizen_spouse_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_citizen_spouse_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_citizen_spouse_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_citizen_spouse_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_citizen_spouse_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_citizen_spouse.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_spouse.hpl
+ citizen_spouse_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_spouse.hpl
+ citizen_spouse_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_spouse.hpl
+ citizen_spouse_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_spouse.hpl
+ citizen_spouse_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_spouse.hpl
+ citizen_spouse_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_spouse.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_spouse.hpl
+ Simple citizen_spouse WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_spouse.hpl
+ Simple citizen_spouse WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_citizen_spouse_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_citizen_spouse_exists.hpl
+ Simple job_citizen_spouse_exists check NEW
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_spouse_exists check NEW
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl
+ recruitment_rows_five_flow_citizen_spouse.hpl
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow1.hpl
+ change_status_citizen_spouse_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow1.hpl
+ change_status_citizen_spouse_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow2.hpl
+ change_status_citizen_spouse_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow2.hpl
+ change_status_citizen_spouse_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow3.hpl
+ change_status_citizen_spouse_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow3.hpl
+ change_status_citizen_spouse_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow4.hpl
+ change_status_citizen_spouse_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow4.hpl
+ change_status_citizen_spouse_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow5.hpl
+ change_status_citizen_spouse_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow5.hpl
+ change_status_citizen_spouse_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_spouse_flow5_error.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow5_success.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow4_error.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow4_success.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow3_error.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow3_success.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow2_error.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow2_success.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow1_error.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow1_success.hpl
+ checkpoint_job_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_spouse.hpl
+ Success new citizen
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_spouse.hpl (2)
+ branching_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_citizen_spouse_exists check NEW
+ checkpoint_job_citizen_spouse.hpl (2)
+ Y
+ N
+ N
+
+
+ Simple citizen_spouse WHERE ERROR
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl (2)
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple citizen_spouse WHERE SUCCESS
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_spouse.hpl
+ change_status_delta_citizen_spouse_success.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_spouse_success.hpl
+ Success delta_citizen
+ Y
+ Y
+ N
+
+
+ delta_citizen_spouse.hpl
+ change_status_delta_citizen_spouse_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_delta_citizen_spouse_error.hpl
+ error delta_citizen
+ Y
+ Y
+ N
+
+
+ change_status_to_processing_delta.hpl
+ delta_citizen_spouse.hpl
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow1.hpl 2
+ change_status_citizen_spouse_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow1.hpl 2
+ change_status_citizen_spouse_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow2.hpl 2
+ change_status_citizen_spouse_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow2.hpl 2
+ change_status_citizen_spouse_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow3.hpl 2
+ change_status_citizen_spouse_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow3.hpl 2
+ change_status_citizen_spouse_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow4.hpl 2
+ change_status_citizen_spouse_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow4.hpl 2
+ change_status_citizen_spouse_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_spouse_flow5.hpl 2
+ change_status_citizen_spouse_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_spouse_flow5.hpl 2
+ change_status_citizen_spouse_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_citizen_spouse_flow1_success.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow1_error.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow2_success.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow2_error.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow3_success.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow3_error.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow4_success.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow4_error.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow5_success.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_spouse_flow5_error.hpl 2
+ checkpoint_job_citizen_spouse.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_spouse.hpl 2
+ Success new citizen 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_spouse_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_spouse_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_spouse_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_spouse_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_spouse_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl
new file mode 100644
index 0000000..39782d4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl
@@ -0,0 +1,268 @@
+
+
+
+ citizen_spouse_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Select values 4 2
+ N
+
+
+ Select values 4 2
+ Get variables
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ recruitment_id
+ -1
+ none
+ String
+ ID_F1
+
+
+
+
+ 976
+ 400
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
citizen_spouse
+
+ recruit_id
+ recruit_id
+ N
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ marriage_az_number
+ marriage_az_number
+ Y
+
+
+ marriage_date
+ marriage_date
+ Y
+
+
+ divorce_az_number
+ divorce_az_number
+ Y
+
+
+ divorce_date
+ divorce_date
+ Y
+
+
+ information_excluded
+ information_excluded
+ Y
+
+
+ N
+
+
+ 944
+ 288
+
+
+
+ Select values 4 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ ID_F1
+ ID_F1
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 720
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH suprug AS (
+ SELECT
+ supr.supri AS supr,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
+ CASE
+ WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
+ ELSE false
+ END AS information_excluded,
+ ri.recruit_id
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ JOIN LATERAL (
+ SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
+ ) AS supr ON true
+)
+SELECT
+ r.recruit_id AS recruit_id,
+ supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
+ CONCAT_WS(' ',
+ supr->'svedFLBS'->'fio'->>'familiya',
+ supr->'svedFLBS'->'fio'->>'imya',
+ supr->'svedFLBS'->'fio'->>'otchestvo'
+ ) AS full_name,
+ MAKE_DATE(
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
+ ) AS birth_date,
+ (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
+ supr->'svedSmert'->>'nomerZapis' AS death_az_number,
+ marriage_az_number,
+ marriage_date::date,
+ divorce_az_number,
+ divorce_date::date,
+ information_excluded
+FROM ervu_dashboard.citizen r
+JOIN suprug ON r.recruit_id = suprug.recruit_id
+ Y
+
+
+ 448
+ 288
+
+
+
+
+ Select values 4 2
+ Get variables
+ Y
+
+
+
+
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl
new file mode 100644
index 0000000..712f5ee
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_spouse_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_spouse
+
+ recruit_id
+ recruit_id
+ N
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ marriage_az_number
+ marriage_az_number
+ Y
+
+
+ marriage_date
+ marriage_date
+ Y
+
+
+ divorce_az_number
+ divorce_az_number
+ Y
+
+
+ divorce_date
+ divorce_date
+ Y
+
+
+ information_excluded
+ information_excluded
+ Y
+
+
+ N
+
+
+ 1280
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH suprug AS (
+ SELECT
+ supr.supri AS supr,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
+ CASE
+ WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
+ ELSE false
+ END AS information_excluded,
+ ri.recruit_id
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ JOIN LATERAL (
+ SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
+ ) AS supr ON true
+)
+SELECT
+ r.recruit_id AS recruit_id,
+ supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
+ CONCAT_WS(' ',
+ supr->'svedFLBS'->'fio'->>'familiya',
+ supr->'svedFLBS'->'fio'->>'imya',
+ supr->'svedFLBS'->'fio'->>'otchestvo'
+ ) AS full_name,
+ MAKE_DATE(
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
+ ) AS birth_date,
+ (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
+ supr->'svedSmert'->>'nomerZapis' AS death_az_number,
+ marriage_az_number,
+ marriage_date::date,
+ divorce_az_number,
+ divorce_date::date,
+ information_excluded
+FROM ervu_dashboard.citizen r
+JOIN suprug ON r.recruit_id = suprug.recruit_id
+ Y
+
+
+ 784
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl
new file mode 100644
index 0000000..bcb2772
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_spouse_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_spouse
+
+ recruit_id
+ recruit_id
+ N
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ marriage_az_number
+ marriage_az_number
+ Y
+
+
+ marriage_date
+ marriage_date
+ Y
+
+
+ divorce_az_number
+ divorce_az_number
+ Y
+
+
+ divorce_date
+ divorce_date
+ Y
+
+
+ information_excluded
+ information_excluded
+ Y
+
+
+ N
+
+
+ 1152
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH suprug AS (
+ SELECT
+ supr.supri AS supr,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
+ CASE
+ WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
+ ELSE false
+ END AS information_excluded,
+ ri.recruit_id
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ JOIN LATERAL (
+ SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
+ ) AS supr ON true
+)
+SELECT
+ r.recruit_id AS recruit_id,
+ supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
+ CONCAT_WS(' ',
+ supr->'svedFLBS'->'fio'->>'familiya',
+ supr->'svedFLBS'->'fio'->>'imya',
+ supr->'svedFLBS'->'fio'->>'otchestvo'
+ ) AS full_name,
+ MAKE_DATE(
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
+ ) AS birth_date,
+ (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
+ supr->'svedSmert'->>'nomerZapis' AS death_az_number,
+ marriage_az_number,
+ marriage_date::date,
+ divorce_az_number,
+ divorce_date::date,
+ information_excluded
+FROM ervu_dashboard.citizen r
+JOIN suprug ON r.recruit_id = suprug.recruit_id
+ Y
+
+
+ 656
+ 336
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl
new file mode 100644
index 0000000..31e629e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_spouse_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_spouse
+
+ recruit_id
+ recruit_id
+ N
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ marriage_az_number
+ marriage_az_number
+ Y
+
+
+ marriage_date
+ marriage_date
+ Y
+
+
+ divorce_az_number
+ divorce_az_number
+ Y
+
+
+ divorce_date
+ divorce_date
+ Y
+
+
+ information_excluded
+ information_excluded
+ Y
+
+
+ N
+
+
+ 1184
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH suprug AS (
+ SELECT
+ supr.supri AS supr,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
+ CASE
+ WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
+ ELSE false
+ END AS information_excluded,
+ ri.recruit_id
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ JOIN LATERAL (
+ SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
+ ) AS supr ON true
+)
+SELECT
+ r.recruit_id AS recruit_id,
+ supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
+ CONCAT_WS(' ',
+ supr->'svedFLBS'->'fio'->>'familiya',
+ supr->'svedFLBS'->'fio'->>'imya',
+ supr->'svedFLBS'->'fio'->>'otchestvo'
+ ) AS full_name,
+ MAKE_DATE(
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
+ ) AS birth_date,
+ (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
+ supr->'svedSmert'->>'nomerZapis' AS death_az_number,
+ marriage_az_number,
+ marriage_date::date,
+ divorce_az_number,
+ divorce_date::date,
+ information_excluded
+FROM ervu_dashboard.citizen r
+JOIN suprug ON r.recruit_id = suprug.recruit_id
+ Y
+
+
+ 688
+ 384
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl
new file mode 100644
index 0000000..18f686f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_spouse_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_spouse
+
+ recruit_id
+ recruit_id
+ N
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ marriage_az_number
+ marriage_az_number
+ Y
+
+
+ marriage_date
+ marriage_date
+ Y
+
+
+ divorce_az_number
+ divorce_az_number
+ Y
+
+
+ divorce_date
+ divorce_date
+ Y
+
+
+ information_excluded
+ information_excluded
+ Y
+
+
+ N
+
+
+ 1152
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH suprug AS (
+ SELECT
+ supr.supri AS supr,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
+ ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
+ CASE
+ WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
+ ELSE false
+ END AS information_excluded,
+ ri.recruit_id
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ JOIN LATERAL (
+ SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
+ ) AS supr ON true
+)
+SELECT
+ r.recruit_id AS recruit_id,
+ supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
+ CONCAT_WS(' ',
+ supr->'svedFLBS'->'fio'->>'familiya',
+ supr->'svedFLBS'->'fio'->>'imya',
+ supr->'svedFLBS'->'fio'->>'otchestvo'
+ ) AS full_name,
+ MAKE_DATE(
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
+ ) AS birth_date,
+ (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
+ supr->'svedSmert'->>'nomerZapis' AS death_az_number,
+ marriage_az_number,
+ marriage_date::date,
+ divorce_az_number,
+ divorce_date::date,
+ information_excluded
+FROM ervu_dashboard.citizen r
+JOIN suprug ON r.recruit_id = suprug.recruit_id
+ Y
+
+
+ 656
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..95a193c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,261 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id
+
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+remains as (
+ select
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at
+ ELSE null
+ END as cr_flow1,
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id
+ ELSE null
+ END as idm_flow1,
+
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at
+ ELSE null
+ END as cr_flow2,
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id
+ ELSE null
+ END as idm_flow2,
+
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at
+ ELSE null
+ END as cr_flow3,
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id
+ ELSE null
+ END as idm_flow3,
+
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at
+ ELSE null
+ END as cr_flow4,
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id
+ ELSE null
+ END as idm_flow4,
+
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at
+ ELSE null
+ END as cr_flow5,
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id
+ ELSE null
+ END as idm_flow5
+ from splitted
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/branching_passport.hpl b/map_v1/info_recruits/citizen_tables/passport/branching_passport.hpl
new file mode 100644
index 0000000..7828ef8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/branching_passport.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_passport
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_passport'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl
similarity index 95%
rename from mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_error.hpl
rename to map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl
index cc3d677..eb035c0 100644
--- a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_error.hpl
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl
@@ -1,7 +1,7 @@
- change_status_delta_child_error
+ change_status_delta_passport_errorY
@@ -85,14 +85,14 @@
N0 SELECT
- 'delta_child' as job_name,
+ 'delta_passport' as job_name,
'ERROR' as status,
current_timestamp as record_created
union all
SELECT
- 'job_child' as job_name,
+ 'job_passport' as job_name,
'ERROR' as status,
current_timestamp as record_created
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl
similarity index 95%
rename from mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_success.hpl
rename to map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl
index 081660e..bed6c3f 100644
--- a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_success.hpl
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl
@@ -1,7 +1,7 @@
- change_status_delta_child_success
+ change_status_delta_passport_successY
@@ -85,14 +85,14 @@
N0 SELECT
- 'delta_child' as job_name,
+ 'delta_passport' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
union all
SELECT
- 'job_child' as job_name,
+ 'job_passport' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl
new file mode 100644
index 0000000..11a8f7c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_passport_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'passport_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl
new file mode 100644
index 0000000..3615a2d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_passport_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'passport_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl
new file mode 100644
index 0000000..37d5e94
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_passport_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl
new file mode 100644
index 0000000..1248307
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_passport_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl
new file mode 100644
index 0000000..8d7d458
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_passport_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl
new file mode 100644
index 0000000..be0921a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_passport_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl
new file mode 100644
index 0000000..3065833
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_passport_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl
new file mode 100644
index 0000000..3df9671
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_passport_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl
new file mode 100644
index 0000000..5728a91
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_passport_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl
new file mode 100644
index 0000000..e6e205c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_passport_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'passport_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..fa312e9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_passport' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'passport_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'passport_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'passport_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'passport_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'passport_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..451d2a8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_passport' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl
new file mode 100644
index 0000000..4f21ffb
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_passport_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_passport') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_passport'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_passport'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl
new file mode 100644
index 0000000..4e652f1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_passport
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'passport_flow1',
+ 'passport_flow2',
+ 'passport_flow3',
+ 'passport_flow4',
+ 'passport_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'passport_flow1',
+ 'passport_flow2',
+ 'passport_flow3',
+ 'passport_flow4',
+ 'passport_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_passport' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_passport_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_passport_error.hpl
new file mode 100644
index 0000000..afde931
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_passport_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_passport_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/passport/checkpoints/xxjob_create_files_child.hwf
new file mode 100644
index 0000000..b31ca9f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/xxjob_create_files_child.hwf
@@ -0,0 +1,235 @@
+
+
+ job_create_files_child
+ Y
+
+
+
+ -
+ 2025/05/26 16:48:00.210
+ -
+ 2025/05/26 16:48:00.210
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 576
+ 496
+
+
+
+ state_child_flow2_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow2"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+ N
+ 848
+ 416
+
+
+
+ state_child_flow1_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow1"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+ N
+ 848
+ 336
+
+
+
+ state_child_flow3_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow3"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+ N
+ 848
+ 496
+
+
+
+ state_child_flow4_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow4"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+ N
+ 848
+ 576
+
+
+
+ state_child_flow5_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow5"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+ N
+ 848
+ 656
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1120
+ 496
+
+
+
+ Delete file state_job_child
+
+ DELETE_FILE
+
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json
+ N
+ 848
+ 256
+
+
+
+
+
+ Start
+ state_child_flow3_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow2_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow1_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow4_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow5_new
+ Y
+ Y
+ Y
+
+
+ state_child_flow5_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow4_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow3_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow2_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow1_new
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ Delete file state_job_child
+ Y
+ Y
+ Y
+
+
+ Delete file state_job_child
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/delta_passport.hpl b/map_v1/info_recruits/citizen_tables/passport/delta_passport.hpl
new file mode 100644
index 0000000..9eb2ddd
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/delta_passport.hpl
@@ -0,0 +1,141 @@
+
+
+
+ delta_passport
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.recruit_id AS recruit_id,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
+ TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
+ CASE
+ WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
+ THEN TRUE ELSE FALSE
+ END AS actual
+FROM ervu_dashboard.recruits_info ri
+--join public.recruits r on r.id = ri.recruit_id
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+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
+ Y
+
+
+ 624
+ 352
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
passport
+
+ recruit_id
+ recruit_id
+ N
+
+
+ actual
+ actual
+ Y
+
+
+ issue_date
+ issue_date
+ Y
+
+
+ organization_name
+ organization_name
+ Y
+
+
+ passport_number
+ passport_number
+ Y
+
+
+ passport_series
+ passport_series
+ Y
+
+
+ type_dul
+ type_dul
+ Y
+
+
+ unit_code
+ unit_code
+ Y
+
+
+ N
+
+
+ 1088
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/job_passport.hwf b/map_v1/info_recruits/citizen_tables/passport/job_passport.hwf
new file mode 100644
index 0000000..cd6680c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/job_passport.hwf
@@ -0,0 +1,1845 @@
+
+
+ job_passport
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_passport.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_passport.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_passport.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ passport_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ passport_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ passport_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ passport_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ passport_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new citizen
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_passport.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/branching_passport.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple passport WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1792
+
+
+
+ Simple passport WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_passport.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/delta_passport.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1792
+
+
+
+ Success delta_citizen
+
+ SUCCESS
+
+ N
+ 3216
+ 1792
+
+
+
+ error delta_citizen
+
+ SUCCESS
+
+ N
+ 3216
+ 1872
+
+
+
+ check_if_job_passport_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 544
+ 400
+
+
+
+ Simple job_passport_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 784
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 400
+
+
+
+ change_status_passport_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_passport_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_passport_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_passport_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_passport_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_passport_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_passport_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_passport_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_passport_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_passport_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_passport.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2112
+ 1280
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2144
+ 1792
+
+
+
+ change_status_delta_passport_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1792
+
+
+
+ change_status_delta_passport_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1872
+
+
+
+ passport_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ passport_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ passport_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ passport_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ passport_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ Success new citizen 2
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_passport_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_passport_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_passport_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_passport_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_passport_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_passport_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_passport_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_passport_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_passport_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_passport_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_passport.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_passport.hpl
+ passport_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_passport.hpl
+ passport_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_passport.hpl
+ passport_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_passport.hpl
+ passport_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_passport.hpl
+ passport_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_passport.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_passport.hpl
+ Simple passport WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_passport.hpl
+ Simple passport WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_passport_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_passport_exists.hpl
+ Simple job_passport_exists check NEW
+ Y
+ Y
+ N
+
+
+ Simple job_passport_exists check NEW
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl
+ recruitment_rows_five_flow_passport.hpl
+ Y
+ Y
+ N
+
+
+ passport_flow1.hpl
+ change_status_passport_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ passport_flow1.hpl
+ change_status_passport_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ passport_flow2.hpl
+ change_status_passport_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ passport_flow2.hpl
+ change_status_passport_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ passport_flow3.hpl
+ change_status_passport_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ passport_flow3.hpl
+ change_status_passport_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ passport_flow4.hpl
+ change_status_passport_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ passport_flow4.hpl
+ change_status_passport_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ passport_flow5.hpl
+ change_status_passport_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ passport_flow5.hpl
+ change_status_passport_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_passport_flow5_error.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow5_success.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow4_error.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow4_success.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow3_error.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow3_success.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow2_error.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow2_success.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow1_error.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow1_success.hpl
+ checkpoint_job_passport.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_passport.hpl
+ Success new citizen
+ Y
+ Y
+ N
+
+
+ checkpoint_job_passport.hpl (2)
+ branching_passport.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_passport_exists check NEW
+ checkpoint_job_passport.hpl (2)
+ Y
+ N
+ N
+
+
+ Simple passport WHERE ERROR
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl (2)
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple passport WHERE SUCCESS
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ delta_passport.hpl
+ change_status_delta_passport_success.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_passport_success.hpl
+ Success delta_citizen
+ Y
+ Y
+ N
+
+
+ delta_passport.hpl
+ change_status_delta_passport_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_delta_passport_error.hpl
+ error delta_citizen
+ Y
+ Y
+ N
+
+
+ passport_flow1.hpl 2
+ change_status_passport_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ passport_flow1.hpl 2
+ change_status_passport_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ passport_flow2.hpl 2
+ change_status_passport_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ passport_flow2.hpl 2
+ change_status_passport_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ passport_flow3.hpl 2
+ change_status_passport_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ passport_flow3.hpl 2
+ change_status_passport_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ passport_flow4.hpl 2
+ change_status_passport_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ passport_flow4.hpl 2
+ change_status_passport_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ passport_flow5.hpl 2
+ change_status_passport_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ passport_flow5.hpl 2
+ change_status_passport_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_passport_flow1_success.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow1_error.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow2_success.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow2_error.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow3_success.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow3_error.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow4_success.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow4_error.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow5_success.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_passport_flow5_error.hpl 2
+ checkpoint_job_passport.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_passport.hpl 2
+ Success new citizen 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ passport_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ passport_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ passport_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ passport_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ passport_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+ change_status_to_processing_delta.hpl
+ delta_passport.hpl
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl
new file mode 100644
index 0000000..8e5bde8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl
@@ -0,0 +1,224 @@
+
+
+
+ passport_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Select values 4 2
+ N
+
+
+ Select values 4 2
+ Get variables
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ recruitment_id
+ -1
+ none
+ String
+ ID_F1
+
+
+
+
+ 976
+ 400
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
passport
+
+ recruit_id
+ recruit_id
+ N
+
+
+ actual
+ actual
+ Y
+
+
+ issue_date
+ issue_date
+ Y
+
+
+ organization_name
+ organization_name
+ Y
+
+
+ passport_number
+ passport_number
+ Y
+
+
+ passport_series
+ passport_series
+ Y
+
+
+ unit_code
+ unit_code
+ Y
+
+
+ N
+
+
+ 944
+ 288
+
+
+
+ Select values 4 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ ID_F1
+ ID_F1
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 720
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.recruit_id AS recruit_id,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
+ TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
+ CASE
+ WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
+ THEN TRUE ELSE FALSE
+ END AS actual
+FROM ervu_dashboard.recruits_info ri
+--join public.recruits r on r.id = ri.recruit_id
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+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
+ Y
+
+
+ 448
+ 288
+
+
+
+
+ Select values 4 2
+ Get variables
+ Y
+
+
+
+
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl
new file mode 100644
index 0000000..884e7b9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl
@@ -0,0 +1,137 @@
+
+
+
+ passport_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
passport
+
+ recruit_id
+ recruit_id
+ N
+
+
+ actual
+ actual
+ Y
+
+
+ issue_date
+ issue_date
+ Y
+
+
+ organization_name
+ organization_name
+ Y
+
+
+ passport_number
+ passport_number
+ Y
+
+
+ passport_series
+ passport_series
+ Y
+
+
+ unit_code
+ unit_code
+ Y
+
+
+ N
+
+
+ 1216
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.recruit_id AS recruit_id,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
+ TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
+ CASE
+ WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
+ THEN TRUE ELSE FALSE
+ END AS actual
+FROM ervu_dashboard.recruits_info ri
+--join public.recruits r on r.id = ri.recruit_id
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+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
+ Y
+
+
+ 720
+ 416
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl
new file mode 100644
index 0000000..9597d30
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl
@@ -0,0 +1,137 @@
+
+
+
+ passport_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
passport
+
+ recruit_id
+ recruit_id
+ N
+
+
+ actual
+ actual
+ Y
+
+
+ issue_date
+ issue_date
+ Y
+
+
+ organization_name
+ organization_name
+ Y
+
+
+ passport_number
+ passport_number
+ Y
+
+
+ passport_series
+ passport_series
+ Y
+
+
+ unit_code
+ unit_code
+ Y
+
+
+ N
+
+
+ 1280
+ 432
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.recruit_id AS recruit_id,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
+ TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
+ CASE
+ WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
+ THEN TRUE ELSE FALSE
+ END AS actual
+FROM ervu_dashboard.recruits_info ri
+--join public.recruits r on r.id = ri.recruit_id
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+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
+ Y
+
+
+ 784
+ 432
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl
new file mode 100644
index 0000000..6d005a8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl
@@ -0,0 +1,137 @@
+
+
+
+ passport_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
passport
+
+ recruit_id
+ recruit_id
+ N
+
+
+ actual
+ actual
+ Y
+
+
+ issue_date
+ issue_date
+ Y
+
+
+ organization_name
+ organization_name
+ Y
+
+
+ passport_number
+ passport_number
+ Y
+
+
+ passport_series
+ passport_series
+ Y
+
+
+ unit_code
+ unit_code
+ Y
+
+
+ N
+
+
+ 1280
+ 448
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.recruit_id AS recruit_id,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
+ TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
+ CASE
+ WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
+ THEN TRUE ELSE FALSE
+ END AS actual
+FROM ervu_dashboard.recruits_info ri
+--join public.recruits r on r.id = ri.recruit_id
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+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
+ Y
+
+
+ 784
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl
new file mode 100644
index 0000000..c1d7b20
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl
@@ -0,0 +1,137 @@
+
+
+
+ passport_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
passport
+
+ recruit_id
+ recruit_id
+ N
+
+
+ actual
+ actual
+ Y
+
+
+ issue_date
+ issue_date
+ Y
+
+
+ organization_name
+ organization_name
+ Y
+
+
+ passport_number
+ passport_number
+ Y
+
+
+ passport_series
+ passport_series
+ Y
+
+
+ unit_code
+ unit_code
+ Y
+
+
+ N
+
+
+ 1296
+ 496
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.recruit_id AS recruit_id,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
+ ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
+ TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
+ CASE
+ WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
+ THEN TRUE ELSE FALSE
+ END AS actual
+FROM ervu_dashboard.recruits_info ri
+--join public.recruits r on r.id = ri.recruit_id
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+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
+ Y
+
+
+ 800
+ 496
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..c45bc33
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,261 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id
+
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+remains as (
+ select
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at
+ ELSE null
+ END as cr_flow1,
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id
+ ELSE null
+ END as idm_flow1,
+
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at
+ ELSE null
+ END as cr_flow2,
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id
+ ELSE null
+ END as idm_flow2,
+
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at
+ ELSE null
+ END as cr_flow3,
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id
+ ELSE null
+ END as idm_flow3,
+
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at
+ ELSE null
+ END as cr_flow4,
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id
+ ELSE null
+ END as idm_flow4,
+
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at
+ ELSE null
+ END as cr_flow5,
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id
+ ELSE null
+ END as idm_flow5
+ from splitted
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl b/map_v1/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl
new file mode 100644
index 0000000..9d0672e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_prosecution
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_prosecution'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl
new file mode 100644
index 0000000..c48e595
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl
@@ -0,0 +1,110 @@
+
+
+
+ change_status_delta_prosecution_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_prosecution' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+union all
+
+ SELECT
+ 'job_prosecution' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl
new file mode 100644
index 0000000..cce1fed
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl
@@ -0,0 +1,110 @@
+
+
+
+ change_status_delta_prosecution_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_prosecution' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+union all
+
+ SELECT
+ 'job_prosecution' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl
new file mode 100644
index 0000000..0169754
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_prosecution_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'prosecution_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl
new file mode 100644
index 0000000..b7da38b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_prosecution_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'prosecution_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl
new file mode 100644
index 0000000..7e19275
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_prosecution_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl
new file mode 100644
index 0000000..31210c2
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_prosecution_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl
new file mode 100644
index 0000000..fadd007
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_prosecution_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl
new file mode 100644
index 0000000..b359b96
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_prosecution_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl
new file mode 100644
index 0000000..999578d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_prosecution_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl
new file mode 100644
index 0000000..a171b65
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_prosecution_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl
new file mode 100644
index 0000000..3ddd2e7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_prosecution_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl
new file mode 100644
index 0000000..bebb11a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_prosecution_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'prosecution_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..86aba83
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_prosecution' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'prosecution_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'prosecution_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'prosecution_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'prosecution_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'prosecution_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..5be41e9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_prosecution' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl
new file mode 100644
index 0000000..3a00226
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_prosecution_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_prosecution') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_prosecution'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_prosecution'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl
new file mode 100644
index 0000000..b56b2e5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_prosecution
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'prosecution_flow1',
+ 'prosecution_flow2',
+ 'prosecution_flow3',
+ 'prosecution_flow4',
+ 'prosecution_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'prosecution_flow1',
+ 'prosecution_flow2',
+ 'prosecution_flow3',
+ 'prosecution_flow4',
+ 'prosecution_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_prosecution' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_prosecution_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_prosecution_error.hpl
new file mode 100644
index 0000000..06ffe21
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_prosecution_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_prosecution_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/xxjob_create_files_child.hwf
new file mode 100644
index 0000000..b31ca9f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/xxjob_create_files_child.hwf
@@ -0,0 +1,235 @@
+
+
+ job_create_files_child
+ Y
+
+
+
+ -
+ 2025/05/26 16:48:00.210
+ -
+ 2025/05/26 16:48:00.210
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 576
+ 496
+
+
+
+ state_child_flow2_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow2"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+ N
+ 848
+ 416
+
+
+
+ state_child_flow1_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow1"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+ N
+ 848
+ 336
+
+
+
+ state_child_flow3_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow3"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+ N
+ 848
+ 496
+
+
+
+ state_child_flow4_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow4"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+ N
+ 848
+ 576
+
+
+
+ state_child_flow5_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow5"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+ N
+ 848
+ 656
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1120
+ 496
+
+
+
+ Delete file state_job_child
+
+ DELETE_FILE
+
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json
+ N
+ 848
+ 256
+
+
+
+
+
+ Start
+ state_child_flow3_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow2_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow1_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow4_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow5_new
+ Y
+ Y
+ Y
+
+
+ state_child_flow5_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow4_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow3_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow2_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow1_new
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ Delete file state_job_child
+ Y
+ Y
+ Y
+
+
+ Delete file state_job_child
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl b/map_v1/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl
new file mode 100644
index 0000000..bc20c7a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_prosecution
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+ugolov_presl AS (
+ SELECT
+ jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
+ ri.recruit_id
+ --'prOtsSvedUgolovPresl'
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
+)
+SELECT
+ r.recruit_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 ervu_dashboard.citizen r
+JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
+LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
+GROUP BY r.recruit_id, up
+ Y
+
+
+ 624
+ 352
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
prosecution
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ case_number_court
+ case_number_court
+ Y
+
+
+ close_date
+ close_date
+ Y
+
+
+ create_date
+ create_date
+ Y
+
+
+ kind
+ kind
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ reclassification
+ reclassification
+ Y
+
+
+ termination_basis
+ termination_basis
+ Y
+
+
+ transfer_to_court
+ transfer_to_court
+ Y
+
+
+ N
+
+
+ 1040
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/job_prosecution.hwf b/map_v1/info_recruits/citizen_tables/prosecution/job_prosecution.hwf
new file mode 100644
index 0000000..4ec227f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/job_prosecution.hwf
@@ -0,0 +1,1843 @@
+
+
+ job_prosecution
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_prosecution.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_prosecution.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_prosecution.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ prosecution_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ prosecution_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ prosecution_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ prosecution_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ prosecution_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new prosecution
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_prosecution.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple prosecution WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1792
+
+
+
+ Simple prosecution WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_prosecution.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1792
+
+
+
+ Success delta_prosecution
+
+ SUCCESS
+
+ N
+ 3280
+ 1792
+
+
+
+ error delta_prosecution
+
+ SUCCESS
+
+ N
+ 3280
+ 1872
+
+
+
+ check_if_job_prosecution_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 576
+ 400
+
+
+
+ Simple job_prosecution_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1264
+ 400
+
+
+
+ change_status_prosecution_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_prosecution_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_prosecution_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_prosecution_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_prosecution_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_prosecution_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_prosecution_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_prosecution_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_prosecution_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_prosecution_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_prosecution.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2112
+ 1280
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2144
+ 1792
+
+
+
+ change_status_delta_prosecution_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1792
+
+
+
+ change_status_delta_prosecution_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1872
+
+
+
+ prosecution_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ prosecution_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ prosecution_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ prosecution_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ prosecution_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ Success new prosecution 2
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_prosecution_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_prosecution_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_prosecution_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_prosecution_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_prosecution_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_prosecution_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_prosecution_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_prosecution_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_prosecution_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_prosecution_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_prosecution.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_prosecution.hpl
+ prosecution_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_prosecution.hpl
+ prosecution_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_prosecution.hpl
+ prosecution_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_prosecution.hpl
+ prosecution_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_prosecution.hpl
+ prosecution_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_prosecution.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_prosecution.hpl
+ Simple prosecution WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_prosecution.hpl
+ Simple prosecution WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_prosecution_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_prosecution_exists.hpl
+ Simple job_prosecution_exists check NEW
+ Y
+ Y
+ N
+
+
+ Simple job_prosecution_exists check NEW
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl
+ recruitment_rows_five_flow_prosecution.hpl
+ Y
+ Y
+ N
+
+
+ prosecution_flow1.hpl
+ change_status_prosecution_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ prosecution_flow1.hpl
+ change_status_prosecution_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ prosecution_flow2.hpl
+ change_status_prosecution_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ prosecution_flow2.hpl
+ change_status_prosecution_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ prosecution_flow3.hpl
+ change_status_prosecution_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ prosecution_flow3.hpl
+ change_status_prosecution_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ prosecution_flow4.hpl
+ change_status_prosecution_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ prosecution_flow4.hpl
+ change_status_prosecution_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ prosecution_flow5.hpl
+ change_status_prosecution_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ prosecution_flow5.hpl
+ change_status_prosecution_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_prosecution_flow5_error.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow5_success.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow4_error.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow4_success.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow3_error.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow3_success.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow2_error.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow2_success.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow1_error.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow1_success.hpl
+ checkpoint_job_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_prosecution.hpl
+ Success new prosecution
+ Y
+ Y
+ N
+
+
+ checkpoint_job_prosecution.hpl (2)
+ branching_prosecution.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_prosecution_exists check NEW
+ checkpoint_job_prosecution.hpl (2)
+ Y
+ N
+ N
+
+
+ Simple prosecution WHERE ERROR
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl (2)
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple prosecution WHERE SUCCESS
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ delta_prosecution.hpl
+ change_status_delta_prosecution_success.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_prosecution_success.hpl
+ Success delta_prosecution
+ Y
+ Y
+ N
+
+
+ delta_prosecution.hpl
+ change_status_delta_prosecution_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_delta_prosecution_error.hpl
+ error delta_prosecution
+ Y
+ Y
+ N
+
+
+ change_status_to_processing_delta.hpl
+ delta_prosecution.hpl
+ Y
+ Y
+ N
+
+
+ prosecution_flow1.hpl 2
+ change_status_prosecution_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ prosecution_flow1.hpl 2
+ change_status_prosecution_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ prosecution_flow2.hpl 2
+ change_status_prosecution_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ prosecution_flow2.hpl 2
+ change_status_prosecution_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ prosecution_flow3.hpl 2
+ change_status_prosecution_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ prosecution_flow3.hpl 2
+ change_status_prosecution_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ prosecution_flow4.hpl 2
+ change_status_prosecution_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ prosecution_flow4.hpl 2
+ change_status_prosecution_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ prosecution_flow5.hpl 2
+ change_status_prosecution_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ prosecution_flow5.hpl 2
+ change_status_prosecution_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_prosecution_flow1_success.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow1_error.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow2_success.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow2_error.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow3_success.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow3_error.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow4_success.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow4_error.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow5_success.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_prosecution_flow5_error.hpl 2
+ checkpoint_job_prosecution.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_prosecution.hpl 2
+ Success new prosecution 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ prosecution_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ prosecution_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ prosecution_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ prosecution_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ prosecution_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl
new file mode 100644
index 0000000..4443790
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl
@@ -0,0 +1,266 @@
+
+
+
+ prosecution_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Select values 4 2
+ N
+
+
+ Select values 4 2
+ Get variables
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ recruitment_id
+ -1
+ none
+ String
+ ID_F1
+
+
+
+
+ 976
+ 400
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
prosecution
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ case_number_court
+ case_number_court
+ Y
+
+
+ close_date
+ close_date
+ Y
+
+
+ create_date
+ create_date
+ Y
+
+
+ kind
+ kind
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ reclassification
+ reclassification
+ Y
+
+
+ termination_basis
+ termination_basis
+ Y
+
+
+ transfer_to_court
+ transfer_to_court
+ Y
+
+
+ N
+
+
+ 960
+ 288
+
+
+
+ Select values 4 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ ID_F1
+ ID_F1
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 720
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+ugolov_presl AS (
+ SELECT
+ jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
+ ri.recruit_id
+ --'prOtsSvedUgolovPresl'
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
+)
+SELECT
+ r.recruit_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 ervu_dashboard.citizen r
+JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
+LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
+GROUP BY r.recruit_id, up
+ Y
+
+
+ 448
+ 288
+
+
+
+
+ Select values 4 2
+ Get variables
+ Y
+
+
+
+
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl
new file mode 100644
index 0000000..2ae10e8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl
@@ -0,0 +1,179 @@
+
+
+
+ prosecution_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
prosecution
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ case_number_court
+ case_number_court
+ Y
+
+
+ close_date
+ close_date
+ Y
+
+
+ create_date
+ create_date
+ Y
+
+
+ kind
+ kind
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ reclassification
+ reclassification
+ Y
+
+
+ termination_basis
+ termination_basis
+ Y
+
+
+ transfer_to_court
+ transfer_to_court
+ Y
+
+
+ N
+
+
+ 1232
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+ugolov_presl AS (
+ SELECT
+ jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
+ ri.recruit_id
+ --'prOtsSvedUgolovPresl'
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
+)
+SELECT
+ r.recruit_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 ervu_dashboard.citizen r
+JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
+LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
+GROUP BY r.recruit_id, up
+ Y
+
+
+ 736
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl
new file mode 100644
index 0000000..edc58d3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl
@@ -0,0 +1,179 @@
+
+
+
+ prosecution_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
prosecution
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ case_number_court
+ case_number_court
+ Y
+
+
+ close_date
+ close_date
+ Y
+
+
+ create_date
+ create_date
+ Y
+
+
+ kind
+ kind
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ reclassification
+ reclassification
+ Y
+
+
+ termination_basis
+ termination_basis
+ Y
+
+
+ transfer_to_court
+ transfer_to_court
+ Y
+
+
+ N
+
+
+ 1216
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+ugolov_presl AS (
+ SELECT
+ jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
+ ri.recruit_id
+ --'prOtsSvedUgolovPresl'
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
+)
+SELECT
+ r.recruit_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 ervu_dashboard.citizen r
+JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
+LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
+GROUP BY r.recruit_id, up
+ Y
+
+
+ 720
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl
new file mode 100644
index 0000000..165c016
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl
@@ -0,0 +1,179 @@
+
+
+
+ prosecution_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
prosecution
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ case_number_court
+ case_number_court
+ Y
+
+
+ close_date
+ close_date
+ Y
+
+
+ create_date
+ create_date
+ Y
+
+
+ kind
+ kind
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ reclassification
+ reclassification
+ Y
+
+
+ termination_basis
+ termination_basis
+ Y
+
+
+ transfer_to_court
+ transfer_to_court
+ Y
+
+
+ N
+
+
+ 1184
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+ugolov_presl AS (
+ SELECT
+ jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
+ ri.recruit_id
+ --'prOtsSvedUgolovPresl'
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
+)
+SELECT
+ r.recruit_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 ervu_dashboard.citizen r
+JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
+LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
+GROUP BY r.recruit_id, up
+ Y
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl
new file mode 100644
index 0000000..b74189b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl
@@ -0,0 +1,179 @@
+
+
+
+ prosecution_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
prosecution
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ case_number_court
+ case_number_court
+ Y
+
+
+ close_date
+ close_date
+ Y
+
+
+ create_date
+ create_date
+ Y
+
+
+ kind
+ kind
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ reclassification
+ reclassification
+ Y
+
+
+ termination_basis
+ termination_basis
+ Y
+
+
+ transfer_to_court
+ transfer_to_court
+ Y
+
+
+ N
+
+
+ 1216
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+ugolov_presl AS (
+ SELECT
+ jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
+ ri.recruit_id
+ --'prOtsSvedUgolovPresl'
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
+)
+SELECT
+ r.recruit_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 ervu_dashboard.citizen r
+JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
+LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
+GROUP BY r.recruit_id, up
+ Y
+
+
+ 720
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..2b2626f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,261 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id
+
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+remains as (
+ select
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at
+ ELSE null
+ END as cr_flow1,
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id
+ ELSE null
+ END as idm_flow1,
+
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at
+ ELSE null
+ END as cr_flow2,
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id
+ ELSE null
+ END as idm_flow2,
+
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at
+ ELSE null
+ END as cr_flow3,
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id
+ ELSE null
+ END as idm_flow3,
+
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at
+ ELSE null
+ END as cr_flow4,
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id
+ ELSE null
+ END as idm_flow4,
+
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at
+ ELSE null
+ END as cr_flow5,
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id
+ ELSE null
+ END as idm_flow5
+ from splitted
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/branching_punishment.hpl b/map_v1/info_recruits/citizen_tables/punishment/branching_punishment.hpl
new file mode 100644
index 0000000..74f2576
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/branching_punishment.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_punishment
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_spouse'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl
similarity index 95%
rename from mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_error.hpl
rename to map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl
index 842cdf0..adf6c94 100644
--- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_error.hpl
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl
@@ -1,7 +1,7 @@
- change_status_delta_snils_inn_error
+ change_status_delta_punishment_errorY
@@ -85,14 +85,14 @@
N0 SELECT
- 'delta_snils_inn' as job_name,
+ 'delta_punishment' as job_name,
'ERROR' as status,
current_timestamp as record_created
union all
SELECT
- 'job_snils_inn' as job_name,
+ 'job_punishment' as job_name,
'ERROR' as status,
current_timestamp as record_created
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl
similarity index 95%
rename from mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_success.hpl
rename to map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl
index c9d5d7b..54bcb5c 100644
--- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_success.hpl
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl
@@ -1,7 +1,7 @@
- change_status_delta_snils_inn_success
+ change_status_delta_punishment_successY
@@ -85,14 +85,14 @@
N0 SELECT
- 'delta_snils_inn' as job_name,
+ 'delta_punishment' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
union all
SELECT
- 'job_snils_inn' as job_name,
+ 'job_punishment' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl
new file mode 100644
index 0000000..91e4623
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_punishment_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'punishment_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl
new file mode 100644
index 0000000..0ff574d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_punishment_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'punishment_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl
new file mode 100644
index 0000000..5e28ac4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_punishment_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl
new file mode 100644
index 0000000..25899f0
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_punishment_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl
new file mode 100644
index 0000000..3691584
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_punishment_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl
new file mode 100644
index 0000000..74aef8f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_punishment_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl
new file mode 100644
index 0000000..c7f7cf6
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_punishment_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl
new file mode 100644
index 0000000..752e93e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_punishment_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl
new file mode 100644
index 0000000..86d3ef7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_punishment_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl
new file mode 100644
index 0000000..7d1092e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_punishment_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'punishment_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..82712b4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_punishment' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'punishment_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'punishment_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'punishment_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'punishment_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'punishment_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..4408027
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_punishment' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl
new file mode 100644
index 0000000..6333e4e
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_punishment_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_punishment') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_punishment'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_punishment'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl
new file mode 100644
index 0000000..7a9995f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_punishment
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'punishment_flow1',
+ 'punishment_flow2',
+ 'punishment_flow3',
+ 'punishment_flow4',
+ 'punishment_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'punishment_flow1',
+ 'punishment_flow2',
+ 'punishment_flow3',
+ 'punishment_flow4',
+ 'punishment_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_punishment' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_punishment_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_punishment_error.hpl
new file mode 100644
index 0000000..d8db141
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_punishment_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_punishment_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/xxjob_create_files_child.hwf
new file mode 100644
index 0000000..b31ca9f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/xxjob_create_files_child.hwf
@@ -0,0 +1,235 @@
+
+
+ job_create_files_child
+ Y
+
+
+
+ -
+ 2025/05/26 16:48:00.210
+ -
+ 2025/05/26 16:48:00.210
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 576
+ 496
+
+
+
+ state_child_flow2_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow2"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+ N
+ 848
+ 416
+
+
+
+ state_child_flow1_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow1"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+ N
+ 848
+ 336
+
+
+
+ state_child_flow3_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow3"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+ N
+ 848
+ 496
+
+
+
+ state_child_flow4_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow4"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+ N
+ 848
+ 576
+
+
+
+ state_child_flow5_new
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "NEW",
+ "pipeline": "child_flow5"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+ N
+ 848
+ 656
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1120
+ 496
+
+
+
+ Delete file state_job_child
+
+ DELETE_FILE
+
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json
+ N
+ 848
+ 256
+
+
+
+
+
+ Start
+ state_child_flow3_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow2_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow1_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow4_new
+ Y
+ Y
+ Y
+
+
+ Start
+ state_child_flow5_new
+ Y
+ Y
+ Y
+
+
+ state_child_flow5_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow4_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow3_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow2_new
+ Success
+ Y
+ Y
+ N
+
+
+ state_child_flow1_new
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ Delete file state_job_child
+ Y
+ Y
+ Y
+
+
+ Delete file state_job_child
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/delta_punishment.hpl b/map_v1/info_recruits/citizen_tables/punishment/delta_punishment.hpl
new file mode 100644
index 0000000..0741988
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/delta_punishment.hpl
@@ -0,0 +1,162 @@
+
+
+
+ delta_punishment
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
punishment
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ sentence
+ sentence
+ Y
+
+
+ sentence_place
+ sentence_place
+ Y
+
+
+ sentence_changed
+ sentence_changed
+ Y
+
+
+ punishment_type
+ punishment_type
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ release_date
+ release_date
+ Y
+
+
+ sentense_date
+ sentense_date
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ release_reason
+ release_reason
+ Y
+
+
+ N
+
+
+ 1264
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ugol AS (
+ SELECT ri.recruit_id,
+ jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+ WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
+)
+SELECT recruit_id,
+ nakaz ->> 'naimSud' AS authority_name,
+ nakaz ->> 'srokNakaz' AS sentence,
+ nakaz ->> 'adresOrg' AS sentence_place,
+-- nakaz->>'vidNakaz' AS punishment_code,
+ nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed,
+ nakaz ->> 'vidNakaz' AS punishment_type,
+ 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, ', ') AS law_point,
+ nakaz ->> 'osnOsvob' AS release_reason
+FROM ugol
+ LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true
+GROUP BY recruit_id, nakaz;
+ Y
+
+
+ 768
+ 416
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/job_punishment.hwf b/map_v1/info_recruits/citizen_tables/punishment/job_punishment.hwf
new file mode 100644
index 0000000..04c4ac1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/job_punishment.hwf
@@ -0,0 +1,1841 @@
+
+
+ job_punishment
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_punishment.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_punishment.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_punishment.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ punishment_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ punishment_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ punishment_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ punishment_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ punishment_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success punishment
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_citizen_spouse.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple punishment WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1792
+
+
+
+ Simple punishment WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_punishment.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/delta_punishment.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1792
+
+
+
+ Success delta_punishment
+
+ SUCCESS
+
+ N
+ 3280
+ 1792
+
+
+
+ error delta_punishment
+
+ SUCCESS
+
+ N
+ 3280
+ 1872
+
+
+
+ check_if_job_punishment_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 576
+ 400
+
+
+
+ Simple job_punishment_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1264
+ 400
+
+
+
+ change_status_punishment_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_punishment_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_punishment_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_punishment_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_punishment_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_punishment_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_punishment_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_punishment_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_punishment_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_punishment_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_punishment.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2112
+ 1280
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2144
+ 1792
+
+
+
+ change_status_delta_punishment_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1792
+
+
+
+ change_status_delta_punishment_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1872
+
+
+
+ punishment_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ punishment_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ punishment_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ punishment_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ punishment_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ Success new punishment 2
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_punishment_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_punishment_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_punishment_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_punishment_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_punishment_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_punishment_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_punishment_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_punishment_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_punishment_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_punishment_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_punishment.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_punishment.hpl
+ punishment_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_punishment.hpl
+ punishment_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_punishment.hpl
+ punishment_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_punishment.hpl
+ punishment_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_punishment.hpl
+ punishment_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_punishment.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_spouse.hpl
+ Simple punishment WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_spouse.hpl
+ Simple punishment WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_punishment_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_punishment_exists.hpl
+ Simple job_punishment_exists check NEW
+ Y
+ Y
+ N
+
+
+ Simple job_punishment_exists check NEW
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl
+ recruitment_rows_five_flow_punishment.hpl
+ Y
+ Y
+ N
+
+
+ punishment_flow1.hpl
+ change_status_punishment_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ punishment_flow1.hpl
+ change_status_punishment_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ punishment_flow2.hpl
+ change_status_punishment_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ punishment_flow2.hpl
+ change_status_punishment_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ punishment_flow3.hpl
+ change_status_punishment_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ punishment_flow3.hpl
+ change_status_punishment_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ punishment_flow4.hpl
+ change_status_punishment_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ punishment_flow4.hpl
+ change_status_punishment_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ punishment_flow5.hpl
+ change_status_punishment_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ punishment_flow5.hpl
+ change_status_punishment_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_punishment_flow5_error.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow5_success.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow4_error.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow4_success.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow3_error.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow3_success.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow2_error.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow2_success.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow1_error.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow1_success.hpl
+ checkpoint_job_punishment.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_punishment.hpl
+ Success punishment
+ Y
+ Y
+ N
+
+
+ checkpoint_job_punishment.hpl (2)
+ branching_citizen_spouse.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_punishment_exists check NEW
+ checkpoint_job_punishment.hpl (2)
+ Y
+ N
+ N
+
+
+ Simple punishment WHERE ERROR
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_to_processing.hpl (2)
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple punishment WHERE SUCCESS
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ delta_punishment.hpl
+ change_status_delta_punishment_success.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_punishment_success.hpl
+ Success delta_punishment
+ Y
+ Y
+ N
+
+
+ delta_punishment.hpl
+ change_status_delta_punishment_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_delta_punishment_error.hpl
+ error delta_punishment
+ Y
+ Y
+ N
+
+
+ change_status_to_processing_delta.hpl
+ delta_punishment.hpl
+ Y
+ Y
+ N
+
+
+ punishment_flow1.hpl 2
+ change_status_punishment_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ punishment_flow1.hpl 2
+ change_status_punishment_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ punishment_flow2.hpl 2
+ change_status_punishment_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ punishment_flow2.hpl 2
+ change_status_punishment_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ punishment_flow3.hpl 2
+ change_status_punishment_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ punishment_flow3.hpl 2
+ change_status_punishment_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ punishment_flow4.hpl 2
+ change_status_punishment_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ punishment_flow4.hpl 2
+ change_status_punishment_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ punishment_flow5.hpl 2
+ change_status_punishment_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ punishment_flow5.hpl 2
+ change_status_punishment_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_punishment_flow1_success.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow1_error.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow2_success.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow2_error.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow3_success.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow3_error.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow4_success.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow4_error.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow5_success.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_punishment_flow5_error.hpl 2
+ checkpoint_job_punishment.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_punishment.hpl 2
+ Success new punishment 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ punishment_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ punishment_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ punishment_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ punishment_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ punishment_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl
new file mode 100644
index 0000000..a5f6f18
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl
@@ -0,0 +1,163 @@
+
+
+
+ punishment_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
punishment
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ sentence
+ sentence
+ Y
+
+
+ sentence_place
+ sentence_place
+ Y
+
+
+ sentence_changed
+ sentence_changed
+ Y
+
+
+ punishment_type
+ punishment_type
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ release_date
+ release_date
+ Y
+
+
+ sentense_date
+ sentense_date
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ release_reason
+ release_reason
+ Y
+
+
+ N
+
+
+ 944
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ugol AS (
+ SELECT ri.recruit_id,
+ jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
+)
+SELECT recruit_id,
+ nakaz ->> 'naimSud' AS authority_name,
+ nakaz ->> 'srokNakaz' AS sentence,
+ nakaz ->> 'adresOrg' AS sentence_place,
+-- nakaz->>'vidNakaz' AS punishment_code,
+ nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed,
+ nakaz ->> 'vidNakaz' AS punishment_type,
+ 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, ', ') AS law_point,
+ nakaz ->> 'osnOsvob' AS release_reason
+FROM ugol
+ LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true
+GROUP BY recruit_id, nakaz;
+ Y
+
+
+ 448
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl
new file mode 100644
index 0000000..1a606b8
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl
@@ -0,0 +1,162 @@
+
+
+
+ punishment_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
punishment
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ sentence
+ sentence
+ Y
+
+
+ sentence_place
+ sentence_place
+ Y
+
+
+ sentence_changed
+ sentence_changed
+ Y
+
+
+ punishment_type
+ punishment_type
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ release_date
+ release_date
+ Y
+
+
+ sentense_date
+ sentense_date
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ release_reason
+ release_reason
+ Y
+
+
+ N
+
+
+ 1184
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ugol AS (
+ SELECT ri.recruit_id,
+ jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
+)
+SELECT recruit_id,
+ nakaz ->> 'naimSud' AS authority_name,
+ nakaz ->> 'srokNakaz' AS sentence,
+ nakaz ->> 'adresOrg' AS sentence_place,
+-- nakaz->>'vidNakaz' AS punishment_code,
+ nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed,
+ nakaz ->> 'vidNakaz' AS punishment_type,
+ 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, ', ') AS law_point,
+ nakaz ->> 'osnOsvob' AS release_reason
+FROM ugol
+ LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true
+GROUP BY recruit_id, nakaz;
+ Y
+
+
+ 688
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl
new file mode 100644
index 0000000..3b0454f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl
@@ -0,0 +1,161 @@
+
+
+
+ punishment_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
punishment
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ sentence
+ sentence
+ Y
+
+
+ sentence_place
+ sentence_place
+ Y
+
+
+ sentence_changed
+ sentence_changed
+ Y
+
+
+ punishment_type
+ punishment_type
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ release_date
+ release_date
+ Y
+
+
+ sentense_date
+ sentense_date
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ release_reason
+ release_reason
+ Y
+
+
+ N
+
+
+ 1200
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ugol AS (
+ SELECT ri.recruit_id,
+ jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
+)
+SELECT recruit_id,
+ nakaz ->> 'naimSud' AS authority_name,
+ nakaz ->> 'srokNakaz' AS sentence,
+ nakaz ->> 'adresOrg' AS sentence_place,
+-- nakaz->>'vidNakaz' AS punishment_code,
+ nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed,
+ nakaz ->> 'vidNakaz' AS punishment_type,
+ 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, ', ') AS law_point,
+ nakaz ->> 'osnOsvob' AS release_reason
+FROM ugol
+ LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true
+GROUP BY recruit_id, nakaz;
+ Y
+
+
+ 704
+ 384
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl
new file mode 100644
index 0000000..b3cb7c1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl
@@ -0,0 +1,161 @@
+
+
+
+ punishment_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
punishment
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ sentence
+ sentence
+ Y
+
+
+ sentence_place
+ sentence_place
+ Y
+
+
+ sentence_changed
+ sentence_changed
+ Y
+
+
+ punishment_type
+ punishment_type
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ release_date
+ release_date
+ Y
+
+
+ sentense_date
+ sentense_date
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ release_reason
+ release_reason
+ Y
+
+
+ N
+
+
+ 1152
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ugol AS (
+ SELECT ri.recruit_id,
+ jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
+)
+SELECT recruit_id,
+ nakaz ->> 'naimSud' AS authority_name,
+ nakaz ->> 'srokNakaz' AS sentence,
+ nakaz ->> 'adresOrg' AS sentence_place,
+-- nakaz->>'vidNakaz' AS punishment_code,
+ nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed,
+ nakaz ->> 'vidNakaz' AS punishment_type,
+ 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, ', ') AS law_point,
+ nakaz ->> 'osnOsvob' AS release_reason
+FROM ugol
+ LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true
+GROUP BY recruit_id, nakaz;
+ Y
+
+
+ 656
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl
new file mode 100644
index 0000000..d65536f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl
@@ -0,0 +1,161 @@
+
+
+
+ punishment_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
punishment
+
+ recruit_id
+ recruit_id
+ N
+
+
+ authority_name
+ authority_name
+ Y
+
+
+ sentence
+ sentence
+ Y
+
+
+ sentence_place
+ sentence_place
+ Y
+
+
+ sentence_changed
+ sentence_changed
+ Y
+
+
+ punishment_type
+ punishment_type
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ release_date
+ release_date
+ Y
+
+
+ sentense_date
+ sentense_date
+ Y
+
+
+ law_point
+ law_point
+ Y
+
+
+ release_reason
+ release_reason
+ Y
+
+
+ N
+
+
+ 1344
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ugol AS (
+ SELECT ri.recruit_id,
+ jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
+)
+SELECT recruit_id,
+ nakaz ->> 'naimSud' AS authority_name,
+ nakaz ->> 'srokNakaz' AS sentence,
+ nakaz ->> 'adresOrg' AS sentence_place,
+-- nakaz->>'vidNakaz' AS punishment_code,
+ nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed,
+ nakaz ->> 'vidNakaz' AS punishment_type,
+ 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, ', ') AS law_point,
+ nakaz ->> 'osnOsvob' AS release_reason
+FROM ugol
+ LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true
+GROUP BY recruit_id, nakaz;
+ Y
+
+
+ 848
+ 416
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..4e3598a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,261 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id
+
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+remains as (
+ select
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at
+ ELSE null
+ END as cr_flow1,
+ CASE
+ WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id
+ ELSE null
+ END as idm_flow1,
+
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at
+ ELSE null
+ END as cr_flow2,
+ CASE
+ WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id
+ ELSE null
+ END as idm_flow2,
+
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at
+ ELSE null
+ END as cr_flow3,
+ CASE
+ WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id
+ ELSE null
+ END as idm_flow3,
+
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at
+ ELSE null
+ END as cr_flow4,
+ CASE
+ WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id
+ ELSE null
+ END as idm_flow4,
+
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at
+ ELSE null
+ END as cr_flow5,
+ CASE
+ WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id
+ ELSE null
+ END as idm_flow5
+ from splitted
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl
new file mode 100644
index 0000000..aacbef5
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_snils_inn
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_snils_inn'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl
new file mode 100644
index 0000000..0415b07
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_snils_inn_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_snils_inn_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_snils_inn_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_snils_inn_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl
new file mode 100644
index 0000000..272ccc9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl
new file mode 100644
index 0000000..60a3e53
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl
new file mode 100644
index 0000000..c2dbe25
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_snils_inn_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl
new file mode 100644
index 0000000..549321d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl
new file mode 100644
index 0000000..681da71
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl
new file mode 100644
index 0000000..2f7cad3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl
new file mode 100644
index 0000000..13ffe89
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl
new file mode 100644
index 0000000..552dbf7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl
new file mode 100644
index 0000000..93465e3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl
new file mode 100644
index 0000000..c961ab0
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl
new file mode 100644
index 0000000..5bfe2fe
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_snils_inn_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'snils_inn_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl
new file mode 100644
index 0000000..f6b19c4
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_snils_inn_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'snils_inn_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl
new file mode 100644
index 0000000..1c08c6d
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_snils_inn_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl
new file mode 100644
index 0000000..5a31299
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_snils_inn_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl
new file mode 100644
index 0000000..8955f9a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_snils_inn_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl
new file mode 100644
index 0000000..1784e80
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_snils_inn_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl
new file mode 100644
index 0000000..164d123
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_snils_inn_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl
new file mode 100644
index 0000000..d5f76cd
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_snils_inn_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl
new file mode 100644
index 0000000..9763f85
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_snils_inn_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl
new file mode 100644
index 0000000..72af375
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_snils_inn_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'snils_inn_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..d0e503c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_snils_inn' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'snils_inn_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'snils_inn_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'snils_inn_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'snils_inn_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'snils_inn_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..6ace1f9
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_snils_inn' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl
new file mode 100644
index 0000000..8d7a204
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_snils_inn_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_snils_inn') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_snils_inn'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_snils_inn'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl
new file mode 100644
index 0000000..1403bee
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_snils_inn
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'snils_inn_flow1',
+ 'snils_inn_flow2',
+ 'snils_inn_flow3',
+ 'snils_inn_flow4',
+ 'snils_inn_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'snils_inn_flow1',
+ 'snils_inn_flow2',
+ 'snils_inn_flow3',
+ 'snils_inn_flow4',
+ 'snils_inn_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_snils_inn' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl
new file mode 100644
index 0000000..100f8e1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_snils_inn_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_snils_inn_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl
new file mode 100644
index 0000000..0d9cb80
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_snils_inn_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf b/map_v1/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf
new file mode 100644
index 0000000..c94e531
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf
@@ -0,0 +1,2516 @@
+
+
+ job_snils_inn
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_snils_inn.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ snils_inn_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ snils_inn_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ snils_inn_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ snils_inn_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ snils_inn_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new snils_inn
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_snils_inn.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple snils_inn WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1696
+ 1680
+
+
+
+ Simple snils_inn WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_snils_inn_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1792
+
+
+
+ check_if_job_snils_inn_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 576
+ 400
+
+
+
+ Simple job_snils_inn_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 560
+
+
+
+ change_status_snils_inn_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_snils_inn_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_snils_inn_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_snils_inn_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_snils_inn_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_snils_inn_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_snils_inn_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_snils_inn_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_snils_inn_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_snils_inn_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_snils_inn.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 1424
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2384
+ 2304
+
+
+
+ change_status_delta_snils_inn_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1792
+
+
+
+ change_status_delta_snils_inn_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1872
+
+
+
+ snils_inn_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ snils_inn_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ snils_inn_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ snils_inn_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ snils_inn_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ Success snils_inn after error
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_snils_inn_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_snils_inn_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_snils_inn_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_snils_inn_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_snils_inn_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_snils_inn_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_snils_inn_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_snils_inn_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_snils_inn_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_snils_inn_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_snils_inn.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2336
+ 1952
+
+
+
+ delta_snils_inn_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1952
+
+
+
+ change_status_delta_snils_inn_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1952
+
+
+
+ change_status_delta_snils_inn_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2032
+
+
+
+ delta_snils_inn_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2112
+
+
+
+ change_status_delta_snils_inn_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2112
+
+
+
+ change_status_delta_snils_inn_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2192
+
+
+
+ delta_snils_inn_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2272
+
+
+
+ change_status_delta_snils_inn_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2272
+
+
+
+ change_status_delta_snils_inn_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2352
+
+
+
+ delta_snils_inn_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2432
+
+
+
+ change_status_delta_snils_inn_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2432
+
+
+
+ change_status_delta_snils_inn_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2512
+
+
+
+ branching_snils_inn_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1824
+ 2112
+
+
+
+ Simple delta_snils_inn WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2064
+ 2112
+
+
+
+ delta_snils_inn success
+
+ SUCCESS
+
+ N
+ 2160
+ 1952
+
+
+
+ checkpoint_job_snils_inn_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3440
+ 2112
+
+
+
+ Success delta_snils_inn
+
+ SUCCESS
+
+ N
+ 3728
+ 2112
+
+
+
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ snils_inn_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ snils_inn_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ snils_inn_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ snils_inn_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ snils_inn_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_snils_inn.hpl
+ Simple snils_inn WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_snils_inn.hpl
+ Simple snils_inn WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_snils_inn_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_snils_inn_exists.hpl
+ Simple job_snils_inn_exists check NEW
+ Y
+ Y
+ N
+
+
+ snils_inn_flow1.hpl
+ change_status_snils_inn_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ snils_inn_flow1.hpl
+ change_status_snils_inn_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ snils_inn_flow2.hpl
+ change_status_snils_inn_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ snils_inn_flow2.hpl
+ change_status_snils_inn_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ snils_inn_flow3.hpl
+ change_status_snils_inn_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ snils_inn_flow3.hpl
+ change_status_snils_inn_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ snils_inn_flow4.hpl
+ change_status_snils_inn_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ snils_inn_flow4.hpl
+ change_status_snils_inn_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ snils_inn_flow5.hpl
+ change_status_snils_inn_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ snils_inn_flow5.hpl
+ change_status_snils_inn_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_snils_inn_flow5_error.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow5_success.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow4_error.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow4_success.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow3_error.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow3_success.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow2_error.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow2_success.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow1_error.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow1_success.hpl
+ checkpoint_job_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_snils_inn.hpl
+ Success new snils_inn
+ Y
+ Y
+ N
+
+
+ checkpoint_job_snils_inn.hpl (2)
+ branching_snils_inn.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_snils_inn_exists check NEW
+ checkpoint_job_snils_inn.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow1.hpl
+ change_status_delta_snils_inn_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow1.hpl
+ change_status_delta_snils_inn_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ snils_inn_flow1.hpl 2
+ change_status_snils_inn_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ snils_inn_flow1.hpl 2
+ change_status_snils_inn_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ snils_inn_flow2.hpl 2
+ change_status_snils_inn_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ snils_inn_flow2.hpl 2
+ change_status_snils_inn_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ snils_inn_flow3.hpl 2
+ change_status_snils_inn_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ snils_inn_flow3.hpl 2
+ change_status_snils_inn_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ snils_inn_flow4.hpl 2
+ change_status_snils_inn_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ snils_inn_flow4.hpl 2
+ change_status_snils_inn_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ snils_inn_flow5.hpl 2
+ change_status_snils_inn_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ snils_inn_flow5.hpl 2
+ change_status_snils_inn_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_snils_inn_flow1_success.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow1_error.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow2_success.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow2_error.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow3_success.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow3_error.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow4_success.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow4_error.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow5_success.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_snils_inn_flow5_error.hpl 2
+ checkpoint_job_snils_inn.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_snils_inn.hpl 2
+ Success snils_inn after error
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ snils_inn_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ snils_inn_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ snils_inn_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ snils_inn_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ snils_inn_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_snils_inn_exists check NEW
+ recruitment_rows_five_flow_snils_inn.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple snils_inn WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow2.hpl
+ change_status_delta_snils_inn_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow2.hpl
+ change_status_delta_snils_inn_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow3.hpl
+ change_status_delta_snils_inn_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow3.hpl
+ change_status_delta_snils_inn_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow4.hpl
+ change_status_delta_snils_inn_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow4.hpl
+ change_status_delta_snils_inn_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow5.hpl
+ change_status_delta_snils_inn_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow5.hpl
+ change_status_delta_snils_inn_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple snils_inn WHERE SUCCESS
+ branching_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_snils_inn WHERE ERROR
+ delta_snils_inn success
+ Y
+ N
+ N
+
+
+ branching_snils_inn_delta.hpl
+ Simple delta_snils_inn WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_snils_inn WHERE ERROR
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow1_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow3_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow2_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow2_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow1_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow3_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow4_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow4_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow5_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow5_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_snils_inn_delta.hpl
+ Success delta_snils_inn
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/delta_snils_inn.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl
similarity index 99%
rename from mappings/info_recruits/citizen_tables/snils_inn/delta_snils_inn.hpl
rename to map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl
index dba805d..fc9877b 100644
--- a/mappings/info_recruits/citizen_tables/snils_inn/delta_snils_inn.hpl
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl
@@ -1,7 +1,7 @@
- delta_snils_inn
+ delta_snils_inn_flow1Y
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl
new file mode 100644
index 0000000..dc170be
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl
new file mode 100644
index 0000000..9042d44
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl
new file mode 100644
index 0000000..655073f
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl
new file mode 100644
index 0000000..f2ffc7a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl
new file mode 100644
index 0000000..4515f7c
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl
@@ -0,0 +1,208 @@
+
+
+
+ snils_inn_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ IS NOT NULL
+ inn
+
+
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 928
+ 208
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 448
+ 288
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ IS NOT NULL
+ snils
+
+
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 928
+ 368
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl
new file mode 100644
index 0000000..12d0170
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl
@@ -0,0 +1,201 @@
+
+
+
+ snils_inn_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1152
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1152
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 672
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl
new file mode 100644
index 0000000..d2fc08b
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl
@@ -0,0 +1,201 @@
+
+
+
+ snils_inn_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1120
+ 336
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1120
+ 496
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 640
+ 416
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl
new file mode 100644
index 0000000..cbdc121
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl
@@ -0,0 +1,201 @@
+
+
+
+ snils_inn_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1216
+ 384
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1216
+ 544
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 736
+ 464
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl
new file mode 100644
index 0000000..6f1cadb
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl
@@ -0,0 +1,201 @@
+
+
+
+ snils_inn_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1200
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1200
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 720
+ 400
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..a4a5b8a
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('snils_inn_flow1', 'snils_inn_flow2', 'snils_inn_flow3', 'snils_inn_flow4', 'snils_inn_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl b/map_v1/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl
new file mode 100644
index 0000000..dcb65d7
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl
@@ -0,0 +1,86 @@
+
+
+
+ check_if_need_to_repeat_job
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 12:27:51.630
+ -
+ 2025/08/08 12:27:51.630
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ need_to_repeat_job
+ NEED_TO_REPEAT_JOB
+ ROOT_WORKFLOW
+
+
+ Y
+
+
+ 624
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (SELECT 1
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN etl.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'work_activity_job'
+where je.status is null or je.status in ('ERROR', 'PROCESSING')
+limit 1
+) as need_to_repeat_job;
+ N
+
+
+ 336
+ 288
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl b/map_v1/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl
new file mode 100644
index 0000000..70c1393
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl
@@ -0,0 +1,113 @@
+
+
+
+ check_if_work_activity_job_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 13:28:46.661
+ -
+ 2025/08/05 13:28:46.661
+
+
+
+
+
+ Set variables
+ Write to log
+ N
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_executed_flag
+ JOB_EXECUTED_FLAG
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 672
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (
+ SELECT 1
+ FROM etl.job_execution
+ WHERE job_name = 'work_activity_job'
+ limit 1
+ ) AS job_executed_flag;
+ N
+
+
+ 384
+ 336
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 944
+ 224
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl b/map_v1/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl
new file mode 100644
index 0000000..c42cfdd
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl
@@ -0,0 +1,27 @@
+
+
+
+ delta_work_activity
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 12:54:02.780
+ -
+ 2025/08/05 12:54:02.780
+
+
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
new file mode 100644
index 0000000..1ade769
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
@@ -0,0 +1,384 @@
+
+
+
+ work_activity_flow
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 14:31:22.799
+ -
+ 2025/08/05 14:31:22.799
+
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 992
+ 512
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 992
+ 320
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id)
+VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
+
+
+
+
+ 288
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 10
+ 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 ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL
+ WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array'
+ THEN
+ ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0
+ ELSE
+ ri.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 ervu_dashboard.recruits_info ri
+
+)
+SELECT ti.recruit_id::uuid,
+ (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date,
+ ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type,
+ (ti.trud_deyat ->> 'prAktMestRab' = '1') 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' IS NOT NULL THEN 'Юридическое лицо'
+ WHEN ti.employer->'svedIP' IS NOT 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,
+ (
+ (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND
+ (
+ (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR
+ (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date
+ )
+ ) 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,
+ ti.reg_ip IS NOT NULL AS active_ip,
+ ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date,
+ ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date,
+ ti.self_employment IS NOT NULL AS active_self_employment
+FROM trud_info ti;
+
+ Y
+
+
+ 496
+ 320
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ personnel_event_date
+ personnel_event_date
+
+
+ personnel_event_type
+ personnel_event_type
+
+
+ current_workplace
+ current_workplace
+
+
+ position
+ position
+
+
+ employer_name
+ employer_name
+
+
+ employer_kpp
+ employer_kpp
+
+
+ employer_category
+ employer_category
+
+
+ employer_inn
+ employer_inn
+
+
+ employer_address
+ employer_address
+
+
+ employer_ogrnip
+ employer_ogrnip
+
+
+ employer_unit_type
+ employer_unit_type
+
+
+ employer_unit_address
+ employer_unit_address
+
+
+ parental_leave_start_date
+ parental_leave_start_date
+
+
+ parental_leave_end_date
+ parental_leave_end_date
+
+
+ parental_leave_active
+ parental_leave_active
+
+
+ reg_ip_date
+ reg_ip_date
+
+
+ dereg_ip_date
+ dereg_ip_date
+
+
+ ogrnip_ip
+ ogrnip_ip
+
+
+ active_ip
+ active_ip
+
+
+ reg_self_employment_date
+ reg_self_employment_date
+
+
+ dereg_self_employment_date
+ dereg_self_employment_date
+
+
+ active_self_employment
+ active_self_employment
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
citizen_work_activity
+ N
+ Y
+ N
+ Y
+
+
+ 720
+ 320
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
new file mode 100644
index 0000000..1a50b86
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
@@ -0,0 +1,396 @@
+
+
+
+ work_activity_flow_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/11 13:22:56.048
+ -
+ 2025/08/11 13:22:56.048
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_ERROR',
+ error_description = ?,
+ error_code = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 1040
+ 416
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 1040
+ 224
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET
+ status = 'DELTA_PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL
+where job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+ 336
+ 224
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 10
+ 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 ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL
+ WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array'
+ THEN
+ ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0
+ ELSE
+ ri.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 ervu_dashboard.recruits_info ri
+
+)
+SELECT ti.recruit_id::uuid,
+ (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date,
+ ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type,
+ (ti.trud_deyat ->> 'prAktMestRab' = '1') 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' IS NOT NULL THEN 'Юридическое лицо'
+ WHEN ti.employer->'svedIP' IS NOT 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,
+ (
+ (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND
+ (
+ (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR
+ (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date
+ )
+ ) 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,
+ ti.reg_ip IS NOT NULL AS active_ip,
+ ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date,
+ ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date,
+ ti.self_employment IS NOT NULL AS active_self_employment
+FROM trud_info ti;
+
+ Y
+
+
+ 544
+ 224
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ personnel_event_date
+ personnel_event_date
+
+
+ personnel_event_type
+ personnel_event_type
+
+
+ current_workplace
+ current_workplace
+
+
+ position
+ position
+
+
+ employer_name
+ employer_name
+
+
+ employer_kpp
+ employer_kpp
+
+
+ employer_category
+ employer_category
+
+
+ employer_inn
+ employer_inn
+
+
+ employer_address
+ employer_address
+
+
+ employer_ogrnip
+ employer_ogrnip
+
+
+ employer_unit_type
+ employer_unit_type
+
+
+ employer_unit_address
+ employer_unit_address
+
+
+ parental_leave_start_date
+ parental_leave_start_date
+
+
+ parental_leave_end_date
+ parental_leave_end_date
+
+
+ parental_leave_active
+ parental_leave_active
+
+
+ reg_ip_date
+ reg_ip_date
+
+
+ dereg_ip_date
+ dereg_ip_date
+
+
+ ogrnip_ip
+ ogrnip_ip
+
+
+ active_ip
+ active_ip
+
+
+ reg_self_employment_date
+ reg_self_employment_date
+
+
+ dereg_self_employment_date
+ dereg_self_employment_date
+
+
+ active_self_employment
+ active_self_employment
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
citizen_work_activity
+ N
+ Y
+ N
+ Y
+
+
+ 768
+ 224
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
new file mode 100644
index 0000000..6d5d9cd
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
@@ -0,0 +1,407 @@
+
+
+
+ work_activity_flow_repeat
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 13:25:52.319
+ -
+ 2025/08/08 13:25:52.319
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 976
+ 400
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 976
+ 208
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (
+ id,
+ job_name,
+ status,
+ execution_datetime,
+ error_description,
+ error_code,
+ recruitment_id
+)
+VALUES (
+ DEFAULT,
+ '${JOB_NAME}',
+ 'PROCESSING',
+ DEFAULT,
+ NULL,
+ NULL,
+ '${IDM_ID}'
+)
+ON CONFLICT (job_name, recruitment_id)
+DO UPDATE SET
+ status = 'PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL;
+
+
+ 272
+ 208
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 10
+ 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 ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL
+ WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array'
+ THEN
+ ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0
+ ELSE
+ ri.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 ervu_dashboard.recruits_info ri
+
+)
+SELECT ti.recruit_id::uuid,
+ (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date,
+ ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type,
+ (ti.trud_deyat ->> 'prAktMestRab' = '1') 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' IS NOT NULL THEN 'Юридическое лицо'
+ WHEN ti.employer->'svedIP' IS NOT 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,
+ (
+ (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND
+ (
+ (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR
+ (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date
+ )
+ ) 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,
+ ti.reg_ip IS NOT NULL AS active_ip,
+ ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date,
+ ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date,
+ ti.self_employment IS NOT NULL AS active_self_employment
+FROM trud_info ti;
+
+ Y
+
+
+ 480
+ 208
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ personnel_event_date
+ personnel_event_date
+
+
+ personnel_event_type
+ personnel_event_type
+
+
+ current_workplace
+ current_workplace
+
+
+ position
+ position
+
+
+ employer_name
+ employer_name
+
+
+ employer_kpp
+ employer_kpp
+
+
+ employer_category
+ employer_category
+
+
+ employer_inn
+ employer_inn
+
+
+ employer_address
+ employer_address
+
+
+ employer_ogrnip
+ employer_ogrnip
+
+
+ employer_unit_type
+ employer_unit_type
+
+
+ employer_unit_address
+ employer_unit_address
+
+
+ parental_leave_start_date
+ parental_leave_start_date
+
+
+ parental_leave_end_date
+ parental_leave_end_date
+
+
+ parental_leave_active
+ parental_leave_active
+
+
+ reg_ip_date
+ reg_ip_date
+
+
+ dereg_ip_date
+ dereg_ip_date
+
+
+ ogrnip_ip
+ ogrnip_ip
+
+
+ active_ip
+ active_ip
+
+
+ reg_self_employment_date
+ reg_self_employment_date
+
+
+ dereg_self_employment_date
+ dereg_self_employment_date
+
+
+ active_self_employment
+ active_self_employment
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
citizen_work_activity
+ N
+ Y
+ N
+ Y
+
+
+ 704
+ 208
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl
new file mode 100644
index 0000000..c8787e1
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl
@@ -0,0 +1,360 @@
+
+
+
+ recruitment_five_flow_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/11 13:16:11.204
+ -
+ 2025/08/11 13:16:11.204
+
+
+
+
+
+ Table input
+ work_activity_flow_delta.hpl
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 2
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 3
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 4
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 5
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.idm_id as recruitment_id
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN public.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'work_activity_job'
+where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');
+ N
+
+
+ 352
+ 288
+
+
+
+ work_activity_flow_delta.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 128
+
+
+
+ work_activity_flow_delta.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 208
+
+
+
+ work_activity_flow_delta.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 288
+
+
+
+ work_activity_flow_delta.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 368
+
+
+
+ work_activity_flow_delta.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 448
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl
new file mode 100644
index 0000000..e1aeda3
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl
@@ -0,0 +1,360 @@
+
+
+
+ recruitment_five_flow_on_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 12:54:50.126
+ -
+ 2025/08/05 12:54:50.126
+
+
+
+
+
+ Table input
+ work_activity_flow_repeat.hpl
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 3
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 2
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 4
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 5
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.idm_id as recruitment_id
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN public.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'work_activity_job'
+where je.status is null or je.status in('ERROR', 'PROCESSING');
+ N
+
+
+ 272
+ 368
+
+
+
+ work_activity_flow_repeat.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 208
+
+
+
+ work_activity_flow_repeat.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 288
+
+
+
+ work_activity_flow_repeat.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 368
+
+
+
+ work_activity_flow_repeat.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 448
+
+
+
+ work_activity_flow_repeat.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 528
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl b/map_v1/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl
new file mode 100644
index 0000000..b1c9b40
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl
@@ -0,0 +1,356 @@
+
+
+
+ recruitments_five_flow
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/04/18 09:48:01.970
+ -
+ 2025/04/18 09:48:01.970
+
+
+
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 2
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 3
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 4
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 5
+ Y
+
+
+
+ Get all recruitments ordered by created_date
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+idm_id AS recruitment
+FROM ervu_dashboard.recruitment;
+ N
+
+
+ 432
+ 304
+
+
+
+ work_activity_flow.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 144
+
+
+
+ work_activity_flow.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 224
+
+
+
+ work_activity_flow.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 304
+
+
+
+ work_activity_flow.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 384
+
+
+
+ work_activity_flow.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 464
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/work_activity_job.hwf b/map_v1/info_recruits/citizen_tables/work_activity/work_activity_job.hwf
new file mode 100644
index 0000000..e384c46
--- /dev/null
+++ b/map_v1/info_recruits/citizen_tables/work_activity/work_activity_job.hwf
@@ -0,0 +1,309 @@
+
+
+ work_activity_job
+ Y
+
+
+
+ -
+ 2025/08/05 12:45:28.561
+ -
+ 2025/08/05 12:45:28.561
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 224
+ 304
+
+
+
+ check_if_ work_activity_job_was_executed.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 416
+ 304
+
+
+
+ work_activity_job_exists_check
+
+ SIMPLE_EVAL
+
+ boolean
+ false
+ equal
+ equal
+ N
+ variable
+ JOB_EXECUTED_FLAG
+ N
+ 688
+ 304
+
+
+
+ recruitments_five_flow.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 928
+ 304
+
+
+
+ recruitment_five_flow_on_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 928
+ 608
+
+
+
+ check_if_need_to_repeat_job.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 464
+
+
+
+ Simple evaluation
+
+ SIMPLE_EVAL
+
+ boolean
+ true
+ equal
+ equal
+ N
+ variable
+ NEED_TO_REPEAT_JOB
+ N
+ 688
+ 608
+
+
+
+ recruitment_five_flow_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 800
+
+
+
+
+
+ Start
+ check_if_ work_activity_job_was_executed.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_ work_activity_job_was_executed.hpl
+ work_activity_job_exists_check
+ Y
+ Y
+ N
+
+
+ work_activity_job_exists_check
+ recruitments_five_flow.hpl
+ Y
+ Y
+ N
+
+
+ work_activity_job_exists_check
+ check_if_need_to_repeat_job.hpl
+ Y
+ N
+ N
+
+
+ check_if_need_to_repeat_job.hpl
+ Simple evaluation
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_on_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_delta.hpl
+ Y
+ N
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 256
+ Первичка
+ 65
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 560
+ Повторка
+ 64
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 608
+ 720
+ Дельта
+ 49
+
+
+
+
diff --git a/map_v1/info_recruits/general_info_recruits_in_process.hpl b/map_v1/info_recruits/general_info_recruits_in_process.hpl
new file mode 100644
index 0000000..9dfaa63
--- /dev/null
+++ b/map_v1/info_recruits/general_info_recruits_in_process.hpl
@@ -0,0 +1,116 @@
+
+
+
+ general_info_recruits_in_process
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 13:57:15.223
+ -
+ 2025/06/11 13:57:15.223
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_general_info_recruits') AS job_name,
+ COALESCE(status, 'SUCCESS') AS status,
+ current_timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_general_info_recruits'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_general_info_recruits'
+ )
+) t
+ N
+
+
+ 384
+ 320
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ status
+ status
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ N
+
+
+ 832
+ 320
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/job_general_info_recruits.hwf b/map_v1/info_recruits/job_general_info_recruits.hwf
new file mode 100644
index 0000000..6835eac
--- /dev/null
+++ b/map_v1/info_recruits/job_general_info_recruits.hwf
@@ -0,0 +1,1312 @@
+
+
+ job_general_info_recruits
+ Y
+
+
+
+ 0
+ -
+ 2025/05/21 13:22:33.264
+ -
+ 2025/05/21 13:22:33.264
+
+
+ M_R_CR_DATE
+
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 720
+ 672
+
+
+
+ job_recruitment.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/recruitment/job_recruitment.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1552
+ 672
+
+
+
+ job_recruits_info.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2112
+ 352
+
+
+
+ job_citizen.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2080
+ 464
+
+
+
+ job_recruit_create_date.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/job_recruit_create_date.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1792
+ 672
+
+
+
+ branching_job_general_info_recruits.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/branching_job_general_info_recruits.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 944
+ 672
+
+
+
+ IF job_general_info_recruits SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1280
+ 672
+
+
+
+ IF job_general_info_recruits ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1248
+ 1552
+
+
+
+ job_recruitment.hwf 2
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/recruitment/job_recruitment.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1488
+ 1552
+
+
+
+ job_recruits_info.hwf 2
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2000
+ 1264
+
+
+
+ row_last_recruit_create_date.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1712
+ 1552
+
+
+
+ Write to log
+
+ WRITE_TO_LOG
+
+ Basic
+ ${M_R_CR_DATE}
+
+ N
+ 1808
+ 1360
+
+
+
+ job_citizen.hwf 2
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2000
+ 1408
+
+
+
+ job_parallel_recruits_info_citizen.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/job_parallel_recruits_info_citizen.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2048
+ 672
+
+
+
+ job_parallel_recruits_info_citizen.hwf 2
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/job_parallel_recruits_info_citizen.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2000
+ 1552
+
+
+
+ job_info_recruits_from_json.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/job_info_recruits_from_json.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 672
+
+
+
+ change_status_job_general_info_recruits_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4000
+ 672
+
+
+
+ check_status_parallel_recruits_info_citizen.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 672
+
+
+
+ IF job_parallel_recruits_info_citizen ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2704
+ 528
+
+
+
+ IF job_parallel_recruits_info_citizen SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2704
+ 672
+
+
+
+ Abort parallel_recruits_info_citizen
+
+ ABORT
+
+ N
+ N
+ 3360
+ 528
+
+
+
+ check_status_job_info_recruits_from_json.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3296
+ 672
+
+
+
+ IF job_info_recruits_from_json ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 3632
+ 528
+
+
+
+ IF job_info_recruits_from_json SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 3632
+ 672
+
+
+
+ Abort job_info_recruits_from_json
+
+ ABORT
+
+ N
+ N
+ 4304
+ 528
+
+
+
+ Success job_general_info_recruits
+
+ SUCCESS
+
+ N
+ 4320
+ 672
+
+
+
+ change_status_job_general_info_recruits_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3984
+ 528
+
+
+
+ change_status_job_general_info_recruits_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3040
+ 528
+
+
+
+ check_status_parallel_recruits_info_citizen.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2336
+ 1552
+
+
+
+ IF job_parallel_recruits_info_citizen ERROR 2
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2656
+ 1408
+
+
+
+ IF job_parallel_recruits_info_citizen SUCCESS 2
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2656
+ 1552
+
+
+
+ job_info_recruits_from_json.hwf 2
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/job_info_recruits_from_json.hwf
+
+
+ Nothing
+
+
+ M_R_CR_DATE
+
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1552
+
+
+
+ change_status_job_general_info_recruits_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4000
+ 1552
+
+
+
+ Abort parallel_recruits_info_citizen 2
+
+ ABORT
+
+ N
+ N
+ 3360
+ 1408
+
+
+
+ check_status_job_info_recruits_from_json.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3296
+ 1552
+
+
+
+ IF job_info_recruits_from_json ERROR 2
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 3632
+ 1408
+
+
+
+ IF job_info_recruits_from_json SUCCESS 2
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 3632
+ 1552
+
+
+
+ Abort job_info_recruits_from_json 2
+
+ ABORT
+
+ N
+ N
+ 4304
+ 1408
+
+
+
+ Success job_general_info_recruits 2
+
+ SUCCESS
+
+ N
+ 4320
+ 1552
+
+
+
+ change_status_job_general_info_recruits_error.hpl 3
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3984
+ 1408
+
+
+
+ change_status_job_general_info_recruits_error.hpl 2 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3040
+ 1408
+
+
+
+
+
+ job_recruitment.hwf
+ job_recruit_create_date.hwf
+ Y
+ Y
+ N
+
+
+ job_recruit_create_date.hwf
+ job_recruits_info.hwf
+ N
+ Y
+ Y
+
+
+ Start
+ branching_job_general_info_recruits.hpl
+ Y
+ Y
+ Y
+
+
+ branching_job_general_info_recruits.hpl
+ IF job_general_info_recruits SUCCESS
+ Y
+ N
+ Y
+
+
+ IF job_general_info_recruits SUCCESS
+ job_recruitment.hwf
+ Y
+ Y
+ N
+
+
+ branching_job_general_info_recruits.hpl
+ IF job_general_info_recruits ERROR
+ Y
+ N
+ Y
+
+
+ IF job_general_info_recruits ERROR
+ job_recruitment.hwf 2
+ Y
+ Y
+ N
+
+
+ job_recruitment.hwf 2
+ row_last_recruit_create_date.hpl
+ Y
+ Y
+ N
+
+
+ row_last_recruit_create_date.hpl
+ job_recruits_info.hwf 2
+ N
+ N
+ Y
+
+
+ row_last_recruit_create_date.hpl
+ Write to log
+ N
+ Y
+ N
+
+
+ job_recruit_create_date.hwf
+ job_citizen.hwf
+ N
+ N
+ Y
+
+
+ row_last_recruit_create_date.hpl
+ job_citizen.hwf 2
+ N
+ N
+ Y
+
+
+ job_recruit_create_date.hwf
+ job_parallel_recruits_info_citizen.hwf
+ Y
+ Y
+ N
+
+
+ row_last_recruit_create_date.hpl
+ job_parallel_recruits_info_citizen.hwf 2
+ Y
+ Y
+ N
+
+
+ job_parallel_recruits_info_citizen.hwf
+ check_status_parallel_recruits_info_citizen.hpl
+ Y
+ Y
+ N
+
+
+ IF job_parallel_recruits_info_citizen SUCCESS
+ job_info_recruits_from_json.hwf
+ Y
+ Y
+ N
+
+
+ check_status_parallel_recruits_info_citizen.hpl
+ IF job_parallel_recruits_info_citizen ERROR
+ Y
+ N
+ Y
+
+
+ check_status_parallel_recruits_info_citizen.hpl
+ IF job_parallel_recruits_info_citizen SUCCESS
+ Y
+ N
+ Y
+
+
+ job_info_recruits_from_json.hwf
+ check_status_job_info_recruits_from_json.hpl
+ Y
+ Y
+ N
+
+
+ check_status_job_info_recruits_from_json.hpl
+ IF job_info_recruits_from_json SUCCESS
+ Y
+ N
+ Y
+
+
+ check_status_job_info_recruits_from_json.hpl
+ IF job_info_recruits_from_json ERROR
+ Y
+ N
+ Y
+
+
+ IF job_info_recruits_from_json SUCCESS
+ change_status_job_general_info_recruits_success.hpl
+ Y
+ Y
+ N
+
+
+ change_status_job_general_info_recruits_success.hpl
+ Success job_general_info_recruits
+ Y
+ Y
+ N
+
+
+ IF job_info_recruits_from_json ERROR
+ change_status_job_general_info_recruits_error.hpl
+ Y
+ Y
+ N
+
+
+ change_status_job_general_info_recruits_error.hpl
+ Abort job_info_recruits_from_json
+ Y
+ Y
+ Y
+
+
+ IF job_parallel_recruits_info_citizen ERROR
+ change_status_job_general_info_recruits_error.hpl 2
+ Y
+ Y
+ N
+
+
+ change_status_job_general_info_recruits_error.hpl 2
+ Abort parallel_recruits_info_citizen
+ Y
+ Y
+ Y
+
+
+ check_status_parallel_recruits_info_citizen.hpl 2
+ IF job_parallel_recruits_info_citizen ERROR 2
+ Y
+ N
+ Y
+
+
+ check_status_parallel_recruits_info_citizen.hpl 2
+ IF job_parallel_recruits_info_citizen SUCCESS 2
+ Y
+ N
+ Y
+
+
+ job_parallel_recruits_info_citizen.hwf 2
+ check_status_parallel_recruits_info_citizen.hpl 2
+ Y
+ Y
+ N
+
+
+ job_info_recruits_from_json.hwf 2
+ check_status_job_info_recruits_from_json.hpl 2
+ Y
+ Y
+ N
+
+
+ change_status_job_general_info_recruits_success.hpl 2
+ Success job_general_info_recruits 2
+ Y
+ Y
+ N
+
+
+ check_status_job_info_recruits_from_json.hpl 2
+ IF job_info_recruits_from_json ERROR 2
+ Y
+ N
+ Y
+
+
+ check_status_job_info_recruits_from_json.hpl 2
+ IF job_info_recruits_from_json SUCCESS 2
+ Y
+ N
+ Y
+
+
+ IF job_info_recruits_from_json ERROR 2
+ change_status_job_general_info_recruits_error.hpl 3
+ Y
+ Y
+ N
+
+
+ IF job_info_recruits_from_json SUCCESS 2
+ change_status_job_general_info_recruits_success.hpl 2
+ Y
+ Y
+ N
+
+
+ change_status_job_general_info_recruits_error.hpl 3
+ Abort job_info_recruits_from_json 2
+ Y
+ Y
+ Y
+
+
+ change_status_job_general_info_recruits_error.hpl 2 2
+ Abort parallel_recruits_info_citizen 2
+ Y
+ Y
+ Y
+
+
+ IF job_parallel_recruits_info_citizen ERROR 2
+ change_status_job_general_info_recruits_error.hpl 2 2
+ Y
+ Y
+ N
+
+
+ IF job_parallel_recruits_info_citizen SUCCESS 2
+ job_info_recruits_from_json.hwf 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 42
+ 1584
+ 608
+ зачистка таблицы военкоматов
+и загрузка ervu_dashboard.recruitment
+ 219
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 74
+ 1280
+ 432
+ ОБЯЗАТЕЛЬНО ЗАФИКСИРОВАТЬ ПОСЛЕДНИЮЮ ДАТУ СОЗДАНИЯ РЕКРУТА(из бд ervu_person_registry) В БД ervu_dashboard,
+ЗАТЕМ ИДТИ ЗА ЭТОЙ ДАТОЙ ПЕРЕД СЕЛЕКТОМ.
+СЕЛЕКТЫ РЕКРУТОВ ПРОИЗВОДИТЬ НЕ БОЛЬШЕ ЭТОЙ ДАТЫ.
+Для чего? - чтобы не терять рекрутов.
+ 714
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 42
+ 1648
+ 1488
+ зачистка таблицы военкоматов
+и загрузка ervu_dashboard.recruitment
+ 219
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 2880
+ 624
+ тут все джожбы которые парсят json
+ 212
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 2880
+ 1504
+ тут все джожбы которые парсят json
+ 212
+
+
+
+
diff --git a/map_v1/info_recruits/job_info_recruits_from_json.hwf b/map_v1/info_recruits/job_info_recruits_from_json.hwf
new file mode 100644
index 0000000..c852794
--- /dev/null
+++ b/map_v1/info_recruits/job_info_recruits_from_json.hwf
@@ -0,0 +1,529 @@
+
+
+ job_info_recruits_from_json
+ Y
+
+
+
+ -
+ 2025/06/10 13:13:23.644
+ -
+ 2025/06/10 13:13:23.644
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 496
+ 400
+
+
+
+ job_child.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/job_child.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 80
+
+
+
+ job_citizen_guardianship.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 160
+
+
+
+ job_passport.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/passport/job_passport.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 240
+
+
+
+ job_citizen_spouse.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf
+ Nothing
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 320
+
+
+
+ job_prosecution.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/job_prosecution.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 400
+
+
+
+ job_snils_inn.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf
+ Nothing
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 560
+
+
+
+ job_citizen_liability_fz53.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 640
+
+
+
+ job_citizen_criminal_liability_fz53.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 720
+
+
+
+ job_citizen_appealing_violations_fz53.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf
+ Nothing
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 800
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1168
+ 400
+
+
+
+ job_punishment.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/job_punishment.hwf
+ Nothing
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 480
+
+
+
+
+
+ Start
+ job_child.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_citizen_guardianship.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_passport.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_citizen_spouse.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_prosecution.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_snils_inn.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_citizen_liability_fz53.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_citizen_criminal_liability_fz53.hwf
+ Y
+ Y
+ Y
+
+
+ Start
+ job_citizen_appealing_violations_fz53.hwf
+ Y
+ Y
+ Y
+
+
+ job_prosecution.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_citizen_spouse.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_passport.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_citizen_guardianship.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_child.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_snils_inn.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_citizen_liability_fz53.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_citizen_criminal_liability_fz53.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ job_citizen_appealing_violations_fz53.hwf
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ job_punishment.hwf
+ Y
+ Y
+ Y
+
+
+ job_punishment.hwf
+ Success
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 976
+ 48
+ в следующий пайплайн(check_status_job_info_recruits_from_json.hpl) родительского воркфлоу вписать новый созданный воркфлоу, который создан тут
+ 849
+
+
+
+
diff --git a/map_v1/info_recruits/job_parallel_recruits_info_citizen.hwf b/map_v1/info_recruits/job_parallel_recruits_info_citizen.hwf
new file mode 100644
index 0000000..f0fd3b4
--- /dev/null
+++ b/map_v1/info_recruits/job_parallel_recruits_info_citizen.hwf
@@ -0,0 +1,190 @@
+
+
+ job_parallel_recruits_info_citizen
+ Y
+
+
+
+ -
+ 2025/06/04 13:12:14.544
+ -
+ 2025/06/04 13:12:14.544
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 208
+ 384
+
+
+
+ job_citizen.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf
+
+
+ Nothing
+
+
+ M_R_CR_DATE
+
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 304
+
+
+
+ job_recruits_info.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
+
+
+ Nothing
+
+
+ M_R_CR_DATE
+
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 480
+
+
+
+ Success job_citizen
+
+ SUCCESS
+
+ N
+ 944
+ 304
+
+
+
+ Success job_recruits_info
+
+ SUCCESS
+
+ N
+ 944
+ 480
+
+
+
+ job_recruit_last_update_date.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 384
+ 384
+
+
+
+
+
+ job_citizen.hwf
+ Success job_citizen
+ Y
+ Y
+ N
+
+
+ job_recruits_info.hwf
+ Success job_recruits_info
+ Y
+ Y
+ N
+
+
+ Start
+ job_recruit_last_update_date.hwf
+ Y
+ Y
+ Y
+
+
+ job_recruit_last_update_date.hwf
+ job_citizen.hwf
+ Y
+ Y
+ Y
+
+
+ job_recruit_last_update_date.hwf
+ job_recruits_info.hwf
+ Y
+ N
+ Y
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/main_profile/main_profile.hpl b/map_v1/info_recruits/main_profile/main_profile.hpl
new file mode 100644
index 0000000..5f98414
--- /dev/null
+++ b/map_v1/info_recruits/main_profile/main_profile.hpl
@@ -0,0 +1,265 @@
+
+
+
+ main_profile
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/17 10:17:01.438
+ -
+ 2025/06/17 10:17:01.438
+
+
+
+
+
+ Table input main profile
+ Table output
+ N
+
+
+ Table input main profile
+ Value mapper main profile
+ Y
+
+
+ Value mapper main profile
+ Insert / update main profile
+ Y
+
+
+
+ Insert / update main profile
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ appeals
+
main_profile
+
+ age
+ avg_age
+ Y
+
+
+ child_min_18
+ avg_children
+ Y
+
+
+ education
+ most_common_education_group
+ Y
+
+
+ employment
+ most_common_employment
+ Y
+
+
+ gender
+ most_common_gender
+ Y
+
+
+ recording_date
+ recording_date
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ Y
+
+
+ schema
+ schema
+ Y
+
+
+ N
+
+
+ 800
+ 256
+
+
+
+ Table input main profile
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ c.recruitment_id,
+ ROUND(AVG(DATE_PART('year', AGE(CURRENT_DATE, c.birth_date)))::numeric, 0) AS avg_age,
+ MODE() WITHIN GROUP (ORDER BY c.gender) AS most_common_gender,
+ MODE() WITHIN GROUP (ORDER BY c.employment) AS most_common_employment,
+ ROUND(AVG(COALESCE(child_counts.child_count, 0))::numeric, 0) AS avg_children,
+ MODE() WITHIN GROUP (ORDER BY education_groups.highest_group) AS most_common_education_group,
+ current_date recording_date,
+ 'Department' as schema
+FROM citizen c
+LEFT JOIN (
+ SELECT
+ recruit_id,
+ COUNT(*) AS child_count
+ FROM citizen_child
+ WHERE death_date IS NULL
+ AND DATE_PART('year', AGE(CURRENT_DATE, birth_date)) < 18
+ GROUP BY recruit_id
+) child_counts ON c.recruit_id = child_counts.recruit_id
+LEFT JOIN (
+ SELECT
+ recruit_id,
+ MIN(CASE
+ WHEN education_level_code IN ('1', '2', '3', '4', '5') THEN 1 -- Высшее
+ WHEN education_level_code IN ('10', '11') THEN 2 -- Среднее проф.
+ WHEN education_level_code IN ('7', '9') THEN 3 -- Общее
+ ELSE 4 -- Прочее/неизвестное
+ END) AS highest_group
+ FROM citizen_foreign_education_diploma
+ GROUP BY recruit_id
+) education_groups ON c.recruit_id = education_groups.recruit_id
+join appeals.appeals_list al on c.system_esia_id = al.system_esia_id
+GROUP BY c.recruitment_id
+HAVING c.recruitment_id IS NOT NULL;
+ N
+
+
+ 304
+ 256
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ gender
+ most_common_gender
+
+
+ age
+ avg_age
+
+
+ education
+ most_common_education_group
+
+
+ employment
+ most_common_employment
+
+
+ child_min_18
+ avg_children
+
+
+ schema
+ schema
+
+
+ recruitment_id
+ recruitment_id
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ appeals
+ Y
+
main_profile
+ N
+ Y
+ N
+ Y
+
+
+ 560
+ 400
+
+
+
+ Value mapper main profile
+ ValueMapper
+
+ Y
+
+ 1
+
+ none
+
+
+ most_common_education_group
+
+
+ 1
+ Высшее
+
+
+ 2
+ Среднее проф.
+
+
+ 3
+ Общее
+
+
+
+
+ 528
+ 256
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/main_profile/main_profile.hwf b/map_v1/info_recruits/main_profile/main_profile.hwf
new file mode 100644
index 0000000..45ddbd8
--- /dev/null
+++ b/map_v1/info_recruits/main_profile/main_profile.hwf
@@ -0,0 +1,126 @@
+
+
+ main_profile
+ Y
+
+
+
+ -
+ 2025/06/17 10:16:58.535
+ -
+ 2025/06/17 10:16:58.535
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 192
+ 368
+
+
+
+ main_profile.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/main_profile/main_profile.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 336
+ 368
+
+
+
+ nlvl_main_profile.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/main_profile/nlvl_main_profile.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 496
+ 368
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 656
+ 368
+
+
+
+
+
+ Start
+ main_profile.hpl
+ Y
+ Y
+ Y
+
+
+ main_profile.hpl
+ nlvl_main_profile.hpl
+ Y
+ Y
+ N
+
+
+ nlvl_main_profile.hpl
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/main_profile/nlvl_main_profile.hpl b/map_v1/info_recruits/main_profile/nlvl_main_profile.hpl
new file mode 100644
index 0000000..1be13c2
--- /dev/null
+++ b/map_v1/info_recruits/main_profile/nlvl_main_profile.hpl
@@ -0,0 +1,210 @@
+
+
+
+ nlvl_main_profile
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/17 10:49:22.576
+ -
+ 2025/06/17 10:49:22.576
+
+
+
+
+
+ Table input nlvl main profile
+ Insert / update nlvl main profile
+ Y
+
+
+
+ Table input nlvl main profile
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ --- next_level_org
+
+WITH latest_hierarchy AS (
+ -- Берем только записи с максимальной версией для каждого idm_id
+ SELECT DISTINCT ON (idm_id) *
+ FROM ervu_dashboard.recruitment
+ ORDER BY idm_id
+),
+latest_date AS (
+ -- Определяем последнюю дату загрузки
+ SELECT MAX(recording_date) AS max_date FROM appeals.main_profile
+),
+filtered_records AS (
+ -- Фильтруем данные, оставляя только записи с последней датой загрузки
+ SELECT id_main_profile, gender, age, child_min_18, education, employment, recording_date, recruitment_id, "schema" FROM appeals.main_profile
+ WHERE recording_date = (SELECT max_date FROM latest_date)
+),
+hierarchy_cte AS (
+ -- Строим связи между уровнями (Department → Organization → Region → Ministry)
+ SELECT
+ h.idm_id AS department_id,
+ h.parent_id AS organization_id,
+ h2.parent_id AS region_id,
+ h3.parent_id AS ministry_id
+ FROM latest_hierarchy h
+ LEFT JOIN latest_hierarchy h2 ON h.parent_id = h2.idm_id -- Organization
+ LEFT JOIN latest_hierarchy h3 ON h2.parent_id = h3.idm_id -- Region
+ WHERE h.schema = 'Department' -- Начинаем с Department
+),
+aggregated_counts AS (
+ -- Агрегируем для Organization
+ SELECT
+ h.organization_id AS level_id,
+ ROUND(AVG(age)::numeric, 0) avg_age,
+ MODE() WITHIN GROUP (ORDER BY gender) AS most_common_gender,
+ MODE() WITHIN GROUP (ORDER BY employment) AS most_common_employment,
+ ROUND(AVG(child_min_18)::numeric, 0) AS avg_child_min_18,
+ MODE() WITHIN GROUP (ORDER BY education) AS most_common_education,
+ MAX(r.recording_date) as recording_date,
+ 'Organization' AS level
+ FROM filtered_records r
+ JOIN hierarchy_cte h ON r.recruitment_id = h.department_id
+ WHERE h.organization_id IS NOT NULL
+ GROUP BY h.organization_id
+
+ UNION ALL
+
+ -- Агрегируем для Region
+ SELECT
+ h.region_id AS level_id,
+ ROUND(AVG(age)::numeric, 0) avg_age,
+ MODE() WITHIN GROUP (ORDER BY gender) AS most_common_gender,
+ MODE() WITHIN GROUP (ORDER BY employment) AS most_common_employment,
+ ROUND(AVG(child_min_18)::numeric, 0) AS avg_child_min_18,
+ MODE() WITHIN GROUP (ORDER BY education) AS most_common_education,
+ MAX(r.recording_date) as recording_date,
+ 'Region' AS level
+ FROM filtered_records r
+ JOIN hierarchy_cte h ON r.recruitment_id = h.department_id
+ WHERE h.region_id IS NOT NULL
+ GROUP BY h.region_id
+
+ UNION ALL
+
+ -- Агрегируем для Ministry
+ SELECT
+ h.ministry_id AS level_id,
+ ROUND(AVG(age)::numeric, 0) avg_age,
+ MODE() WITHIN GROUP (ORDER BY gender) AS most_common_gender,
+ MODE() WITHIN GROUP (ORDER BY employment) AS most_common_employment,
+ ROUND(AVG(child_min_18)::numeric, 0) AS avg_child_min_18,
+ MODE() WITHIN GROUP (ORDER BY education) AS most_common_education,
+ MAX(r.recording_date) as recording_date,
+ 'Ministry' AS level
+ FROM filtered_records r
+ JOIN hierarchy_cte h ON r.recruitment_id = h.department_id
+ WHERE h.ministry_id IS NOT NULL
+ GROUP BY h.ministry_id
+)
+SELECT * FROM aggregated_counts;
+
+ N
+
+
+ 608
+ 352
+
+
+
+ Insert / update nlvl main profile
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ level_id
+
+
+
+ =
+ recording_date
+ recording_date
+
+
+ appeals
+
main_profile
+
+ age
+ avg_age
+ Y
+
+
+ child_min_18
+ avg_child_min_18
+ Y
+
+
+ education
+ most_common_education
+ Y
+
+
+ employment
+ most_common_employment
+ Y
+
+
+ gender
+ most_common_gender
+ Y
+
+
+ recording_date
+ recording_date
+ Y
+
+
+ schema
+ level
+ Y
+
+
+ recruitment_id
+ level_id
+ Y
+
+
+ N
+
+
+ 784
+ 368
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl b/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl b/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf
rename to map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf
diff --git a/mappings/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf b/map_v1/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf
rename to map_v1/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf
diff --git a/mappings/info_recruits/raw_data/info_recruits/job_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
similarity index 99%
rename from mappings/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
rename to map_v1/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
index 2fc61be..c9b5aec 100644
--- a/mappings/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
+++ b/map_v1/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
@@ -1891,7 +1891,7 @@
variableSTATUSN
- 1840
+ 18242944
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl b/map_v1/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl b/map_v1/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl
diff --git a/mappings/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl b/map_v1/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl
similarity index 100%
rename from mappings/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl
rename to map_v1/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl
diff --git a/map_v1/info_recruits/recruitment/job_recruitment.hwf b/map_v1/info_recruits/recruitment/job_recruitment.hwf
new file mode 100644
index 0000000..2c7cb84
--- /dev/null
+++ b/map_v1/info_recruits/recruitment/job_recruitment.hwf
@@ -0,0 +1,144 @@
+
+
+ job_recruitment
+ Y
+
+
+
+ -
+ 2024/08/16 15:32:20.489
+ -
+ 2024/08/16 15:32:20.489
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 96
+ 224
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 768
+ 224
+
+
+
+ recruitment.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/recruitment/recruitment.hpl
+
+
+ Basic
+
+
+ CR_DATE
+ CREATE_DATE
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 592
+ 224
+
+
+
+ recruitment_param_create_date.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/recruitment/recruitment_param_create_date.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 336
+ 224
+
+
+
+
+
+ recruitment.hpl
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ recruitment_param_create_date.hpl
+ Y
+ Y
+ Y
+
+
+ recruitment_param_create_date.hpl
+ recruitment.hpl
+ Y
+ Y
+ N
+
+
+
+
+
+
+ METASTORE.pentaho
+
+ Default Run Configuration
+ {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null}
+
+
+
+ {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"}
+
+ Pentaho local
+ {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]}
+
+
+
+
diff --git a/map_v1/info_recruits/recruitment/recruitment.hpl b/map_v1/info_recruits/recruitment/recruitment.hpl
new file mode 100644
index 0000000..9a82266
--- /dev/null
+++ b/map_v1/info_recruits/recruitment/recruitment.hpl
@@ -0,0 +1,204 @@
+
+
+
+ recruitment
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/15 14:02:51.713
+ -
+ 2024/08/15 14:02:51.713
+
+
+
+
+
+ Table input
+ Table output
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ idm_id
+ idm_id
+
+ ervu_dashboard
+
recruitment
+
+ id
+ id
+ Y
+
+
+ parent_id
+ parent_id
+ Y
+
+
+ schema
+ schema
+ Y
+
+
+ shortname
+ shortname
+ Y
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ idm_id
+ idm_id
+ N
+
+
+ code
+ code
+ Y
+
+
+ created_at
+ created_at
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ enabled
+ enabled
+ Y
+
+
+ reports_enabled
+ reports_enabled
+ Y
+
+
+ N
+
+
+ 512
+ 208
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ SELECT
+ rt.id,
+ rt.fullname as shortname,
+ rt.parent_id,
+ rt.idm_id,
+ rt.schema,
+ rt.military_code AS code,
+ rt.created_at,
+ rt.updated_at,
+ rt.hidden,
+ rt.enabled,
+ rt.reports_enabled--,
+ --ROW_NUMBER() OVER (ORDER BY rt.idm_id) AS rn_recruitment
+FROM
+ public.recruitment rt
+WHERE
+ rt.idm_id ~ '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
+ AND '${CR_DATE}' < rt.created_at
+ AND (rt.schema = 'Ministry' OR (rt.schema IS NOT NULL AND rt.parent_id IS NOT NULL))
+ AND rt.hidden IS NOT TRUE
+ AND (
+ rt.fullname ILIKE '%военный%'
+ OR
+ rt.fullname ILIKE '%округ%'
+ OR
+ rt.fullname ILIKE '%министерство%'
+)
+ AND rt.fullname NOT ILIKE '%тест%'
+ Y
+
+
+ 208
+ 208
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ N
+
recruitment
+ N
+ Y
+ N
+ Y
+
+
+ 480
+ 320
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/recruitment/recruitment_param_create_date.hpl b/map_v1/info_recruits/recruitment/recruitment_param_create_date.hpl
new file mode 100644
index 0000000..45843bc
--- /dev/null
+++ b/map_v1/info_recruits/recruitment/recruitment_param_create_date.hpl
@@ -0,0 +1,76 @@
+
+
+
+ recruitment_param_create_date
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 17:32:05.740
+ -
+ 2025/05/21 17:32:05.740
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 768
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ CASE
+ WHEN count(*)>0 THEN max(created_at)::timestamp
+ ELSE '0001-01-01 00:00:00'::timestamp
+ END AS CREATE_DATE
+FROM ervu_dashboard.recruitment
+ N
+
+
+ 496
+ 336
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/supportive_jobs/job_create_files.hwf b/map_v1/info_recruits/supportive_jobs/job_create_files.hwf
new file mode 100644
index 0000000..3e8f21c
--- /dev/null
+++ b/map_v1/info_recruits/supportive_jobs/job_create_files.hwf
@@ -0,0 +1,215 @@
+
+
+ job_create_files
+ Y
+
+
+
+ -
+ 2025/05/26 16:45:11.777
+ -
+ 2025/05/26 16:45:11.777
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 720
+ 528
+
+
+
+ job_create_files_recruits_info.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 944
+ 528
+
+
+
+ Success job_create_files_recruits_info.hwf
+
+ SUCCESS
+
+ N
+ 1216
+ 528
+
+
+
+ job_create_files_citizen.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 944
+ 608
+
+
+
+ job_create_files_child.hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 944
+ 688
+
+
+
+ state_job_general_info_recruits_error 3
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "SUCCESS",
+ "pipeline": "job_general_info_recruits"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/checkpoints/state_job_general_info_recruits.json
+ N
+ 944
+ 768
+
+
+
+
+
+ Start
+ job_create_files_recruits_info.hwf
+ Y
+ Y
+ Y
+
+
+ job_create_files_recruits_info.hwf
+ Success job_create_files_recruits_info.hwf
+ Y
+ Y
+ N
+
+
+ Start
+ job_create_files_citizen.hwf
+ Y
+ Y
+ Y
+
+
+ job_create_files_citizen.hwf
+ Success job_create_files_recruits_info.hwf
+ Y
+ Y
+ N
+
+
+ Start
+ job_create_files_child.hwf
+ Y
+ Y
+ Y
+
+
+ job_create_files_child.hwf
+ Success job_create_files_recruits_info.hwf
+ Y
+ Y
+ N
+
+
+ Start
+ state_job_general_info_recruits_error 3
+ Y
+ Y
+ Y
+
+
+ state_job_general_info_recruits_error 3
+ Success job_create_files_recruits_info.hwf
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 832
+ 480
+ тут будут все workflow на создание файлов
+ 247
+
+
+
+
diff --git a/map_v1/info_recruits/supportive_jobs/job_create_files_for_test.hwf b/map_v1/info_recruits/supportive_jobs/job_create_files_for_test.hwf
new file mode 100644
index 0000000..8367208
--- /dev/null
+++ b/map_v1/info_recruits/supportive_jobs/job_create_files_for_test.hwf
@@ -0,0 +1,145 @@
+
+
+ job_create_files_for_test
+ Y
+
+
+
+ -
+ 2025/06/04 16:51:54.189
+ -
+ 2025/06/04 16:51:54.189
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 544
+ 368
+
+
+
+ state_job_citizen_success
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "SUCCESS",
+ "pipeline": "job_citizen"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/checkpoints/state_job_citizen.json
+ N
+ 752
+ 368
+
+
+
+ state_job_recruits_info_success 2
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "SUCCESS",
+ "pipeline": "job_recruits_info"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_job_recruits_info.json
+ N
+ 752
+ 448
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1008
+ 448
+
+
+
+ state_job_child_success
+
+ WRITE_TO_FILE
+
+ N
+ {
+ "status": "SUCCESS",
+ "pipeline": "job_child"
+}
+ N
+ UTF-8
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json
+ N
+ 752
+ 288
+
+
+
+
+
+ Start
+ state_job_citizen_success
+ Y
+ Y
+ Y
+
+
+ Start
+ state_job_recruits_info_success 2
+ Y
+ Y
+ Y
+
+
+ state_job_citizen_success
+ Success
+ Y
+ Y
+ N
+
+
+ state_job_recruits_info_success 2
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ state_job_child_success
+ Y
+ Y
+ Y
+
+
+ state_job_child_success
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/supportive_jobs/job_recruit_create_date.hwf b/map_v1/info_recruits/supportive_jobs/job_recruit_create_date.hwf
new file mode 100644
index 0000000..7e7b7bf
--- /dev/null
+++ b/map_v1/info_recruits/supportive_jobs/job_recruit_create_date.hwf
@@ -0,0 +1,124 @@
+
+
+ job_recruit_create_date
+ Y
+
+
+
+ -
+ 2025/05/29 14:25:10.488
+ -
+ 2025/05/29 14:25:10.488
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 416
+ 352
+
+
+
+ recruit_create_date_person_registry.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 640
+ 352
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1152
+ 352
+
+
+
+ row_last_recruit_create_date.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 912
+ 352
+
+
+
+
+
+ Start
+ recruit_create_date_person_registry.hpl
+ Y
+ Y
+ Y
+
+
+ recruit_create_date_person_registry.hpl
+ row_last_recruit_create_date.hpl
+ Y
+ Y
+ N
+
+
+ row_last_recruit_create_date.hpl
+ Success
+ Y
+ Y
+ Y
+
+
+
+
+
+
diff --git a/map_v1/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl b/map_v1/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl
new file mode 100644
index 0000000..dcc73d6
--- /dev/null
+++ b/map_v1/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl
@@ -0,0 +1,95 @@
+
+
+
+ recruit_create_date_person_registry
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/29 14:31:18.657
+ -
+ 2025/05/29 14:31:18.657
+
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ SELECT
+ system_create_date,
+ system_update_date,
+ current_timestamp AS record_created,
+ 'job_general_info_recruits' AS workflow
+FROM public.recruits
+WHERE system_create_date = (SELECT MAX(system_create_date) FROM public.recruits)
+limit 1
+ N
+
+
+ 432
+ 352
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
+
+ N
+ Y
+ N
+ Y
+
+
+ 1280
+ 304
+
+
+
+ Table output action
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+
+ Y
+
+ N
+ public
+ N
+
action_logs
+
+ N
+ Y
+ N
+ Y
+
+
+ 1280
+ 432
+
+
+
+
+
+
diff --git a/map_v1/log_jobs/log_job_info_recruits.txt b/map_v1/log_jobs/log_job_info_recruits.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/log_jobs/log_job_info_recruits_once.txt b/map_v1/log_jobs/log_job_info_recruits_once.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/log_jobs/log_job_ratings.txt b/map_v1/log_jobs/log_job_ratings.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/log_jobs/log_job_recruitments_all.txt b/map_v1/log_jobs/log_job_recruitments_all.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/log_jobs/log_job_recruitments_country.txt b/map_v1/log_jobs/log_job_recruitments_country.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/log_jobs/log_job_recruitments_milcom.txt b/map_v1/log_jobs/log_job_recruitments_milcom.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/log_jobs/log_job_recruitments_mildis.txt b/map_v1/log_jobs/log_job_recruitments_mildis.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/log_jobs/log_job_recruitments_region.txt b/map_v1/log_jobs/log_job_recruitments_region.txt
new file mode 100644
index 0000000..e69de29
diff --git a/map_v1/metadata/pipeline-run-configuration/local.json b/map_v1/metadata/pipeline-run-configuration/local.json
new file mode 100644
index 0000000..d6b7ca4
--- /dev/null
+++ b/map_v1/metadata/pipeline-run-configuration/local.json
@@ -0,0 +1,20 @@
+{
+ "engineRunConfiguration": {
+ "Local": {
+ "feedback_size": "50000",
+ "sample_size": "100",
+ "sample_type_in_gui": "Last",
+ "wait_time": "20",
+ "rowset_size": "10000",
+ "safe_mode": false,
+ "show_feedback": false,
+ "topo_sort": false,
+ "gather_metrics": false,
+ "transactional": false
+ }
+ },
+ "defaultSelection": true,
+ "configurationVariables": [],
+ "name": "local",
+ "description": "Runs your pipelines locally with the standard local Hop pipeline engine"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/118_ervu-person-registry.json b/map_v1/metadata/rdbms/118_ervu-person-registry.json
new file mode 100644
index 0000000..f58b973
--- /dev/null
+++ b/map_v1/metadata/rdbms/118_ervu-person-registry.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "ervu-person-registry",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "10.10.31.118",
+ "password": "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb",
+ "pluginName": "PostgreSQL",
+ "port": "5432",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "postgres"
+ }
+ },
+ "name": "118_ervu-person-registry"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/118_ervu-subpoena-registry.json b/map_v1/metadata/rdbms/118_ervu-subpoena-registry.json
new file mode 100644
index 0000000..f2bd116
--- /dev/null
+++ b/map_v1/metadata/rdbms/118_ervu-subpoena-registry.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "ervu-subpoena-registry",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "10.10.31.118",
+ "password": "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb",
+ "pluginName": "PostgreSQL",
+ "port": "5432",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "postgres"
+ }
+ },
+ "name": "118_ervu-subpoena-registry"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/119_ervu-dashboard-copy.json b/map_v1/metadata/rdbms/119_ervu-dashboard-copy.json
new file mode 100644
index 0000000..25ade15
--- /dev/null
+++ b/map_v1/metadata/rdbms/119_ervu-dashboard-copy.json
@@ -0,0 +1,27 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "ervu-dashboard-copy",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "10.10.31.119",
+ "password": "Encrypted 2be98caba1cd2df80aa0aa672d193bdde",
+ "pluginName": "PostgreSQL",
+ "port": "5432",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "EXTRA_OPTION_POSTGRESQL.stringtype": "unspecified",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "ervu-dashboard"
+ }
+ },
+ "name": "119_ervu-dashboard-copy"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/ervu-dashboard.json b/map_v1/metadata/rdbms/ervu-dashboard.json
new file mode 100644
index 0000000..b270eef
--- /dev/null
+++ b/map_v1/metadata/rdbms/ervu-dashboard.json
@@ -0,0 +1,27 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_DASHBOARD_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_DASHBOARD_HOST}",
+ "password": "${DB_DASHBOARD_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_DASHBOARD_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "EXTRA_OPTION_POSTGRESQL.stringtype": "unspecified",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_DASHBOARD_USERNAME}"
+ }
+ },
+ "name": "ervu-dashboard"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/ervu-journal.json b/map_v1/metadata/rdbms/ervu-journal.json
new file mode 100644
index 0000000..da61575
--- /dev/null
+++ b/map_v1/metadata/rdbms/ervu-journal.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_JOURNAL_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_JOURNAL_HOST}",
+ "password": "${DB_JOURNAL_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_JOURNAL_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_JOURNAL_USERNAME}"
+ }
+ },
+ "name": "ervu-journal"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/ervu_person_registry.json b/map_v1/metadata/rdbms/ervu_person_registry.json
new file mode 100644
index 0000000..7e965f9
--- /dev/null
+++ b/map_v1/metadata/rdbms/ervu_person_registry.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_PERSON_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_PERSON_HOST}",
+ "password": "${DB_PERSON_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_PERSON_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_PERSON_USERNAME}"
+ }
+ },
+ "name": "ervu_person_registry"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/incident.json b/map_v1/metadata/rdbms/incident.json
new file mode 100644
index 0000000..3cb4185
--- /dev/null
+++ b/map_v1/metadata/rdbms/incident.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_INCIDENTS_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_INCIDENTS_HOST}",
+ "password": "${DB_INCIDENTS_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_INCIDENTS_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_INCIDENTS_USERNAME}"
+ }
+ },
+ "name": "incident"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/metrics.json b/map_v1/metadata/rdbms/metrics.json
new file mode 100644
index 0000000..fe7601d
--- /dev/null
+++ b/map_v1/metadata/rdbms/metrics.json
@@ -0,0 +1,27 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_METRICS_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_METRICS_HOST}",
+ "password": "${DB_METRICS_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_METRICS_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "EXTRA_OPTION_POSTGRESQL.stringtype": "unspecified",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_METRICS_USERNAME}"
+ }
+ },
+ "name": "metrics"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/postgres.appeal-document-service.json b/map_v1/metadata/rdbms/postgres.appeal-document-service.json
new file mode 100644
index 0000000..dc7d764
--- /dev/null
+++ b/map_v1/metadata/rdbms/postgres.appeal-document-service.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_APPEAL_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_APPEAL_HOST}",
+ "password": "${DB_APPEAL_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_APPEAL_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_APPEAL_USERNAME}"
+ }
+ },
+ "name": "postgres.appeal-document-service"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/postgres.decision-document-service.json b/map_v1/metadata/rdbms/postgres.decision-document-service.json
new file mode 100644
index 0000000..2104dad
--- /dev/null
+++ b/map_v1/metadata/rdbms/postgres.decision-document-service.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_DECISION_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_DECISION_HOST}",
+ "password": "${DB_DECISION_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_DECISION_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_DECISION_USERNAME}"
+ }
+ },
+ "name": "postgres.decision-document-service"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/postgres.person_registry.json b/map_v1/metadata/rdbms/postgres.person_registry.json
new file mode 100644
index 0000000..bd67eb2
--- /dev/null
+++ b/map_v1/metadata/rdbms/postgres.person_registry.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_PERSON_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_PERSON_HOST}",
+ "password": "${DB_PERSON_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_PERSON_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_PERSON_USERNAME}"
+ }
+ },
+ "name": "postgres.person_registry"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/rdbms/postgres.subpoena.json b/map_v1/metadata/rdbms/postgres.subpoena.json
new file mode 100644
index 0000000..5bc7195
--- /dev/null
+++ b/map_v1/metadata/rdbms/postgres.subpoena.json
@@ -0,0 +1,26 @@
+{
+ "rdbms": {
+ "POSTGRESQL": {
+ "databaseName": "${DB_SUBPOENA_NAME}",
+ "pluginId": "POSTGRESQL",
+ "accessType": 0,
+ "hostname": "${DB_SUBPOENA_HOST}",
+ "password": "${DB_SUBPOENA_PASSWORD}",
+ "pluginName": "PostgreSQL",
+ "port": "${DB_SUBPOENA_PORT}",
+ "attributes": {
+ "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
+ "QUOTE_ALL_FIELDS": "N",
+ "SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
+ "FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
+ "PRESERVE_RESERVED_WORD_CASE": "Y",
+ "SQL_CONNECT": "",
+ "FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
+ "PREFERRED_SCHEMA_NAME": ""
+ },
+ "manualUrl": "",
+ "username": "${DB_SUBPOENA_USERNAME}"
+ }
+ },
+ "name": "postgres.subpoena"
+}
\ No newline at end of file
diff --git a/map_v1/metadata/workflow-log/workflow-logging.json b/map_v1/metadata/workflow-log/workflow-logging.json
new file mode 100644
index 0000000..60cceb4
--- /dev/null
+++ b/map_v1/metadata/workflow-log/workflow-logging.json
@@ -0,0 +1,16 @@
+{
+ "loggingParentsOnly": true,
+ "name": "workflow-logging",
+ "workflowToLog": [
+ "${PROJECT_HOME}/job_general.hwf",
+ "${PROJECT_HOME}/region/job_recruitments_region.hwf",
+ "${PROJECT_HOME}/country/job_recruitments_country.hwf",
+ "${PROJECT_HOME}/info_recruits/job_info_recruits.hwf"
+ ],
+ "intervalInSeconds": "30",
+ "executingPeriodically": false,
+ "pipelineFilename": "${PROJECT_HOME}/log/workflows-logging.hpl",
+ "executingAtEnd": true,
+ "enabled": true,
+ "executingAtStart": true
+}
\ No newline at end of file
diff --git a/map_v1/metadata/workflow-run-configuration/local.json b/map_v1/metadata/workflow-run-configuration/local.json
new file mode 100644
index 0000000..1d0cf74
--- /dev/null
+++ b/map_v1/metadata/workflow-run-configuration/local.json
@@ -0,0 +1,11 @@
+{
+ "engineRunConfiguration": {
+ "Local": {
+ "safe_mode": false,
+ "transactional": false
+ }
+ },
+ "defaultSelection": true,
+ "name": "local",
+ "description": "Runs your workflows locally with the standard local Hop workflow engine"
+}
\ No newline at end of file
diff --git a/map_v1/mil_com/job_recruitments_milcom.hwf b/map_v1/mil_com/job_recruitments_milcom.hwf
new file mode 100644
index 0000000..e70eb4f
--- /dev/null
+++ b/map_v1/mil_com/job_recruitments_milcom.hwf
@@ -0,0 +1,2185 @@
+
+
+ job_recruitments_milcom
+ Y
+
+
+
+ 0
+ -
+ 2024/08/15 16:02:12.821
+ -
+ 2024/08/15 16:02:12.821
+
+
+ ARR_MC
+
+
+
+
+ REC_ID
+
+
+
+
+ SCM
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 1008
+ 1552
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 2592
+ 1152
+
+
+
+ main_dashboard.total_registered(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl
+ txt
+ ${PROJECT_HOME}/log
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1248
+
+
+
+ Success main_dashboard.total_registered(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1312
+
+
+
+ Success main_dashboard.waiting_registration(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1232
+
+
+
+ Success 6
+
+ SUCCESS
+
+ N
+ 2592
+ 1072
+
+
+
+ total_registered.reg_mil_cat(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1312
+
+
+
+ Success 7
+
+ SUCCESS
+
+ N
+ 0
+ 1312
+
+
+
+ total_registered.removed_registry(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1376
+
+
+
+ Success 8
+
+ SUCCESS
+
+ N
+ 0
+ 1376
+
+
+
+ total_registered.subpoenas(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1440
+
+
+
+ Success 9
+
+ SUCCESS
+
+ N
+ 0
+ 1440
+
+
+
+ total_registered.driver_license(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1504
+
+
+
+ Success 10
+
+ SUCCESS
+
+ N
+ 0
+ 1504
+
+
+
+ total_registered.child_minor(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl
+ txt
+ C:\Users\acer\Desktop\лог
+ Rowlevel
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1568
+
+
+
+ Success 11
+
+ SUCCESS
+
+ N
+ 0
+ 1568
+
+
+
+ total_registered.age(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1632
+
+
+
+ Success 12
+
+ SUCCESS
+
+ N
+ 0
+ 1632
+
+
+
+ total_registered.marital_status(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1696
+
+
+
+ Success 13
+
+ SUCCESS
+
+ N
+ 0
+ 1696
+
+
+
+ total_registered.education_level(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1760
+
+
+
+ Success 14
+
+ SUCCESS
+
+ N
+ 0
+ 1760
+
+
+
+ total_registered.busyness(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1824
+
+
+
+ Success 15
+
+ SUCCESS
+
+ N
+ 0
+ 1824
+
+
+
+ array_recruitments.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/array_recruitments.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 848
+ 1552
+
+
+
+ SQL total_registered.reg_mil_cat
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.reg_mil_cat
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1312
+
+
+
+ SQL main_dashboard.total_registered
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM main_dashboard.total_registered
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1248
+
+
+
+ SQL total_registered.removed_registry
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.removed_registry
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ N
+ 624
+ 1376
+
+
+
+ SQL total_registered.subpoenas
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.subpoenas
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1440
+
+
+
+ SQL total_registered.driver_license
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.driver_license
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ N
+ 624
+ 1504
+
+
+
+ SQL total_registered.child_minor
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.child_minor
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1568
+
+
+
+ SQL total_registered.age
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.age
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1632
+
+
+
+ SQL total_registered.marital_status
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.marital_status
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1696
+
+
+
+ SQL total_registered.education_level
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.education_level
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ N
+ 624
+ 1760
+
+
+
+ SQL total_registered.busyness
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.busyness
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1824
+
+
+
+ main_dashboard.recruitment_campaign(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1712
+ 1152
+
+
+
+ SQL main_dashboard.recruitment_campaign clearing null
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM main_dashboard.recruitment_campaign
+WHERE recording_date = current_date
+AND new_recruits IS NULL
+AND subpoenas_sent IS NULL
+AND appeared_on_subpoenas IS NULL
+AND postponement_have_right IS NULL
+AND postponement_granted IS NULL;
+ N
+ N
+ N
+ 2336
+ 1152
+
+
+
+ postponement_percents.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1152
+
+
+
+ recruitment_campaign.subpoenas(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf
+ Nothing
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1712
+ 1072
+
+
+
+ main_dashboard.waiting_registration(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1232
+
+
+
+ SQL main_dashboard.waiting_registration
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM main_dashboard.waiting_registration
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 624
+ 1184
+
+
+
+ Success main_dashboard.waiting_registration(m_c)
+
+ SUCCESS
+
+ N
+ 0
+ 1184
+
+
+
+ main_dashboard.waiting_registration(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 320
+ 1184
+
+
+
+ Success main_dashboard.total_registered(m_c)
+
+ SUCCESS
+
+ N
+ 0
+ 1248
+
+
+
+ array_recruitment_for_parallel.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/array_recruitment_for_parallel.hpl
+ txt
+ C:\Users\acer\Desktop\logii
+ Rowlevel
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 1152
+ 1552
+
+
+
+ SQL main_dashboard.waiting_registration 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM main_dashboard.waiting_registration
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 1232
+
+
+
+ main_dashboard.total_registered(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1312
+
+
+
+ SQL main_dashboard.total_registered 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM main_dashboard.total_registered
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 1312
+
+
+
+ SQL total_registered.reg_mil_cat 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.reg_mil_cat
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 1392
+
+
+
+ total_registered.reg_mil_cat(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1392
+
+
+
+ Success total_registered.reg_mil_cat(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1392
+
+
+
+ SQL total_registered.removed_registry 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.removed_registry
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ N
+ 1712
+ 1472
+
+
+
+ total_registered.removed_registry(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1472
+
+
+
+ Success total_registered.removed_registry(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1472
+
+
+
+ SQL total_registered.subpoenas 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.subpoenas
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 1552
+
+
+
+ total_registered.subpoenas(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1552
+
+
+
+ Success total_registered.subpoenas(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1552
+
+
+
+ total_registered.driver_license(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1632
+
+
+
+ SQL total_registered.driver_license 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.driver_license
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ N
+ 1712
+ 1632
+
+
+
+ Success total_registered.driver_license(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1632
+
+
+
+ SQL total_registered.child_minor 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.child_minor
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 1712
+
+
+
+ total_registered.child_minor(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1712
+
+
+
+ Success total_registered.child_minor(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1712
+
+
+
+ SQL total_registered.age 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.age
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 1792
+
+
+
+ total_registered.age(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1792
+
+
+
+ Success total_registered.age(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1792
+
+
+
+ SQL total_registered.marital_status 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.marital_status
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 1872
+
+
+
+ total_registered.marital_status(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1872
+
+
+
+ Success total_registered.marital_status(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1872
+
+
+
+ SQL total_registered.education_level 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.education_level
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ N
+ 1712
+ 1952
+
+
+
+ total_registered.education_level(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 1952
+
+
+
+ Success total_registered.education_level(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 1952
+
+
+
+ SQL total_registered.busyness 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM total_registered.busyness
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+
+ N
+ N
+ N
+ 1712
+ 2032
+
+
+
+ total_registered.busyness(m_c).hwf
+
+ WORKFLOW
+
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf
+ Nothing
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2032
+ 2032
+
+
+
+ Success total_registered.busyness(m_c)_pll
+
+ SUCCESS
+
+ N
+ 2592
+ 2032
+
+
+
+
+
+ total_registered.reg_mil_cat(m_c).hpl
+ Success 7
+ Y
+ Y
+ N
+
+
+ total_registered.removed_registry(m_c).hpl
+ Success 8
+ Y
+ Y
+ N
+
+
+ total_registered.subpoenas(m_c).hpl
+ Success 9
+ Y
+ Y
+ N
+
+
+ total_registered.driver_license(m_c).hpl
+ Success 10
+ Y
+ Y
+ N
+
+
+ total_registered.child_minor(m_c).hpl
+ Success 11
+ Y
+ Y
+ N
+
+
+ total_registered.age(m_c).hpl
+ Success 12
+ Y
+ Y
+ N
+
+
+ total_registered.marital_status(m_c).hpl
+ Success 13
+ Y
+ Y
+ N
+
+
+ total_registered.education_level(m_c).hpl
+ Success 14
+ Y
+ Y
+ N
+
+
+ total_registered.busyness(m_c).hpl
+ Success 15
+ Y
+ Y
+ N
+
+
+ Start
+ array_recruitments.hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.reg_mil_cat
+ N
+ Y
+ N
+
+
+ SQL total_registered.reg_mil_cat
+ total_registered.reg_mil_cat(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL main_dashboard.total_registered
+ N
+ Y
+ N
+
+
+ SQL main_dashboard.total_registered
+ main_dashboard.total_registered(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.removed_registry
+ N
+ Y
+ N
+
+
+ SQL total_registered.removed_registry
+ total_registered.removed_registry(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.subpoenas
+ N
+ Y
+ N
+
+
+ SQL total_registered.subpoenas
+ total_registered.subpoenas(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.driver_license
+ N
+ Y
+ N
+
+
+ SQL total_registered.driver_license
+ total_registered.driver_license(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.child_minor
+ N
+ Y
+ N
+
+
+ SQL total_registered.child_minor
+ total_registered.child_minor(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.age
+ N
+ Y
+ N
+
+
+ SQL total_registered.age
+ total_registered.age(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.marital_status
+ N
+ Y
+ N
+
+
+ SQL total_registered.marital_status
+ total_registered.marital_status(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.education_level
+ N
+ Y
+ N
+
+
+ SQL total_registered.education_level
+ total_registered.education_level(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitments.hpl
+ SQL total_registered.busyness
+ N
+ Y
+ N
+
+
+ SQL total_registered.busyness
+ total_registered.busyness(m_c).hpl
+ Y
+ N
+ Y
+
+
+ Start
+ main_dashboard.recruitment_campaign(m_c).hwf
+ Y
+ Y
+ Y
+
+
+ SQL main_dashboard.recruitment_campaign clearing null
+ Success 2
+ Y
+ Y
+ Y
+
+
+ main_dashboard.recruitment_campaign(m_c).hwf
+ postponement_percents.hpl
+ Y
+ N
+ Y
+
+
+ postponement_percents.hpl
+ SQL main_dashboard.recruitment_campaign clearing null
+ Y
+ Y
+ Y
+
+
+ Start
+ recruitment_campaign.subpoenas(m_c).hwf
+ N
+ Y
+ Y
+
+
+ recruitment_campaign.subpoenas(m_c).hwf
+ Success 6
+ Y
+ N
+ Y
+
+
+ main_dashboard.waiting_registration(m_c).hwf
+ Success main_dashboard.waiting_registration(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitments.hpl
+ SQL main_dashboard.waiting_registration
+ N
+ Y
+ N
+
+
+ SQL main_dashboard.waiting_registration
+ main_dashboard.waiting_registration(m_c).hpl
+ Y
+ N
+ Y
+
+
+ main_dashboard.waiting_registration(m_c).hpl
+ Success main_dashboard.waiting_registration(m_c)
+ Y
+ Y
+ N
+
+
+ main_dashboard.total_registered(m_c).hpl
+ Success main_dashboard.total_registered(m_c)
+ Y
+ Y
+ N
+
+
+ Start
+ array_recruitment_for_parallel.hpl
+ Y
+ Y
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL main_dashboard.waiting_registration 2
+ Y
+ Y
+ Y
+
+
+ SQL main_dashboard.waiting_registration 2
+ main_dashboard.waiting_registration(m_c).hwf
+ Y
+ Y
+ Y
+
+
+ SQL main_dashboard.total_registered 2
+ main_dashboard.total_registered(m_c).hwf
+ Y
+ N
+ Y
+
+
+ main_dashboard.total_registered(m_c).hwf
+ Success main_dashboard.total_registered(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL main_dashboard.total_registered 2
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.reg_mil_cat 2
+ Y
+ Y
+ Y
+
+
+ SQL total_registered.reg_mil_cat 2
+ total_registered.reg_mil_cat(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.reg_mil_cat(m_c).hwf
+ Success total_registered.reg_mil_cat(m_c)_pll
+ Y
+ N
+ Y
+
+
+ SQL total_registered.removed_registry 2
+ total_registered.removed_registry(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.removed_registry(m_c).hwf
+ Success total_registered.removed_registry(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.removed_registry 2
+ Y
+ Y
+ Y
+
+
+ SQL total_registered.subpoenas 2
+ total_registered.subpoenas(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.subpoenas(m_c).hwf
+ Success total_registered.subpoenas(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.subpoenas 2
+ Y
+ Y
+ Y
+
+
+ SQL total_registered.driver_license 2
+ total_registered.driver_license(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.driver_license(m_c).hwf
+ Success total_registered.driver_license(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.driver_license 2
+ Y
+ Y
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.child_minor 2
+ Y
+ Y
+ Y
+
+
+ SQL total_registered.child_minor 2
+ total_registered.child_minor(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.child_minor(m_c).hwf
+ Success total_registered.child_minor(m_c)_pll
+ Y
+ N
+ Y
+
+
+ SQL total_registered.age 2
+ total_registered.age(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.age(m_c).hwf
+ Success total_registered.age(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.age 2
+ Y
+ Y
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.marital_status 2
+ Y
+ Y
+ Y
+
+
+ SQL total_registered.marital_status 2
+ total_registered.marital_status(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.marital_status(m_c).hwf
+ Success total_registered.marital_status(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.education_level 2
+ Y
+ Y
+ Y
+
+
+ SQL total_registered.education_level 2
+ total_registered.education_level(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.education_level(m_c).hwf
+ Success total_registered.education_level(m_c)_pll
+ Y
+ N
+ Y
+
+
+ array_recruitment_for_parallel.hpl
+ SQL total_registered.busyness 2
+ Y
+ Y
+ Y
+
+
+ SQL total_registered.busyness 2
+ total_registered.busyness(m_c).hwf
+ Y
+ N
+ Y
+
+
+ total_registered.busyness(m_c).hwf
+ Success total_registered.busyness(m_c)_pll
+ Y
+ N
+ Y
+
+
+
+
+
+
+ METASTORE.pentaho
+
+ Default Run Configuration
+ {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null}
+
+
+
+ {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"}
+
+ Pentaho local
+ {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]}
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl
new file mode 100644
index 0000000..85504aa
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl
@@ -0,0 +1,142 @@
+
+
+
+ m_d.rec_cam(m_c)_to_decision_service
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input отчрочки из decisions
+ Update
+ Y
+
+
+
+ Table input отчрочки из decisions
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ 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, r.target_recruitment) AS recruitment_id,
+ 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 in ('1', '2')
+ WHERE COALESCE(r.current_recruitment, r.target_recruitment)::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 = '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,
+ 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') or
+ (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days'))
+GROUP BY spring_autumn, ls.recruitment_id
+ Y
+
+
+ 400
+ 320
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
recruitment_campaign
+
+ postponement_granted
+ postponement_granted
+
+
+ N
+ Y
+
+
+ 1024
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl
new file mode 100644
index 0000000..8a4475b
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl
@@ -0,0 +1,178 @@
+
+
+
+ m_d.rec_cam(m_c)_to_decision_service_uniq
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input отчрочки из decisions
+ Update
+ Y
+
+
+
+ Table input отчрочки из decisions
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ 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,
+ COALESCE(r.current_recruitment, r.target_recruitment) AS recruitment_id,
+ 'Весна' AS season,
+ dd.postponement_date,
+ 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'
+ WHERE COALESCE(r.current_recruitment, r.target_recruitment)::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,
+ COALESCE(r.current_recruitment, r.target_recruitment) AS recruitment_id,
+ 'Осень' AS season,
+ dd.postponement_date,
+ 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'
+ WHERE COALESCE(r.current_recruitment, r.target_recruitment)::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;
+ Y
+
+
+ 400
+ 320
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+
+ =
+ recording_date
+ recording_date
+
+
+ main_dashboard
+
recruitment_campaign
+
+ postponement_granted
+ postponement_granted
+
+
+ N
+ Y
+
+
+ 1024
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl
new file mode 100644
index 0000000..ff15055
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl
@@ -0,0 +1,274 @@
+
+
+
+ m_d.rec_cam(m_c)_to_person_registry
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/осень
+ Update
+ Y
+
+
+
+ Table input (person_registry) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.person_registry
+ N
+ 0
+ WITH
+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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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
+ ),
+*/
+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,
+ 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 'Весна'
+ 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 (
+ 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 (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 (
+ 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 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')))
+
+),
+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
+ 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
+ Y
+
+
+ 464
+ 320
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
recruitment_campaign
+
+ new_recruits
+ recruit
+
+
+ postponement_have_right
+ postponement_have_right
+
+
+ N
+ Y
+
+
+ 1056
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement.hpl
new file mode 100644
index 0000000..7452855
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement.hpl
@@ -0,0 +1,137 @@
+
+
+
+ m_d.rec_cam(m_c)_to_person_registry_postponement
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/осень
+ Update
+ Y
+
+
+
+ Table input (person_registry) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.person_registry
+ N
+ 0
+ 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
+ Y
+
+
+ 464
+ 320
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
recruitment_campaign
+
+ postponement_have_right
+ postponement_have_right
+
+
+ N
+ Y
+
+
+ 1056
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement_uniq.hpl
new file mode 100644
index 0000000..d12b342
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement_uniq.hpl
@@ -0,0 +1,170 @@
+
+
+
+ m_d.rec_cam(m_c)_to_person_registry_postponement_uniq
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/осень
+ Update
+ Y
+
+
+
+ Table input (person_registry) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.person_registry
+ N
+ 0
+ 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;
+ Y
+
+
+ 464
+ 320
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ N
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
recruitment_campaign
+
+ postponement_have_right
+ postponement_have_right
+
+
+ N
+ N
+
+
+ 1024
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
new file mode 100644
index 0000000..dd44b39
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
@@ -0,0 +1,342 @@
+
+
+
+ m_d.rec_cam(m_c)_to_person_registry_uniq
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/осень
+ Update
+ Y
+
+
+
+ Table input (person_registry) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.person_registry
+ N
+ 0
+ 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
+),
+/*
+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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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
+ ),
+*/
+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.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
+ 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 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
+
+ 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
+ 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 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
+ 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
+ Y
+
+
+ 464
+ 320
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ N
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
recruitment_campaign
+
+ new_recruits
+ recruit
+
+
+ postponement_have_right
+ postponement_have_right
+
+
+ N
+ N
+
+
+ 1024
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl
new file mode 100644
index 0000000..fd1ff82
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl
@@ -0,0 +1,272 @@
+
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (subpoena) регион/осень
+ Update
+ Y
+
+
+
+ Table input (subpoena) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ 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.visit_date,
+ s.department_id::uuid AS recruitment_id,
+ s.status_id,
+ 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,
+ ssi.act_number,
+sh.rn,
+rd.rn_d,
+--rdi.rn_di,
+ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1
+ --AND
+sr.type = '3'
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+season_separations AS (
+ SELECT DISTINCT
+ ls.recruitment_id,
+ ls.create_date,
+ ls.visit_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_date,
+ ls.send_date,
+ ls.restr_dc,
+ ls.ap_date,
+ ls.d_code,
+ ls.act_number,
+ ls.rdi_id,
+ls.rn,
+ls.rn_d,
+--rdi.rn_di,
+ls.rn_si,
+ CASE
+ WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days')
+ THEN 'Весна'
+ WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days')
+ THEN 'Осень'
+ END AS spring_autumn
+ FROM subpoena_data ls
+ WHERE --ls.create_date >= DATE_TRUNC('year', CURRENT_DATE)
+ ((ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days')
+ or
+ (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days'))
+),
+season_separations_clean AS (
+ SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations
+),
+t1 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT subpoena_id) AS count_subpoena
+ FROM season_separations ss
+ WHERE sub_stat_hist IS NOT NULL and ss.rn = 1
+ 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
+ WHERE sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1
+ 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
+ WHERE sub_stat_hist = '5' and ss.rn = 1
+ 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_clean 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
+ Y
+
+
+ 288
+ 320
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
recruitment_campaign
+
+ subpoenas_sent
+ count_subpoena
+
+
+ appeared_on_subpoenas
+ count_appeared
+
+
+ not_appeared_on_subpoenas
+ count_not_appeared
+
+
+ appeared_on_subpoenas_percent
+ appeared_on_subpoenas_percent
+
+
+ not_appeared_on_subpoenas_percent
+ not_appeared_on_subpoenas_percent
+
+
+ N
+ Y
+
+
+ 928
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
new file mode 100644
index 0000000..28fed23
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
@@ -0,0 +1,369 @@
+
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry_uniq
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (subpoena) регион/осень
+ Update
+ Y
+
+
+
+ Table input (subpoena) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ 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
+),
+subpoena_data AS (
+ SELECT
+ s.id AS subpoena_id,
+ s.create_date,
+ s.visit_date,
+ s.department_id::uuid AS recruitment_id,
+ s.status_id,
+ 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,
+ ssi.act_number,
+ 'Весна' AS season,
+sh.rn,
+rd.rn_d,
+--rdi.rn_di,
+ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1
+ --AND
+sr.type = '3'
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+ UNION ALL
+ SELECT
+ s.id AS subpoena_id,
+ s.create_date,
+ s.visit_date,
+ s.department_id::uuid AS recruitment_id,
+ s.status_id,
+ 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,
+ ssi.act_number,
+ 'Осень' AS season,
+sh.rn,
+rd.rn_d,
+--rdi.rn_di,
+ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1 AND*/ --ssi.rn_si = 1
+ --AND
+sr.type = '3'
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+season_separations AS (
+ SELECT DISTINCT
+ ls.recruitment_id,
+ ls.create_date,
+ ls.visit_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_date,
+ ls.send_date,
+ ls.restr_dc,
+ ls.ap_date,
+ ls.d_code,
+ ls.act_number,
+ ls.rdi_id,
+ ls.season AS spring_autumn,
+ls.rn,
+ls.rn_d,
+--rdi.rn_di,
+ls.rn_si
+ FROM subpoena_data ls
+ WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '4 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '7 months' + INTERVAL '14 days')
+ AND ls.season = 'Весна'
+
+ --WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE)
+
+ UNION ALL
+
+ SELECT DISTINCT
+ ls.recruitment_id,
+ ls.create_date,
+ ls.visit_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_date,
+ ls.send_date,
+ ls.restr_dc,
+ ls.ap_date,
+ ls.d_code,
+ ls.act_number,
+ ls.rdi_id,
+ ls.season AS spring_autumn,
+ls.rn,
+ls.rn_d,
+--rdi.rn_di,
+ls.rn_si
+ FROM subpoena_data ls
+ WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '10 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '30 days')
+ AND ls.season = 'Осень'
+
+ --WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE)
+),
+season_separations_clean AS (
+ SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations
+),
+t1 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT subpoena_id) AS count_subpoena
+ FROM season_separations ss
+ WHERE sub_stat_hist IS NOT NULL and ss.rn = 1
+ 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
+ WHERE sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1
+ 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
+ WHERE sub_stat_hist = '5' and ss.rn = 1
+ 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_clean 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;
+ Y
+
+
+ 656
+ 336
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
recruitment_campaign
+
+ subpoenas_sent
+ count_subpoena
+
+
+ appeared_on_subpoenas
+ count_appeared
+
+
+ not_appeared_on_subpoenas
+ count_not_appeared
+
+
+ appeared_on_subpoenas_percent
+ appeared_on_subpoenas_percent
+
+
+ not_appeared_on_subpoenas_percent
+ not_appeared_on_subpoenas_percent
+
+
+ N
+ Y
+
+
+ 1056
+ 336
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf
new file mode 100644
index 0000000..cd9c18a
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf
@@ -0,0 +1,769 @@
+
+
+ main_dashboard.recruitment_campaign(m_c)
+ Y
+
+
+
+ -
+ 2025/03/19 10:26:06.313
+ -
+ 2025/03/19 10:26:06.313
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 48
+ 256
+
+
+
+ m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
+ Basic
+
+
+ ARR_MC_SP
+ ARRAY_MIL_COM_SP
+
+
+ ARR_MC_AU
+ ARRAY_MIL_COM_AU
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1104
+ 0
+
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
+ Basic
+
+
+ ARR_MC_SP
+ ARRAY_MIL_COM_SP
+
+
+ ARR_MC_AU
+ ARRAY_MIL_COM_AU
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1648
+ 112
+
+
+
+ m_d.rec_cam(m_c)_to_decision_service_uniq.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl
+ Basic
+
+
+ ARR_MC_SP
+ ARRAY_MIL_COM_SP
+
+
+ ARR_MC_AU
+ ARRAY_MIL_COM_AU
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2000
+ 112
+
+
+
+ recruitment_season_combination_uniq.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl
+ Basic
+
+
+ ARR_MC_SP
+ ARRAY_MIL_COM_SP
+
+
+ ARR_MC_AU
+ ARRAY_MIL_COM_AU
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 672
+ 112
+
+
+
+ array_season_recruitments_all.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 416
+ 368
+
+
+
+ array_season_recruitments.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 416
+ 112
+
+
+
+ m_d.rec_cam(m_c)_to_person_registry.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1040
+ 480
+
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1408
+ 368
+
+
+
+ m_d.rec_cam(m_c)_to_decision_service.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1984
+ 368
+
+
+
+ recruitment_season_combination.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination.hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 672
+ 368
+
+
+
+ Success all
+
+ SUCCESS
+
+ N
+ 2352
+ 368
+
+
+
+ SQL main_dashboard.recruitment_campaign
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM main_dashboard.recruitment_campaign
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ Y
+ 256
+ 256
+
+
+
+ Success uniq
+
+ SUCCESS
+
+ N
+ 2352
+ 112
+
+
+
+ array_season_recruitments_all.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 768
+ 480
+
+
+
+ array_season_recruitments_all.hpl 2 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1312
+ 480
+
+
+
+ array_season_recruitments_all.hpl 2 2 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1616
+ 480
+
+
+
+ array_season_recruitments.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 800
+ 0
+
+
+
+ array_season_recruitments.hpl 3
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1408
+ 0
+
+
+
+ array_season_recruitments.hpl 4
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1840
+ 16
+
+
+
+
+
+ m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
+ m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
+ N
+ N
+ Y
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
+ m_d.rec_cam(m_c)_to_decision_service_uniq.hpl
+ N
+ N
+ Y
+
+
+ recruitment_season_combination_uniq.hpl
+ m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
+ N
+ Y
+ Y
+
+
+ array_season_recruitments.hpl
+ recruitment_season_combination_uniq.hpl
+ Y
+ Y
+ Y
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry.hpl
+ m_d.rec_cam(m_c)_to_decision_service.hpl
+ N
+ N
+ Y
+
+
+ recruitment_season_combination.hpl
+ m_d.rec_cam(m_c)_to_person_registry.hpl
+ N
+ N
+ Y
+
+
+ array_season_recruitments_all.hpl
+ recruitment_season_combination.hpl
+ Y
+ N
+ Y
+
+
+ m_d.rec_cam(m_c)_to_decision_service.hpl
+ Success all
+ Y
+ Y
+ N
+
+
+ Start
+ SQL main_dashboard.recruitment_campaign
+ Y
+ Y
+ Y
+
+
+ recruitment_season_combination.hpl
+ m_d.rec_cam(m_c)_to_subpoena_registry.hpl
+ N
+ N
+ Y
+
+
+ recruitment_season_combination_uniq.hpl
+ m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
+ N
+ N
+ Y
+
+
+ SQL main_dashboard.recruitment_campaign
+ array_season_recruitments.hpl
+ Y
+ N
+ Y
+
+
+ SQL main_dashboard.recruitment_campaign
+ array_season_recruitments_all.hpl
+ Y
+ Y
+ Y
+
+
+ m_d.rec_cam(m_c)_to_decision_service_uniq.hpl
+ Success uniq
+ Y
+ Y
+ N
+
+
+ m_d.rec_cam(m_c)_to_person_registry.hpl
+ m_d.rec_cam(m_c)_to_subpoena_registry.hpl
+ N
+ Y
+ N
+
+
+ recruitment_season_combination.hpl
+ array_season_recruitments_all.hpl 2
+ Y
+ Y
+ N
+
+
+ array_season_recruitments_all.hpl 2
+ m_d.rec_cam(m_c)_to_person_registry.hpl
+ Y
+ Y
+ N
+
+
+ m_d.rec_cam(m_c)_to_person_registry.hpl
+ array_season_recruitments_all.hpl 2 2
+ Y
+ Y
+ N
+
+
+ array_season_recruitments_all.hpl 2 2
+ m_d.rec_cam(m_c)_to_subpoena_registry.hpl
+ Y
+ Y
+ N
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry.hpl
+ array_season_recruitments_all.hpl 2 2 2
+ Y
+ Y
+ N
+
+
+ array_season_recruitments_all.hpl 2 2 2
+ m_d.rec_cam(m_c)_to_decision_service.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_season_combination_uniq.hpl
+ array_season_recruitments.hpl 2
+ Y
+ Y
+ N
+
+
+ array_season_recruitments.hpl 2
+ m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
+ Y
+ Y
+ N
+
+
+ m_d.rec_cam(m_c)_to_person_registry_uniq.hpl
+ array_season_recruitments.hpl 3
+ Y
+ Y
+ N
+
+
+ array_season_recruitments.hpl 3
+ m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
+ Y
+ Y
+ N
+
+
+ m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl
+ array_season_recruitments.hpl 4
+ Y
+ Y
+ N
+
+
+ array_season_recruitments.hpl 4
+ m_d.rec_cam(m_c)_to_decision_service_uniq.hpl
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 0
+ 112
+ особенные регионы
+ 123
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 0
+ 400
+ обычные регионы
+ 113
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl
new file mode 100644
index 0000000..c2efea3
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl
@@ -0,0 +1,112 @@
+
+
+
+ postponement_percents
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/03/21 14:21:43.089
+ -
+ 2025/03/21 14:21:43.089
+
+
+
+
+
+ Table input
+ Update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ current_date AS recording_date,
+ spring_autumn,
+ recruitment_id,
+ ROUND(COALESCE(SUM(postponement_have_right) * 100 / NULLIF(SUM(new_recruits), 0), 0), 1) AS postponement_have_right_percent,
+ ROUND(COALESCE(SUM(postponement_granted) * 100 / NULLIF(SUM(new_recruits), 0), 0), 1) AS postponement_granted_percent
+FROM main_dashboard.recruitment_campaign
+WHERE recording_date = current_date
+ AND schema = 'empty'
+GROUP BY recruitment_id, spring_autumn;
+ N
+
+
+ 480
+ 256
+
+
+
+ Update
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ spring_autumn
+ spring_autumn
+ N
+
+
+ recording_date
+ recording_date
+ N
+
+
+ N
+
+
+ 1168
+ 304
+
+
+
+ Table input (person_registry) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
+),
+season_separations AS (
+ SELECT 'Весна' AS spring_autumn
+ UNION ALL
+ SELECT 'Осень' AS spring_autumn
+)
+SELECT
+ current_date AS recording_date,
+ i.recruitment_id AS recruitment_id,
+ ss.spring_autumn
+FROM ids i
+CROSS JOIN season_separations ss
+ Y
+
+
+ 624
+ 304
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl
new file mode 100644
index 0000000..9d87a89
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl
@@ -0,0 +1,124 @@
+
+
+
+ recruitment_season_combination_uniq
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/03/20 14:06:15.043
+ -
+ 2025/03/20 14:06:15.043
+
+
+
+
+
+ Table input (person_registry) регион/осень
+ Insert / update (main_dashboard.recruitment_campaign)
+ Y
+
+
+
+ Insert / update (main_dashboard.recruitment_campaign)
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+
+ =
+ recording_date
+ recording_date
+
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ main_dashboard
+
recruitment_campaign
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ spring_autumn
+ spring_autumn
+ N
+
+
+ recording_date
+ recording_date
+ N
+
+
+ N
+
+
+ 1056
+ 320
+
+
+
+ Table input (person_registry) регион/осень
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.person_registry
+ N
+ 0
+ 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
+)
+SELECT
+ current_date AS recording_date,
+ i.recruitment_id AS recruitment_id,
+ i.spring_autumn
+FROM ids i;
+ Y
+
+
+ 512
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl
new file mode 100644
index 0000000..2667286
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl
@@ -0,0 +1,436 @@
+
+
+
+ main_dashboard.total_registered(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 2 2
+ Select values 2 2
+ N
+
+
+ Select values 2 2
+ Insert / update (main_dashboard.total_registered) 2
+ N
+
+
+ Table input (person_registry) регион
+ Get variables 2 2
+ N
+
+
+ Table input (person_registry) регион
+ Insert / update (main_dashboard.total_registered) 2
+ Y
+
+
+
+ Get variables 2 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 704
+ 480
+
+
+
+ Insert / update (main_dashboard.total_registered) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ main_dashboard
+
total_registered
+
+ total_registered
+ total_count
+ Y
+
+
+ "total_registered_M"
+ male_count
+ Y
+
+
+ "total_registered_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1168
+ 320
+
+
+
+ Select values 2 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 912
+ 480
+
+
+
+ Table input (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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 (
+ SELECT
+ --distinct
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id,
+ r.current_recruitment_id AS r_current_recruitment_id,
+ r.gender,
+ r.birth_date,
+ --r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_current_recruitment_id::uuid AS recruitment_id,
+ ri.convicts,
+ COUNT(distinct ri.recruit_id) AS total_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_current_recruitment_id, ri.convicts
+),
+recruit_data_all AS (
+ SELECT
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total_count) AS total_count,
+ SUM(male_count) AS male_count,
+ SUM(female_count) AS female_count,
+ SUM(mobilization_criterion) AS mobilization_criterion,
+ SUM(volunteer_criterion) AS volunteer_criterion,
+ SUM(contract_criterion) AS contract_criterion
+ FROM recruit_data
+ GROUP BY recruitment_id
+)
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id
+
+UNION ALL
+
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id
+ Y
+
+
+ 496
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf
new file mode 100644
index 0000000..2f9cedc
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf
@@ -0,0 +1,309 @@
+
+
+ main_dashboard.total_registered(m_c)
+ Y
+
+
+
+ -
+ 2025/03/31 14:43:03.816
+ -
+ 2025/03/31 14:43:03.816
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 544
+ 304
+
+
+
+ main_dashboard.total_registered_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1120
+ 144
+
+
+
+ main_dashboard.total_registered_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1120
+ 224
+
+
+
+ main_dashboard.total_registered_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1120
+ 304
+
+
+
+ main_dashboard.total_registered_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1120
+ 384
+
+
+
+ main_dashboard.total_registered_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1120
+ 464
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1392
+ 144
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1392
+ 224
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1392
+ 304
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1392
+ 384
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1392
+ 464
+
+
+
+
+
+ Start
+ main_dashboard.total_registered_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.total_registered_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.total_registered_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.total_registered_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.total_registered_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ main_dashboard.total_registered_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ main_dashboard.total_registered_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ main_dashboard.total_registered_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ main_dashboard.total_registered_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ main_dashboard.total_registered_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl
new file mode 100644
index 0000000..f75f382
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl
@@ -0,0 +1,334 @@
+
+
+
+ main_dashboard.total_registered_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион
+ Insert / update (main_dashboard.total_registered) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.total_registered) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ main_dashboard
+
total_registered
+
+ total_registered
+ total_count
+ Y
+
+
+ "total_registered_M"
+ male_count
+ Y
+
+
+ "total_registered_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1168
+ 320
+
+
+
+ Table input (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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 (
+ SELECT
+ --distinct
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id,
+ r.current_recruitment_id AS r_current_recruitment_id,
+ r.gender,
+ r.birth_date,
+ --r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_current_recruitment_id::uuid AS recruitment_id,
+ ri.convicts,
+ COUNT(distinct ri.recruit_id) AS total_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_current_recruitment_id, ri.convicts
+),
+recruit_data_all AS (
+ SELECT
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total_count) AS total_count,
+ SUM(male_count) AS male_count,
+ SUM(female_count) AS female_count,
+ SUM(mobilization_criterion) AS mobilization_criterion,
+ SUM(volunteer_criterion) AS volunteer_criterion,
+ SUM(contract_criterion) AS contract_criterion
+ FROM recruit_data
+ GROUP BY recruitment_id
+)
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id
+
+UNION ALL
+
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id
+ Y
+
+
+ 496
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl
new file mode 100644
index 0000000..18c15c8
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl
@@ -0,0 +1,334 @@
+
+
+
+ main_dashboard.total_registered_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион
+ Insert / update (main_dashboard.total_registered) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.total_registered) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ main_dashboard
+
total_registered
+
+ total_registered
+ total_count
+ Y
+
+
+ "total_registered_M"
+ male_count
+ Y
+
+
+ "total_registered_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1168
+ 320
+
+
+
+ Table input (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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 (
+ SELECT
+ --distinct
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id,
+ r.current_recruitment_id AS r_current_recruitment_id,
+ r.gender,
+ r.birth_date,
+ --r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_current_recruitment_id::uuid AS recruitment_id,
+ ri.convicts,
+ COUNT(distinct ri.recruit_id) AS total_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_current_recruitment_id, ri.convicts
+),
+recruit_data_all AS (
+ SELECT
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total_count) AS total_count,
+ SUM(male_count) AS male_count,
+ SUM(female_count) AS female_count,
+ SUM(mobilization_criterion) AS mobilization_criterion,
+ SUM(volunteer_criterion) AS volunteer_criterion,
+ SUM(contract_criterion) AS contract_criterion
+ FROM recruit_data
+ GROUP BY recruitment_id
+)
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id
+
+UNION ALL
+
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id
+ Y
+
+
+ 496
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl
new file mode 100644
index 0000000..3493467
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl
@@ -0,0 +1,334 @@
+
+
+
+ main_dashboard.total_registered_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион
+ Insert / update (main_dashboard.total_registered) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.total_registered) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ main_dashboard
+
total_registered
+
+ total_registered
+ total_count
+ Y
+
+
+ "total_registered_M"
+ male_count
+ Y
+
+
+ "total_registered_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1168
+ 320
+
+
+
+ Table input (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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 (
+ SELECT
+ --distinct
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id,
+ r.current_recruitment_id AS r_current_recruitment_id,
+ r.gender,
+ r.birth_date,
+ --r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_current_recruitment_id::uuid AS recruitment_id,
+ ri.convicts,
+ COUNT(distinct ri.recruit_id) AS total_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_current_recruitment_id, ri.convicts
+),
+recruit_data_all AS (
+ SELECT
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total_count) AS total_count,
+ SUM(male_count) AS male_count,
+ SUM(female_count) AS female_count,
+ SUM(mobilization_criterion) AS mobilization_criterion,
+ SUM(volunteer_criterion) AS volunteer_criterion,
+ SUM(contract_criterion) AS contract_criterion
+ FROM recruit_data
+ GROUP BY recruitment_id
+)
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id
+
+UNION ALL
+
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id
+ Y
+
+
+ 496
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl
new file mode 100644
index 0000000..293beaf
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl
@@ -0,0 +1,334 @@
+
+
+
+ main_dashboard.total_registered_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион
+ Insert / update (main_dashboard.total_registered) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.total_registered) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ main_dashboard
+
total_registered
+
+ total_registered
+ total_count
+ Y
+
+
+ "total_registered_M"
+ male_count
+ Y
+
+
+ "total_registered_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1168
+ 320
+
+
+
+ Table input (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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 (
+ SELECT
+ --distinct
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id,
+ r.current_recruitment_id AS r_current_recruitment_id,
+ r.gender,
+ r.birth_date,
+ --r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_current_recruitment_id::uuid AS recruitment_id,
+ ri.convicts,
+ COUNT(distinct ri.recruit_id) AS total_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_current_recruitment_id, ri.convicts
+),
+recruit_data_all AS (
+ SELECT
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total_count) AS total_count,
+ SUM(male_count) AS male_count,
+ SUM(female_count) AS female_count,
+ SUM(mobilization_criterion) AS mobilization_criterion,
+ SUM(volunteer_criterion) AS volunteer_criterion,
+ SUM(contract_criterion) AS contract_criterion
+ FROM recruit_data
+ GROUP BY recruitment_id
+)
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id
+
+UNION ALL
+
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id
+ Y
+
+
+ 496
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl
new file mode 100644
index 0000000..001fcc8
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl
@@ -0,0 +1,334 @@
+
+
+
+ main_dashboard.total_registered_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион
+ Insert / update (main_dashboard.total_registered) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.total_registered) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ main_dashboard
+
total_registered
+
+ total_registered
+ total_count
+ Y
+
+
+ "total_registered_M"
+ male_count
+ Y
+
+
+ "total_registered_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1168
+ 320
+
+
+
+ Table input (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ 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 (
+ SELECT
+ --distinct
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id,
+ r.current_recruitment_id AS r_current_recruitment_id,
+ r.gender,
+ r.birth_date,
+ --r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_current_recruitment_id::uuid AS recruitment_id,
+ ri.convicts,
+ COUNT(distinct ri.recruit_id) AS total_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_current_recruitment_id, ri.convicts
+),
+recruit_data_all AS (
+ SELECT
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total_count) AS total_count,
+ SUM(male_count) AS male_count,
+ SUM(female_count) AS female_count,
+ SUM(mobilization_criterion) AS mobilization_criterion,
+ SUM(volunteer_criterion) AS volunteer_criterion,
+ SUM(contract_criterion) AS contract_criterion
+ FROM recruit_data
+ GROUP BY recruitment_id
+)
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id
+
+UNION ALL
+
+SELECT
+ ids.recruitment_id,
+ rd.convicts,
+ current_date AS recording_date,
+ COALESCE(rd.total_count, 0) AS total_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM ids
+JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id
+ Y
+
+
+ 496
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl
new file mode 100644
index 0000000..acc5ecd
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl
@@ -0,0 +1,272 @@
+
+
+
+ main_dashboard.waiting_registration(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input 2 (person_registry) регион
+ Insert / update (main_dashboard.waiting_registration) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.waiting_registration) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
waiting_registration
+
+ waiting_registration
+ waiting_count
+ Y
+
+
+ "waiting_registration_M"
+ male_count
+ Y
+
+
+ "waiting_registration_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1024
+ 240
+
+
+
+ Table input 2 (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ 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 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 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
+),
+vse AS (
+ SELECT
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id,
+ r.gender,
+ r.birth_date,
+ -- r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.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
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_target_recruitment_id::uuid AS recruitment_id,
+ COUNT(distinct ri.recruit_id) AS waiting_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_target_recruitment_id
+)
+SELECT
+ rd.recruitment_id,
+ current_date AS recording_date,
+ COALESCE(rd.waiting_count, 0) AS waiting_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM recruit_data AS rd
+ Y
+
+
+ 336
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf
new file mode 100644
index 0000000..70f7f97
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf
@@ -0,0 +1,309 @@
+
+
+ main_dashboard.waiting_registration(m_c)
+ Y
+
+
+
+ -
+ 2025/03/31 10:12:19.214
+ -
+ 2025/03/31 10:12:19.214
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 688
+ 416
+
+
+
+ main_dashboard.waiting_registration_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1568
+ 256
+
+
+
+ main_dashboard.waiting_registration_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1568
+ 336
+
+
+
+ main_dashboard.waiting_registration_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1568
+ 416
+
+
+
+ main_dashboard.waiting_registration_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1568
+ 496
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1808
+ 256
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1808
+ 336
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1808
+ 416
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1808
+ 496
+
+
+
+ main_dashboard.waiting_registration_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1568
+ 576
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1808
+ 576
+
+
+
+
+
+ main_dashboard.waiting_registration_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ main_dashboard.waiting_registration_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ main_dashboard.waiting_registration_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ main_dashboard.waiting_registration_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ main_dashboard.waiting_registration_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+ Start
+ main_dashboard.waiting_registration_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.waiting_registration_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.waiting_registration_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.waiting_registration_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ main_dashboard.waiting_registration_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl
new file mode 100644
index 0000000..9e9b647
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl
@@ -0,0 +1,272 @@
+
+
+
+ main_dashboard.waiting_registration_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input 2 (person_registry) регион
+ Insert / update (main_dashboard.waiting_registration) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.waiting_registration) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
waiting_registration
+
+ waiting_registration
+ waiting_count
+ Y
+
+
+ "waiting_registration_M"
+ male_count
+ Y
+
+
+ "waiting_registration_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1024
+ 240
+
+
+
+ Table input 2 (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id
+),
+last_status 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 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
+),
+vse AS (
+ SELECT
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id,
+ r.gender,
+ r.birth_date,
+ -- r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.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
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_target_recruitment_id::uuid AS recruitment_id,
+ COUNT(distinct ri.recruit_id) AS waiting_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_target_recruitment_id
+)
+SELECT
+ rd.recruitment_id,
+ current_date AS recording_date,
+ COALESCE(rd.waiting_count, 0) AS waiting_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM recruit_data AS rd
+ Y
+
+
+ 336
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl
new file mode 100644
index 0000000..232eb01
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl
@@ -0,0 +1,272 @@
+
+
+
+ main_dashboard.waiting_registration_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input 2 (person_registry) регион
+ Insert / update (main_dashboard.waiting_registration) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.waiting_registration) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
waiting_registration
+
+ waiting_registration
+ waiting_count
+ Y
+
+
+ "waiting_registration_M"
+ male_count
+ Y
+
+
+ "waiting_registration_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1024
+ 240
+
+
+
+ Table input 2 (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id
+),
+last_status 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 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
+),
+vse AS (
+ SELECT
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id,
+ r.gender,
+ r.birth_date,
+ -- r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.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
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_target_recruitment_id::uuid AS recruitment_id,
+ COUNT(distinct ri.recruit_id) AS waiting_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_target_recruitment_id
+)
+SELECT
+ rd.recruitment_id,
+ current_date AS recording_date,
+ COALESCE(rd.waiting_count, 0) AS waiting_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM recruit_data AS rd
+ Y
+
+
+ 336
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl
new file mode 100644
index 0000000..1be98fb
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl
@@ -0,0 +1,272 @@
+
+
+
+ main_dashboard.waiting_registration_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input 2 (person_registry) регион
+ Insert / update (main_dashboard.waiting_registration) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.waiting_registration) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
waiting_registration
+
+ waiting_registration
+ waiting_count
+ Y
+
+
+ "waiting_registration_M"
+ male_count
+ Y
+
+
+ "waiting_registration_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1024
+ 240
+
+
+
+ Table input 2 (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id
+),
+last_status 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 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
+),
+vse AS (
+ SELECT
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id,
+ r.gender,
+ r.birth_date,
+ -- r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.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
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_target_recruitment_id::uuid AS recruitment_id,
+ COUNT(distinct ri.recruit_id) AS waiting_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_target_recruitment_id
+)
+SELECT
+ rd.recruitment_id,
+ current_date AS recording_date,
+ COALESCE(rd.waiting_count, 0) AS waiting_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM recruit_data AS rd
+ Y
+
+
+ 336
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl
new file mode 100644
index 0000000..c11a7f1
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl
@@ -0,0 +1,272 @@
+
+
+
+ main_dashboard.waiting_registration_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input 2 (person_registry) регион
+ Insert / update (main_dashboard.waiting_registration) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.waiting_registration) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
waiting_registration
+
+ waiting_registration
+ waiting_count
+ Y
+
+
+ "waiting_registration_M"
+ male_count
+ Y
+
+
+ "waiting_registration_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1024
+ 240
+
+
+
+ Table input 2 (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id
+),
+last_status 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 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
+),
+vse AS (
+ SELECT
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id,
+ r.gender,
+ r.birth_date,
+ -- r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.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
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_target_recruitment_id::uuid AS recruitment_id,
+ COUNT(distinct ri.recruit_id) AS waiting_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_target_recruitment_id
+)
+SELECT
+ rd.recruitment_id,
+ current_date AS recording_date,
+ COALESCE(rd.waiting_count, 0) AS waiting_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM recruit_data AS rd
+ Y
+
+
+ 336
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl
new file mode 100644
index 0000000..dbbb488
--- /dev/null
+++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl
@@ -0,0 +1,272 @@
+
+
+
+ main_dashboard.waiting_registration_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input 2 (person_registry) регион
+ Insert / update (main_dashboard.waiting_registration) 2
+ Y
+
+
+
+ Insert / update (main_dashboard.waiting_registration) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
waiting_registration
+
+ waiting_registration
+ waiting_count
+ Y
+
+
+ "waiting_registration_M"
+ male_count
+ Y
+
+
+ "waiting_registration_W"
+ female_count
+ Y
+
+
+ mobilization_criterion
+ mobilization_criterion
+ Y
+
+
+ volunteer_criterion
+ volunteer_criterion
+ Y
+
+
+ contract_criterion
+ contract_criterion
+ Y
+
+
+ mobilization_criterion_percent
+ mobilization_criterion_percent
+ Y
+
+
+ volunteer_criterion_percent
+ volunteer_criterion_percent
+ Y
+
+
+ contract_criterion_percent
+ contract_criterion_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1024
+ 240
+
+
+
+ Table input 2 (person_registry) регион
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id
+),
+last_status 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 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
+),
+vse AS (
+ SELECT
+ r.id AS r_id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id,
+ r.gender,
+ r.birth_date,
+ -- r.conscription,
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
+ WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
+ )
+ ELSE
+ false
+ END AS uchet_pnd,
+ 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.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
+),
+extracted_children AS (
+ SELECT
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_birth_dates AS (
+ SELECT
+ recruit_id,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
+ FROM extracted_children
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) AS children_under_16
+ FROM children_birth_dates
+ WHERE AGE(make_date(year, month, day)) < interval '16 years'
+ GROUP BY recruit_id
+),
+recruit_data AS (
+ SELECT
+ ri.r_target_recruitment_id::uuid AS recruitment_id,
+ COUNT(distinct ri.recruit_id) AS waiting_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count,
+ COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count,
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет
+ OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет
+ AND COALESCE(cc.children_under_16, 0) < 5
+ ) AS mobilization_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
+ AND gender = 'MALE'
+ AND hidden IS true -- нет отсрочки и нет освобождения от службы
+ ) AS volunteer_criterion, -- критерии от 03.06.2025
+
+ COUNT(distinct ri.recruit_id) FILTER (
+ WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
+ AND gender = 'MALE'
+ AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
+ OR uchet_pnd is false)
+ AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
+ --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1'
+ ) AS contract_criterion -- критерии от 03.06.2025
+ FROM vse AS ri
+ LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id
+ GROUP BY ri.r_target_recruitment_id
+)
+SELECT
+ rd.recruitment_id,
+ current_date AS recording_date,
+ COALESCE(rd.waiting_count, 0) AS waiting_count,
+ COALESCE(rd.male_count, 0) AS male_count,
+ COALESCE(rd.female_count, 0) AS female_count,
+ COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion,
+ COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion,
+ COALESCE(rd.contract_criterion, 0) AS contract_criterion,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS mobilization_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS volunteer_criterion_percent,
+ CASE
+ WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2)
+ ELSE 0
+ END AS contract_criterion_percent
+FROM recruit_data AS rd
+ Y
+
+
+ 336
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/parameters/add_schema.hpl b/map_v1/mil_com/parameters/add_schema.hpl
new file mode 100644
index 0000000..836f4d7
--- /dev/null
+++ b/map_v1/mil_com/parameters/add_schema.hpl
@@ -0,0 +1,692 @@
+
+
+
+ add_schema
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/01/17 12:24:07.728
+ -
+ 2025/01/17 12:24:07.728
+
+
+
+
+
+ Table input
+ Update (total_registered.driver_license)
+ Y
+
+
+ Table input
+ Update (total_registered.child_minor)
+ Y
+
+
+ Table input
+ Update (total_registered.age)
+ Y
+
+
+ Table input
+ Update (total_registered.marital_status)
+ Y
+
+
+ Table input
+ Update (total_registered.busyness)
+ Y
+
+
+ Table input
+ Update (total_registered.education_level)
+ Y
+
+
+ Table input
+ Update (total_registered.subpoenas)
+ Y
+
+
+ Table input
+ Update (total_registered.removed_registry)
+ Y
+
+
+ Table input
+ Update (total_registered.reg_mil_cat)
+ Y
+
+
+ Table input
+ Update (main_dashboard.waiting_registration)
+ Y
+
+
+ Table input
+ Update (main_dashboard.total_registered)
+ Y
+
+
+ Table input
+ Update (recruitment_campaign.appeals)
+ N
+
+
+ Table input
+ Update (recruitment_campaign.subpoenas)
+ Y
+
+
+ Table input
+ Update (main_dashboard.recruitment_campaign)
+ Y
+
+
+
+ Table input
+ TableInput
+
+ N
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ 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'
+ WHEN schema = 'Ministry' THEN 'Ministry'
+ ELSE schema -- на случай, если появится неизвестное значение
+ END AS schema,
+ current_date AS recording_date
+FROM
+ ervu_dashboard.recruitment
+WHERE schema in ('Department', 'Organization', 'Region')
+ N
+
+
+ 608
+ 928
+
+
+
+ Update (main_dashboard.recruitment_campaign)
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ main_dashboard
+
+
+ schema
+ schema
+
+
+ N
+ Y
+
+
+ 1200
+ 800
+
+
+
+
+
+
diff --git a/map_v1/mil_com/parameters/array_recruitment_for_parallel.hpl b/map_v1/mil_com/parameters/array_recruitment_for_parallel.hpl
new file mode 100644
index 0000000..396b2c5
--- /dev/null
+++ b/map_v1/mil_com/parameters/array_recruitment_for_parallel.hpl
@@ -0,0 +1,113 @@
+
+
+
+ array_recruitment_for_parallel
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/03/31 10:14:04.435
+ -
+ 2025/03/31 10:14:04.435
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 1040
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ids AS (
+ SELECT idm_id,
+ NTILE(5) OVER (ORDER BY idm_id) AS part -- Разбиваем на 5 частей
+ FROM ervu_dashboard.recruitment
+ WHERE schema IN ('Department', 'Organization', 'Region')
+),
+grouped AS (
+ SELECT
+ array_agg(idm_id) FILTER (WHERE part = 1) AS part_1,
+ array_agg(idm_id) FILTER (WHERE part = 2) AS part_2,
+ array_agg(idm_id) FILTER (WHERE part = 3) AS part_3,
+ array_agg(idm_id) FILTER (WHERE part = 4) AS part_4,
+ array_agg(idm_id) FILTER (WHERE part = 5) AS part_5
+ FROM ids
+),
+split_parts AS (
+ SELECT
+ gs.row_num,
+ (SELECT array_agg(val) FROM unnest(part_1) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_1, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_1, 1) * gs.row_num / 2) AS PART_RECRUITMENT_1,
+ (SELECT array_agg(val) FROM unnest(part_2) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_2, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_2, 1) * gs.row_num / 2) AS PART_RECRUITMENT_2,
+ (SELECT array_agg(val) FROM unnest(part_3) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_3, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_3, 1) * gs.row_num / 2) AS PART_RECRUITMENT_3,
+ (SELECT array_agg(val) FROM unnest(part_4) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_4, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_4, 1) * gs.row_num / 2) AS PART_RECRUITMENT_4,
+ (SELECT array_agg(val) FROM unnest(part_5) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_5, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_5, 1) * gs.row_num / 2) AS PART_RECRUITMENT_5
+ FROM grouped
+ CROSS JOIN generate_series(1, 2) gs(row_num)
+)
+SELECT
+PART_RECRUITMENT_1,
+PART_RECRUITMENT_2,
+PART_RECRUITMENT_3,
+PART_RECRUITMENT_4,
+PART_RECRUITMENT_5
+FROM split_parts;
+ N
+
+
+ 672
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/parameters/array_recruitments.hpl b/map_v1/mil_com/parameters/array_recruitments.hpl
new file mode 100644
index 0000000..4fc3712
--- /dev/null
+++ b/map_v1/mil_com/parameters/array_recruitments.hpl
@@ -0,0 +1,120 @@
+
+
+
+ array_recruitments
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/01/17 10:29:53.663
+ -
+ 2025/01/17 10:29:53.663
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 42
+ 752
+ 128
+ ARRAY_MIL_COM - алиас (массив idm_id всех военкоматов)
+ARR_MC - параметр
+ 339
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 752
+ 192
+ для запуска без параллели
+ 158
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 768
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ WITH ids AS (
+ SELECT idm_id,
+ (ROW_NUMBER() OVER ()) - 1 AS rn
+ FROM ervu_dashboard.recruitment
+ WHERE schema IN ('Department', 'Organization', 'Region')
+ --LIMIT 200
+)
+SELECT array_agg(idm_id) AS ARRAY_MIL_COM
+FROM ids
+GROUP BY rn / 100;
+ N
+
+
+ 512
+ 336
+
+
+
+
+
+
diff --git a/map_v1/mil_com/parameters/season_separation/array_season_recruitments.hpl b/map_v1/mil_com/parameters/season_separation/array_season_recruitments.hpl
new file mode 100644
index 0000000..58e9e3a
--- /dev/null
+++ b/map_v1/mil_com/parameters/season_separation/array_season_recruitments.hpl
@@ -0,0 +1,114 @@
+
+
+
+ array_season_recruitments
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/03/20 10:44:35.298
+ -
+ 2025/03/20 10:44:35.298
+
+
+
+
+
+ Table input определенные вк
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 832
+ 240
+
+
+
+ Table input определенные вк
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ARRAY[
+ '55158cc6-1342-4701-ab2b-855a6389906d'::UUID, -- Военный комиссариат Провиденского и Чукотского районов Чукотского автономного округа
+ 'd35584cf-8405-42ea-9944-25bfe5725347', -- Военный комиссариат Охотского Аяно-Майского и Тугуро-Чумиканского районов Хабаровского края
+ 'b960d9a3-97c5-42ff-9fa7-1843114392a0', -- Военный комиссариат Тигильского Карагинского Олюторского и Пенжинского районов Камчатского края
+ 'ab335d7b-7966-470d-89b3-72cee950839d', -- Военный комиссариат Оймяконского и Момского улусов Республики Саха (Якутия)
+ '1dea48be-40fb-42bd-9df8-14d0cfd3fd12', -- Военный комиссариат Нижнеколымского и Среднеколымского улусов Республики Саха (Якутия)
+ '018b8e04-2714-402a-961b-39877b9ee698', -- Военный комиссариат Верхоянского и Эвено-Бытантайского улусов Республики Саха (Якутия)
+ '18e818af-ef45-49ee-aea2-d0f3516ddf1d', -- Военный комиссариат Верхнеколымского улуса Республики Саха (Якутия)
+ 'b2ec295c-47a4-4be9-a6f8-827096f9857d', -- Военный комиссариат Булунского и Жиганского улусов Республики Саха (Якутия)
+ 'eaffdb79-767f-405c-a1b1-b48bdc63add8' -- Военный комиссариат Усть-Янского Аллаиховского и Абыйского улусов Республики Саха (Якутия)
+ ] AS ARRAY_MIL_COM_SP, -- 1.05-15.07
+ ARRAY[
+ '354f7fbd-467f-4f41-aaad-f0e2e139527e'::UUID, -- Военный комиссариат города Воркута Республики Коми
+ 'ce2b0297-d1e8-422a-8367-b7e3a5cc7a40', -- Военный комиссариат города Инта Республики Коми
+ 'c023af4a-ad27-4539-a1f9-7a3251634fdb', -- Военный комиссариат города Печора и Печорского района Республики Коми
+ '0e44335f-02db-43ac-b713-f09532e675a3', -- Военный комиссариат городов Ухта Вуктыл и Сосногорск Вуктыльского и Сосногорского районов Республики Коми
+ 'e55859e6-9d34-47b7-a969-efc8ceea708b', -- Военный комиссариат Ижемского района Республики Коми
+ 'b9d1002f-d2a7-4d2f-910b-637b2cf332dd', -- Военный комиссариат Княжпогостского и Усть-Вымского районов Республики Коми
+ 'ef2da2e5-0cc1-479c-b2de-c334c95b5514', -- Военный комиссариат Сысольского Койгородского и Прилузского районов Республики Коми
+ '53851a38-fc95-400b-9ff7-00b4dcad2918', -- Военный комиссариат города Сыктывкар Сыктывдинского и Корткеросского районов Республики Коми
+ '2dc1de3a-712a-4376-8baf-7833a43f6678', -- Военный комиссариат Троицко-Печорского района Республики Коми
+ 'a6db3dba-65e3-4ad9-a76e-a846efec2a2d', -- Военный комиссариат Удорского района Республики Коми
+ '630ba6cd-c979-4d35-b128-f6e2527949ef', -- Военный комиссариат города Усинск и Усинского района Республики Коми
+ '231361d3-3d34-4409-8a30-20c4b013d62c', -- Военный комиссариат Усть-Куломского района Республики Коми
+ '6466af82-e8be-416d-88c9-cef02f99fef0', -- Военный комиссариат Усть-Цилемского района Республики Коми
+ '83c89e3d-aa69-43bc-857c-59ce405b9e1e', -- Военный комиссариат Туруханского района и города Игарка Красноярского края
+ 'ec2c03cd-9c13-4980-9f6d-ba4a93a9a411', -- Военный комиссариат города Лесосибирск и Мотыгинского района Красноярского края
+ 'd386bf1f-42bd-436f-8b14-288b2cbe1046', -- какой то Северо-Енисейский безымянный военкомат
+ '61b5758c-c72b-426e-a96f-e146d89197c2', -- Военный комиссариат города Норильск и Таймырского Долгано-Ненецкого района Красноярского края
+ '9f1a1e68-2fd2-478c-b6ba-b04cc6b752b3', -- Военный комиссариат Эвенкийского района Красноярского края
+ '7cb704d4-b600-4ce9-bddf-723e1b024f98', -- Военный комиссариат Гайнского района Пермского края
+ 'be515915-26e8-41c8-af21-3b53d991d632', -- Военный комиссариат Кочевского и Косинского районов Пермского края
+ '28061db5-22ef-46f6-a2af-043c47288885', -- Военный комиссариат Ненецкого автономного округа
+ 'ce08e909-5a14-480f-b931-bff172872ac6', -- ВК городских округов Курильский и Северо-Курильский Сахалинской области
+ 'f578c2c0-72fe-4f3b-bcf7-659bda20f511', -- Военный комиссариат города Губкинский Пуровского и Красноселькупского районов Ямало-Ненецкого автономного округа
+ '5a0c4a0c-1d00-4528-9dcc-73c8d6dd52b9', -- Военный комиссариат города Лабытнанги и Шурышкарского района Ямало-Ненецкого автономного округа
+ '50af0e45-872b-48e8-bf74-c13b2162e3ce', -- Военный комиссариат городов Ноябрьск и Муравленко Ямало-Ненецкого автономного округа
+ 'a8852d04-516d-4ea4-9979-5eb149e9ac7e', -- Военный комиссариат города Новый Уренгой Ямало-Ненецкого автономного округа
+ '9464d4df-9402-4eb2-abb2-c68b079ad5cf', -- Военный комиссариат города Салехард и Приуральского района Ямало-Ненецкого автономного округа
+ 'b778245a-0257-4d93-a51c-fa7005e4a480', -- Военный комиссариат города Надым и Надымского района Ямало-Ненецкого автономного округа
+ '2e18cd11-bbca-406d-a2b8-0a89cbb2046e', -- Военный комиссариат Тазовского района Ямало-Ненецкого автономного округа
+ 'a4126a2d-3412-47cd-aa90-caa62e202c7f' -- Военный комиссариат Ямальского района Ямало-Ненецкого автономного округа
+ ] AS ARRAY_MIL_COM_AU -- 1.11-31.12
+ N
+
+
+ 512
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all.hpl b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
new file mode 100644
index 0000000..b2dbe45
--- /dev/null
+++ b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
@@ -0,0 +1,121 @@
+
+
+
+ array_season_recruitments_all
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/03/20 10:44:35.298
+ -
+ 2025/03/20 10:44:35.298
+
+
+
+
+
+ Table input остальные
+ Copy rows to result 2
+ Y
+
+
+
+ Copy rows to result 2
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 832
+ 352
+
+
+
+ Table input остальные
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+
+ WITH ids AS (
+ SELECT idm_id,
+ (ROW_NUMBER() OVER ()) - 1 AS rn
+ FROM ervu_dashboard.recruitment
+ WHERE schema IN ('Department', 'Organization', 'Region')
+ --LIMIT 200
+ AND idm_id NOT IN (
+ '55158cc6-1342-4701-ab2b-855a6389906d'::UUID, -- Военный комиссариат Провиденского и Чукотского районов Чукотского автономного округа
+ 'd35584cf-8405-42ea-9944-25bfe5725347', -- Военный комиссариат Охотского Аяно-Майского и Тугуро-Чумиканского районов Хабаровского края
+ 'b960d9a3-97c5-42ff-9fa7-1843114392a0', -- Военный комиссариат Тигильского Карагинского Олюторского и Пенжинского районов Камчатского края
+ 'ab335d7b-7966-470d-89b3-72cee950839d', -- Военный комиссариат Оймяконского и Момского улусов Республики Саха (Якутия)
+ '1dea48be-40fb-42bd-9df8-14d0cfd3fd12', -- Военный комиссариат Нижнеколымского и Среднеколымского улусов Республики Саха (Якутия)
+ '018b8e04-2714-402a-961b-39877b9ee698', -- Военный комиссариат Верхоянского и Эвено-Бытантайского улусов Республики Саха (Якутия)
+ '18e818af-ef45-49ee-aea2-d0f3516ddf1d', -- Военный комиссариат Верхнеколымского улуса Республики Саха (Якутия)
+ 'b2ec295c-47a4-4be9-a6f8-827096f9857d', -- Военный комиссариат Булунского и Жиганского улусов Республики Саха (Якутия)
+ 'eaffdb79-767f-405c-a1b1-b48bdc63add8', -- Военный комиссариат Усть-Янского Аллаиховского и Абыйского улусов Республики Саха (Якутия)
+ '354f7fbd-467f-4f41-aaad-f0e2e139527e', -- Военный комиссариат города Воркута Республики Коми
+ 'ce2b0297-d1e8-422a-8367-b7e3a5cc7a40', -- Военный комиссариат города Инта Республики Коми
+ 'c023af4a-ad27-4539-a1f9-7a3251634fdb', -- Военный комиссариат города Печора и Печорского района Республики Коми
+ '0e44335f-02db-43ac-b713-f09532e675a3', -- Военный комиссариат городов Ухта Вуктыл и Сосногорск Вуктыльского и Сосногорского районов Республики Коми
+ 'e55859e6-9d34-47b7-a969-efc8ceea708b', -- Военный комиссариат Ижемского района Республики Коми
+ 'b9d1002f-d2a7-4d2f-910b-637b2cf332dd', -- Военный комиссариат Княжпогостского и Усть-Вымского районов Республики Коми
+ 'ef2da2e5-0cc1-479c-b2de-c334c95b5514', -- Военный комиссариат Сысольского Койгородского и Прилузского районов Республики Коми
+ '53851a38-fc95-400b-9ff7-00b4dcad2918', -- Военный комиссариат города Сыктывкар Сыктывдинского и Корткеросского районов Республики Коми
+ '2dc1de3a-712a-4376-8baf-7833a43f6678', -- Военный комиссариат Троицко-Печорского района Республики Коми
+ 'a6db3dba-65e3-4ad9-a76e-a846efec2a2d', -- Военный комиссариат Удорского района Республики Коми
+ '630ba6cd-c979-4d35-b128-f6e2527949ef', -- Военный комиссариат города Усинск и Усинского района Республики Коми
+ '231361d3-3d34-4409-8a30-20c4b013d62c', -- Военный комиссариат Усть-Куломского района Республики Коми
+ '6466af82-e8be-416d-88c9-cef02f99fef0', -- Военный комиссариат Усть-Цилемского района Республики Коми
+ '83c89e3d-aa69-43bc-857c-59ce405b9e1e', -- Военный комиссариат Туруханского района и города Игарка Красноярского края
+ 'ec2c03cd-9c13-4980-9f6d-ba4a93a9a411', -- Военный комиссариат города Лесосибирск и Мотыгинского района Красноярского края
+ 'd386bf1f-42bd-436f-8b14-288b2cbe1046', -- какой то Северо-Енисейский безымянный военкомат
+ '61b5758c-c72b-426e-a96f-e146d89197c2', -- Военный комиссариат города Норильск и Таймырского Долгано-Ненецкого района Красноярского края
+ '9f1a1e68-2fd2-478c-b6ba-b04cc6b752b3', -- Военный комиссариат Эвенкийского района Красноярского края
+ '7cb704d4-b600-4ce9-bddf-723e1b024f98', -- Военный комиссариат Гайнского района Пермского края
+ 'be515915-26e8-41c8-af21-3b53d991d632', -- Военный комиссариат Кочевского и Косинского районов Пермского края
+ '28061db5-22ef-46f6-a2af-043c47288885', -- Военный комиссариат Ненецкого автономного округа
+ 'ce08e909-5a14-480f-b931-bff172872ac6', -- ВК городских округов Курильский и Северо-Курильский Сахалинской области
+ 'f578c2c0-72fe-4f3b-bcf7-659bda20f511', -- Военный комиссариат города Губкинский Пуровского и Красноселькупского районов Ямало-Ненецкого автономного округа
+ '5a0c4a0c-1d00-4528-9dcc-73c8d6dd52b9', -- Военный комиссариат города Лабытнанги и Шурышкарского района Ямало-Ненецкого автономного округа
+ '50af0e45-872b-48e8-bf74-c13b2162e3ce', -- Военный комиссариат городов Ноябрьск и Муравленко Ямало-Ненецкого автономного округа
+ 'a8852d04-516d-4ea4-9979-5eb149e9ac7e', -- Военный комиссариат города Новый Уренгой Ямало-Ненецкого автономного округа
+ '9464d4df-9402-4eb2-abb2-c68b079ad5cf', -- Военный комиссариат города Салехард и Приуральского района Ямало-Ненецкого автономного округа
+ 'b778245a-0257-4d93-a51c-fa7005e4a480', -- Военный комиссариат города Надым и Надымского района Ямало-Ненецкого автономного округа
+ '2e18cd11-bbca-406d-a2b8-0a89cbb2046e', -- Военный комиссариат Тазовского района Ямало-Ненецкого автономного округа
+ 'a4126a2d-3412-47cd-aa90-caa62e202c7f' -- Военный комиссариат Ямальского района Ямало-Ненецкого автономного округа
+ )
+)
+SELECT array_agg(idm_id) AS ARRAY_MIL_COM
+FROM ids
+GROUP BY rn / 200;
+ N
+
+
+ 512
+ 352
+
+
+
+
+
+
diff --git a/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all_parallel.hpl b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all_parallel.hpl
new file mode 100644
index 0000000..b2d6ede
--- /dev/null
+++ b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all_parallel.hpl
@@ -0,0 +1,154 @@
+
+
+
+ array_season_recruitments_all_parallel
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/03/20 10:44:35.298
+ -
+ 2025/03/20 10:44:35.298
+
+
+
+
+
+ Table input остальные
+ Copy rows to result 2
+ Y
+
+
+
+ Copy rows to result 2
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 832
+ 352
+
+
+
+ Table input остальные
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+
+ WITH ids AS (
+ SELECT idm_id,
+ NTILE(5) OVER (ORDER BY idm_id) AS part -- Разбиваем на 5 частей
+ FROM ervu_dashboard.recruitment
+ WHERE schema IN ('Department', 'Organization', 'Region')
+ AND idm_id NOT IN (
+ '55158cc6-1342-4701-ab2b-855a6389906d'::UUID, -- Военный комиссариат Провиденского и Чукотского районов Чукотского автономного округа
+ 'd35584cf-8405-42ea-9944-25bfe5725347', -- Военный комиссариат Охотского Аяно-Майского и Тугуро-Чумиканского районов Хабаровского края
+ 'b960d9a3-97c5-42ff-9fa7-1843114392a0', -- Военный комиссариат Тигильского Карагинского Олюторского и Пенжинского районов Камчатского края
+ 'ab335d7b-7966-470d-89b3-72cee950839d', -- Военный комиссариат Оймяконского и Момского улусов Республики Саха (Якутия)
+ '1dea48be-40fb-42bd-9df8-14d0cfd3fd12', -- Военный комиссариат Нижнеколымского и Среднеколымского улусов Республики Саха (Якутия)
+ '018b8e04-2714-402a-961b-39877b9ee698', -- Военный комиссариат Верхоянского и Эвено-Бытантайского улусов Республики Саха (Якутия)
+ '18e818af-ef45-49ee-aea2-d0f3516ddf1d', -- Военный комиссариат Верхнеколымского улуса Республики Саха (Якутия)
+ 'b2ec295c-47a4-4be9-a6f8-827096f9857d', -- Военный комиссариат Булунского и Жиганского улусов Республики Саха (Якутия)
+ 'eaffdb79-767f-405c-a1b1-b48bdc63add8', -- Военный комиссариат Усть-Янского Аллаиховского и Абыйского улусов Республики Саха (Якутия)
+ '354f7fbd-467f-4f41-aaad-f0e2e139527e', -- Военный комиссариат города Воркута Республики Коми
+ 'ce2b0297-d1e8-422a-8367-b7e3a5cc7a40', -- Военный комиссариат города Инта Республики Коми
+ 'c023af4a-ad27-4539-a1f9-7a3251634fdb', -- Военный комиссариат города Печора и Печорского района Республики Коми
+ '0e44335f-02db-43ac-b713-f09532e675a3', -- Военный комиссариат городов Ухта Вуктыл и Сосногорск Вуктыльского и Сосногорского районов Республики Коми
+ 'e55859e6-9d34-47b7-a969-efc8ceea708b', -- Военный комиссариат Ижемского района Республики Коми
+ 'b9d1002f-d2a7-4d2f-910b-637b2cf332dd', -- Военный комиссариат Княжпогостского и Усть-Вымского районов Республики Коми
+ 'ef2da2e5-0cc1-479c-b2de-c334c95b5514', -- Военный комиссариат Сысольского Койгородского и Прилузского районов Республики Коми
+ '53851a38-fc95-400b-9ff7-00b4dcad2918', -- Военный комиссариат города Сыктывкар Сыктывдинского и Корткеросского районов Республики Коми
+ '2dc1de3a-712a-4376-8baf-7833a43f6678', -- Военный комиссариат Троицко-Печорского района Республики Коми
+ 'a6db3dba-65e3-4ad9-a76e-a846efec2a2d', -- Военный комиссариат Удорского района Республики Коми
+ '630ba6cd-c979-4d35-b128-f6e2527949ef', -- Военный комиссариат города Усинск и Усинского района Республики Коми
+ '231361d3-3d34-4409-8a30-20c4b013d62c', -- Военный комиссариат Усть-Куломского района Республики Коми
+ '6466af82-e8be-416d-88c9-cef02f99fef0', -- Военный комиссариат Усть-Цилемского района Республики Коми
+ '83c89e3d-aa69-43bc-857c-59ce405b9e1e', -- Военный комиссариат Туруханского района и города Игарка Красноярского края
+ 'ec2c03cd-9c13-4980-9f6d-ba4a93a9a411', -- Военный комиссариат города Лесосибирск и Мотыгинского района Красноярского края
+ 'd386bf1f-42bd-436f-8b14-288b2cbe1046', -- какой то Северо-Енисейский безымянный военкомат
+ '61b5758c-c72b-426e-a96f-e146d89197c2', -- Военный комиссариат города Норильск и Таймырского Долгано-Ненецкого района Красноярского края
+ '9f1a1e68-2fd2-478c-b6ba-b04cc6b752b3', -- Военный комиссариат Эвенкийского района Красноярского края
+ '7cb704d4-b600-4ce9-bddf-723e1b024f98', -- Военный комиссариат Гайнского района Пермского края
+ 'be515915-26e8-41c8-af21-3b53d991d632', -- Военный комиссариат Кочевского и Косинского районов Пермского края
+ '28061db5-22ef-46f6-a2af-043c47288885', -- Военный комиссариат Ненецкого автономного округа
+ 'ce08e909-5a14-480f-b931-bff172872ac6', -- ВК городских округов Курильский и Северо-Курильский Сахалинской области
+ 'f578c2c0-72fe-4f3b-bcf7-659bda20f511', -- Военный комиссариат города Губкинский Пуровского и Красноселькупского районов Ямало-Ненецкого автономного округа
+ '5a0c4a0c-1d00-4528-9dcc-73c8d6dd52b9', -- Военный комиссариат города Лабытнанги и Шурышкарского района Ямало-Ненецкого автономного округа
+ '50af0e45-872b-48e8-bf74-c13b2162e3ce', -- Военный комиссариат городов Ноябрьск и Муравленко Ямало-Ненецкого автономного округа
+ 'a8852d04-516d-4ea4-9979-5eb149e9ac7e', -- Военный комиссариат города Новый Уренгой Ямало-Ненецкого автономного округа
+ '9464d4df-9402-4eb2-abb2-c68b079ad5cf', -- Военный комиссариат города Салехард и Приуральского района Ямало-Ненецкого автономного округа
+ 'b778245a-0257-4d93-a51c-fa7005e4a480', -- Военный комиссариат города Надым и Надымского района Ямало-Ненецкого автономного округа
+ '2e18cd11-bbca-406d-a2b8-0a89cbb2046e', -- Военный комиссариат Тазовского района Ямало-Ненецкого автономного округа
+ 'a4126a2d-3412-47cd-aa90-caa62e202c7f' -- Военный комиссариат Ямальского района Ямало-Ненецкого автономного округа
+ )
+),
+grouped AS (
+ SELECT
+ array_agg(idm_id) FILTER (WHERE part = 1) AS part_1,
+ array_agg(idm_id) FILTER (WHERE part = 2) AS part_2,
+ array_agg(idm_id) FILTER (WHERE part = 3) AS part_3,
+ array_agg(idm_id) FILTER (WHERE part = 4) AS part_4,
+ array_agg(idm_id) FILTER (WHERE part = 5) AS part_5
+ FROM ids
+),
+split_parts AS (
+ SELECT
+ gs.row_num,
+ (SELECT array_agg(val) FROM unnest(part_1) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_1, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_1, 1) * gs.row_num / 2) AS PART_RECRUITMENT_1,
+ (SELECT array_agg(val) FROM unnest(part_2) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_2, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_2, 1) * gs.row_num / 2) AS PART_RECRUITMENT_2,
+ (SELECT array_agg(val) FROM unnest(part_3) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_3, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_3, 1) * gs.row_num / 2) AS PART_RECRUITMENT_3,
+ (SELECT array_agg(val) FROM unnest(part_4) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_4, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_4, 1) * gs.row_num / 2) AS PART_RECRUITMENT_4,
+ (SELECT array_agg(val) FROM unnest(part_5) WITH ORDINALITY AS t(val, ord)
+ WHERE ord > array_length(part_5, 1) * (gs.row_num - 1) / 2
+ AND ord <= array_length(part_5, 1) * gs.row_num / 2) AS PART_RECRUITMENT_5
+ FROM grouped
+ CROSS JOIN generate_series(1, 2) gs(row_num)
+)
+SELECT
+PART_RECRUITMENT_1,
+PART_RECRUITMENT_2,
+PART_RECRUITMENT_3,
+PART_RECRUITMENT_4,
+PART_RECRUITMENT_5
+FROM split_parts;
+ N
+
+
+ 512
+ 352
+
+
+
+
+
+
diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl
new file mode 100644
index 0000000..0a7e8ab
--- /dev/null
+++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl
@@ -0,0 +1,702 @@
+
+
+
+ recruitment_campaign.subpoenas(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/09 13:13:59.825
+ -
+ 2024/08/09 13:13:59.825
+
+
+
+
+
+ Get variables 4 3
+ Select values 4 3
+ N
+
+
+ Table input (subpoena) осень/регионы
+ Get variables 4 3
+ N
+
+
+ Select values 4 3
+ Insert / update (recruitment_campaign.subpoenas) 3
+ N
+
+
+ Table input (subpoena) осень/регионы
+ Insert / update (recruitment_campaign.subpoenas) 3
+ N
+
+
+ Table input (subpoena) осень/регионы
+ Update recruitment_campaign.subpoenas
+ Y
+
+
+
+ Get variables 4 3
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 592
+ 512
+
+
+
+ Insert / update (recruitment_campaign.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ recruitment_campaign
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ rest
+ rest
+ Y
+
+
+ spring_autumn
+ spring_autumn
+ N
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 960
+ 400
+
+
+
+ Select values 4 3
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 768
+ 512
+
+
+
+ Table input (subpoena) осень/регионы
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ 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.recruit_id,
+ rdi.status_applied,
+ s.create_date,
+ s.visit_date,
+ s.department_id::uuid AS recruitment_id,
+ s.status_id,
+ 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,
+ ssi.act_number,
+ sh.rn,
+ rd.rn_d,
+ --rdi.rn_di,
+ ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1
+ --AND
+sr.type = '3'
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+season_separations AS (
+ SELECT distinct
+ ls.recruitment_id,
+ ls.recruit_id,
+ ls.status_applied,
+ ls.create_date,
+ ls.visit_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_date,
+ ls.send_date,
+ ls.restr_dc,
+ ls.ap_date,
+ ls.d_code,
+ ls.act_number,
+ ls.rdi_id,
+ ls.rn,
+ ls.rn_d,
+ --rdi.rn_di,
+ ls.rn_si,
+ CASE
+ WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days')
+ THEN 'Весна'
+ WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days')
+ THEN 'Осень'
+ END AS spring_autumn
+ FROM subpoena_data ls
+ WHERE --ls.create_date >= DATE_TRUNC('year', CURRENT_DATE)
+ --AND
+ ((ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days')
+ OR
+ (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days'))
+),
+season_separations_clean AS (
+ SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations
+),
+t1 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_subpoena
+ FROM season_separations ss
+ WHERE sub_stat_hist IS NOT NULL and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t2 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ss.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ss.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+ FROM season_separations ss
+where ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t3 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_appeared
+ FROM season_separations ss
+ WHERE ss.sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1 -- снесен 4 статус от 14.03.2025
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t4 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_not_appeared
+ FROM season_separations ss
+ WHERE sub_stat_hist = '5' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t5 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_not_ap_good_reason
+ FROM season_separations ss
+ WHERE sub_stat_hist = '5.1' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t6 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_ap_not_required
+ FROM season_separations ss
+ WHERE sub_stat_hist IN ('3.8', '5.2') and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t7 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(distinct recruit_id) AS count_restrictions_applied
+ FROM season_separations ss
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and ss.rn = 1 and ss.rn_d = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t8 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(distinct recruit_id) AS count_introduced_measures
+ FROM season_separations ss
+ WHERE status_applied = '11' and ss.rn = 1 and ss.rn_d = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t9 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_paper
+ FROM season_separations ss
+ WHERE d_code != '7' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t10 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_electron
+ FROM season_separations ss
+ WHERE d_code = '7' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t11 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT (DISTINCT ss.rdi_id) AS count_restrictions
+ FROM season_separations ss
+where ss.rn_d = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t12 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_not_delivery
+ FROM season_separations ss
+ WHERE ss.act_number IS NOT NULL and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t13 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS appear_date_is_good
+ FROM season_separations ss
+ WHERE ss.sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appeared_percent,
+ ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_appeared_percent,
+ ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_ap_good_reason_percent,
+ ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS ap_not_required_percent,
+ ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS electron_percent,
+ ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS paper_percent,
+ ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS restrictions_applied_percent,
+ ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS introduced_measures_percent,
+ ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_delivery_percent,
+ ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appear_date_is_good_percent,
+ ss.recruitment_id,
+ 0 AS rest,
+ ss.spring_autumn
+FROM season_separations_clean 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
+LEFT JOIN t4 ON ss.recruitment_id = t4.recruitment_id AND ss.spring_autumn = t4.spring_autumn
+LEFT JOIN t5 ON ss.recruitment_id = t5.recruitment_id AND ss.spring_autumn = t5.spring_autumn
+LEFT JOIN t6 ON ss.recruitment_id = t6.recruitment_id AND ss.spring_autumn = t6.spring_autumn
+LEFT JOIN t7 ON ss.recruitment_id = t7.recruitment_id AND ss.spring_autumn = t7.spring_autumn
+LEFT JOIN t8 ON ss.recruitment_id = t8.recruitment_id AND ss.spring_autumn = t8.spring_autumn
+LEFT JOIN t9 ON ss.recruitment_id = t9.recruitment_id AND ss.spring_autumn = t9.spring_autumn
+LEFT JOIN t10 ON ss.recruitment_id = t10.recruitment_id AND ss.spring_autumn = t10.spring_autumn
+LEFT JOIN t11 ON ss.recruitment_id = t11.recruitment_id AND ss.spring_autumn = t11.spring_autumn
+LEFT JOIN t12 ON ss.recruitment_id = t12.recruitment_id AND ss.spring_autumn = t12.spring_autumn
+LEFT JOIN t13 ON ss.recruitment_id = t13.recruitment_id AND ss.spring_autumn = t13.spring_autumn
+ Y
+
+
+ 464
+ 400
+
+
+
+ Update recruitment_campaign.subpoenas
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ recruitment_campaign
+
subpoenas
+
+ subpoena
+ count_subpoena
+
+
+ appeared
+ count_appeared
+
+
+ not_appeared
+ count_not_appeared
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+
+
+ ap_not_required
+ count_ap_not_required
+
+
+ restrictions_applied
+ count_restrictions_applied
+
+
+ appeared_percent
+ appeared_percent
+
+
+ not_appeared_percent
+ not_appeared_percent
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+
+
+ introduced_measures
+ count_introduced_measures
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+
+
+ count_not_delivery
+ count_not_delivery
+
+
+ appear_date_is_good
+ appear_date_is_good
+
+
+ not_delivery_percent
+ not_delivery_percent
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+
+
+ N
+ Y
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf
new file mode 100644
index 0000000..4c2f5d9
--- /dev/null
+++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf
@@ -0,0 +1,487 @@
+
+
+ recruitment_campaign.subpoenas(m_c)
+ Y
+
+
+
+ -
+ 2025/03/28 13:41:42.903
+ -
+ 2025/03/28 13:41:42.903
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 416
+ 304
+
+
+
+ SQL recruitment_campaign.subpoenas
+
+ SQL
+
+ ervu-dashboard
+ N
+ DELETE FROM recruitment_campaign.subpoenas
+WHERE recording_date = current_date
+ AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
+ N
+ N
+ Y
+ 624
+ 304
+
+
+
+ array_season_recruitments.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 832
+ 176
+
+
+
+ array_season_recruitments_all.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 832
+ 416
+
+
+
+ recruitment_season_combination_uniq.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination_uniq.hpl
+ Basic
+
+
+ ARR_MC_SP
+ ARRAY_MIL_COM_SP
+
+
+ ARR_MC_AU
+ ARRAY_MIL_COM_AU
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1120
+ 176
+
+
+
+ recruitment_season_combination.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination.hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1120
+ 416
+
+
+
+ recruitment_campaign.subpoenas(m_c)_uniq.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl
+ Basic
+
+
+ ARR_MC_SP
+ ARRAY_MIL_COM_SP
+
+
+ ARR_MC_AU
+ ARRAY_MIL_COM_AU
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1408
+ 112
+
+
+
+ recruitment_campaign.subpoenas(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl
+ Basic
+
+
+ ARR_MC
+ ARRAY_MIL_COM
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1408
+ 464
+
+
+
+ Success uniq
+
+ SUCCESS
+
+ N
+ 1696
+ 112
+
+
+
+ Success all
+
+ SUCCESS
+
+ N
+ 1696
+ 464
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 992
+ 304
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1248
+ 304
+
+
+
+ array_season_recruitments.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1264
+ 80
+
+
+
+ array_season_recruitments_all.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1216
+ 528
+
+
+
+
+
+ Start
+ SQL recruitment_campaign.subpoenas
+ Y
+ Y
+ Y
+
+
+ SQL recruitment_campaign.subpoenas
+ array_season_recruitments.hpl
+ Y
+ Y
+ N
+
+
+ SQL recruitment_campaign.subpoenas
+ array_season_recruitments_all.hpl
+ Y
+ Y
+ N
+
+
+ array_season_recruitments.hpl
+ recruitment_season_combination_uniq.hpl
+ Y
+ Y
+ N
+
+
+ array_season_recruitments_all.hpl
+ recruitment_season_combination.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_season_combination_uniq.hpl
+ recruitment_campaign.subpoenas(m_c)_uniq.hpl
+ N
+ Y
+ N
+
+
+ recruitment_season_combination.hpl
+ recruitment_campaign.subpoenas(m_c).hpl
+ N
+ Y
+ N
+
+
+ recruitment_campaign.subpoenas(m_c).hpl
+ Success all
+ Y
+ Y
+ N
+
+
+ recruitment_campaign.subpoenas(m_c)_uniq.hpl
+ Success uniq
+ Y
+ Y
+ N
+
+
+ array_season_recruitments_all.hpl
+ Success
+ N
+ N
+ Y
+
+
+ array_season_recruitments.hpl
+ Success
+ N
+ N
+ Y
+
+
+ recruitment_season_combination.hpl
+ Success 2
+ N
+ N
+ Y
+
+
+ recruitment_season_combination_uniq.hpl
+ Success 2
+ N
+ N
+ Y
+
+
+ recruitment_season_combination.hpl
+ array_season_recruitments_all.hpl 2
+ Y
+ Y
+ N
+
+
+ array_season_recruitments_all.hpl 2
+ recruitment_campaign.subpoenas(m_c).hpl
+ Y
+ Y
+ N
+
+
+ recruitment_season_combination_uniq.hpl
+ array_season_recruitments.hpl 2
+ Y
+ Y
+ N
+
+
+ array_season_recruitments.hpl 2
+ recruitment_campaign.subpoenas(m_c)_uniq.hpl
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 400
+ 176
+ уникальные
+ 78
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 400
+ 448
+ остальные
+ 70
+
+
+
+
diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl
new file mode 100644
index 0000000..da86027
--- /dev/null
+++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl
@@ -0,0 +1,799 @@
+
+
+
+ recruitment_campaign.subpoenas(m_c)_uniq
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/09 13:13:59.825
+ -
+ 2024/08/09 13:13:59.825
+
+
+
+
+
+ Get variables 4 3
+ Select values 4 3
+ N
+
+
+ Table input (subpoena) осень/регионы
+ Get variables 4 3
+ N
+
+
+ Select values 4 3
+ Insert / update (recruitment_campaign.subpoenas) 3
+ N
+
+
+ Table input (subpoena) осень/регионы
+ Insert / update (recruitment_campaign.subpoenas) 3
+ N
+
+
+ Table input (subpoena) осень/регионы
+ Update recruitment_campaign.subpoenas
+ Y
+
+
+
+ Get variables 4 3
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 592
+ 624
+
+
+
+ Insert / update (recruitment_campaign.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ recruitment_campaign
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ rest
+ rest
+ Y
+
+
+ spring_autumn
+ spring_autumn
+ N
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 1040
+ 624
+
+
+
+ Select values 4 3
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 768
+ 624
+
+
+
+ Table input (subpoena) осень/регионы
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ 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
+),
+subpoena_data AS (
+ SELECT
+ s.id AS subpoena_id,
+ s.recruit_id,
+ rdi.status_applied,
+ s.create_date,
+ s.visit_date,
+ s.department_id::uuid AS recruitment_id,
+ s.status_id,
+ 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,
+ ssi.act_number,
+ 'Весна' AS season,
+sh.rn,
+rd.rn_d,
+--rdi.rn_di
+ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1 AND */--ssi.rn_si = 1
+ --AND
+sr.type = '3'
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна')
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+ UNION ALL
+ SELECT
+ s.id AS subpoena_id,
+ s.recruit_id,
+ rdi.status_applied,
+ s.create_date,
+ s.visit_date,
+ s.department_id::uuid AS recruitment_id,
+ s.status_id,
+ 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,
+ ssi.act_number,
+ 'Осень' AS season,
+sh.rn,
+rd.rn_d,
+--rdi.rn_di
+ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1
+ --AND
+sr.type = '3'
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень')
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+season_separations AS (
+ SELECT distinct
+ ls.recruitment_id,
+ ls.recruit_id,
+ ls.status_applied,
+ ls.create_date,
+ ls.visit_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_date,
+ ls.send_date,
+ ls.restr_dc,
+ ls.ap_date,
+ ls.d_code,
+ ls.act_number,
+ ls.rdi_id,
+ 'Весна' AS spring_autumn,
+ls.rn,
+ls.rn_d,
+--rdi.rn_di
+ls.rn_si
+ FROM subpoena_data ls
+ WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '4 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '7 months' + INTERVAL '14 days')
+ AND ls.season = 'Весна'
+
+ UNION ALL
+
+ SELECT distinct
+ ls.recruitment_id,
+ ls.recruit_id,
+ ls.status_applied,
+ ls.create_date,
+ ls.visit_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_date,
+ ls.send_date,
+ ls.restr_dc,
+ ls.ap_date,
+ ls.d_code,
+ ls.act_number,
+ ls.rdi_id,
+ 'Осень' AS spring_autumn,
+ls.rn,
+ls.rn_d,
+--rdi.rn_di
+ls.rn_si
+ FROM subpoena_data ls
+ WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '10 months' + INTERVAL '1 day'
+ AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '30 days')
+ AND ls.season = 'Осень'
+),
+season_separations_clean AS (
+ SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations
+),
+t1 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_subpoena
+ FROM season_separations ss
+ WHERE sub_stat_hist IS NOT NULL and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t2 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ss.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ss.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+ FROM season_separations ss
+where ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t3 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_appeared
+ FROM season_separations ss
+ WHERE ss.sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1 -- снесен 4 статус от 14.03.2025
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t4 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_not_appeared
+ FROM season_separations ss
+ WHERE sub_stat_hist = '5' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t5 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_not_ap_good_reason
+ FROM season_separations ss
+ WHERE sub_stat_hist = '5.1' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t6 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_ap_not_required
+ FROM season_separations ss
+ WHERE sub_stat_hist IN ('3.8', '5.2') and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t7 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT recruit_id) AS count_restrictions_applied
+ FROM season_separations ss
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and ss.rn = 1 and ss.rn_d = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t8 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT recruit_id) AS count_introduced_measures
+ FROM season_separations ss
+ WHERE status_applied = '11' and ss.rn = 1 and ss.rn_d = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t9 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_paper
+ FROM season_separations ss
+ WHERE d_code != '7' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t10 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_electron
+ FROM season_separations ss
+ WHERE d_code = '7' and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t11 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT (DISTINCT ss.rdi_id) AS count_restrictions
+ FROM season_separations ss
+where ss.rn_d = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t12 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS count_not_delivery
+ FROM season_separations ss
+ WHERE ss.act_number IS NOT NULL and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+),
+t13 AS (
+ SELECT
+ ss.recruitment_id,
+ ss.spring_autumn,
+ COUNT(DISTINCT ss.subpoena_id) AS appear_date_is_good
+ FROM season_separations ss
+ WHERE ss.sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and ss.rn = 1
+ GROUP BY ss.recruitment_id, ss.spring_autumn
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appeared_percent,
+ ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_appeared_percent,
+ ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_ap_good_reason_percent,
+ ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS ap_not_required_percent,
+ ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS electron_percent,
+ ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS paper_percent,
+ ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS restrictions_applied_percent,
+ ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS introduced_measures_percent,
+ ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_delivery_percent,
+ ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appear_date_is_good_percent,
+ ss.recruitment_id,
+ 0 AS rest,
+ ss.spring_autumn
+FROM season_separations_clean 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
+LEFT JOIN t4 ON ss.recruitment_id = t4.recruitment_id AND ss.spring_autumn = t4.spring_autumn
+LEFT JOIN t5 ON ss.recruitment_id = t5.recruitment_id AND ss.spring_autumn = t5.spring_autumn
+LEFT JOIN t6 ON ss.recruitment_id = t6.recruitment_id AND ss.spring_autumn = t6.spring_autumn
+LEFT JOIN t7 ON ss.recruitment_id = t7.recruitment_id AND ss.spring_autumn = t7.spring_autumn
+LEFT JOIN t8 ON ss.recruitment_id = t8.recruitment_id AND ss.spring_autumn = t8.spring_autumn
+LEFT JOIN t9 ON ss.recruitment_id = t9.recruitment_id AND ss.spring_autumn = t9.spring_autumn
+LEFT JOIN t10 ON ss.recruitment_id = t10.recruitment_id AND ss.spring_autumn = t10.spring_autumn
+LEFT JOIN t11 ON ss.recruitment_id = t11.recruitment_id AND ss.spring_autumn = t11.spring_autumn
+LEFT JOIN t12 ON ss.recruitment_id = t12.recruitment_id AND ss.spring_autumn = t12.spring_autumn
+LEFT JOIN t13 ON ss.recruitment_id = t13.recruitment_id AND ss.spring_autumn = t13.spring_autumn
+ Y
+
+
+ 464
+ 400
+
+
+
+ Update recruitment_campaign.subpoenas
+ Update
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+ Y
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+
+ =
+ recording_date
+ recording_date
+
+ recruitment_campaign
+
+
+ "17_years"
+ 17_year_count
+ Y
+
+
+ "18-26_years"
+ 18-26_year_count
+ Y
+
+
+ "27-30_years"
+ 27-30_year_count
+ Y
+
+
+ "31-35_years"
+ 31-35_year_count
+ Y
+
+
+ "36-40_years"
+ 36-40_year_count
+ Y
+
+
+ "41-45_years"
+ 41-45_year_count
+ Y
+
+
+ "51+_years"
+ 41-45_year_count
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ "46-50_years"
+ 46-50_year_count
+ Y
+
+
+ "17_years_percent"
+ 17_year_percent
+ Y
+
+
+ "18-26_years_percent"
+ 18-26_year_percent
+ Y
+
+
+ "27-30_years_percent"
+ 27-30_year_percent
+ Y
+
+
+ "31-35_years_percent"
+ 31-35_year_percent
+ Y
+
+
+ "36-40_years_percent"
+ 36-40_year_percent
+ Y
+
+
+ "41-45_years_percent"
+ 41-45_year_percent
+ Y
+
+
+ "46-50_years_percent"
+ 46-50_year_percent
+ Y
+
+
+ "51+_years_percent"
+ 51+_year_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1920
+ 720
+
+
+
+ Select values 3 2 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1680
+ 800
+
+
+
+ Table input (person_registry) регион/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+),
+total_count AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+total_count_all AS (
+ SELECT
+ rd.recruitment_id,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.registered, rd.convicts
+),
+age_counts AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+age_counts_all AS (
+ SELECT
+ r.recruitment_id,
+ r.registered,
+ r.convicts,
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data r
+ GROUP BY r.recruitment_id, r.registered, r.convicts
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(ac."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tc.total, 0) AS total_count,
+ tc.recruitment_id,
+ (CASE
+ WHEN tc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END)::text AS gender,
+ tc.convicts,
+ tc.registered::text
+FROM total_count tc
+LEFT JOIN age_counts ac
+ ON ac.recruitment_id = tc.recruitment_id
+ AND ac.gender = tc.gender
+ AND ac.registered = tc.registered
+ AND ac.convicts = tc.convicts
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ COALESCE(aca."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tca.total, 0) AS total_count,
+ tca.recruitment_id,
+ 'ALL' AS gender,
+ tca.convicts,
+ tca.registered::text
+FROM total_count_all tca
+LEFT JOIN age_counts_all aca
+ ON aca.recruitment_id = tca.recruitment_id
+ AND aca.registered = tca.registered
+ AND aca.convicts = tca.convicts
+ Y
+
+
+ 1296
+ 720
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf
new file mode 100644
index 0000000..ebf664d
--- /dev/null
+++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf
@@ -0,0 +1,312 @@
+
+
+ total_registered.age(m_c)
+ Y
+
+
+
+ -
+ 2025/04/01 09:55:15.265
+ -
+ 2025/04/01 09:55:15.265
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 544
+ 400
+
+
+
+ total_registered.age_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 992
+ 240
+
+
+
+ total_registered.age_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 992
+ 320
+
+
+
+ total_registered.age_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 992
+ 400
+
+
+
+ total_registered.age_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 992
+ 480
+
+
+
+ total_registered.age_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl
+
+
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 992
+ 560
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1200
+ 240
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1200
+ 320
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1200
+ 400
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1200
+ 480
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1200
+ 560
+
+
+
+
+
+ Start
+ total_registered.age_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.age_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.age_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.age_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.age_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.age_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.age_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.age_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.age_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.age_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl
new file mode 100644
index 0000000..7c7627d
--- /dev/null
+++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl
@@ -0,0 +1,446 @@
+
+
+
+ total_registered.age_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/мужчины
+ Insert / update (total_registered.age) 2
+ Y
+
+
+
+ Insert / update (total_registered.age) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ registered
+ registered
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
age
+
+ "17_years"
+ 17_year_count
+ Y
+
+
+ "18-26_years"
+ 18-26_year_count
+ Y
+
+
+ "27-30_years"
+ 27-30_year_count
+ Y
+
+
+ "31-35_years"
+ 31-35_year_count
+ Y
+
+
+ "36-40_years"
+ 36-40_year_count
+ Y
+
+
+ "41-45_years"
+ 41-45_year_count
+ Y
+
+
+ "51+_years"
+ 41-45_year_count
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ "46-50_years"
+ 46-50_year_count
+ Y
+
+
+ "17_years_percent"
+ 17_year_percent
+ Y
+
+
+ "18-26_years_percent"
+ 18-26_year_percent
+ Y
+
+
+ "27-30_years_percent"
+ 27-30_year_percent
+ Y
+
+
+ "31-35_years_percent"
+ 31-35_year_percent
+ Y
+
+
+ "36-40_years_percent"
+ 36-40_year_percent
+ Y
+
+
+ "41-45_years_percent"
+ 41-45_year_percent
+ Y
+
+
+ "46-50_years_percent"
+ 46-50_year_percent
+ Y
+
+
+ "51+_years_percent"
+ 51+_year_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1920
+ 720
+
+
+
+ Table input (person_registry) регион/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+),
+total_count AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+total_count_all AS (
+ SELECT
+ rd.recruitment_id,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.registered, rd.convicts
+),
+age_counts AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+age_counts_all AS (
+ SELECT
+ r.recruitment_id,
+ r.registered,
+ r.convicts,
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data r
+ GROUP BY r.recruitment_id, r.registered, r.convicts
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(ac."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tc.total, 0) AS total_count,
+ tc.recruitment_id,
+ (CASE
+ WHEN tc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END)::text AS gender,
+ tc.convicts,
+ tc.registered::text
+FROM total_count tc
+LEFT JOIN age_counts ac
+ ON ac.recruitment_id = tc.recruitment_id
+ AND ac.gender = tc.gender
+ AND ac.registered = tc.registered
+ AND ac.convicts = tc.convicts
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ COALESCE(aca."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tca.total, 0) AS total_count,
+ tca.recruitment_id,
+ 'ALL' AS gender,
+ tca.convicts,
+ tca.registered::text
+FROM total_count_all tca
+LEFT JOIN age_counts_all aca
+ ON aca.recruitment_id = tca.recruitment_id
+ AND aca.registered = tca.registered
+ AND aca.convicts = tca.convicts
+ Y
+
+
+ 1296
+ 720
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl
new file mode 100644
index 0000000..b5ad7ee
--- /dev/null
+++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl
@@ -0,0 +1,446 @@
+
+
+
+ total_registered.age_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/мужчины
+ Insert / update (total_registered.age) 2
+ Y
+
+
+
+ Insert / update (total_registered.age) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ registered
+ registered
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
age
+
+ "17_years"
+ 17_year_count
+ Y
+
+
+ "18-26_years"
+ 18-26_year_count
+ Y
+
+
+ "27-30_years"
+ 27-30_year_count
+ Y
+
+
+ "31-35_years"
+ 31-35_year_count
+ Y
+
+
+ "36-40_years"
+ 36-40_year_count
+ Y
+
+
+ "41-45_years"
+ 41-45_year_count
+ Y
+
+
+ "51+_years"
+ 41-45_year_count
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ "46-50_years"
+ 46-50_year_count
+ Y
+
+
+ "17_years_percent"
+ 17_year_percent
+ Y
+
+
+ "18-26_years_percent"
+ 18-26_year_percent
+ Y
+
+
+ "27-30_years_percent"
+ 27-30_year_percent
+ Y
+
+
+ "31-35_years_percent"
+ 31-35_year_percent
+ Y
+
+
+ "36-40_years_percent"
+ 36-40_year_percent
+ Y
+
+
+ "41-45_years_percent"
+ 41-45_year_percent
+ Y
+
+
+ "46-50_years_percent"
+ 46-50_year_percent
+ Y
+
+
+ "51+_years_percent"
+ 51+_year_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1920
+ 720
+
+
+
+ Table input (person_registry) регион/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+),
+total_count AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+total_count_all AS (
+ SELECT
+ rd.recruitment_id,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.registered, rd.convicts
+),
+age_counts AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+age_counts_all AS (
+ SELECT
+ r.recruitment_id,
+ r.registered,
+ r.convicts,
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data r
+ GROUP BY r.recruitment_id, r.registered, r.convicts
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(ac."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tc.total, 0) AS total_count,
+ tc.recruitment_id,
+ (CASE
+ WHEN tc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END)::text AS gender,
+ tc.convicts,
+ tc.registered::text
+FROM total_count tc
+LEFT JOIN age_counts ac
+ ON ac.recruitment_id = tc.recruitment_id
+ AND ac.gender = tc.gender
+ AND ac.registered = tc.registered
+ AND ac.convicts = tc.convicts
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ COALESCE(aca."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tca.total, 0) AS total_count,
+ tca.recruitment_id,
+ 'ALL' AS gender,
+ tca.convicts,
+ tca.registered::text
+FROM total_count_all tca
+LEFT JOIN age_counts_all aca
+ ON aca.recruitment_id = tca.recruitment_id
+ AND aca.registered = tca.registered
+ AND aca.convicts = tca.convicts
+ Y
+
+
+ 1296
+ 720
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl
new file mode 100644
index 0000000..3e7ed5b
--- /dev/null
+++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl
@@ -0,0 +1,446 @@
+
+
+
+ total_registered.age_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/мужчины
+ Insert / update (total_registered.age) 2
+ Y
+
+
+
+ Insert / update (total_registered.age) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ registered
+ registered
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
age
+
+ "17_years"
+ 17_year_count
+ Y
+
+
+ "18-26_years"
+ 18-26_year_count
+ Y
+
+
+ "27-30_years"
+ 27-30_year_count
+ Y
+
+
+ "31-35_years"
+ 31-35_year_count
+ Y
+
+
+ "36-40_years"
+ 36-40_year_count
+ Y
+
+
+ "41-45_years"
+ 41-45_year_count
+ Y
+
+
+ "51+_years"
+ 41-45_year_count
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ "46-50_years"
+ 46-50_year_count
+ Y
+
+
+ "17_years_percent"
+ 17_year_percent
+ Y
+
+
+ "18-26_years_percent"
+ 18-26_year_percent
+ Y
+
+
+ "27-30_years_percent"
+ 27-30_year_percent
+ Y
+
+
+ "31-35_years_percent"
+ 31-35_year_percent
+ Y
+
+
+ "36-40_years_percent"
+ 36-40_year_percent
+ Y
+
+
+ "41-45_years_percent"
+ 41-45_year_percent
+ Y
+
+
+ "46-50_years_percent"
+ 46-50_year_percent
+ Y
+
+
+ "51+_years_percent"
+ 51+_year_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1920
+ 720
+
+
+
+ Table input (person_registry) регион/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+),
+total_count AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+total_count_all AS (
+ SELECT
+ rd.recruitment_id,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.registered, rd.convicts
+),
+age_counts AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+age_counts_all AS (
+ SELECT
+ r.recruitment_id,
+ r.registered,
+ r.convicts,
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data r
+ GROUP BY r.recruitment_id, r.registered, r.convicts
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(ac."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tc.total, 0) AS total_count,
+ tc.recruitment_id,
+ (CASE
+ WHEN tc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END)::text AS gender,
+ tc.convicts,
+ tc.registered::text
+FROM total_count tc
+LEFT JOIN age_counts ac
+ ON ac.recruitment_id = tc.recruitment_id
+ AND ac.gender = tc.gender
+ AND ac.registered = tc.registered
+ AND ac.convicts = tc.convicts
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ COALESCE(aca."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tca.total, 0) AS total_count,
+ tca.recruitment_id,
+ 'ALL' AS gender,
+ tca.convicts,
+ tca.registered::text
+FROM total_count_all tca
+LEFT JOIN age_counts_all aca
+ ON aca.recruitment_id = tca.recruitment_id
+ AND aca.registered = tca.registered
+ AND aca.convicts = tca.convicts
+ Y
+
+
+ 1296
+ 720
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl
new file mode 100644
index 0000000..e618ef4
--- /dev/null
+++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl
@@ -0,0 +1,446 @@
+
+
+
+ total_registered.age_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/мужчины
+ Insert / update (total_registered.age) 2
+ Y
+
+
+
+ Insert / update (total_registered.age) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ registered
+ registered
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
age
+
+ "17_years"
+ 17_year_count
+ Y
+
+
+ "18-26_years"
+ 18-26_year_count
+ Y
+
+
+ "27-30_years"
+ 27-30_year_count
+ Y
+
+
+ "31-35_years"
+ 31-35_year_count
+ Y
+
+
+ "36-40_years"
+ 36-40_year_count
+ Y
+
+
+ "41-45_years"
+ 41-45_year_count
+ Y
+
+
+ "51+_years"
+ 41-45_year_count
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ "46-50_years"
+ 46-50_year_count
+ Y
+
+
+ "17_years_percent"
+ 17_year_percent
+ Y
+
+
+ "18-26_years_percent"
+ 18-26_year_percent
+ Y
+
+
+ "27-30_years_percent"
+ 27-30_year_percent
+ Y
+
+
+ "31-35_years_percent"
+ 31-35_year_percent
+ Y
+
+
+ "36-40_years_percent"
+ 36-40_year_percent
+ Y
+
+
+ "41-45_years_percent"
+ 41-45_year_percent
+ Y
+
+
+ "46-50_years_percent"
+ 46-50_year_percent
+ Y
+
+
+ "51+_years_percent"
+ 51+_year_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1920
+ 720
+
+
+
+ Table input (person_registry) регион/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+),
+total_count AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+total_count_all AS (
+ SELECT
+ rd.recruitment_id,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.registered, rd.convicts
+),
+age_counts AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+age_counts_all AS (
+ SELECT
+ r.recruitment_id,
+ r.registered,
+ r.convicts,
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data r
+ GROUP BY r.recruitment_id, r.registered, r.convicts
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(ac."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tc.total, 0) AS total_count,
+ tc.recruitment_id,
+ (CASE
+ WHEN tc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END)::text AS gender,
+ tc.convicts,
+ tc.registered::text
+FROM total_count tc
+LEFT JOIN age_counts ac
+ ON ac.recruitment_id = tc.recruitment_id
+ AND ac.gender = tc.gender
+ AND ac.registered = tc.registered
+ AND ac.convicts = tc.convicts
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ COALESCE(aca."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tca.total, 0) AS total_count,
+ tca.recruitment_id,
+ 'ALL' AS gender,
+ tca.convicts,
+ tca.registered::text
+FROM total_count_all tca
+LEFT JOIN age_counts_all aca
+ ON aca.recruitment_id = tca.recruitment_id
+ AND aca.registered = tca.registered
+ AND aca.convicts = tca.convicts
+ Y
+
+
+ 1296
+ 720
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl
new file mode 100644
index 0000000..d016ad4
--- /dev/null
+++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl
@@ -0,0 +1,446 @@
+
+
+
+ total_registered.age_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регион/мужчины
+ Insert / update (total_registered.age) 2
+ Y
+
+
+
+ Insert / update (total_registered.age) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ registered
+ registered
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
age
+
+ "17_years"
+ 17_year_count
+ Y
+
+
+ "18-26_years"
+ 18-26_year_count
+ Y
+
+
+ "27-30_years"
+ 27-30_year_count
+ Y
+
+
+ "31-35_years"
+ 31-35_year_count
+ Y
+
+
+ "36-40_years"
+ 36-40_year_count
+ Y
+
+
+ "41-45_years"
+ 41-45_year_count
+ Y
+
+
+ "51+_years"
+ 41-45_year_count
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ "46-50_years"
+ 46-50_year_count
+ Y
+
+
+ "17_years_percent"
+ 17_year_percent
+ Y
+
+
+ "18-26_years_percent"
+ 18-26_year_percent
+ Y
+
+
+ "27-30_years_percent"
+ 27-30_year_percent
+ Y
+
+
+ "31-35_years_percent"
+ 31-35_year_percent
+ Y
+
+
+ "36-40_years_percent"
+ 36-40_year_percent
+ Y
+
+
+ "41-45_years_percent"
+ 41-45_year_percent
+ Y
+
+
+ "46-50_years_percent"
+ 46-50_year_percent
+ Y
+
+
+ "51+_years_percent"
+ 51+_year_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1920
+ 720
+
+
+
+ Table input (person_registry) регион/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'false' AS registered,
+ r.birth_date
+ 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
+ WHERE
+ 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
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id AS recruit_id,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ 'true' AS registered,
+ r.birth_date
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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)
+*/
+
+),
+total_count AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+total_count_all AS (
+ SELECT
+ rd.recruitment_id,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.registered, rd.convicts
+),
+age_counts AS (
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.registered,
+ rd.convicts,
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts
+),
+age_counts_all AS (
+ SELECT
+ r.recruitment_id,
+ r.registered,
+ r.convicts,
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
+ COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
+ FROM recruit_data r
+ GROUP BY r.recruitment_id, r.registered, r.convicts
+)
+SELECT
+ current_date AS recording_date,
+ COALESCE(ac."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tc.total, 0) AS total_count,
+ tc.recruitment_id,
+ (CASE
+ WHEN tc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END)::text AS gender,
+ tc.convicts,
+ tc.registered::text
+FROM total_count tc
+LEFT JOIN age_counts ac
+ ON ac.recruitment_id = tc.recruitment_id
+ AND ac.gender = tc.gender
+ AND ac.registered = tc.registered
+ AND ac.convicts = tc.convicts
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ COALESCE(aca."17_year_count", 0) AS "17_year_count",
+ COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
+ COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
+ COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
+ COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
+ COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
+ COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
+ COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
+ COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
+ COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
+ COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
+ COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
+ COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
+ COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
+ COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
+ COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
+ COALESCE(tca.total, 0) AS total_count,
+ tca.recruitment_id,
+ 'ALL' AS gender,
+ tca.convicts,
+ tca.registered::text
+FROM total_count_all tca
+LEFT JOIN age_counts_all aca
+ ON aca.recruitment_id = tca.recruitment_id
+ AND aca.registered = tca.registered
+ AND aca.convicts = tca.convicts
+ Y
+
+
+ 1296
+ 720
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl
new file mode 100644
index 0000000..7d13e7a
--- /dev/null
+++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl
@@ -0,0 +1,691 @@
+
+
+
+ total_registered.busyness(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 3 2 2
+ Select values 3 2 2
+ N
+
+
+ Select values 3 2 2
+ Insert / update (total_registered.busyness) 2
+ N
+
+
+ Table input (person_registry) РФ/мужчины
+ Get variables 3 2 2
+ N
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.busyness) 2
+ Y
+
+
+
+ Get variables 3 2 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 1568
+ 624
+
+
+
+ Insert / update (total_registered.busyness) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ registered
+ registered
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
busyness
+
+ study
+ study
+ Y
+
+
+ work
+ work
+ Y
+
+
+ study_percent
+ study_percent
+ Y
+
+
+ work_percent
+ work_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ not_work
+ no_info
+ Y
+
+
+ not_work_percent
+ no_info_percent
+ Y
+
+
+ busyness
+ total_people
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1968
+ 544
+
+
+
+ Select values 3 2 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1712
+ 624
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+status_info AS (
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1'
+ )
+
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE
+ r.id in (SELECT recruit_id FROM notregistered)
+ AND rh.id in (SELECT recruit_history_id FROM notregistered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.current_recruitment_id is null
+),
+summary AS (
+ SELECT
+ si.recruitment_id,
+ CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender,
+ si.convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered
+
+ UNION ALL
+
+ SELECT
+ si.recruitment_id,
+ CASE
+ WHEN si.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ 'ALL' AS convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.registered
+),
+summary_all AS (
+ SELECT
+ recruitment_id,
+ registered,
+ convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered, convicts
+
+ UNION ALL
+
+ SELECT
+ recruitment_id,
+ registered,
+ 'ALL' AS convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered
+)
+SELECT
+ current_date AS recording_date,
+ s.convicts,
+ s.gender,
+ s.registered,
+ s.recruitment_id,
+ s.study,
+ s.work,
+ s.no_info,
+ s.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent
+FROM summary s
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ sa.convicts,
+ sa.gender,
+ sa.registered,
+ sa.recruitment_id,
+ sa.study,
+ sa.work,
+ sa.no_info,
+ sa.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent
+FROM summary_all sa
+ Y
+
+
+ 1328
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf
new file mode 100644
index 0000000..8c60f83
--- /dev/null
+++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf
@@ -0,0 +1,309 @@
+
+
+ total_registered.busyness(m_c)
+ Y
+
+
+
+ -
+ 2025/04/01 10:45:43.074
+ -
+ 2025/04/01 10:45:43.074
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 704
+ 432
+
+
+
+ total_registered.busyness_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 272
+
+
+
+ total_registered.busyness_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 352
+
+
+
+ total_registered.busyness_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 432
+
+
+
+ total_registered.busyness_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 512
+
+
+
+ total_registered.busyness_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 592
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1360
+ 272
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1360
+ 352
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1360
+ 432
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1360
+ 512
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1360
+ 592
+
+
+
+
+
+ Start
+ total_registered.busyness_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.busyness_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.busyness_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.busyness_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.busyness_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.busyness_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.busyness_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.busyness_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.busyness_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.busyness_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl
new file mode 100644
index 0000000..0903778
--- /dev/null
+++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl
@@ -0,0 +1,589 @@
+
+
+
+ total_registered.busyness_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.busyness) 2
+ Y
+
+
+
+ Insert / update (total_registered.busyness) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ registered
+ registered
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
busyness
+
+ study
+ study
+ Y
+
+
+ work
+ work
+ Y
+
+
+ study_percent
+ study_percent
+ Y
+
+
+ work_percent
+ work_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ not_work
+ no_info
+ Y
+
+
+ not_work_percent
+ no_info_percent
+ Y
+
+
+ busyness
+ total_people
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1968
+ 544
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+status_info AS (
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1'
+ )
+
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE
+ r.id in (SELECT recruit_id FROM notregistered)
+ AND rh.id in (SELECT recruit_history_id FROM notregistered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.current_recruitment_id is null
+),
+summary AS (
+ SELECT
+ si.recruitment_id,
+ CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender,
+ si.convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered
+
+ UNION ALL
+
+ SELECT
+ si.recruitment_id,
+ CASE
+ WHEN si.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ 'ALL' AS convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.registered
+),
+summary_all AS (
+ SELECT
+ recruitment_id,
+ registered,
+ convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered, convicts
+
+ UNION ALL
+
+ SELECT
+ recruitment_id,
+ registered,
+ 'ALL' AS convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered
+)
+SELECT
+ current_date AS recording_date,
+ s.convicts,
+ s.gender,
+ s.registered,
+ s.recruitment_id,
+ s.study,
+ s.work,
+ s.no_info,
+ s.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent
+FROM summary s
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ sa.convicts,
+ sa.gender,
+ sa.registered,
+ sa.recruitment_id,
+ sa.study,
+ sa.work,
+ sa.no_info,
+ sa.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent
+FROM summary_all sa
+ Y
+
+
+ 1328
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl
new file mode 100644
index 0000000..875eb9c
--- /dev/null
+++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl
@@ -0,0 +1,589 @@
+
+
+
+ total_registered.busyness_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.busyness) 2
+ Y
+
+
+
+ Insert / update (total_registered.busyness) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ registered
+ registered
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
busyness
+
+ study
+ study
+ Y
+
+
+ work
+ work
+ Y
+
+
+ study_percent
+ study_percent
+ Y
+
+
+ work_percent
+ work_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ not_work
+ no_info
+ Y
+
+
+ not_work_percent
+ no_info_percent
+ Y
+
+
+ busyness
+ total_people
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1968
+ 544
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+status_info AS (
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1'
+ )
+
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE
+ r.id in (SELECT recruit_id FROM notregistered)
+ AND rh.id in (SELECT recruit_history_id FROM notregistered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.current_recruitment_id is null
+),
+summary AS (
+ SELECT
+ si.recruitment_id,
+ CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender,
+ si.convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered
+
+ UNION ALL
+
+ SELECT
+ si.recruitment_id,
+ CASE
+ WHEN si.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ 'ALL' AS convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.registered
+),
+summary_all AS (
+ SELECT
+ recruitment_id,
+ registered,
+ convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered, convicts
+
+ UNION ALL
+
+ SELECT
+ recruitment_id,
+ registered,
+ 'ALL' AS convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered
+)
+SELECT
+ current_date AS recording_date,
+ s.convicts,
+ s.gender,
+ s.registered,
+ s.recruitment_id,
+ s.study,
+ s.work,
+ s.no_info,
+ s.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent
+FROM summary s
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ sa.convicts,
+ sa.gender,
+ sa.registered,
+ sa.recruitment_id,
+ sa.study,
+ sa.work,
+ sa.no_info,
+ sa.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent
+FROM summary_all sa
+ Y
+
+
+ 1328
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl
new file mode 100644
index 0000000..fac1d1f
--- /dev/null
+++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl
@@ -0,0 +1,589 @@
+
+
+
+ total_registered.busyness_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.busyness) 2
+ Y
+
+
+
+ Insert / update (total_registered.busyness) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ registered
+ registered
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
busyness
+
+ study
+ study
+ Y
+
+
+ work
+ work
+ Y
+
+
+ study_percent
+ study_percent
+ Y
+
+
+ work_percent
+ work_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ not_work
+ no_info
+ Y
+
+
+ not_work_percent
+ no_info_percent
+ Y
+
+
+ busyness
+ total_people
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1968
+ 544
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+status_info AS (
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1'
+ )
+
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE
+ r.id in (SELECT recruit_id FROM notregistered)
+ AND rh.id in (SELECT recruit_history_id FROM notregistered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.current_recruitment_id is null
+),
+summary AS (
+ SELECT
+ si.recruitment_id,
+ CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender,
+ si.convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered
+
+ UNION ALL
+
+ SELECT
+ si.recruitment_id,
+ CASE
+ WHEN si.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ 'ALL' AS convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.registered
+),
+summary_all AS (
+ SELECT
+ recruitment_id,
+ registered,
+ convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered, convicts
+
+ UNION ALL
+
+ SELECT
+ recruitment_id,
+ registered,
+ 'ALL' AS convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered
+)
+SELECT
+ current_date AS recording_date,
+ s.convicts,
+ s.gender,
+ s.registered,
+ s.recruitment_id,
+ s.study,
+ s.work,
+ s.no_info,
+ s.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent
+FROM summary s
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ sa.convicts,
+ sa.gender,
+ sa.registered,
+ sa.recruitment_id,
+ sa.study,
+ sa.work,
+ sa.no_info,
+ sa.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent
+FROM summary_all sa
+ Y
+
+
+ 1328
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl
new file mode 100644
index 0000000..d7232f1
--- /dev/null
+++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl
@@ -0,0 +1,589 @@
+
+
+
+ total_registered.busyness_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.busyness) 2
+ Y
+
+
+
+ Insert / update (total_registered.busyness) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ registered
+ registered
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
busyness
+
+ study
+ study
+ Y
+
+
+ work
+ work
+ Y
+
+
+ study_percent
+ study_percent
+ Y
+
+
+ work_percent
+ work_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ not_work
+ no_info
+ Y
+
+
+ not_work_percent
+ no_info_percent
+ Y
+
+
+ busyness
+ total_people
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1968
+ 544
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+status_info AS (
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1'
+ )
+
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE
+ r.id in (SELECT recruit_id FROM notregistered)
+ AND rh.id in (SELECT recruit_history_id FROM notregistered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.current_recruitment_id is null
+),
+summary AS (
+ SELECT
+ si.recruitment_id,
+ CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender,
+ si.convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered
+
+ UNION ALL
+
+ SELECT
+ si.recruitment_id,
+ CASE
+ WHEN si.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ 'ALL' AS convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.registered
+),
+summary_all AS (
+ SELECT
+ recruitment_id,
+ registered,
+ convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered, convicts
+
+ UNION ALL
+
+ SELECT
+ recruitment_id,
+ registered,
+ 'ALL' AS convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered
+)
+SELECT
+ current_date AS recording_date,
+ s.convicts,
+ s.gender,
+ s.registered,
+ s.recruitment_id,
+ s.study,
+ s.work,
+ s.no_info,
+ s.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent
+FROM summary s
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ sa.convicts,
+ sa.gender,
+ sa.registered,
+ sa.recruitment_id,
+ sa.study,
+ sa.work,
+ sa.no_info,
+ sa.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent
+FROM summary_all sa
+ Y
+
+
+ 1328
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl
new file mode 100644
index 0000000..acd579b
--- /dev/null
+++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl
@@ -0,0 +1,589 @@
+
+
+
+ total_registered.busyness_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.busyness) 2
+ Y
+
+
+
+ Insert / update (total_registered.busyness) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ registered
+ registered
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
busyness
+
+ study
+ study
+ Y
+
+
+ work
+ work
+ Y
+
+
+ study_percent
+ study_percent
+ Y
+
+
+ work_percent
+ work_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ registered
+ registered
+ N
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ not_work
+ no_info
+ Y
+
+
+ not_work_percent
+ no_info_percent
+ Y
+
+
+ busyness
+ total_people
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1968
+ 544
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ -- Преобразуем строковый массив в таблицу UUID
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+status_info AS (
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1'
+ )
+
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'true' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ r.id AS recruit_id,
+ -- Проверка на обучение в вузе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
+ WHERE vuz->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_vuz,
+
+ -- Проверка на обучение в колледже (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
+ WHERE kolledzh->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_college,
+
+ -- Проверка на обучение в школе (есть информация и обучается)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school
+ WHERE school->>'kodStatus' IN (
+ '1', -- Обучается
+ '2', -- Восстановлен
+ '4' -- Отпуск
+ )
+ )
+ ELSE false
+ END
+ ) AS is_studying_in_school,
+
+ -- Проверка на работу (есть информация и работает)
+ (
+ CASE
+ WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
+ WHERE trud->>'prAktMestRab' = '1'
+ )
+ ELSE false
+ END
+ ) AS is_working,
+
+ -- Проверка на самозанятого (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_samozanyat,
+
+ -- Проверка на ИП (есть информация)
+ (
+ CASE
+ WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true
+ ELSE false
+ END
+ ) AS is_ip,
+
+ -- Проверка на КФХ (есть информация)
+ (
+ CASE
+ WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true
+ ELSE false
+ END
+ ) AS is_kfh,
+
+
+ -- Проверка на отсутствие сведений о вузе
+ info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz,
+
+ -- Проверка на отсутствие сведений о колледже
+ info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college,
+
+ -- Проверка на отсутствие сведений о школе
+ info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school,
+
+ -- Проверка на отсутствие сведений о работе
+ info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work,
+
+ -- Проверка на отсутствие сведений о самозанятых
+ info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat,
+
+ -- Проверка на отсутствие сведений об ip
+ info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip,
+
+ -- Проверка на отсутствие сведений о KFH
+ info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh,
+
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ 'false' AS registered
+ FROM public.recruits AS r
+ JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
+ JOIN public.recruits_history AS rh on rh.recruit_id = r.id
+ WHERE
+ r.id in (SELECT recruit_id FROM notregistered)
+ AND rh.id in (SELECT recruit_history_id FROM notregistered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.current_recruitment_id is null
+),
+summary AS (
+ SELECT
+ si.recruitment_id,
+ CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender,
+ si.convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered
+
+ UNION ALL
+
+ SELECT
+ si.recruitment_id,
+ CASE
+ WHEN si.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ 'ALL' AS convicts,
+ si.registered,
+
+ -- Количество людей, которые учатся
+ COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study,
+
+ -- Количество людей, которые работают (но не учатся)
+ COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh)
+ AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school)
+ THEN 1 END) AS work,
+
+ /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info,
+*/
+ -- Количество людей, для которых нет информации
+ COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR
+ is_working OR is_samozanyat OR is_ip OR is_kfh)
+ THEN 1 END) AS no_info,
+
+ -- Общее количество людей
+ COUNT(si.recruit_id) AS total_people
+ FROM status_info si
+ GROUP BY si.recruitment_id, si.gender, si.registered
+),
+summary_all AS (
+ SELECT
+ recruitment_id,
+ registered,
+ convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered, convicts
+
+ UNION ALL
+
+ SELECT
+ recruitment_id,
+ registered,
+ 'ALL' AS convicts,
+ 'ALL' AS gender,
+ SUM(study) AS study,
+ SUM(work) AS work,
+ SUM(no_info) AS no_info,
+ SUM(total_people) AS total_people
+ FROM summary
+ GROUP BY recruitment_id, registered
+)
+SELECT
+ current_date AS recording_date,
+ s.convicts,
+ s.gender,
+ s.registered,
+ s.recruitment_id,
+ s.study,
+ s.work,
+ s.no_info,
+ s.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent
+FROM summary s
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ sa.convicts,
+ sa.gender,
+ sa.registered,
+ sa.recruitment_id,
+ sa.study,
+ sa.work,
+ sa.no_info,
+ sa.total_people,
+
+ -- Процент людей, которые учатся
+ ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent,
+
+ -- Процент людей, которые работают
+ ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent,
+
+ -- Процент людей, для которых отсутствуют сведения
+ ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent
+FROM summary_all sa
+ Y
+
+
+ 1328
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl
new file mode 100644
index 0000000..66817de
--- /dev/null
+++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl
@@ -0,0 +1,424 @@
+
+
+
+ total_registered.child_minor(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 4 2
+ Select values 4 2
+ N
+
+
+ Table input (person_registry)регион/все
+ Get variables 4 2
+ N
+
+
+ Select values 4 2
+ Insert / update (total_registered.child_minor) 3
+ N
+
+
+ Table input (person_registry)регион/все
+ Insert / update (total_registered.child_minor) 3
+ Y
+
+
+
+ Get variables 4 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 1056
+ 480
+
+
+
+ Insert / update (total_registered.child_minor) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
child_minor
+
+ no_child
+ no_children
+ Y
+
+
+ "1_child"
+ one_child
+ Y
+
+
+ "2_child"
+ two_children
+ Y
+
+
+ "3_child"
+ three_children
+ Y
+
+
+ "4_more_child"
+ four_or_more_children
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ no_child_percent
+ no_children_percent
+ Y
+
+
+ "1_child_percent"
+ one_child_percent
+ Y
+
+
+ "2_child_percent"
+ two_children_percent
+ Y
+
+
+ "3_child_percent"
+ three_children_percent
+ Y
+
+
+ "4_more_child_percent"
+ four_or_more_children_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1504
+ 368
+
+
+
+ Select values 4 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1248
+ 480
+
+
+
+ Table input (person_registry)регион/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+vse AS (
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+),
+extracted_children AS(
+ SELECT
+ distinct
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) FILTER (
+ WHERE make_date(
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int
+ ) > CURRENT_DATE - INTERVAL '18 years'
+ ) AS children_under_18
+ FROM
+ extracted_children
+ GROUP BY
+ recruit_id
+),
+gender_and_recruitment_data AS (
+ SELECT
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(r.recruit_id) AS total_count,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent
+ FROM vse r
+ LEFT JOIN children_count cc
+ ON r.recruit_id = cc.recruit_id
+ GROUP BY
+ r.gender,
+ r.convicts,
+ r.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ gender,
+ recruitment_id,
+ convicts,
+ total_count,
+ no_children,
+ one_child,
+ two_children,
+ three_children,
+ four_or_more_children,
+ COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+
+UNION ALL
+
+SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total_count) AS total_count,
+ SUM(no_children) AS no_children,
+ SUM(one_child) AS one_child,
+ SUM(two_children) AS two_children,
+ SUM(three_children) AS three_children,
+ SUM(four_or_more_children) AS four_or_more_children,
+ COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+GROUP BY recruitment_id, convicts
+ Y
+
+
+ 816
+ 368
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf
new file mode 100644
index 0000000..a5570dd
--- /dev/null
+++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf
@@ -0,0 +1,312 @@
+
+
+ total_registered.child_minor(m_c)
+ Y
+
+
+
+ -
+ 2025/03/31 17:47:01.214
+ -
+ 2025/03/31 17:47:01.214
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 640
+ 496
+
+
+
+ total_registered.child_minor_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 976
+ 336
+
+
+
+ total_registered.child_minor_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 976
+ 416
+
+
+
+ total_registered.child_minor_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 976
+ 496
+
+
+
+ total_registered.child_minor_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 976
+ 576
+
+
+
+ total_registered.child_minor_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl
+
+
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 976
+ 656
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1280
+ 336
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1280
+ 416
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1280
+ 496
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1280
+ 576
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1280
+ 656
+
+
+
+
+
+ Start
+ total_registered.child_minor_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.child_minor_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.child_minor_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.child_minor_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.child_minor_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.child_minor_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.child_minor_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.child_minor_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.child_minor_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.child_minor_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl
new file mode 100644
index 0000000..1bf758f
--- /dev/null
+++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl
@@ -0,0 +1,322 @@
+
+
+
+ total_registered.child_minor_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry)регион/все
+ Insert / update (total_registered.child_minor) 3
+ Y
+
+
+
+ Insert / update (total_registered.child_minor) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
child_minor
+
+ no_child
+ no_children
+ Y
+
+
+ "1_child"
+ one_child
+ Y
+
+
+ "2_child"
+ two_children
+ Y
+
+
+ "3_child"
+ three_children
+ Y
+
+
+ "4_more_child"
+ four_or_more_children
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ no_child_percent
+ no_children_percent
+ Y
+
+
+ "1_child_percent"
+ one_child_percent
+ Y
+
+
+ "2_child_percent"
+ two_children_percent
+ Y
+
+
+ "3_child_percent"
+ three_children_percent
+ Y
+
+
+ "4_more_child_percent"
+ four_or_more_children_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1504
+ 368
+
+
+
+ Table input (person_registry)регион/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+vse AS (
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+),
+extracted_children AS(
+ SELECT
+ distinct
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) FILTER (
+ WHERE make_date(
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int
+ ) > CURRENT_DATE - INTERVAL '18 years'
+ ) AS children_under_18
+ FROM
+ extracted_children
+ GROUP BY
+ recruit_id
+),
+gender_and_recruitment_data AS (
+ SELECT
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(r.recruit_id) AS total_count,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent
+ FROM vse r
+ LEFT JOIN children_count cc
+ ON r.recruit_id = cc.recruit_id
+ GROUP BY
+ r.gender,
+ r.convicts,
+ r.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ gender,
+ recruitment_id,
+ convicts,
+ total_count,
+ no_children,
+ one_child,
+ two_children,
+ three_children,
+ four_or_more_children,
+ COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+
+UNION ALL
+
+SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total_count) AS total_count,
+ SUM(no_children) AS no_children,
+ SUM(one_child) AS one_child,
+ SUM(two_children) AS two_children,
+ SUM(three_children) AS three_children,
+ SUM(four_or_more_children) AS four_or_more_children,
+ COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+GROUP BY recruitment_id, convicts
+ Y
+
+
+ 816
+ 368
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl
new file mode 100644
index 0000000..fb8302b
--- /dev/null
+++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl
@@ -0,0 +1,322 @@
+
+
+
+ total_registered.child_minor_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry)регион/все
+ Insert / update (total_registered.child_minor) 3
+ Y
+
+
+
+ Insert / update (total_registered.child_minor) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
child_minor
+
+ no_child
+ no_children
+ Y
+
+
+ "1_child"
+ one_child
+ Y
+
+
+ "2_child"
+ two_children
+ Y
+
+
+ "3_child"
+ three_children
+ Y
+
+
+ "4_more_child"
+ four_or_more_children
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ no_child_percent
+ no_children_percent
+ Y
+
+
+ "1_child_percent"
+ one_child_percent
+ Y
+
+
+ "2_child_percent"
+ two_children_percent
+ Y
+
+
+ "3_child_percent"
+ three_children_percent
+ Y
+
+
+ "4_more_child_percent"
+ four_or_more_children_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1504
+ 368
+
+
+
+ Table input (person_registry)регион/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+vse AS (
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+),
+extracted_children AS(
+ SELECT
+ distinct
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) FILTER (
+ WHERE make_date(
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int
+ ) > CURRENT_DATE - INTERVAL '18 years'
+ ) AS children_under_18
+ FROM
+ extracted_children
+ GROUP BY
+ recruit_id
+),
+gender_and_recruitment_data AS (
+ SELECT
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(r.recruit_id) AS total_count,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent
+ FROM vse r
+ LEFT JOIN children_count cc
+ ON r.recruit_id = cc.recruit_id
+ GROUP BY
+ r.gender,
+ r.convicts,
+ r.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ gender,
+ recruitment_id,
+ convicts,
+ total_count,
+ no_children,
+ one_child,
+ two_children,
+ three_children,
+ four_or_more_children,
+ COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+
+UNION ALL
+
+SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total_count) AS total_count,
+ SUM(no_children) AS no_children,
+ SUM(one_child) AS one_child,
+ SUM(two_children) AS two_children,
+ SUM(three_children) AS three_children,
+ SUM(four_or_more_children) AS four_or_more_children,
+ COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+GROUP BY recruitment_id, convicts
+ Y
+
+
+ 816
+ 368
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl
new file mode 100644
index 0000000..8fd266a
--- /dev/null
+++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl
@@ -0,0 +1,322 @@
+
+
+
+ total_registered.child_minor_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry)регион/все
+ Insert / update (total_registered.child_minor) 3
+ Y
+
+
+
+ Insert / update (total_registered.child_minor) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
child_minor
+
+ no_child
+ no_children
+ Y
+
+
+ "1_child"
+ one_child
+ Y
+
+
+ "2_child"
+ two_children
+ Y
+
+
+ "3_child"
+ three_children
+ Y
+
+
+ "4_more_child"
+ four_or_more_children
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ no_child_percent
+ no_children_percent
+ Y
+
+
+ "1_child_percent"
+ one_child_percent
+ Y
+
+
+ "2_child_percent"
+ two_children_percent
+ Y
+
+
+ "3_child_percent"
+ three_children_percent
+ Y
+
+
+ "4_more_child_percent"
+ four_or_more_children_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1504
+ 368
+
+
+
+ Table input (person_registry)регион/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+vse AS (
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+),
+extracted_children AS(
+ SELECT
+ distinct
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) FILTER (
+ WHERE make_date(
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int
+ ) > CURRENT_DATE - INTERVAL '18 years'
+ ) AS children_under_18
+ FROM
+ extracted_children
+ GROUP BY
+ recruit_id
+),
+gender_and_recruitment_data AS (
+ SELECT
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(r.recruit_id) AS total_count,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent
+ FROM vse r
+ LEFT JOIN children_count cc
+ ON r.recruit_id = cc.recruit_id
+ GROUP BY
+ r.gender,
+ r.convicts,
+ r.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ gender,
+ recruitment_id,
+ convicts,
+ total_count,
+ no_children,
+ one_child,
+ two_children,
+ three_children,
+ four_or_more_children,
+ COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+
+UNION ALL
+
+SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total_count) AS total_count,
+ SUM(no_children) AS no_children,
+ SUM(one_child) AS one_child,
+ SUM(two_children) AS two_children,
+ SUM(three_children) AS three_children,
+ SUM(four_or_more_children) AS four_or_more_children,
+ COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+GROUP BY recruitment_id, convicts
+ Y
+
+
+ 816
+ 368
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl
new file mode 100644
index 0000000..68988de
--- /dev/null
+++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl
@@ -0,0 +1,322 @@
+
+
+
+ total_registered.child_minor_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry)регион/все
+ Insert / update (total_registered.child_minor) 3
+ Y
+
+
+
+ Insert / update (total_registered.child_minor) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
child_minor
+
+ no_child
+ no_children
+ Y
+
+
+ "1_child"
+ one_child
+ Y
+
+
+ "2_child"
+ two_children
+ Y
+
+
+ "3_child"
+ three_children
+ Y
+
+
+ "4_more_child"
+ four_or_more_children
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ no_child_percent
+ no_children_percent
+ Y
+
+
+ "1_child_percent"
+ one_child_percent
+ Y
+
+
+ "2_child_percent"
+ two_children_percent
+ Y
+
+
+ "3_child_percent"
+ three_children_percent
+ Y
+
+
+ "4_more_child_percent"
+ four_or_more_children_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1504
+ 368
+
+
+
+ Table input (person_registry)регион/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+vse AS (
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+),
+extracted_children AS(
+ SELECT
+ distinct
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) FILTER (
+ WHERE make_date(
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int
+ ) > CURRENT_DATE - INTERVAL '18 years'
+ ) AS children_under_18
+ FROM
+ extracted_children
+ GROUP BY
+ recruit_id
+),
+gender_and_recruitment_data AS (
+ SELECT
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(r.recruit_id) AS total_count,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent
+ FROM vse r
+ LEFT JOIN children_count cc
+ ON r.recruit_id = cc.recruit_id
+ GROUP BY
+ r.gender,
+ r.convicts,
+ r.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ gender,
+ recruitment_id,
+ convicts,
+ total_count,
+ no_children,
+ one_child,
+ two_children,
+ three_children,
+ four_or_more_children,
+ COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+
+UNION ALL
+
+SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total_count) AS total_count,
+ SUM(no_children) AS no_children,
+ SUM(one_child) AS one_child,
+ SUM(two_children) AS two_children,
+ SUM(three_children) AS three_children,
+ SUM(four_or_more_children) AS four_or_more_children,
+ COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+GROUP BY recruitment_id, convicts
+ Y
+
+
+ 816
+ 368
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl
new file mode 100644
index 0000000..86bce7f
--- /dev/null
+++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl
@@ -0,0 +1,322 @@
+
+
+
+ total_registered.child_minor_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry)регион/все
+ Insert / update (total_registered.child_minor) 3
+ Y
+
+
+
+ Insert / update (total_registered.child_minor) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
child_minor
+
+ no_child
+ no_children
+ Y
+
+
+ "1_child"
+ one_child
+ Y
+
+
+ "2_child"
+ two_children
+ Y
+
+
+ "3_child"
+ three_children
+ Y
+
+
+ "4_more_child"
+ four_or_more_children
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ no_child_percent
+ no_children_percent
+ Y
+
+
+ "1_child_percent"
+ one_child_percent
+ Y
+
+
+ "2_child_percent"
+ two_children_percent
+ Y
+
+
+ "3_child_percent"
+ three_children_percent
+ Y
+
+
+ "4_more_child_percent"
+ four_or_more_children_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ total_count
+ total_count
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ N
+
+
+ 1504
+ 368
+
+
+
+ Table input (person_registry)регион/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+vse AS (
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ ri.recruit_id,
+ --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.current_recruitment_id AS recruitment_id,
+ r.gender,
+ 'ALL' AS convicts,
+ ri.info
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh ON rh.recruit_id = r.id
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE')
+),
+extracted_children AS(
+ SELECT
+ distinct
+ ri.recruit_id,
+ jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
+ FROM vse ri
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+),
+children_count AS (
+ SELECT
+ recruit_id,
+ COUNT(*) FILTER (
+ WHERE make_date(
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int,
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int
+ ) > CURRENT_DATE - INTERVAL '18 years'
+ ) AS children_under_18
+ FROM
+ extracted_children
+ GROUP BY
+ recruit_id
+),
+gender_and_recruitment_data AS (
+ SELECT
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(r.recruit_id) AS total_count,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children,
+ COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent,
+ ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent
+ FROM vse r
+ LEFT JOIN children_count cc
+ ON r.recruit_id = cc.recruit_id
+ GROUP BY
+ r.gender,
+ r.convicts,
+ r.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ gender,
+ recruitment_id,
+ convicts,
+ total_count,
+ no_children,
+ one_child,
+ two_children,
+ three_children,
+ four_or_more_children,
+ COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+
+UNION ALL
+
+SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total_count) AS total_count,
+ SUM(no_children) AS no_children,
+ SUM(one_child) AS one_child,
+ SUM(two_children) AS two_children,
+ SUM(three_children) AS three_children,
+ SUM(four_or_more_children) AS four_or_more_children,
+ COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent,
+ COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent,
+ COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent,
+ COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent,
+ COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent
+FROM
+ gender_and_recruitment_data
+GROUP BY recruitment_id, convicts
+ Y
+
+
+ 816
+ 368
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl
new file mode 100644
index 0000000..06ee25d
--- /dev/null
+++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl
@@ -0,0 +1,414 @@
+
+
+
+ total_registered.driver_license(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 3 2
+ Select values 3 2
+ N
+
+
+ Select values 3 2
+ Insert / update (total_registered.driver_license) 2
+ N
+
+
+ Table input (driver_license) регионы/все
+ Get variables 3 2
+ N
+
+
+ Table input (driver_license) регионы/все
+ Insert / update (total_registered.driver_license) 2
+ Y
+
+
+
+ Get variables 3 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 960
+ 496
+
+
+
+ Insert / update (total_registered.driver_license) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
driver_license
+
+ "A"
+ a
+ Y
+
+
+ "B"
+ b
+ Y
+
+
+ "C"
+ c
+ Y
+
+
+ "D"
+ d
+ Y
+
+
+ "E"
+ e
+ Y
+
+
+ nope
+ nope
+ Y
+
+
+ "A_repcent"
+ a_percent
+ Y
+
+
+ "B_repcent"
+ b_percent
+ Y
+
+
+ "C_repcent"
+ c_percent
+ Y
+
+
+ "D_repcent"
+ d_percent
+ Y
+
+
+ "E_repcent"
+ e_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ nope_repcent
+ nope_percent
+ Y
+
+
+ total_count
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1264
+ 384
+
+
+
+ Select values 3 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1104
+ 496
+
+
+
+ Table input (driver_license) регионы/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+categorized AS (
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ 'ALL' AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+),
+aggregated AS (
+ SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ r.convicts,
+ r.recruitment_id,
+ -- Считаем количество уникальных рекрутов с каждой категорией
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.gender, r.recruitment_id, r.convicts
+),
+aggregated_all AS (
+ SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.recruitment_id, r.convicts
+)
+
+-- Объединение результатов с вычислением процентов
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated
+UNION ALL
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated_all
+ Y
+
+
+ 800
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf
new file mode 100644
index 0000000..a5e579d
--- /dev/null
+++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf
@@ -0,0 +1,309 @@
+
+
+ total_registered.driver_license(m_c)
+ Y
+
+
+
+ -
+ 2025/03/31 17:29:01.571
+ -
+ 2025/03/31 17:29:01.571
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 592
+ 400
+
+
+
+ total_registered.driver_license_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 240
+
+
+
+ total_registered.driver_license_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 320
+
+
+
+ total_registered.driver_license_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 400
+
+
+
+ total_registered.driver_license_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 480
+
+
+
+ total_registered.driver_license_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 560
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1520
+ 240
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1520
+ 320
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1520
+ 400
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1520
+ 480
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1520
+ 560
+
+
+
+
+
+ Start
+ total_registered.driver_license_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.driver_license_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.driver_license_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.driver_license_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.driver_license_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.driver_license_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.driver_license_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.driver_license_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.driver_license_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.driver_license_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl
new file mode 100644
index 0000000..499784b
--- /dev/null
+++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl
@@ -0,0 +1,312 @@
+
+
+
+ total_registered.driver_license_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (driver_license) регионы/все
+ Insert / update (total_registered.driver_license) 2
+ Y
+
+
+
+ Insert / update (total_registered.driver_license) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
driver_license
+
+ "A"
+ a
+ Y
+
+
+ "B"
+ b
+ Y
+
+
+ "C"
+ c
+ Y
+
+
+ "D"
+ d
+ Y
+
+
+ "E"
+ e
+ Y
+
+
+ nope
+ nope
+ Y
+
+
+ "A_repcent"
+ a_percent
+ Y
+
+
+ "B_repcent"
+ b_percent
+ Y
+
+
+ "C_repcent"
+ c_percent
+ Y
+
+
+ "D_repcent"
+ d_percent
+ Y
+
+
+ "E_repcent"
+ e_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ nope_repcent
+ nope_percent
+ Y
+
+
+ total_count
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1264
+ 384
+
+
+
+ Table input (driver_license) регионы/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+categorized AS (
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ 'ALL' AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+),
+aggregated AS (
+ SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ r.convicts,
+ r.recruitment_id,
+ -- Считаем количество уникальных рекрутов с каждой категорией
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.gender, r.recruitment_id, r.convicts
+),
+aggregated_all AS (
+ SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.recruitment_id, r.convicts
+)
+
+-- Объединение результатов с вычислением процентов
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated
+UNION ALL
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated_all
+ Y
+
+
+ 800
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl
new file mode 100644
index 0000000..123f382
--- /dev/null
+++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl
@@ -0,0 +1,312 @@
+
+
+
+ total_registered.driver_license_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (driver_license) регионы/все
+ Insert / update (total_registered.driver_license) 2
+ Y
+
+
+
+ Insert / update (total_registered.driver_license) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
driver_license
+
+ "A"
+ a
+ Y
+
+
+ "B"
+ b
+ Y
+
+
+ "C"
+ c
+ Y
+
+
+ "D"
+ d
+ Y
+
+
+ "E"
+ e
+ Y
+
+
+ nope
+ nope
+ Y
+
+
+ "A_repcent"
+ a_percent
+ Y
+
+
+ "B_repcent"
+ b_percent
+ Y
+
+
+ "C_repcent"
+ c_percent
+ Y
+
+
+ "D_repcent"
+ d_percent
+ Y
+
+
+ "E_repcent"
+ e_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ nope_repcent
+ nope_percent
+ Y
+
+
+ total_count
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1264
+ 384
+
+
+
+ Table input (driver_license) регионы/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+categorized AS (
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ 'ALL' AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+),
+aggregated AS (
+ SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ r.convicts,
+ r.recruitment_id,
+ -- Считаем количество уникальных рекрутов с каждой категорией
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.gender, r.recruitment_id, r.convicts
+),
+aggregated_all AS (
+ SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.recruitment_id, r.convicts
+)
+
+-- Объединение результатов с вычислением процентов
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated
+UNION ALL
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated_all
+ Y
+
+
+ 800
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl
new file mode 100644
index 0000000..a80fbf3
--- /dev/null
+++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl
@@ -0,0 +1,312 @@
+
+
+
+ total_registered.driver_license_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (driver_license) регионы/все
+ Insert / update (total_registered.driver_license) 2
+ Y
+
+
+
+ Insert / update (total_registered.driver_license) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
driver_license
+
+ "A"
+ a
+ Y
+
+
+ "B"
+ b
+ Y
+
+
+ "C"
+ c
+ Y
+
+
+ "D"
+ d
+ Y
+
+
+ "E"
+ e
+ Y
+
+
+ nope
+ nope
+ Y
+
+
+ "A_repcent"
+ a_percent
+ Y
+
+
+ "B_repcent"
+ b_percent
+ Y
+
+
+ "C_repcent"
+ c_percent
+ Y
+
+
+ "D_repcent"
+ d_percent
+ Y
+
+
+ "E_repcent"
+ e_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ nope_repcent
+ nope_percent
+ Y
+
+
+ total_count
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1264
+ 384
+
+
+
+ Table input (driver_license) регионы/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+categorized AS (
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ 'ALL' AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+),
+aggregated AS (
+ SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ r.convicts,
+ r.recruitment_id,
+ -- Считаем количество уникальных рекрутов с каждой категорией
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.gender, r.recruitment_id, r.convicts
+),
+aggregated_all AS (
+ SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.recruitment_id, r.convicts
+)
+
+-- Объединение результатов с вычислением процентов
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated
+UNION ALL
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated_all
+ Y
+
+
+ 800
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl
new file mode 100644
index 0000000..b8ebe8a
--- /dev/null
+++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl
@@ -0,0 +1,312 @@
+
+
+
+ total_registered.driver_license_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (driver_license) регионы/все
+ Insert / update (total_registered.driver_license) 2
+ Y
+
+
+
+ Insert / update (total_registered.driver_license) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
driver_license
+
+ "A"
+ a
+ Y
+
+
+ "B"
+ b
+ Y
+
+
+ "C"
+ c
+ Y
+
+
+ "D"
+ d
+ Y
+
+
+ "E"
+ e
+ Y
+
+
+ nope
+ nope
+ Y
+
+
+ "A_repcent"
+ a_percent
+ Y
+
+
+ "B_repcent"
+ b_percent
+ Y
+
+
+ "C_repcent"
+ c_percent
+ Y
+
+
+ "D_repcent"
+ d_percent
+ Y
+
+
+ "E_repcent"
+ e_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ nope_repcent
+ nope_percent
+ Y
+
+
+ total_count
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1264
+ 384
+
+
+
+ Table input (driver_license) регионы/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+categorized AS (
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ 'ALL' AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+),
+aggregated AS (
+ SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ r.convicts,
+ r.recruitment_id,
+ -- Считаем количество уникальных рекрутов с каждой категорией
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.gender, r.recruitment_id, r.convicts
+),
+aggregated_all AS (
+ SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.recruitment_id, r.convicts
+)
+
+-- Объединение результатов с вычислением процентов
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated
+UNION ALL
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated_all
+ Y
+
+
+ 800
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl
new file mode 100644
index 0000000..33620bb
--- /dev/null
+++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl
@@ -0,0 +1,312 @@
+
+
+
+ total_registered.driver_license_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (driver_license) регионы/все
+ Insert / update (total_registered.driver_license) 2
+ Y
+
+
+
+ Insert / update (total_registered.driver_license) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
driver_license
+
+ "A"
+ a
+ Y
+
+
+ "B"
+ b
+ Y
+
+
+ "C"
+ c
+ Y
+
+
+ "D"
+ d
+ Y
+
+
+ "E"
+ e
+ Y
+
+
+ nope
+ nope
+ Y
+
+
+ "A_repcent"
+ a_percent
+ Y
+
+
+ "B_repcent"
+ b_percent
+ Y
+
+
+ "C_repcent"
+ c_percent
+ Y
+
+
+ "D_repcent"
+ d_percent
+ Y
+
+
+ "E_repcent"
+ e_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ nope_repcent
+ nope_percent
+ Y
+
+
+ total_count
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1264
+ 384
+
+
+
+ Table input (driver_license) регионы/все
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+categorized AS (
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+
+ UNION ALL
+
+ SELECT
+ r.id,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ 'ALL' AS convicts,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E,
+ MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды
+ MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы
+ FROM public.recruits AS r
+ JOIN public.recruits_info ri ON ri.recruit_id = r.id
+ --JOIN public.recruits_history rh on rh.recruit_id=r.id
+ LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+/*
+ 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.gender IN ('MALE', 'FEMALE') -- Исключаем NULL
+ GROUP BY r.id, r.gender
+),
+aggregated AS (
+ SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN r.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ r.convicts,
+ r.recruitment_id,
+ -- Считаем количество уникальных рекрутов с каждой категорией
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.gender, r.recruitment_id, r.convicts
+),
+aggregated_all AS (
+ SELECT
+ current_date AS recording_date,
+ 'ALL' AS gender,
+ r.convicts,
+ r.recruitment_id,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
+ COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
+ COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025
+ COUNT(DISTINCT r.id) AS total
+ FROM categorized r
+ GROUP BY r.recruitment_id, r.convicts
+)
+
+-- Объединение результатов с вычислением процентов
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated
+UNION ALL
+SELECT
+ *,
+ COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent,
+ COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent,
+ COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent,
+ COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent,
+ COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent,
+ COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent
+FROM aggregated_all
+ Y
+
+
+ 800
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl
new file mode 100644
index 0000000..39bed0f
--- /dev/null
+++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl
@@ -0,0 +1,452 @@
+
+
+
+ total_registered.education_level(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 3 2 2
+ Select values 3 2 2
+ N
+
+
+ Table input (person_registry) РФ/мужчины
+ Get variables 3 2 2
+ N
+
+
+ Select values 3 2 2
+ Insert / update (total_registered.education_level) 2
+ N
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.education_level) 2
+ Y
+
+
+
+ Get variables 3 2 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 1328
+ 624
+
+
+
+ Insert / update (total_registered.education_level) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
education_level
+
+ higher
+ higher
+ Y
+
+
+ average
+ average_prof
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ only_general
+ only_general
+ Y
+
+
+ no_data
+ count_nodata
+ Y
+
+
+ higher_percent
+ higher_percentage
+ Y
+
+
+ average_percent
+ average_prof_percentage
+ Y
+
+
+ only_general_percent
+ only_general_percentage
+ Y
+
+
+ no_data_percent
+ count_nodata_percentage
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ education_level
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1728
+ 496
+
+
+
+ Select values 3 2 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1472
+ 624
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+education_status AS (
+ SELECT
+ ri.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ -- Высшее образование (российское или иностранное)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
+ ) OR EXISTS (
+ 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' IN ('1', '2', '3', '4', '5')
+ )
+ ) AS has_higher,
+
+ -- Среднее профессиональное образование (если нет высшего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('6', '8', '10', '11')
+ ) OR EXISTS (
+ 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' IN ('6', '8', '10', '11')
+ )
+ ) AS has_average_prof,
+
+ -- Общее образование (если нет высшего и среднего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('7', '9')
+ ) OR EXISTS (
+ 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' IN ('7', '9')
+ )
+ ) AS has_only_general,
+
+ -- Нет данных об образовании (российское или иностранное)
+ (
+ NOT (
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ ) OR EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
+ )
+ )
+ ) AND (
+ ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1'
+ OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1'
+ )
+ ) AS has_no_data
+
+ 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
+ WHERE
+ r.gender IN ('MALE', 'FEMALE')
+ AND r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+),
+final_counts AS (
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ es.convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender, es.convicts
+
+ UNION ALL
+
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ 'ALL' AS convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender
+),
+final_counts_all AS (
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id, convicts
+
+ UNION ALL
+
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN fc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ fc.convicts,
+ fc.recruitment_id,
+ fc.higher,
+ fc.average_prof,
+ fc.only_general,
+ fc.count_nodata,
+ fc.total,
+ COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts fc
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ fca.gender,
+ fca.convicts,
+ fca.recruitment_id,
+ fca.higher,
+ fca.average_prof,
+ fca.only_general,
+ fca.count_nodata,
+ fca.total,
+ COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts_all fca
+ Y
+
+
+ 1072
+ 496
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf
new file mode 100644
index 0000000..d2032bb
--- /dev/null
+++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf
@@ -0,0 +1,309 @@
+
+
+ total_registered.education_level(m_c)
+ Y
+
+
+
+ -
+ 2025/04/01 10:26:22.205
+ -
+ 2025/04/01 10:26:22.205
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 624
+ 432
+
+
+
+ total_registered.education_level_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 272
+
+
+
+ total_registered.education_level_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 352
+
+
+
+ total_registered.education_level_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 432
+
+
+
+ total_registered.education_level_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 512
+
+
+
+ total_registered.education_level_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1088
+ 592
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1360
+ 272
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1360
+ 352
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1360
+ 432
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1360
+ 512
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1360
+ 592
+
+
+
+
+
+ Start
+ total_registered.education_level_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.education_level_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ Start
+ total_registered.education_level_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.education_level_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ Start
+ total_registered.education_level_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.education_level_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ Start
+ total_registered.education_level_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.education_level_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.education_level_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+ Start
+ total_registered.education_level_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl
new file mode 100644
index 0000000..625f5ac
--- /dev/null
+++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl
@@ -0,0 +1,350 @@
+
+
+
+ total_registered.education_level_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.education_level) 2
+ Y
+
+
+
+ Insert / update (total_registered.education_level) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
education_level
+
+ higher
+ higher
+ Y
+
+
+ average
+ average_prof
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ only_general
+ only_general
+ Y
+
+
+ no_data
+ count_nodata
+ Y
+
+
+ higher_percent
+ higher_percentage
+ Y
+
+
+ average_percent
+ average_prof_percentage
+ Y
+
+
+ only_general_percent
+ only_general_percentage
+ Y
+
+
+ no_data_percent
+ count_nodata_percentage
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ education_level
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1728
+ 496
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+education_status AS (
+ SELECT
+ ri.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ -- Высшее образование (российское или иностранное)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
+ ) OR EXISTS (
+ 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' IN ('1', '2', '3', '4', '5')
+ )
+ ) AS has_higher,
+
+ -- Среднее профессиональное образование (если нет высшего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('6', '8', '10', '11')
+ ) OR EXISTS (
+ 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' IN ('6', '8', '10', '11')
+ )
+ ) AS has_average_prof,
+
+ -- Общее образование (если нет высшего и среднего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('7', '9')
+ ) OR EXISTS (
+ 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' IN ('7', '9')
+ )
+ ) AS has_only_general,
+
+ -- Нет данных об образовании (российское или иностранное)
+ (
+ NOT (
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ ) OR EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
+ )
+ )
+ ) AND (
+ ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1'
+ OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1'
+ )
+ ) AS has_no_data
+
+ 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
+ WHERE
+ r.gender IN ('MALE', 'FEMALE')
+ AND r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+),
+final_counts AS (
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ es.convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender, es.convicts
+
+ UNION ALL
+
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ 'ALL' AS convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender
+),
+final_counts_all AS (
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id, convicts
+
+ UNION ALL
+
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN fc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ fc.convicts,
+ fc.recruitment_id,
+ fc.higher,
+ fc.average_prof,
+ fc.only_general,
+ fc.count_nodata,
+ fc.total,
+ COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts fc
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ fca.gender,
+ fca.convicts,
+ fca.recruitment_id,
+ fca.higher,
+ fca.average_prof,
+ fca.only_general,
+ fca.count_nodata,
+ fca.total,
+ COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts_all fca
+ Y
+
+
+ 1072
+ 496
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl
new file mode 100644
index 0000000..01c5120
--- /dev/null
+++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl
@@ -0,0 +1,350 @@
+
+
+
+ total_registered.education_level_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.education_level) 2
+ Y
+
+
+
+ Insert / update (total_registered.education_level) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
education_level
+
+ higher
+ higher
+ Y
+
+
+ average
+ average_prof
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ only_general
+ only_general
+ Y
+
+
+ no_data
+ count_nodata
+ Y
+
+
+ higher_percent
+ higher_percentage
+ Y
+
+
+ average_percent
+ average_prof_percentage
+ Y
+
+
+ only_general_percent
+ only_general_percentage
+ Y
+
+
+ no_data_percent
+ count_nodata_percentage
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ education_level
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1728
+ 496
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+education_status AS (
+ SELECT
+ ri.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ -- Высшее образование (российское или иностранное)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
+ ) OR EXISTS (
+ 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' IN ('1', '2', '3', '4', '5')
+ )
+ ) AS has_higher,
+
+ -- Среднее профессиональное образование (если нет высшего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('6', '8', '10', '11')
+ ) OR EXISTS (
+ 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' IN ('6', '8', '10', '11')
+ )
+ ) AS has_average_prof,
+
+ -- Общее образование (если нет высшего и среднего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('7', '9')
+ ) OR EXISTS (
+ 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' IN ('7', '9')
+ )
+ ) AS has_only_general,
+
+ -- Нет данных об образовании (российское или иностранное)
+ (
+ NOT (
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ ) OR EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
+ )
+ )
+ ) AND (
+ ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1'
+ OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1'
+ )
+ ) AS has_no_data
+
+ 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
+ WHERE
+ r.gender IN ('MALE', 'FEMALE')
+ AND r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+),
+final_counts AS (
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ es.convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender, es.convicts
+
+ UNION ALL
+
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ 'ALL' AS convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender
+),
+final_counts_all AS (
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id, convicts
+
+ UNION ALL
+
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN fc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ fc.convicts,
+ fc.recruitment_id,
+ fc.higher,
+ fc.average_prof,
+ fc.only_general,
+ fc.count_nodata,
+ fc.total,
+ COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts fc
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ fca.gender,
+ fca.convicts,
+ fca.recruitment_id,
+ fca.higher,
+ fca.average_prof,
+ fca.only_general,
+ fca.count_nodata,
+ fca.total,
+ COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts_all fca
+ Y
+
+
+ 1072
+ 496
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl
new file mode 100644
index 0000000..2d28874
--- /dev/null
+++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl
@@ -0,0 +1,350 @@
+
+
+
+ total_registered.education_level_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.education_level) 2
+ Y
+
+
+
+ Insert / update (total_registered.education_level) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
education_level
+
+ higher
+ higher
+ Y
+
+
+ average
+ average_prof
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ only_general
+ only_general
+ Y
+
+
+ no_data
+ count_nodata
+ Y
+
+
+ higher_percent
+ higher_percentage
+ Y
+
+
+ average_percent
+ average_prof_percentage
+ Y
+
+
+ only_general_percent
+ only_general_percentage
+ Y
+
+
+ no_data_percent
+ count_nodata_percentage
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ education_level
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1728
+ 496
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+education_status AS (
+ SELECT
+ ri.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ -- Высшее образование (российское или иностранное)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
+ ) OR EXISTS (
+ 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' IN ('1', '2', '3', '4', '5')
+ )
+ ) AS has_higher,
+
+ -- Среднее профессиональное образование (если нет высшего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('6', '8', '10', '11')
+ ) OR EXISTS (
+ 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' IN ('6', '8', '10', '11')
+ )
+ ) AS has_average_prof,
+
+ -- Общее образование (если нет высшего и среднего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('7', '9')
+ ) OR EXISTS (
+ 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' IN ('7', '9')
+ )
+ ) AS has_only_general,
+
+ -- Нет данных об образовании (российское или иностранное)
+ (
+ NOT (
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ ) OR EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
+ )
+ )
+ ) AND (
+ ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1'
+ OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1'
+ )
+ ) AS has_no_data
+
+ 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
+ WHERE
+ r.gender IN ('MALE', 'FEMALE')
+ AND r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+),
+final_counts AS (
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ es.convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender, es.convicts
+
+ UNION ALL
+
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ 'ALL' AS convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender
+),
+final_counts_all AS (
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id, convicts
+
+ UNION ALL
+
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN fc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ fc.convicts,
+ fc.recruitment_id,
+ fc.higher,
+ fc.average_prof,
+ fc.only_general,
+ fc.count_nodata,
+ fc.total,
+ COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts fc
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ fca.gender,
+ fca.convicts,
+ fca.recruitment_id,
+ fca.higher,
+ fca.average_prof,
+ fca.only_general,
+ fca.count_nodata,
+ fca.total,
+ COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts_all fca
+ Y
+
+
+ 1072
+ 496
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl
new file mode 100644
index 0000000..9e18fa4
--- /dev/null
+++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl
@@ -0,0 +1,350 @@
+
+
+
+ total_registered.education_level_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.education_level) 2
+ Y
+
+
+
+ Insert / update (total_registered.education_level) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
education_level
+
+ higher
+ higher
+ Y
+
+
+ average
+ average_prof
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ only_general
+ only_general
+ Y
+
+
+ no_data
+ count_nodata
+ Y
+
+
+ higher_percent
+ higher_percentage
+ Y
+
+
+ average_percent
+ average_prof_percentage
+ Y
+
+
+ only_general_percent
+ only_general_percentage
+ Y
+
+
+ no_data_percent
+ count_nodata_percentage
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ education_level
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1728
+ 496
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+education_status AS (
+ SELECT
+ ri.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ -- Высшее образование (российское или иностранное)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
+ ) OR EXISTS (
+ 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' IN ('1', '2', '3', '4', '5')
+ )
+ ) AS has_higher,
+
+ -- Среднее профессиональное образование (если нет высшего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('6', '8', '10', '11')
+ ) OR EXISTS (
+ 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' IN ('6', '8', '10', '11')
+ )
+ ) AS has_average_prof,
+
+ -- Общее образование (если нет высшего и среднего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('7', '9')
+ ) OR EXISTS (
+ 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' IN ('7', '9')
+ )
+ ) AS has_only_general,
+
+ -- Нет данных об образовании (российское или иностранное)
+ (
+ NOT (
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ ) OR EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
+ )
+ )
+ ) AND (
+ ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1'
+ OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1'
+ )
+ ) AS has_no_data
+
+ 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
+ WHERE
+ r.gender IN ('MALE', 'FEMALE')
+ AND r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+),
+final_counts AS (
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ es.convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender, es.convicts
+
+ UNION ALL
+
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ 'ALL' AS convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender
+),
+final_counts_all AS (
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id, convicts
+
+ UNION ALL
+
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN fc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ fc.convicts,
+ fc.recruitment_id,
+ fc.higher,
+ fc.average_prof,
+ fc.only_general,
+ fc.count_nodata,
+ fc.total,
+ COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts fc
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ fca.gender,
+ fca.convicts,
+ fca.recruitment_id,
+ fca.higher,
+ fca.average_prof,
+ fca.only_general,
+ fca.count_nodata,
+ fca.total,
+ COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts_all fca
+ Y
+
+
+ 1072
+ 496
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl
new file mode 100644
index 0000000..e5cb4e6
--- /dev/null
+++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl
@@ -0,0 +1,350 @@
+
+
+
+ total_registered.education_level_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) РФ/мужчины
+ Insert / update (total_registered.education_level) 2
+ Y
+
+
+
+ Insert / update (total_registered.education_level) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
education_level
+
+ higher
+ higher
+ Y
+
+
+ average
+ average_prof
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ only_general
+ only_general
+ Y
+
+
+ no_data
+ count_nodata
+ Y
+
+
+ higher_percent
+ higher_percentage
+ Y
+
+
+ average_percent
+ average_prof_percentage
+ Y
+
+
+ only_general_percent
+ only_general_percentage
+ Y
+
+
+ no_data_percent
+ count_nodata_percentage
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ education_level
+ total
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1728
+ 496
+
+
+
+ Table input (person_registry) РФ/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+education_status AS (
+ SELECT
+ ri.id,
+ ri.recruit_id AS recruit_id,
+ coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ -- Высшее образование (российское или иностранное)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
+ ) OR EXISTS (
+ 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' IN ('1', '2', '3', '4', '5')
+ )
+ ) AS has_higher,
+
+ -- Среднее профессиональное образование (если нет высшего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('6', '8', '10', '11')
+ ) OR EXISTS (
+ 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' IN ('6', '8', '10', '11')
+ )
+ ) AS has_average_prof,
+
+ -- Общее образование (если нет высшего и среднего)
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ AND education->>'kodUrObr' IN ('7', '9')
+ ) OR EXISTS (
+ 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' IN ('7', '9')
+ )
+ ) AS has_only_general,
+
+ -- Нет данных об образовании (российское или иностранное)
+ (
+ NOT (
+ (
+ EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
+ ) OR EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
+ WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
+ )
+ )
+ ) AND (
+ ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1'
+ OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1'
+ )
+ ) AS has_no_data
+
+ 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
+ WHERE
+ r.gender IN ('MALE', 'FEMALE')
+ AND r.id in (SELECT recruit_id FROM registered)
+ AND rh.id in (SELECT recruit_history_id FROM registered)
+ -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+),
+final_counts AS (
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ es.convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender, es.convicts
+
+ UNION ALL
+
+ SELECT
+ es.gender,
+ es.recruitment_id,
+ 'ALL' AS convicts,
+ COUNT(DISTINCT es.id) AS total,
+ COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
+ COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
+ COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
+ FROM education_status es
+ GROUP BY es.recruitment_id, es.gender
+),
+final_counts_all AS (
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id, convicts
+
+ UNION ALL
+
+ SELECT
+ 'ALL' AS gender,
+ recruitment_id,
+ 'ALL' AS convicts,
+ SUM(total) AS total,
+ SUM(higher) AS higher,
+ SUM(average_prof) AS average_prof,
+ SUM(only_general) AS only_general,
+ SUM(count_nodata) AS count_nodata
+ FROM final_counts
+ GROUP BY recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ CASE
+ WHEN fc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ fc.convicts,
+ fc.recruitment_id,
+ fc.higher,
+ fc.average_prof,
+ fc.only_general,
+ fc.count_nodata,
+ fc.total,
+ COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts fc
+UNION ALL
+SELECT
+ current_date AS recording_date,
+ fca.gender,
+ fca.convicts,
+ fca.recruitment_id,
+ fca.higher,
+ fca.average_prof,
+ fca.only_general,
+ fca.count_nodata,
+ fca.total,
+ COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage,
+ COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage,
+ COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage,
+ COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage
+FROM final_counts_all fca
+ Y
+
+
+ 1072
+ 496
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl
new file mode 100644
index 0000000..e285fa4
--- /dev/null
+++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl
@@ -0,0 +1,372 @@
+
+
+
+ total_registered.marital_status(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 3 2 2
+ Select values 3 2 2
+ N
+
+
+ Table input (person_registry) регионы/мужчины
+ Get variables 3 2 2
+ N
+
+
+ Select values 3 2 2
+ Insert / update (total_registered.marital_status) 2
+ N
+
+
+ Table input (person_registry) регионы/мужчины
+ Insert / update (total_registered.marital_status) 2
+ Y
+
+
+
+ Get variables 3 2 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 1280
+ 624
+
+
+
+ Insert / update (total_registered.marital_status) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
marital_status
+
+ married
+ married
+ Y
+
+
+ not_married
+ not_married
+ Y
+
+
+ married_percent
+ married_percent
+ Y
+
+
+ not_married_percent
+ not_married_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ marital_status
+ total
+ Y
+
+
+ other
+ other
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1680
+ 544
+
+
+
+ Select values 3 2 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1424
+ 624
+
+
+
+ Table input (person_registry) регионы/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+recruit_data AS (
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ 'ALL' AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+),
+married_counts AS (
+ -- Считаем значения для каждого гендера
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.convicts,
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other,
+ COUNT(rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025
+),
+all_counts AS (
+ -- Считаем значения для ALL, суммируя данные по всем гендерам
+ SELECT
+ recruitment_id,
+ 'ALL' AS gender,
+ convicts,
+ SUM(not_married) AS not_married,
+ SUM(married) AS married,
+ SUM(other) AS other,
+ SUM(total) AS total
+ FROM married_counts
+ GROUP BY recruitment_id, convicts
+)
+-- Финальное объединение
+SELECT
+ mc.not_married,
+ mc.married,
+ mc.total,
+ mc.other,
+ mc.convicts,
+ COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent,
+ CASE
+ WHEN mc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ current_date AS recording_date,
+ mc.recruitment_id
+FROM married_counts mc
+UNION ALL
+SELECT
+ ac.not_married,
+ ac.married,
+ ac.total,
+ ac.other,
+ ac.convicts,
+ COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent,
+ ac.gender,
+ current_date AS recording_date,
+ ac.recruitment_id
+FROM all_counts ac
+ Y
+
+
+ 1040
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf
new file mode 100644
index 0000000..85f6e93
--- /dev/null
+++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf
@@ -0,0 +1,312 @@
+
+
+ total_registered.marital_status(m_c)
+ Y
+
+
+
+ -
+ 2025/04/01 10:07:53.719
+ -
+ 2025/04/01 10:07:53.719
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 512
+ 416
+
+
+
+ total_registered.marital_status_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 896
+ 256
+
+
+
+ total_registered.marital_status_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 896
+ 336
+
+
+
+ total_registered.marital_status_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 896
+ 416
+
+
+
+ total_registered.marital_status_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 896
+ 496
+
+
+
+ total_registered.marital_status_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl
+
+
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 896
+ 576
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1264
+ 256
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1264
+ 336
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1264
+ 416
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1264
+ 496
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1264
+ 576
+
+
+
+
+
+ Start
+ total_registered.marital_status_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.marital_status_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.marital_status_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.marital_status_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.marital_status_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.marital_status_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.marital_status_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.marital_status_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.marital_status_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.marital_status_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl
new file mode 100644
index 0000000..cdf8016
--- /dev/null
+++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl
@@ -0,0 +1,270 @@
+
+
+
+ total_registered.marital_status_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регионы/мужчины
+ Insert / update (total_registered.marital_status) 2
+ Y
+
+
+
+ Insert / update (total_registered.marital_status) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
marital_status
+
+ married
+ married
+ Y
+
+
+ not_married
+ not_married
+ Y
+
+
+ married_percent
+ married_percent
+ Y
+
+
+ not_married_percent
+ not_married_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ marital_status
+ total
+ Y
+
+
+ other
+ other
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1680
+ 544
+
+
+
+ Table input (person_registry) регионы/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+recruit_data AS (
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ 'ALL' AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+),
+married_counts AS (
+ -- Считаем значения для каждого гендера
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.convicts,
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other,
+ COUNT(rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025
+),
+all_counts AS (
+ -- Считаем значения для ALL, суммируя данные по всем гендерам
+ SELECT
+ recruitment_id,
+ 'ALL' AS gender,
+ convicts,
+ SUM(not_married) AS not_married,
+ SUM(married) AS married,
+ SUM(other) AS other,
+ SUM(total) AS total
+ FROM married_counts
+ GROUP BY recruitment_id, convicts
+)
+-- Финальное объединение
+SELECT
+ mc.not_married,
+ mc.married,
+ mc.total,
+ mc.other,
+ mc.convicts,
+ COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent,
+ CASE
+ WHEN mc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ current_date AS recording_date,
+ mc.recruitment_id
+FROM married_counts mc
+UNION ALL
+SELECT
+ ac.not_married,
+ ac.married,
+ ac.total,
+ ac.other,
+ ac.convicts,
+ COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent,
+ ac.gender,
+ current_date AS recording_date,
+ ac.recruitment_id
+FROM all_counts ac
+ Y
+
+
+ 1040
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl
new file mode 100644
index 0000000..af10c10
--- /dev/null
+++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl
@@ -0,0 +1,270 @@
+
+
+
+ total_registered.marital_status_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регионы/мужчины
+ Insert / update (total_registered.marital_status) 2
+ Y
+
+
+
+ Insert / update (total_registered.marital_status) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
marital_status
+
+ married
+ married
+ Y
+
+
+ not_married
+ not_married
+ Y
+
+
+ married_percent
+ married_percent
+ Y
+
+
+ not_married_percent
+ not_married_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ marital_status
+ total
+ Y
+
+
+ other
+ other
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1680
+ 544
+
+
+
+ Table input (person_registry) регионы/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+recruit_data AS (
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ 'ALL' AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+),
+married_counts AS (
+ -- Считаем значения для каждого гендера
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.convicts,
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other,
+ COUNT(rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025
+),
+all_counts AS (
+ -- Считаем значения для ALL, суммируя данные по всем гендерам
+ SELECT
+ recruitment_id,
+ 'ALL' AS gender,
+ convicts,
+ SUM(not_married) AS not_married,
+ SUM(married) AS married,
+ SUM(other) AS other,
+ SUM(total) AS total
+ FROM married_counts
+ GROUP BY recruitment_id, convicts
+)
+-- Финальное объединение
+SELECT
+ mc.not_married,
+ mc.married,
+ mc.total,
+ mc.other,
+ mc.convicts,
+ COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent,
+ CASE
+ WHEN mc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ current_date AS recording_date,
+ mc.recruitment_id
+FROM married_counts mc
+UNION ALL
+SELECT
+ ac.not_married,
+ ac.married,
+ ac.total,
+ ac.other,
+ ac.convicts,
+ COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent,
+ ac.gender,
+ current_date AS recording_date,
+ ac.recruitment_id
+FROM all_counts ac
+ Y
+
+
+ 1040
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl
new file mode 100644
index 0000000..1dc80e3
--- /dev/null
+++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl
@@ -0,0 +1,270 @@
+
+
+
+ total_registered.marital_status_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регионы/мужчины
+ Insert / update (total_registered.marital_status) 2
+ Y
+
+
+
+ Insert / update (total_registered.marital_status) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
marital_status
+
+ married
+ married
+ Y
+
+
+ not_married
+ not_married
+ Y
+
+
+ married_percent
+ married_percent
+ Y
+
+
+ not_married_percent
+ not_married_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ marital_status
+ total
+ Y
+
+
+ other
+ other
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1680
+ 544
+
+
+
+ Table input (person_registry) регионы/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+recruit_data AS (
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ 'ALL' AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+),
+married_counts AS (
+ -- Считаем значения для каждого гендера
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.convicts,
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other,
+ COUNT(rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025
+),
+all_counts AS (
+ -- Считаем значения для ALL, суммируя данные по всем гендерам
+ SELECT
+ recruitment_id,
+ 'ALL' AS gender,
+ convicts,
+ SUM(not_married) AS not_married,
+ SUM(married) AS married,
+ SUM(other) AS other,
+ SUM(total) AS total
+ FROM married_counts
+ GROUP BY recruitment_id, convicts
+)
+-- Финальное объединение
+SELECT
+ mc.not_married,
+ mc.married,
+ mc.total,
+ mc.other,
+ mc.convicts,
+ COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent,
+ CASE
+ WHEN mc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ current_date AS recording_date,
+ mc.recruitment_id
+FROM married_counts mc
+UNION ALL
+SELECT
+ ac.not_married,
+ ac.married,
+ ac.total,
+ ac.other,
+ ac.convicts,
+ COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent,
+ ac.gender,
+ current_date AS recording_date,
+ ac.recruitment_id
+FROM all_counts ac
+ Y
+
+
+ 1040
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl
new file mode 100644
index 0000000..2401073
--- /dev/null
+++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl
@@ -0,0 +1,270 @@
+
+
+
+ total_registered.marital_status_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регионы/мужчины
+ Insert / update (total_registered.marital_status) 2
+ Y
+
+
+
+ Insert / update (total_registered.marital_status) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
marital_status
+
+ married
+ married
+ Y
+
+
+ not_married
+ not_married
+ Y
+
+
+ married_percent
+ married_percent
+ Y
+
+
+ not_married_percent
+ not_married_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ marital_status
+ total
+ Y
+
+
+ other
+ other
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1680
+ 544
+
+
+
+ Table input (person_registry) регионы/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+recruit_data AS (
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ 'ALL' AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+),
+married_counts AS (
+ -- Считаем значения для каждого гендера
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.convicts,
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other,
+ COUNT(rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025
+),
+all_counts AS (
+ -- Считаем значения для ALL, суммируя данные по всем гендерам
+ SELECT
+ recruitment_id,
+ 'ALL' AS gender,
+ convicts,
+ SUM(not_married) AS not_married,
+ SUM(married) AS married,
+ SUM(other) AS other,
+ SUM(total) AS total
+ FROM married_counts
+ GROUP BY recruitment_id, convicts
+)
+-- Финальное объединение
+SELECT
+ mc.not_married,
+ mc.married,
+ mc.total,
+ mc.other,
+ mc.convicts,
+ COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent,
+ CASE
+ WHEN mc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ current_date AS recording_date,
+ mc.recruitment_id
+FROM married_counts mc
+UNION ALL
+SELECT
+ ac.not_married,
+ ac.married,
+ ac.total,
+ ac.other,
+ ac.convicts,
+ COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent,
+ ac.gender,
+ current_date AS recording_date,
+ ac.recruitment_id
+FROM all_counts ac
+ Y
+
+
+ 1040
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl
new file mode 100644
index 0000000..47b4635
--- /dev/null
+++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl
@@ -0,0 +1,270 @@
+
+
+
+ total_registered.marital_status_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) регионы/мужчины
+ Insert / update (total_registered.marital_status) 2
+ Y
+
+
+
+ Insert / update (total_registered.marital_status) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ "all_M_W"
+ gender
+
+
+ =
+ convicts
+ convicts
+
+ total_registered
+
marital_status
+
+ married
+ married
+ Y
+
+
+ not_married
+ not_married
+ Y
+
+
+ married_percent
+ married_percent
+ Y
+
+
+ not_married_percent
+ not_married_percent
+ Y
+
+
+ "all_M_W"
+ gender
+ N
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ marital_status
+ total
+ Y
+
+
+ other
+ other
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ convicts
+ convicts
+ N
+
+
+ Y
+
+
+ 1680
+ 544
+
+
+
+ Table input (person_registry) регионы/мужчины
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+recruit_data AS (
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+
+ UNION ALL
+
+ SELECT
+ ri.recruit_id,
+ ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol,
+ r.gender,
+ 'ALL' AS convicts,
+ r.current_recruitment_id AS recruitment_id
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND r.gender IN ('MALE', 'FEMALE')
+/*
+ AND r.id in (SELECT recruit_id FROM registered)
+ and rh.id in (SELECT recruit_history_id FROM registered)
+ --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true'
+ and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids)
+*/
+),
+married_counts AS (
+ -- Считаем значения для каждого гендера
+ SELECT
+ rd.recruitment_id,
+ rd.gender,
+ rd.convicts,
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке
+ COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other,
+ COUNT(rd.recruit_id) AS total
+ FROM recruit_data rd
+ GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025
+),
+all_counts AS (
+ -- Считаем значения для ALL, суммируя данные по всем гендерам
+ SELECT
+ recruitment_id,
+ 'ALL' AS gender,
+ convicts,
+ SUM(not_married) AS not_married,
+ SUM(married) AS married,
+ SUM(other) AS other,
+ SUM(total) AS total
+ FROM married_counts
+ GROUP BY recruitment_id, convicts
+)
+-- Финальное объединение
+SELECT
+ mc.not_married,
+ mc.married,
+ mc.total,
+ mc.other,
+ mc.convicts,
+ COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent,
+ CASE
+ WHEN mc.gender = 'MALE' THEN 'M'
+ ELSE 'W'
+ END AS gender,
+ current_date AS recording_date,
+ mc.recruitment_id
+FROM married_counts mc
+UNION ALL
+SELECT
+ ac.not_married,
+ ac.married,
+ ac.total,
+ ac.other,
+ ac.convicts,
+ COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent,
+ COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent,
+ COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent,
+ ac.gender,
+ current_date AS recording_date,
+ ac.recruitment_id
+FROM all_counts ac
+ Y
+
+
+ 1040
+ 544
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl
new file mode 100644
index 0000000..c26f394
--- /dev/null
+++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl
@@ -0,0 +1,453 @@
+
+
+
+ total_registered.reg_mil_cat(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 3
+ Select values 3
+ N
+
+
+ Table input (person_registry) военком/рег
+ Get variables 3
+ N
+
+
+ Select values 3
+ Insert / update (total_registered.reg_mil_cat)
+ N
+
+
+ Table input (person_registry) военком/рег
+ Insert / update (total_registered.reg_mil_cat)
+ Y
+
+
+
+ Get variables 3
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 1008
+ 464
+
+
+
+ Insert / update (total_registered.reg_mil_cat)
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
reg_mil_cat
+
+ first_reg_17
+ first_reg_17
+ Y
+
+
+ first_reg_18
+ first_reg_18
+ Y
+
+
+ "mil_spec_W"
+ mil_spec_w
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ returned_dep_liberty
+ returned_dep_liberty
+ Y
+
+
+ punished
+ punished
+ Y
+
+
+ received_citizenship
+ received_citizenship
+ Y
+
+
+ first_reg_17_percent
+ first_reg_17_percent
+ Y
+
+
+ first_reg_18_percent
+ first_reg_18_percent
+ Y
+
+
+ returned_dep_liberty_percent
+ returned_dep_liberty_percent
+ Y
+
+
+ "mil_spec_W_percent"
+ mil_spec_w_percent
+ Y
+
+
+ punished_percent
+ punished_percent
+ Y
+
+
+ received_citizenship_percent
+ received_citizenship_percent
+ Y
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ N
+
+
+ 1392
+ 288
+
+
+
+ Select values 3
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1152
+ 464
+
+
+
+ Table input (person_registry) военком/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+base_data AS (
+ -- Основной набор данных с вычислением mil_reg
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ 1 AS is_military_registered
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ /*
+ 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 jsonb_exists_any(registration_reasons, ARRAY[
+ '1', -- Освобождение из мест лишения свободы
+ '2', -- Приобретение гражданства Российской Федерации
+ '3', -- Получение военно-учётной специальности гражданином женского пола
+ '4', -- Отбывание наказания в местах лишения свободы
+ '5'--, -- Достижение 17 лет в год постановки на воинский учёт
+ --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте
+ ])
+ UNION ALL
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ 0 AS is_military_registered
+ 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
+ WHERE
+ 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
+ AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5'])
+),
+t1 AS (
+ -- Первоначальная постановка 17 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_17
+ FROM base_data
+ WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт
+ GROUP BY recruitment_id, is_military_registered
+),
+t2 AS (
+ -- Первоначальная постановка 18 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_18
+ FROM base_data
+ WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4'])
+ GROUP BY recruitment_id, is_military_registered
+),
+t3 AS (
+ -- Женщины, получившие ВУС
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS mil_spec_w
+ FROM base_data
+ WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
+ GROUP BY recruitment_id, is_military_registered
+),
+t4 AS (
+ -- Возвратившиеся из мест лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS returned_dep_liberty
+ FROM base_data
+ WHERE registration_reasons @> '"1"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t5 AS (
+ -- Отбывающие наказание в местах лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS punished
+ FROM base_data
+ WHERE registration_reasons @> '"4"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t6 AS (
+ -- Получившие гражданство
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS received_citizenship
+ FROM base_data
+ WHERE registration_reasons @> '"2"'
+ GROUP BY recruitment_id, is_military_registered
+),
+total AS (
+ -- Общее количество записей
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS total_count
+ FROM base_data
+ GROUP BY recruitment_id, is_military_registered
+),
+uniq_ms AS (
+ SELECT
+ distinct
+ recruitment_id,
+ is_military_registered
+ FROM base_data
+)
+-- Основной запрос
+SELECT
+ current_date AS recording_date,
+ dc.recruitment_id,
+ dc.is_military_registered AS mil_reg,
+ COALESCE(total.total_count, 0) AS total_count,
+ COALESCE(t1.first_reg_17, 0) AS first_reg_17,
+ COALESCE(t2.first_reg_18, 0) AS first_reg_18,
+ COALESCE(t3.mil_spec_w, 0) AS mil_spec_w,
+ COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty,
+ COALESCE(t5.punished, 0) AS punished,
+ COALESCE(t6.received_citizenship, 0) AS received_citizenship,
+ -- Вычисление процентов
+ COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent,
+ COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent,
+ COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent,
+ COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent,
+ COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent,
+ COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent
+FROM uniq_ms dc
+LEFT JOIN total ON dc.recruitment_id = total.recruitment_id
+ AND dc.is_military_registered = total.is_military_registered
+LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id
+ AND dc.is_military_registered = t1.is_military_registered
+LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id
+ AND dc.is_military_registered = t2.is_military_registered
+LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id
+ AND dc.is_military_registered = t3.is_military_registered
+LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id
+ AND dc.is_military_registered = t4.is_military_registered
+LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id
+ AND dc.is_military_registered = t5.is_military_registered
+LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id
+ AND dc.is_military_registered = t6.is_military_registered;
+ Y
+
+
+ 736
+ 288
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf
new file mode 100644
index 0000000..56a73fb
--- /dev/null
+++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf
@@ -0,0 +1,309 @@
+
+
+ total_registered.reg_mil_cat(m_c)
+ Y
+
+
+
+ -
+ 2025/03/31 15:05:31.181
+ -
+ 2025/03/31 15:05:31.181
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 400
+ 368
+
+
+
+ total_registered.reg_mil_cat_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 816
+ 208
+
+
+
+ total_registered.reg_mil_cat_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 816
+ 288
+
+
+
+ total_registered.reg_mil_cat_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 816
+ 368
+
+
+
+ total_registered.reg_mil_cat_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 816
+ 448
+
+
+
+ total_registered.reg_mil_cat_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 816
+ 528
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1136
+ 208
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1136
+ 288
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1136
+ 368
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1136
+ 448
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1136
+ 528
+
+
+
+
+
+ Start
+ total_registered.reg_mil_cat_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.reg_mil_cat_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.reg_mil_cat_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.reg_mil_cat_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.reg_mil_cat_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.reg_mil_cat_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.reg_mil_cat_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.reg_mil_cat_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.reg_mil_cat_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.reg_mil_cat_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl
new file mode 100644
index 0000000..10a37aa
--- /dev/null
+++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl
@@ -0,0 +1,351 @@
+
+
+
+ total_registered.reg_mil_cat_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) военком/рег
+ Insert / update (total_registered.reg_mil_cat)
+ Y
+
+
+
+ Insert / update (total_registered.reg_mil_cat)
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
reg_mil_cat
+
+ first_reg_17
+ first_reg_17
+ Y
+
+
+ first_reg_18
+ first_reg_18
+ Y
+
+
+ "mil_spec_W"
+ mil_spec_w
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ returned_dep_liberty
+ returned_dep_liberty
+ Y
+
+
+ punished
+ punished
+ Y
+
+
+ received_citizenship
+ received_citizenship
+ Y
+
+
+ first_reg_17_percent
+ first_reg_17_percent
+ Y
+
+
+ first_reg_18_percent
+ first_reg_18_percent
+ Y
+
+
+ returned_dep_liberty_percent
+ returned_dep_liberty_percent
+ Y
+
+
+ "mil_spec_W_percent"
+ mil_spec_w_percent
+ Y
+
+
+ punished_percent
+ punished_percent
+ Y
+
+
+ received_citizenship_percent
+ received_citizenship_percent
+ Y
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ N
+
+
+ 1392
+ 288
+
+
+
+ Table input (person_registry) военком/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+base_data AS (
+ -- Основной набор данных с вычислением mil_reg
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ 1 AS is_military_registered
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ /*
+ 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 jsonb_exists_any(registration_reasons, ARRAY[
+ '1', -- Освобождение из мест лишения свободы
+ '2', -- Приобретение гражданства Российской Федерации
+ '3', -- Получение военно-учётной специальности гражданином женского пола
+ '4', -- Отбывание наказания в местах лишения свободы
+ '5'--, -- Достижение 17 лет в год постановки на воинский учёт
+ --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте
+ ])
+ UNION ALL
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ 0 AS is_military_registered
+ 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
+ WHERE
+ 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
+ AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5'])
+),
+t1 AS (
+ -- Первоначальная постановка 17 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_17
+ FROM base_data
+ WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт
+ GROUP BY recruitment_id, is_military_registered
+),
+t2 AS (
+ -- Первоначальная постановка 18 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_18
+ FROM base_data
+ WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4'])
+ GROUP BY recruitment_id, is_military_registered
+),
+t3 AS (
+ -- Женщины, получившие ВУС
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS mil_spec_w
+ FROM base_data
+ WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
+ GROUP BY recruitment_id, is_military_registered
+),
+t4 AS (
+ -- Возвратившиеся из мест лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS returned_dep_liberty
+ FROM base_data
+ WHERE registration_reasons @> '"1"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t5 AS (
+ -- Отбывающие наказание в местах лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS punished
+ FROM base_data
+ WHERE registration_reasons @> '"4"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t6 AS (
+ -- Получившие гражданство
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS received_citizenship
+ FROM base_data
+ WHERE registration_reasons @> '"2"'
+ GROUP BY recruitment_id, is_military_registered
+),
+total AS (
+ -- Общее количество записей
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS total_count
+ FROM base_data
+ GROUP BY recruitment_id, is_military_registered
+),
+uniq_ms AS (
+ SELECT
+ distinct
+ recruitment_id,
+ is_military_registered
+ FROM base_data
+)
+-- Основной запрос
+SELECT
+ current_date AS recording_date,
+ dc.recruitment_id,
+ dc.is_military_registered AS mil_reg,
+ COALESCE(total.total_count, 0) AS total_count,
+ COALESCE(t1.first_reg_17, 0) AS first_reg_17,
+ COALESCE(t2.first_reg_18, 0) AS first_reg_18,
+ COALESCE(t3.mil_spec_w, 0) AS mil_spec_w,
+ COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty,
+ COALESCE(t5.punished, 0) AS punished,
+ COALESCE(t6.received_citizenship, 0) AS received_citizenship,
+ -- Вычисление процентов
+ COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent,
+ COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent,
+ COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent,
+ COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent,
+ COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent,
+ COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent
+FROM uniq_ms dc
+LEFT JOIN total ON dc.recruitment_id = total.recruitment_id
+ AND dc.is_military_registered = total.is_military_registered
+LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id
+ AND dc.is_military_registered = t1.is_military_registered
+LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id
+ AND dc.is_military_registered = t2.is_military_registered
+LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id
+ AND dc.is_military_registered = t3.is_military_registered
+LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id
+ AND dc.is_military_registered = t4.is_military_registered
+LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id
+ AND dc.is_military_registered = t5.is_military_registered
+LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id
+ AND dc.is_military_registered = t6.is_military_registered;
+ Y
+
+
+ 736
+ 288
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl
new file mode 100644
index 0000000..5b82156
--- /dev/null
+++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl
@@ -0,0 +1,351 @@
+
+
+
+ total_registered.reg_mil_cat_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) военком/рег
+ Insert / update (total_registered.reg_mil_cat)
+ Y
+
+
+
+ Insert / update (total_registered.reg_mil_cat)
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
reg_mil_cat
+
+ first_reg_17
+ first_reg_17
+ Y
+
+
+ first_reg_18
+ first_reg_18
+ Y
+
+
+ "mil_spec_W"
+ mil_spec_w
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ returned_dep_liberty
+ returned_dep_liberty
+ Y
+
+
+ punished
+ punished
+ Y
+
+
+ received_citizenship
+ received_citizenship
+ Y
+
+
+ first_reg_17_percent
+ first_reg_17_percent
+ Y
+
+
+ first_reg_18_percent
+ first_reg_18_percent
+ Y
+
+
+ returned_dep_liberty_percent
+ returned_dep_liberty_percent
+ Y
+
+
+ "mil_spec_W_percent"
+ mil_spec_w_percent
+ Y
+
+
+ punished_percent
+ punished_percent
+ Y
+
+
+ received_citizenship_percent
+ received_citizenship_percent
+ Y
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ N
+
+
+ 1392
+ 288
+
+
+
+ Table input (person_registry) военком/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+base_data AS (
+ -- Основной набор данных с вычислением mil_reg
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ 1 AS is_military_registered
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ /*
+ 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 jsonb_exists_any(registration_reasons, ARRAY[
+ '1', -- Освобождение из мест лишения свободы
+ '2', -- Приобретение гражданства Российской Федерации
+ '3', -- Получение военно-учётной специальности гражданином женского пола
+ '4', -- Отбывание наказания в местах лишения свободы
+ '5'--, -- Достижение 17 лет в год постановки на воинский учёт
+ --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте
+ ])
+ UNION ALL
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ 0 AS is_military_registered
+ 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
+ WHERE
+ 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
+ AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5'])
+),
+t1 AS (
+ -- Первоначальная постановка 17 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_17
+ FROM base_data
+ WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт
+ GROUP BY recruitment_id, is_military_registered
+),
+t2 AS (
+ -- Первоначальная постановка 18 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_18
+ FROM base_data
+ WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4'])
+ GROUP BY recruitment_id, is_military_registered
+),
+t3 AS (
+ -- Женщины, получившие ВУС
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS mil_spec_w
+ FROM base_data
+ WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
+ GROUP BY recruitment_id, is_military_registered
+),
+t4 AS (
+ -- Возвратившиеся из мест лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS returned_dep_liberty
+ FROM base_data
+ WHERE registration_reasons @> '"1"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t5 AS (
+ -- Отбывающие наказание в местах лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS punished
+ FROM base_data
+ WHERE registration_reasons @> '"4"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t6 AS (
+ -- Получившие гражданство
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS received_citizenship
+ FROM base_data
+ WHERE registration_reasons @> '"2"'
+ GROUP BY recruitment_id, is_military_registered
+),
+total AS (
+ -- Общее количество записей
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS total_count
+ FROM base_data
+ GROUP BY recruitment_id, is_military_registered
+),
+uniq_ms AS (
+ SELECT
+ distinct
+ recruitment_id,
+ is_military_registered
+ FROM base_data
+)
+-- Основной запрос
+SELECT
+ current_date AS recording_date,
+ dc.recruitment_id,
+ dc.is_military_registered AS mil_reg,
+ COALESCE(total.total_count, 0) AS total_count,
+ COALESCE(t1.first_reg_17, 0) AS first_reg_17,
+ COALESCE(t2.first_reg_18, 0) AS first_reg_18,
+ COALESCE(t3.mil_spec_w, 0) AS mil_spec_w,
+ COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty,
+ COALESCE(t5.punished, 0) AS punished,
+ COALESCE(t6.received_citizenship, 0) AS received_citizenship,
+ -- Вычисление процентов
+ COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent,
+ COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent,
+ COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent,
+ COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent,
+ COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent,
+ COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent
+FROM uniq_ms dc
+LEFT JOIN total ON dc.recruitment_id = total.recruitment_id
+ AND dc.is_military_registered = total.is_military_registered
+LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id
+ AND dc.is_military_registered = t1.is_military_registered
+LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id
+ AND dc.is_military_registered = t2.is_military_registered
+LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id
+ AND dc.is_military_registered = t3.is_military_registered
+LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id
+ AND dc.is_military_registered = t4.is_military_registered
+LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id
+ AND dc.is_military_registered = t5.is_military_registered
+LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id
+ AND dc.is_military_registered = t6.is_military_registered;
+ Y
+
+
+ 736
+ 288
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl
new file mode 100644
index 0000000..dfd56ef
--- /dev/null
+++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl
@@ -0,0 +1,351 @@
+
+
+
+ total_registered.reg_mil_cat_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) военком/рег
+ Insert / update (total_registered.reg_mil_cat)
+ Y
+
+
+
+ Insert / update (total_registered.reg_mil_cat)
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
reg_mil_cat
+
+ first_reg_17
+ first_reg_17
+ Y
+
+
+ first_reg_18
+ first_reg_18
+ Y
+
+
+ "mil_spec_W"
+ mil_spec_w
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ returned_dep_liberty
+ returned_dep_liberty
+ Y
+
+
+ punished
+ punished
+ Y
+
+
+ received_citizenship
+ received_citizenship
+ Y
+
+
+ first_reg_17_percent
+ first_reg_17_percent
+ Y
+
+
+ first_reg_18_percent
+ first_reg_18_percent
+ Y
+
+
+ returned_dep_liberty_percent
+ returned_dep_liberty_percent
+ Y
+
+
+ "mil_spec_W_percent"
+ mil_spec_w_percent
+ Y
+
+
+ punished_percent
+ punished_percent
+ Y
+
+
+ received_citizenship_percent
+ received_citizenship_percent
+ Y
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ N
+
+
+ 1392
+ 288
+
+
+
+ Table input (person_registry) военком/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+base_data AS (
+ -- Основной набор данных с вычислением mil_reg
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ 1 AS is_military_registered
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ /*
+ 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 jsonb_exists_any(registration_reasons, ARRAY[
+ '1', -- Освобождение из мест лишения свободы
+ '2', -- Приобретение гражданства Российской Федерации
+ '3', -- Получение военно-учётной специальности гражданином женского пола
+ '4', -- Отбывание наказания в местах лишения свободы
+ '5'--, -- Достижение 17 лет в год постановки на воинский учёт
+ --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте
+ ])
+ UNION ALL
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ 0 AS is_military_registered
+ 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
+ WHERE
+ 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
+ AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5'])
+),
+t1 AS (
+ -- Первоначальная постановка 17 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_17
+ FROM base_data
+ WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт
+ GROUP BY recruitment_id, is_military_registered
+),
+t2 AS (
+ -- Первоначальная постановка 18 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_18
+ FROM base_data
+ WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4'])
+ GROUP BY recruitment_id, is_military_registered
+),
+t3 AS (
+ -- Женщины, получившие ВУС
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS mil_spec_w
+ FROM base_data
+ WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
+ GROUP BY recruitment_id, is_military_registered
+),
+t4 AS (
+ -- Возвратившиеся из мест лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS returned_dep_liberty
+ FROM base_data
+ WHERE registration_reasons @> '"1"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t5 AS (
+ -- Отбывающие наказание в местах лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS punished
+ FROM base_data
+ WHERE registration_reasons @> '"4"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t6 AS (
+ -- Получившие гражданство
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS received_citizenship
+ FROM base_data
+ WHERE registration_reasons @> '"2"'
+ GROUP BY recruitment_id, is_military_registered
+),
+total AS (
+ -- Общее количество записей
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS total_count
+ FROM base_data
+ GROUP BY recruitment_id, is_military_registered
+),
+uniq_ms AS (
+ SELECT
+ distinct
+ recruitment_id,
+ is_military_registered
+ FROM base_data
+)
+-- Основной запрос
+SELECT
+ current_date AS recording_date,
+ dc.recruitment_id,
+ dc.is_military_registered AS mil_reg,
+ COALESCE(total.total_count, 0) AS total_count,
+ COALESCE(t1.first_reg_17, 0) AS first_reg_17,
+ COALESCE(t2.first_reg_18, 0) AS first_reg_18,
+ COALESCE(t3.mil_spec_w, 0) AS mil_spec_w,
+ COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty,
+ COALESCE(t5.punished, 0) AS punished,
+ COALESCE(t6.received_citizenship, 0) AS received_citizenship,
+ -- Вычисление процентов
+ COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent,
+ COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent,
+ COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent,
+ COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent,
+ COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent,
+ COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent
+FROM uniq_ms dc
+LEFT JOIN total ON dc.recruitment_id = total.recruitment_id
+ AND dc.is_military_registered = total.is_military_registered
+LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id
+ AND dc.is_military_registered = t1.is_military_registered
+LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id
+ AND dc.is_military_registered = t2.is_military_registered
+LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id
+ AND dc.is_military_registered = t3.is_military_registered
+LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id
+ AND dc.is_military_registered = t4.is_military_registered
+LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id
+ AND dc.is_military_registered = t5.is_military_registered
+LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id
+ AND dc.is_military_registered = t6.is_military_registered;
+ Y
+
+
+ 736
+ 288
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl
new file mode 100644
index 0000000..d3bba44
--- /dev/null
+++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl
@@ -0,0 +1,351 @@
+
+
+
+ total_registered.reg_mil_cat_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) военком/рег
+ Insert / update (total_registered.reg_mil_cat)
+ Y
+
+
+
+ Insert / update (total_registered.reg_mil_cat)
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
reg_mil_cat
+
+ first_reg_17
+ first_reg_17
+ Y
+
+
+ first_reg_18
+ first_reg_18
+ Y
+
+
+ "mil_spec_W"
+ mil_spec_w
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ returned_dep_liberty
+ returned_dep_liberty
+ Y
+
+
+ punished
+ punished
+ Y
+
+
+ received_citizenship
+ received_citizenship
+ Y
+
+
+ first_reg_17_percent
+ first_reg_17_percent
+ Y
+
+
+ first_reg_18_percent
+ first_reg_18_percent
+ Y
+
+
+ returned_dep_liberty_percent
+ returned_dep_liberty_percent
+ Y
+
+
+ "mil_spec_W_percent"
+ mil_spec_w_percent
+ Y
+
+
+ punished_percent
+ punished_percent
+ Y
+
+
+ received_citizenship_percent
+ received_citizenship_percent
+ Y
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ N
+
+
+ 1392
+ 288
+
+
+
+ Table input (person_registry) военком/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+base_data AS (
+ -- Основной набор данных с вычислением mil_reg
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ 1 AS is_military_registered
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ /*
+ 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 jsonb_exists_any(registration_reasons, ARRAY[
+ '1', -- Освобождение из мест лишения свободы
+ '2', -- Приобретение гражданства Российской Федерации
+ '3', -- Получение военно-учётной специальности гражданином женского пола
+ '4', -- Отбывание наказания в местах лишения свободы
+ '5'--, -- Достижение 17 лет в год постановки на воинский учёт
+ --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте
+ ])
+ UNION ALL
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ 0 AS is_military_registered
+ 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
+ WHERE
+ 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
+ AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5'])
+),
+t1 AS (
+ -- Первоначальная постановка 17 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_17
+ FROM base_data
+ WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт
+ GROUP BY recruitment_id, is_military_registered
+),
+t2 AS (
+ -- Первоначальная постановка 18 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_18
+ FROM base_data
+ WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4'])
+ GROUP BY recruitment_id, is_military_registered
+),
+t3 AS (
+ -- Женщины, получившие ВУС
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS mil_spec_w
+ FROM base_data
+ WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
+ GROUP BY recruitment_id, is_military_registered
+),
+t4 AS (
+ -- Возвратившиеся из мест лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS returned_dep_liberty
+ FROM base_data
+ WHERE registration_reasons @> '"1"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t5 AS (
+ -- Отбывающие наказание в местах лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS punished
+ FROM base_data
+ WHERE registration_reasons @> '"4"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t6 AS (
+ -- Получившие гражданство
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS received_citizenship
+ FROM base_data
+ WHERE registration_reasons @> '"2"'
+ GROUP BY recruitment_id, is_military_registered
+),
+total AS (
+ -- Общее количество записей
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS total_count
+ FROM base_data
+ GROUP BY recruitment_id, is_military_registered
+),
+uniq_ms AS (
+ SELECT
+ distinct
+ recruitment_id,
+ is_military_registered
+ FROM base_data
+)
+-- Основной запрос
+SELECT
+ current_date AS recording_date,
+ dc.recruitment_id,
+ dc.is_military_registered AS mil_reg,
+ COALESCE(total.total_count, 0) AS total_count,
+ COALESCE(t1.first_reg_17, 0) AS first_reg_17,
+ COALESCE(t2.first_reg_18, 0) AS first_reg_18,
+ COALESCE(t3.mil_spec_w, 0) AS mil_spec_w,
+ COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty,
+ COALESCE(t5.punished, 0) AS punished,
+ COALESCE(t6.received_citizenship, 0) AS received_citizenship,
+ -- Вычисление процентов
+ COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent,
+ COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent,
+ COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent,
+ COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent,
+ COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent,
+ COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent
+FROM uniq_ms dc
+LEFT JOIN total ON dc.recruitment_id = total.recruitment_id
+ AND dc.is_military_registered = total.is_military_registered
+LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id
+ AND dc.is_military_registered = t1.is_military_registered
+LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id
+ AND dc.is_military_registered = t2.is_military_registered
+LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id
+ AND dc.is_military_registered = t3.is_military_registered
+LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id
+ AND dc.is_military_registered = t4.is_military_registered
+LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id
+ AND dc.is_military_registered = t5.is_military_registered
+LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id
+ AND dc.is_military_registered = t6.is_military_registered;
+ Y
+
+
+ 736
+ 288
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl
new file mode 100644
index 0000000..0cd012d
--- /dev/null
+++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl
@@ -0,0 +1,351 @@
+
+
+
+ total_registered.reg_mil_cat_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (person_registry) военком/рег
+ Insert / update (total_registered.reg_mil_cat)
+ Y
+
+
+
+ Insert / update (total_registered.reg_mil_cat)
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
reg_mil_cat
+
+ first_reg_17
+ first_reg_17
+ Y
+
+
+ first_reg_18
+ first_reg_18
+ Y
+
+
+ "mil_spec_W"
+ mil_spec_w
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ returned_dep_liberty
+ returned_dep_liberty
+ Y
+
+
+ punished
+ punished
+ Y
+
+
+ received_citizenship
+ received_citizenship
+ Y
+
+
+ first_reg_17_percent
+ first_reg_17_percent
+ Y
+
+
+ first_reg_18_percent
+ first_reg_18_percent
+ Y
+
+
+ returned_dep_liberty_percent
+ returned_dep_liberty_percent
+ Y
+
+
+ "mil_spec_W_percent"
+ mil_spec_w_percent
+ Y
+
+
+ punished_percent
+ punished_percent
+ Y
+
+
+ received_citizenship_percent
+ received_citizenship_percent
+ Y
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ N
+
+
+ 1392
+ 288
+
+
+
+ Table input (person_registry) военком/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id
+),
+/*
+last_status_r 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
+ where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ group by recruit_id
+),
+registered as (
+ select
+ distinct rh.recruit_id,
+ rh.id as recruit_history_id
+ from recruits_history rh
+ join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time
+ where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')
+ --and rh.source is not null
+),
+*/
+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
+),
+base_data AS (
+ -- Основной набор данных с вычислением mil_reg
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ r.current_recruitment_id AS recruitment_id,
+ --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id,
+ 1 AS is_military_registered
+ 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
+ WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ /*
+ 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 jsonb_exists_any(registration_reasons, ARRAY[
+ '1', -- Освобождение из мест лишения свободы
+ '2', -- Приобретение гражданства Российской Федерации
+ '3', -- Получение военно-учётной специальности гражданином женского пола
+ '4', -- Отбывание наказания в местах лишения свободы
+ '5'--, -- Достижение 17 лет в год постановки на воинский учёт
+ --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте
+ ])
+ UNION ALL
+ SELECT
+ r.registration_reasons,
+ r.gender,
+ coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id,
+ 0 AS is_military_registered
+ 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
+ WHERE
+ 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
+ AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5'])
+),
+t1 AS (
+ -- Первоначальная постановка 17 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_17
+ FROM base_data
+ WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт
+ GROUP BY recruitment_id, is_military_registered
+),
+t2 AS (
+ -- Первоначальная постановка 18 лет
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS first_reg_18
+ FROM base_data
+ WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4'])
+ GROUP BY recruitment_id, is_military_registered
+),
+t3 AS (
+ -- Женщины, получившие ВУС
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS mil_spec_w
+ FROM base_data
+ WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
+ GROUP BY recruitment_id, is_military_registered
+),
+t4 AS (
+ -- Возвратившиеся из мест лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS returned_dep_liberty
+ FROM base_data
+ WHERE registration_reasons @> '"1"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t5 AS (
+ -- Отбывающие наказание в местах лишения свободы
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS punished
+ FROM base_data
+ WHERE registration_reasons @> '"4"'
+ GROUP BY recruitment_id, is_military_registered
+),
+t6 AS (
+ -- Получившие гражданство
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS received_citizenship
+ FROM base_data
+ WHERE registration_reasons @> '"2"'
+ GROUP BY recruitment_id, is_military_registered
+),
+total AS (
+ -- Общее количество записей
+ SELECT
+ recruitment_id,
+ is_military_registered,
+ COUNT(*) AS total_count
+ FROM base_data
+ GROUP BY recruitment_id, is_military_registered
+),
+uniq_ms AS (
+ SELECT
+ distinct
+ recruitment_id,
+ is_military_registered
+ FROM base_data
+)
+-- Основной запрос
+SELECT
+ current_date AS recording_date,
+ dc.recruitment_id,
+ dc.is_military_registered AS mil_reg,
+ COALESCE(total.total_count, 0) AS total_count,
+ COALESCE(t1.first_reg_17, 0) AS first_reg_17,
+ COALESCE(t2.first_reg_18, 0) AS first_reg_18,
+ COALESCE(t3.mil_spec_w, 0) AS mil_spec_w,
+ COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty,
+ COALESCE(t5.punished, 0) AS punished,
+ COALESCE(t6.received_citizenship, 0) AS received_citizenship,
+ -- Вычисление процентов
+ COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent,
+ COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent,
+ COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent,
+ COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent,
+ COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent,
+ COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent
+FROM uniq_ms dc
+LEFT JOIN total ON dc.recruitment_id = total.recruitment_id
+ AND dc.is_military_registered = total.is_military_registered
+LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id
+ AND dc.is_military_registered = t1.is_military_registered
+LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id
+ AND dc.is_military_registered = t2.is_military_registered
+LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id
+ AND dc.is_military_registered = t3.is_military_registered
+LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id
+ AND dc.is_military_registered = t4.is_military_registered
+LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id
+ AND dc.is_military_registered = t5.is_military_registered
+LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id
+ AND dc.is_military_registered = t6.is_military_registered;
+ Y
+
+
+ 736
+ 288
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl
new file mode 100644
index 0000000..2a0d1b3
--- /dev/null
+++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl
@@ -0,0 +1,348 @@
+
+
+
+ total_registered.removed_registry(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 904
+ 118
+ на 12.03.2025 статус 1.3 на тесте рубит все результаты
+ 303
+
+
+
+
+ Get variables 2 2
+ Select values 2 2
+ N
+
+
+ Select values 2 2
+ Insert / update (total_registered.removed_registry) 2
+ N
+
+
+ Table input (decision-document-service) регион 2
+ Get variables 2 2
+ N
+
+
+ Table input (decision-document-service) регион 2
+ Insert / update (total_registered.removed_registry) 2
+ Y
+
+
+
+ Get variables 2 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 992
+ 464
+
+
+
+ Insert / update (total_registered.removed_registry) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ total_registered
+
removed_registry
+
+ age_limit
+ age_limit
+ Y
+
+
+ death
+ death
+ Y
+
+
+ removed_registry
+ removed_registry
+ Y
+
+
+ deprivation_citizenship
+ deprivation_citizenship
+ Y
+
+
+ travel_abroad
+ travel_abroad
+ Y
+
+
+ living_abroad
+ travel_abroad
+ Y
+
+
+ other
+ other
+ Y
+
+
+ deprivation_citizen_percents
+ deprivation_citizen_percents
+ Y
+
+
+ age_limit_percent
+ age_limit_percent
+ Y
+
+
+ death_percent
+ death_percent
+ Y
+
+
+ travel_abroad_percent
+ travel_abroad_percent
+ Y
+
+
+ living_abroad_percent
+ living_abroad_percent
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1408
+ 320
+
+
+
+ Select values 2 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1120
+ 464
+
+
+
+ Table input (decision-document-service) регион 2
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
+),
+recr AS (
+ SELECT
+ r.id,
+ r.system_pgs_status
+ FROM recruits r
+ WHERE r.system_pgs_status = '1.3'
+),
+last_decision AS (
+ SELECT
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.code
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn,
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.type->>'code' AS code
+ FROM decision d
+ WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год
+ ) d
+ WHERE rn = 1 -- ищем последнее решение для рекрута
+ AND d.code IN ('9', '10')
+ /*FROM decision d
+ WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/
+),
+total_info AS (
+ SELECT
+ d.recruitment_id,
+ COUNT(*) AS removed_registry,
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть
+ --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent
+ FROM last_decision d
+ JOIN recr AS r ON d.recruit_id = r.id
+ GROUP BY d.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ recruitment_id,
+ COALESCE(total_info.removed_registry, 0) AS removed_registry,
+ COALESCE(total_info.age_limit, 0) AS age_limit,
+ COALESCE(total_info.death, 0) AS death,
+ COALESCE(total_info.other, 0) AS other,
+ COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent,
+ COALESCE(total_info.death_percent, 0) AS death_percent,
+ COALESCE(total_info.other_percent, 0) AS other_percent,
+ --deprivation_citizenship,
+ '0' AS deprivation_citizenship,
+ '0' AS travel_abroad,
+ '0' AS living_abroad,
+ '0' AS deprivation_citizen_percents,
+ '0' AS travel_abroad_percent,
+ '0' AS living_abroad_percent
+FROM total_info;
+ Y
+
+
+ 752
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf
new file mode 100644
index 0000000..840ccdf
--- /dev/null
+++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf
@@ -0,0 +1,312 @@
+
+
+ total_registered.removed_registry(m_c)
+ Y
+
+
+
+ -
+ 2025/03/31 15:23:08.216
+ -
+ 2025/03/31 15:23:08.216
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 800
+ 368
+
+
+
+ total_registered.removed_registry_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1312
+ 208
+
+
+
+ total_registered.removed_registry_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1312
+ 288
+
+
+
+ total_registered.removed_registry_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1312
+ 448
+
+
+
+ total_registered.removed_registry_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1312
+ 368
+
+
+
+ total_registered.removed_registry_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl
+
+
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1312
+ 528
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1664
+ 208
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1664
+ 288
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1664
+ 368
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1664
+ 448
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1664
+ 528
+
+
+
+
+
+ Start
+ total_registered.removed_registry_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.removed_registry_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.removed_registry_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.removed_registry_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.removed_registry_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.removed_registry_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.removed_registry_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.removed_registry_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.removed_registry_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.removed_registry_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl
new file mode 100644
index 0000000..ae952b2
--- /dev/null
+++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl
@@ -0,0 +1,246 @@
+
+
+
+ total_registered.removed_registry_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 904
+ 118
+ на 12.03.2025 статус 1.3 на тесте рубит все результаты
+ 303
+
+
+
+
+ Table input (decision-document-service) регион 2
+ Insert / update (total_registered.removed_registry) 2
+ Y
+
+
+
+ Insert / update (total_registered.removed_registry) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ total_registered
+
removed_registry
+
+ age_limit
+ age_limit
+ Y
+
+
+ death
+ death
+ Y
+
+
+ removed_registry
+ removed_registry
+ Y
+
+
+ deprivation_citizenship
+ deprivation_citizenship
+ Y
+
+
+ travel_abroad
+ travel_abroad
+ Y
+
+
+ living_abroad
+ travel_abroad
+ Y
+
+
+ other
+ other
+ Y
+
+
+ deprivation_citizen_percents
+ deprivation_citizen_percents
+ Y
+
+
+ age_limit_percent
+ age_limit_percent
+ Y
+
+
+ death_percent
+ death_percent
+ Y
+
+
+ travel_abroad_percent
+ travel_abroad_percent
+ Y
+
+
+ living_abroad_percent
+ living_abroad_percent
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1408
+ 320
+
+
+
+ Table input (decision-document-service) регион 2
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id
+),
+recr AS (
+ SELECT
+ r.id,
+ r.system_pgs_status
+ FROM recruits r
+ WHERE r.system_pgs_status = '1.3'
+),
+last_decision AS (
+ SELECT
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.code
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn,
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.type->>'code' AS code
+ FROM decision d
+ WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год
+ ) d
+ WHERE rn = 1 -- ищем последнее решение для рекрута
+ AND d.code IN ('9', '10')
+ /*FROM decision d
+ WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/
+),
+total_info AS (
+ SELECT
+ d.recruitment_id,
+ COUNT(*) AS removed_registry,
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть
+ --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent
+ FROM last_decision d
+ JOIN recr AS r ON d.recruit_id = r.id
+ GROUP BY d.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ recruitment_id,
+ COALESCE(total_info.removed_registry, 0) AS removed_registry,
+ COALESCE(total_info.age_limit, 0) AS age_limit,
+ COALESCE(total_info.death, 0) AS death,
+ COALESCE(total_info.other, 0) AS other,
+ COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent,
+ COALESCE(total_info.death_percent, 0) AS death_percent,
+ COALESCE(total_info.other_percent, 0) AS other_percent,
+ --deprivation_citizenship,
+ '0' AS deprivation_citizenship,
+ '0' AS travel_abroad,
+ '0' AS living_abroad,
+ '0' AS deprivation_citizen_percents,
+ '0' AS travel_abroad_percent,
+ '0' AS living_abroad_percent
+FROM total_info;
+ Y
+
+
+ 752
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl
new file mode 100644
index 0000000..81d9f8a
--- /dev/null
+++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl
@@ -0,0 +1,246 @@
+
+
+
+ total_registered.removed_registry_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 904
+ 118
+ на 12.03.2025 статус 1.3 на тесте рубит все результаты
+ 303
+
+
+
+
+ Table input (decision-document-service) регион 2
+ Insert / update (total_registered.removed_registry) 2
+ Y
+
+
+
+ Insert / update (total_registered.removed_registry) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ total_registered
+
removed_registry
+
+ age_limit
+ age_limit
+ Y
+
+
+ death
+ death
+ Y
+
+
+ removed_registry
+ removed_registry
+ Y
+
+
+ deprivation_citizenship
+ deprivation_citizenship
+ Y
+
+
+ travel_abroad
+ travel_abroad
+ Y
+
+
+ living_abroad
+ travel_abroad
+ Y
+
+
+ other
+ other
+ Y
+
+
+ deprivation_citizen_percents
+ deprivation_citizen_percents
+ Y
+
+
+ age_limit_percent
+ age_limit_percent
+ Y
+
+
+ death_percent
+ death_percent
+ Y
+
+
+ travel_abroad_percent
+ travel_abroad_percent
+ Y
+
+
+ living_abroad_percent
+ living_abroad_percent
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1408
+ 320
+
+
+
+ Table input (decision-document-service) регион 2
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id
+),
+recr AS (
+ SELECT
+ r.id,
+ r.system_pgs_status
+ FROM recruits r
+ WHERE r.system_pgs_status = '1.3'
+),
+last_decision AS (
+ SELECT
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.code
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn,
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.type->>'code' AS code
+ FROM decision d
+ WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год
+ ) d
+ WHERE rn = 1 -- ищем последнее решение для рекрута
+ AND d.code IN ('9', '10')
+ /*FROM decision d
+ WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/
+),
+total_info AS (
+ SELECT
+ d.recruitment_id,
+ COUNT(*) AS removed_registry,
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть
+ --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent
+ FROM last_decision d
+ JOIN recr AS r ON d.recruit_id = r.id
+ GROUP BY d.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ recruitment_id,
+ COALESCE(total_info.removed_registry, 0) AS removed_registry,
+ COALESCE(total_info.age_limit, 0) AS age_limit,
+ COALESCE(total_info.death, 0) AS death,
+ COALESCE(total_info.other, 0) AS other,
+ COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent,
+ COALESCE(total_info.death_percent, 0) AS death_percent,
+ COALESCE(total_info.other_percent, 0) AS other_percent,
+ --deprivation_citizenship,
+ '0' AS deprivation_citizenship,
+ '0' AS travel_abroad,
+ '0' AS living_abroad,
+ '0' AS deprivation_citizen_percents,
+ '0' AS travel_abroad_percent,
+ '0' AS living_abroad_percent
+FROM total_info;
+ Y
+
+
+ 752
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl
new file mode 100644
index 0000000..18a8ede
--- /dev/null
+++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl
@@ -0,0 +1,246 @@
+
+
+
+ total_registered.removed_registry_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 904
+ 118
+ на 12.03.2025 статус 1.3 на тесте рубит все результаты
+ 303
+
+
+
+
+ Table input (decision-document-service) регион 2
+ Insert / update (total_registered.removed_registry) 2
+ Y
+
+
+
+ Insert / update (total_registered.removed_registry) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ total_registered
+
removed_registry
+
+ age_limit
+ age_limit
+ Y
+
+
+ death
+ death
+ Y
+
+
+ removed_registry
+ removed_registry
+ Y
+
+
+ deprivation_citizenship
+ deprivation_citizenship
+ Y
+
+
+ travel_abroad
+ travel_abroad
+ Y
+
+
+ living_abroad
+ travel_abroad
+ Y
+
+
+ other
+ other
+ Y
+
+
+ deprivation_citizen_percents
+ deprivation_citizen_percents
+ Y
+
+
+ age_limit_percent
+ age_limit_percent
+ Y
+
+
+ death_percent
+ death_percent
+ Y
+
+
+ travel_abroad_percent
+ travel_abroad_percent
+ Y
+
+
+ living_abroad_percent
+ living_abroad_percent
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1408
+ 320
+
+
+
+ Table input (decision-document-service) регион 2
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id
+),
+recr AS (
+ SELECT
+ r.id,
+ r.system_pgs_status
+ FROM recruits r
+ WHERE r.system_pgs_status = '1.3'
+),
+last_decision AS (
+ SELECT
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.code
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn,
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.type->>'code' AS code
+ FROM decision d
+ WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год
+ ) d
+ WHERE rn = 1 -- ищем последнее решение для рекрута
+ AND d.code IN ('9', '10')
+ /*FROM decision d
+ WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/
+),
+total_info AS (
+ SELECT
+ d.recruitment_id,
+ COUNT(*) AS removed_registry,
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть
+ --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent
+ FROM last_decision d
+ JOIN recr AS r ON d.recruit_id = r.id
+ GROUP BY d.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ recruitment_id,
+ COALESCE(total_info.removed_registry, 0) AS removed_registry,
+ COALESCE(total_info.age_limit, 0) AS age_limit,
+ COALESCE(total_info.death, 0) AS death,
+ COALESCE(total_info.other, 0) AS other,
+ COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent,
+ COALESCE(total_info.death_percent, 0) AS death_percent,
+ COALESCE(total_info.other_percent, 0) AS other_percent,
+ --deprivation_citizenship,
+ '0' AS deprivation_citizenship,
+ '0' AS travel_abroad,
+ '0' AS living_abroad,
+ '0' AS deprivation_citizen_percents,
+ '0' AS travel_abroad_percent,
+ '0' AS living_abroad_percent
+FROM total_info;
+ Y
+
+
+ 752
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl
new file mode 100644
index 0000000..36e59b5
--- /dev/null
+++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl
@@ -0,0 +1,246 @@
+
+
+
+ total_registered.removed_registry_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 904
+ 118
+ на 12.03.2025 статус 1.3 на тесте рубит все результаты
+ 303
+
+
+
+
+ Table input (decision-document-service) регион 2
+ Insert / update (total_registered.removed_registry) 2
+ Y
+
+
+
+ Insert / update (total_registered.removed_registry) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ total_registered
+
removed_registry
+
+ age_limit
+ age_limit
+ Y
+
+
+ death
+ death
+ Y
+
+
+ removed_registry
+ removed_registry
+ Y
+
+
+ deprivation_citizenship
+ deprivation_citizenship
+ Y
+
+
+ travel_abroad
+ travel_abroad
+ Y
+
+
+ living_abroad
+ travel_abroad
+ Y
+
+
+ other
+ other
+ Y
+
+
+ deprivation_citizen_percents
+ deprivation_citizen_percents
+ Y
+
+
+ age_limit_percent
+ age_limit_percent
+ Y
+
+
+ death_percent
+ death_percent
+ Y
+
+
+ travel_abroad_percent
+ travel_abroad_percent
+ Y
+
+
+ living_abroad_percent
+ living_abroad_percent
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1408
+ 320
+
+
+
+ Table input (decision-document-service) регион 2
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id
+),
+recr AS (
+ SELECT
+ r.id,
+ r.system_pgs_status
+ FROM recruits r
+ WHERE r.system_pgs_status = '1.3'
+),
+last_decision AS (
+ SELECT
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.code
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn,
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.type->>'code' AS code
+ FROM decision d
+ WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год
+ ) d
+ WHERE rn = 1 -- ищем последнее решение для рекрута
+ AND d.code IN ('9', '10')
+ /*FROM decision d
+ WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/
+),
+total_info AS (
+ SELECT
+ d.recruitment_id,
+ COUNT(*) AS removed_registry,
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть
+ --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent
+ FROM last_decision d
+ JOIN recr AS r ON d.recruit_id = r.id
+ GROUP BY d.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ recruitment_id,
+ COALESCE(total_info.removed_registry, 0) AS removed_registry,
+ COALESCE(total_info.age_limit, 0) AS age_limit,
+ COALESCE(total_info.death, 0) AS death,
+ COALESCE(total_info.other, 0) AS other,
+ COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent,
+ COALESCE(total_info.death_percent, 0) AS death_percent,
+ COALESCE(total_info.other_percent, 0) AS other_percent,
+ --deprivation_citizenship,
+ '0' AS deprivation_citizenship,
+ '0' AS travel_abroad,
+ '0' AS living_abroad,
+ '0' AS deprivation_citizen_percents,
+ '0' AS travel_abroad_percent,
+ '0' AS living_abroad_percent
+FROM total_info;
+ Y
+
+
+ 752
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl
new file mode 100644
index 0000000..1303b08
--- /dev/null
+++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl
@@ -0,0 +1,246 @@
+
+
+
+ total_registered.removed_registry_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 904
+ 118
+ на 12.03.2025 статус 1.3 на тесте рубит все результаты
+ 303
+
+
+
+
+ Table input (decision-document-service) регион 2
+ Insert / update (total_registered.removed_registry) 2
+ Y
+
+
+
+ Insert / update (total_registered.removed_registry) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+ total_registered
+
removed_registry
+
+ age_limit
+ age_limit
+ Y
+
+
+ death
+ death
+ Y
+
+
+ removed_registry
+ removed_registry
+ Y
+
+
+ deprivation_citizenship
+ deprivation_citizenship
+ Y
+
+
+ travel_abroad
+ travel_abroad
+ Y
+
+
+ living_abroad
+ travel_abroad
+ Y
+
+
+ other
+ other
+ Y
+
+
+ deprivation_citizen_percents
+ deprivation_citizen_percents
+ Y
+
+
+ age_limit_percent
+ age_limit_percent
+ Y
+
+
+ death_percent
+ death_percent
+ Y
+
+
+ travel_abroad_percent
+ travel_abroad_percent
+ Y
+
+
+ living_abroad_percent
+ living_abroad_percent
+ Y
+
+
+ other_percent
+ other_percent
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ N
+
+
+ 1408
+ 320
+
+
+
+ Table input (decision-document-service) регион 2
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id
+),
+recr AS (
+ SELECT
+ r.id,
+ r.system_pgs_status
+ FROM recruits r
+ WHERE r.system_pgs_status = '1.3'
+),
+last_decision AS (
+ SELECT
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.code
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn,
+ d.recruitment_id,
+ d.recruit_id,
+ d.extra_info,
+ d.created_at,
+ d.type->>'code' AS code
+ FROM decision d
+ WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год
+ ) d
+ WHERE rn = 1 -- ищем последнее решение для рекрута
+ AND d.code IN ('9', '10')
+ /*FROM decision d
+ WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/
+),
+total_info AS (
+ SELECT
+ d.recruitment_id,
+ COUNT(*) AS removed_registry,
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть
+ --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства
+ COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent,
+ ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent
+ FROM last_decision d
+ JOIN recr AS r ON d.recruit_id = r.id
+ GROUP BY d.recruitment_id
+)
+SELECT
+ current_date AS recording_date,
+ recruitment_id,
+ COALESCE(total_info.removed_registry, 0) AS removed_registry,
+ COALESCE(total_info.age_limit, 0) AS age_limit,
+ COALESCE(total_info.death, 0) AS death,
+ COALESCE(total_info.other, 0) AS other,
+ COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent,
+ COALESCE(total_info.death_percent, 0) AS death_percent,
+ COALESCE(total_info.other_percent, 0) AS other_percent,
+ --deprivation_citizenship,
+ '0' AS deprivation_citizenship,
+ '0' AS travel_abroad,
+ '0' AS living_abroad,
+ '0' AS deprivation_citizen_percents,
+ '0' AS travel_abroad_percent,
+ '0' AS living_abroad_percent
+FROM total_info;
+ Y
+
+
+ 752
+ 320
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl
new file mode 100644
index 0000000..2349dc9
--- /dev/null
+++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl
@@ -0,0 +1,581 @@
+
+
+
+ total_registered.subpoenas(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Get variables 4 2
+ Select values 4 2
+ N
+
+
+ Table input (subpoena) регион/рег
+ Get variables 4 2
+ N
+
+
+ Select values 4 2
+ Insert / update (total_registered.subpoenas) 3
+ N
+
+
+ Table input (subpoena) регион/рег
+ Insert / update (total_registered.subpoenas) 3
+ Y
+
+
+
+ Get variables 4 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REC_ID
+ -1
+ none
+ String
+
+
+ -1
+ SCM
+ -1
+ none
+ String
+
+
+
+
+ 1040
+ 496
+
+
+
+ Insert / update (total_registered.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ average_appeared
+ average_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ electron
+ count_electron
+ Y
+
+
+ paper
+ count_paper
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ electron_percent
+ electron_percent
+ Y
+
+
+ paper_percent
+ paper_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 1472
+ 384
+
+
+
+ Select values 4 2
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REC_ID
+ REC_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+ SCM
+ SCM
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1216
+ 496
+
+
+
+ Table input (subpoena) регион/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ 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.department_id::uuid,
+ s.status_id,
+ (CASE
+ WHEN sr.type = '1' THEN 0
+ WHEN sr.type != '1' THEN 1
+ ELSE NULL
+ END)::numeric AS mil_reg,
+ 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,
+ ssi.act_number,
+ s.visit_date
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ AND ssi.rn_si = 1
+ AND sr.type IS NOT NULL
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+uniq_ls AS (
+ SELECT
+ distinct
+ department_id,
+ mil_reg
+ FROM subpoena_data
+),
+t1 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_subpoena
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IS NOT NULL
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t2 AS (
+SELECT
+ ls.mil_reg,
+ ls.department_id,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+FROM subpoena_data ls
+GROUP BY ls.department_id, ls.mil_reg
+),
+t3 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('4.1', '4.2') -- снесен 4 статус от 14.03.2025
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t4 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_not_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5'
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t5 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5.1'
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t6 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_ap_not_required -- явка не требуется
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3.8', '5.2')
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t7 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(rdi_id) AS count_restrictions_applied
+ FROM subpoena_data ls
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t8 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(rdi_id) AS count_introduced_measures
+ FROM subpoena_data ls
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL AND ap_date IS NOT NULL
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t9 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_paper
+ FROM subpoena_data ls
+ WHERE d_code != '7'
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t10 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_electron
+ FROM subpoena_data ls
+ WHERE d_code = '7'
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t11 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(rdi_id) AS count_restrictions
+ FROM subpoena_data ls
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t12 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS count_not_delivery
+ FROM subpoena_data ls
+ WHERE act_number IS NOT NULL
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t13 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(subpoena_id) AS appear_date_is_good
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1')
+ GROUP BY ls.department_id, ls.mil_reg
+)
+SELECT
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent,
+ COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent,
+ COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent,
+ COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent,
+ COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent,
+ COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent,
+ COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent,
+ COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent,
+ COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent,
+ COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent,
+ ls.department_id AS recruitment_id,
+ current_date AS recording_date,
+ ls.mil_reg
+FROM uniq_ls ls
+LEFT JOIN t1 ON ls.department_id = t1.department_id
+ AND ls.mil_reg = t1.mil_reg
+LEFT JOIN t2 ON ls.department_id = t2.department_id
+ AND ls.mil_reg = t2.mil_reg
+LEFT JOIN t3 ON ls.department_id = t3.department_id
+ AND ls.mil_reg = t3.mil_reg
+LEFT JOIN t4 ON ls.department_id = t4.department_id
+ AND ls.mil_reg = t4.mil_reg
+LEFT JOIN t5 ON ls.department_id = t5.department_id
+ AND ls.mil_reg = t5.mil_reg
+LEFT JOIN t6 ON ls.department_id = t6.department_id
+ AND ls.mil_reg = t6.mil_reg
+LEFT JOIN t7 ON ls.department_id = t7.department_id
+ AND ls.mil_reg = t7.mil_reg
+LEFT JOIN t8 ON ls.department_id = t8.department_id
+ AND ls.mil_reg = t8.mil_reg
+LEFT JOIN t9 ON ls.department_id = t9.department_id
+ AND ls.mil_reg = t9.mil_reg
+LEFT JOIN t10 ON ls.department_id = t10.department_id
+ AND ls.mil_reg = t10.mil_reg
+LEFT JOIN t11 ON ls.department_id = t11.department_id
+ AND ls.mil_reg = t11.mil_reg
+LEFT JOIN t12 ON ls.department_id = t12.department_id
+ AND ls.mil_reg = t12.mil_reg
+LEFT JOIN t13 ON ls.department_id = t13.department_id
+ AND ls.mil_reg = t13.mil_reg;
+ Y
+
+
+ 816
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf
new file mode 100644
index 0000000..9ed662b
--- /dev/null
+++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf
@@ -0,0 +1,312 @@
+
+
+ total_registered.subpoenas(m_c)
+ Y
+
+
+
+ -
+ 2025/03/31 16:22:00.652
+ -
+ 2025/03/31 16:22:00.652
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 624
+ 384
+
+
+
+ total_registered.subpoenas_pr1(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl
+ Basic
+
+
+ ARR_PR_1
+ PART_RECRUITMENT_1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1040
+ 224
+
+
+
+ total_registered.subpoenas_pr2(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl
+ Basic
+
+
+ ARR_PR_2
+ PART_RECRUITMENT_2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1040
+ 304
+
+
+
+ total_registered.subpoenas_pr3(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl
+
+
+ Basic
+
+
+ ARR_PR_3
+ PART_RECRUITMENT_3
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1040
+ 384
+
+
+
+ total_registered.subpoenas_pr4(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl
+ Basic
+
+
+ ARR_PR_4
+ PART_RECRUITMENT_4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1040
+ 464
+
+
+
+ total_registered.subpoenas_pr5(m_c).hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl
+ Basic
+
+
+ ARR_PR_5
+ PART_RECRUITMENT_5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1040
+ 544
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1392
+ 224
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1392
+ 304
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1392
+ 384
+
+
+
+ Success 4
+
+ SUCCESS
+
+ N
+ 1392
+ 464
+
+
+
+ Success 5
+
+ SUCCESS
+
+ N
+ 1392
+ 544
+
+
+
+
+
+ Start
+ total_registered.subpoenas_pr1(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.subpoenas_pr2(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.subpoenas_pr3(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.subpoenas_pr4(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ Start
+ total_registered.subpoenas_pr5(m_c).hpl
+ Y
+ Y
+ Y
+
+
+ total_registered.subpoenas_pr1(m_c).hpl
+ Success
+ Y
+ Y
+ N
+
+
+ total_registered.subpoenas_pr2(m_c).hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ total_registered.subpoenas_pr3(m_c).hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ total_registered.subpoenas_pr4(m_c).hpl
+ Success 4
+ Y
+ Y
+ N
+
+
+ total_registered.subpoenas_pr5(m_c).hpl
+ Success 5
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl
new file mode 100644
index 0000000..0622fdc
--- /dev/null
+++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl
@@ -0,0 +1,490 @@
+
+
+
+ total_registered.subpoenas_pr1(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (subpoena) регион/рег
+ Insert / update (total_registered.subpoenas) 3
+ Y
+
+
+
+ Insert / update (total_registered.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ average_appeared
+ average_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ electron
+ count_electron
+ Y
+
+
+ paper
+ count_paper
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ electron_percent
+ electron_percent
+ Y
+
+
+ paper_percent
+ paper_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 1472
+ 384
+
+
+
+ Table input (subpoena) регион/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id
+),
+subpoena_data AS (
+ SELECT
+ s.id AS subpoena_id,
+ s.recruit_id,
+ s.department_id::uuid,
+ s.status_id,
+ (CASE
+ WHEN sr.type = '1' THEN 0
+ WHEN sr.type != '1' THEN 1
+ ELSE NULL
+ END)::numeric AS mil_reg,
+ 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,
+ rdi.status_applied,
+ ssi.delivery_code AS d_code,
+ ssi.act_number,
+ s.visit_date,
+ sh.rn,
+ rd.rn_d,
+ --rdi.rn_di,
+ ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ --WHERE act_number is not null
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1
+ --AND
+ sr.type IS NOT NULL
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+uniq_ls AS (
+ SELECT
+ distinct
+ department_id,
+ mil_reg
+ FROM subpoena_data
+),
+t1 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_subpoena
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t2 AS (
+SELECT
+ ls.mil_reg,
+ ls.department_id,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+FROM subpoena_data ls
+where rn = 1
+GROUP BY ls.department_id, ls.mil_reg
+),
+t3 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t4 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t5 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5.1' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t6 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t7 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_restrictions_applied
+ FROM subpoena_data ls
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t8 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_introduced_measures
+ FROM subpoena_data ls
+ WHERE status_applied = '11' and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t9 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_paper
+ FROM subpoena_data ls
+ WHERE d_code != '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t10 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_electron
+ FROM subpoena_data ls
+ WHERE d_code = '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t11 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct rdi_id) AS count_restrictions
+ FROM subpoena_data ls
+ where rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t12 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_delivery
+ FROM subpoena_data ls
+ WHERE act_number IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t13 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS appear_date_is_good
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+)
+SELECT
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent,
+ COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent,
+ COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent,
+ COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent,
+ COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent,
+ COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent,
+ COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent,
+ COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent,
+ COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent,
+ COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent,
+ ls.department_id AS recruitment_id,
+ current_date AS recording_date,
+ ls.mil_reg
+FROM uniq_ls ls
+LEFT JOIN t1 ON ls.department_id = t1.department_id
+ AND ls.mil_reg = t1.mil_reg
+LEFT JOIN t2 ON ls.department_id = t2.department_id
+ AND ls.mil_reg = t2.mil_reg
+LEFT JOIN t3 ON ls.department_id = t3.department_id
+ AND ls.mil_reg = t3.mil_reg
+LEFT JOIN t4 ON ls.department_id = t4.department_id
+ AND ls.mil_reg = t4.mil_reg
+LEFT JOIN t5 ON ls.department_id = t5.department_id
+ AND ls.mil_reg = t5.mil_reg
+LEFT JOIN t6 ON ls.department_id = t6.department_id
+ AND ls.mil_reg = t6.mil_reg
+LEFT JOIN t7 ON ls.department_id = t7.department_id
+ AND ls.mil_reg = t7.mil_reg
+LEFT JOIN t8 ON ls.department_id = t8.department_id
+ AND ls.mil_reg = t8.mil_reg
+LEFT JOIN t9 ON ls.department_id = t9.department_id
+ AND ls.mil_reg = t9.mil_reg
+LEFT JOIN t10 ON ls.department_id = t10.department_id
+ AND ls.mil_reg = t10.mil_reg
+LEFT JOIN t11 ON ls.department_id = t11.department_id
+ AND ls.mil_reg = t11.mil_reg
+LEFT JOIN t12 ON ls.department_id = t12.department_id
+ AND ls.mil_reg = t12.mil_reg
+LEFT JOIN t13 ON ls.department_id = t13.department_id
+ AND ls.mil_reg = t13.mil_reg;
+ Y
+
+
+ 816
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl
new file mode 100644
index 0000000..cbeff24
--- /dev/null
+++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl
@@ -0,0 +1,490 @@
+
+
+
+ total_registered.subpoenas_pr2(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (subpoena) регион/рег
+ Insert / update (total_registered.subpoenas) 3
+ Y
+
+
+
+ Insert / update (total_registered.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ average_appeared
+ average_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ electron
+ count_electron
+ Y
+
+
+ paper
+ count_paper
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ electron_percent
+ electron_percent
+ Y
+
+
+ paper_percent
+ paper_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 1472
+ 384
+
+
+
+ Table input (subpoena) регион/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id
+),
+subpoena_data AS (
+ SELECT
+ s.id AS subpoena_id,
+ s.recruit_id,
+ s.department_id::uuid,
+ s.status_id,
+ (CASE
+ WHEN sr.type = '1' THEN 0
+ WHEN sr.type != '1' THEN 1
+ ELSE NULL
+ END)::numeric AS mil_reg,
+ 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,
+ rdi.status_applied,
+ ssi.delivery_code AS d_code,
+ ssi.act_number,
+ s.visit_date,
+ sh.rn,
+ rd.rn_d,
+ --rdi.rn_di,
+ ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ --WHERE act_number is not null
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1
+ --AND
+ sr.type IS NOT NULL
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+uniq_ls AS (
+ SELECT
+ distinct
+ department_id,
+ mil_reg
+ FROM subpoena_data
+),
+t1 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_subpoena
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t2 AS (
+SELECT
+ ls.mil_reg,
+ ls.department_id,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+FROM subpoena_data ls
+where rn = 1
+GROUP BY ls.department_id, ls.mil_reg
+),
+t3 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t4 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t5 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5.1' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t6 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t7 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_restrictions_applied
+ FROM subpoena_data ls
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t8 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_introduced_measures
+ FROM subpoena_data ls
+ WHERE status_applied = '11' and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t9 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_paper
+ FROM subpoena_data ls
+ WHERE d_code != '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t10 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_electron
+ FROM subpoena_data ls
+ WHERE d_code = '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t11 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct rdi_id) AS count_restrictions
+ FROM subpoena_data ls
+ where rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t12 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_delivery
+ FROM subpoena_data ls
+ WHERE act_number IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t13 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS appear_date_is_good
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+)
+SELECT
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent,
+ COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent,
+ COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent,
+ COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent,
+ COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent,
+ COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent,
+ COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent,
+ COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent,
+ COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent,
+ COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent,
+ ls.department_id AS recruitment_id,
+ current_date AS recording_date,
+ ls.mil_reg
+FROM uniq_ls ls
+LEFT JOIN t1 ON ls.department_id = t1.department_id
+ AND ls.mil_reg = t1.mil_reg
+LEFT JOIN t2 ON ls.department_id = t2.department_id
+ AND ls.mil_reg = t2.mil_reg
+LEFT JOIN t3 ON ls.department_id = t3.department_id
+ AND ls.mil_reg = t3.mil_reg
+LEFT JOIN t4 ON ls.department_id = t4.department_id
+ AND ls.mil_reg = t4.mil_reg
+LEFT JOIN t5 ON ls.department_id = t5.department_id
+ AND ls.mil_reg = t5.mil_reg
+LEFT JOIN t6 ON ls.department_id = t6.department_id
+ AND ls.mil_reg = t6.mil_reg
+LEFT JOIN t7 ON ls.department_id = t7.department_id
+ AND ls.mil_reg = t7.mil_reg
+LEFT JOIN t8 ON ls.department_id = t8.department_id
+ AND ls.mil_reg = t8.mil_reg
+LEFT JOIN t9 ON ls.department_id = t9.department_id
+ AND ls.mil_reg = t9.mil_reg
+LEFT JOIN t10 ON ls.department_id = t10.department_id
+ AND ls.mil_reg = t10.mil_reg
+LEFT JOIN t11 ON ls.department_id = t11.department_id
+ AND ls.mil_reg = t11.mil_reg
+LEFT JOIN t12 ON ls.department_id = t12.department_id
+ AND ls.mil_reg = t12.mil_reg
+LEFT JOIN t13 ON ls.department_id = t13.department_id
+ AND ls.mil_reg = t13.mil_reg;
+ Y
+
+
+ 816
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl
new file mode 100644
index 0000000..3e661b4
--- /dev/null
+++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl
@@ -0,0 +1,490 @@
+
+
+
+ total_registered.subpoenas_pr3(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (subpoena) регион/рег
+ Insert / update (total_registered.subpoenas) 3
+ Y
+
+
+
+ Insert / update (total_registered.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ average_appeared
+ average_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ electron
+ count_electron
+ Y
+
+
+ paper
+ count_paper
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ electron_percent
+ electron_percent
+ Y
+
+
+ paper_percent
+ paper_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 1472
+ 384
+
+
+
+ Table input (subpoena) регион/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id
+),
+subpoena_data AS (
+ SELECT
+ s.id AS subpoena_id,
+ s.recruit_id,
+ s.department_id::uuid,
+ s.status_id,
+ (CASE
+ WHEN sr.type = '1' THEN 0
+ WHEN sr.type != '1' THEN 1
+ ELSE NULL
+ END)::numeric AS mil_reg,
+ 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,
+ rdi.status_applied,
+ ssi.delivery_code AS d_code,
+ ssi.act_number,
+ s.visit_date,
+ sh.rn,
+ rd.rn_d,
+ --rdi.rn_di,
+ ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ --WHERE act_number is not null
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1
+ --AND
+ sr.type IS NOT NULL
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+uniq_ls AS (
+ SELECT
+ distinct
+ department_id,
+ mil_reg
+ FROM subpoena_data
+),
+t1 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_subpoena
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t2 AS (
+SELECT
+ ls.mil_reg,
+ ls.department_id,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+FROM subpoena_data ls
+where rn = 1
+GROUP BY ls.department_id, ls.mil_reg
+),
+t3 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t4 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t5 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5.1' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t6 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t7 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_restrictions_applied
+ FROM subpoena_data ls
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t8 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_introduced_measures
+ FROM subpoena_data ls
+ WHERE status_applied = '11' and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t9 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_paper
+ FROM subpoena_data ls
+ WHERE d_code != '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t10 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_electron
+ FROM subpoena_data ls
+ WHERE d_code = '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t11 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct rdi_id) AS count_restrictions
+ FROM subpoena_data ls
+ where rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t12 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_delivery
+ FROM subpoena_data ls
+ WHERE act_number IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t13 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS appear_date_is_good
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+)
+SELECT
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent,
+ COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent,
+ COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent,
+ COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent,
+ COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent,
+ COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent,
+ COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent,
+ COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent,
+ COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent,
+ COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent,
+ ls.department_id AS recruitment_id,
+ current_date AS recording_date,
+ ls.mil_reg
+FROM uniq_ls ls
+LEFT JOIN t1 ON ls.department_id = t1.department_id
+ AND ls.mil_reg = t1.mil_reg
+LEFT JOIN t2 ON ls.department_id = t2.department_id
+ AND ls.mil_reg = t2.mil_reg
+LEFT JOIN t3 ON ls.department_id = t3.department_id
+ AND ls.mil_reg = t3.mil_reg
+LEFT JOIN t4 ON ls.department_id = t4.department_id
+ AND ls.mil_reg = t4.mil_reg
+LEFT JOIN t5 ON ls.department_id = t5.department_id
+ AND ls.mil_reg = t5.mil_reg
+LEFT JOIN t6 ON ls.department_id = t6.department_id
+ AND ls.mil_reg = t6.mil_reg
+LEFT JOIN t7 ON ls.department_id = t7.department_id
+ AND ls.mil_reg = t7.mil_reg
+LEFT JOIN t8 ON ls.department_id = t8.department_id
+ AND ls.mil_reg = t8.mil_reg
+LEFT JOIN t9 ON ls.department_id = t9.department_id
+ AND ls.mil_reg = t9.mil_reg
+LEFT JOIN t10 ON ls.department_id = t10.department_id
+ AND ls.mil_reg = t10.mil_reg
+LEFT JOIN t11 ON ls.department_id = t11.department_id
+ AND ls.mil_reg = t11.mil_reg
+LEFT JOIN t12 ON ls.department_id = t12.department_id
+ AND ls.mil_reg = t12.mil_reg
+LEFT JOIN t13 ON ls.department_id = t13.department_id
+ AND ls.mil_reg = t13.mil_reg;
+ Y
+
+
+ 816
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl
new file mode 100644
index 0000000..35c168a
--- /dev/null
+++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl
@@ -0,0 +1,490 @@
+
+
+
+ total_registered.subpoenas_pr4(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (subpoena) регион/рег
+ Insert / update (total_registered.subpoenas) 3
+ Y
+
+
+
+ Insert / update (total_registered.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ average_appeared
+ average_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ electron
+ count_electron
+ Y
+
+
+ paper
+ count_paper
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ electron_percent
+ electron_percent
+ Y
+
+
+ paper_percent
+ paper_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 1472
+ 384
+
+
+
+ Table input (subpoena) регион/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id
+),
+subpoena_data AS (
+ SELECT
+ s.id AS subpoena_id,
+ s.recruit_id,
+ s.department_id::uuid,
+ s.status_id,
+ (CASE
+ WHEN sr.type = '1' THEN 0
+ WHEN sr.type != '1' THEN 1
+ ELSE NULL
+ END)::numeric AS mil_reg,
+ 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,
+ rdi.status_applied,
+ ssi.delivery_code AS d_code,
+ ssi.act_number,
+ s.visit_date,
+ sh.rn,
+ rd.rn_d,
+ --rdi.rn_di,
+ ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ --WHERE act_number is not null
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1
+ --AND
+ sr.type IS NOT NULL
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+uniq_ls AS (
+ SELECT
+ distinct
+ department_id,
+ mil_reg
+ FROM subpoena_data
+),
+t1 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_subpoena
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t2 AS (
+SELECT
+ ls.mil_reg,
+ ls.department_id,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+FROM subpoena_data ls
+where rn = 1
+GROUP BY ls.department_id, ls.mil_reg
+),
+t3 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t4 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t5 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5.1' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t6 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t7 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_restrictions_applied
+ FROM subpoena_data ls
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t8 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_introduced_measures
+ FROM subpoena_data ls
+ WHERE status_applied = '11' and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t9 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_paper
+ FROM subpoena_data ls
+ WHERE d_code != '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t10 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_electron
+ FROM subpoena_data ls
+ WHERE d_code = '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t11 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct rdi_id) AS count_restrictions
+ FROM subpoena_data ls
+ where rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t12 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_delivery
+ FROM subpoena_data ls
+ WHERE act_number IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t13 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS appear_date_is_good
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+)
+SELECT
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent,
+ COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent,
+ COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent,
+ COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent,
+ COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent,
+ COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent,
+ COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent,
+ COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent,
+ COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent,
+ COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent,
+ ls.department_id AS recruitment_id,
+ current_date AS recording_date,
+ ls.mil_reg
+FROM uniq_ls ls
+LEFT JOIN t1 ON ls.department_id = t1.department_id
+ AND ls.mil_reg = t1.mil_reg
+LEFT JOIN t2 ON ls.department_id = t2.department_id
+ AND ls.mil_reg = t2.mil_reg
+LEFT JOIN t3 ON ls.department_id = t3.department_id
+ AND ls.mil_reg = t3.mil_reg
+LEFT JOIN t4 ON ls.department_id = t4.department_id
+ AND ls.mil_reg = t4.mil_reg
+LEFT JOIN t5 ON ls.department_id = t5.department_id
+ AND ls.mil_reg = t5.mil_reg
+LEFT JOIN t6 ON ls.department_id = t6.department_id
+ AND ls.mil_reg = t6.mil_reg
+LEFT JOIN t7 ON ls.department_id = t7.department_id
+ AND ls.mil_reg = t7.mil_reg
+LEFT JOIN t8 ON ls.department_id = t8.department_id
+ AND ls.mil_reg = t8.mil_reg
+LEFT JOIN t9 ON ls.department_id = t9.department_id
+ AND ls.mil_reg = t9.mil_reg
+LEFT JOIN t10 ON ls.department_id = t10.department_id
+ AND ls.mil_reg = t10.mil_reg
+LEFT JOIN t11 ON ls.department_id = t11.department_id
+ AND ls.mil_reg = t11.mil_reg
+LEFT JOIN t12 ON ls.department_id = t12.department_id
+ AND ls.mil_reg = t12.mil_reg
+LEFT JOIN t13 ON ls.department_id = t13.department_id
+ AND ls.mil_reg = t13.mil_reg;
+ Y
+
+
+ 816
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl
new file mode 100644
index 0000000..a929b9f
--- /dev/null
+++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl
@@ -0,0 +1,490 @@
+
+
+
+ total_registered.subpoenas_pr5(m_c)
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/08/02 11:56:22.507
+ -
+ 2024/08/02 11:56:22.507
+
+
+
+
+
+ Table input (subpoena) регион/рег
+ Insert / update (total_registered.subpoenas) 3
+ Y
+
+
+
+ Insert / update (total_registered.subpoenas) 3
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ recruitment_id
+
+
+ =
+ recording_date
+ recording_date
+
+
+ =
+ mil_reg
+ mil_reg
+
+ total_registered
+
subpoenas
+
+ subpoena
+ count_subpoena
+ Y
+
+
+ appeared
+ count_appeared
+ Y
+
+
+ average_appeared
+ average_appeared
+ Y
+
+
+ not_appeared
+ count_not_appeared
+ Y
+
+
+ not_ap_good_reason
+ count_not_ap_good_reason
+ Y
+
+
+ introduced_measures
+ count_introduced_measures
+ Y
+
+
+ ap_not_required
+ count_ap_not_required
+ Y
+
+
+ electron
+ count_electron
+ Y
+
+
+ paper
+ count_paper
+ Y
+
+
+ restrictions_applied
+ count_restrictions_applied
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ N
+
+
+ mil_reg
+ mil_reg
+ N
+
+
+ appeared_percent
+ appeared_percent
+ Y
+
+
+ not_appeared_percent
+ not_appeared_percent
+ Y
+
+
+ not_ap_good_reason_percent
+ not_ap_good_reason_percent
+ Y
+
+
+ ap_not_required_percent
+ ap_not_required_percent
+ Y
+
+
+ electron_percent
+ electron_percent
+ Y
+
+
+ paper_percent
+ paper_percent
+ Y
+
+
+ restrictions_applied_percent
+ restrictions_applied_percent
+ Y
+
+
+ introduced_measures_percent
+ introduced_measures_percent
+ Y
+
+
+ count_not_delivery
+ count_not_delivery
+ Y
+
+
+ appear_date_is_good
+ appear_date_is_good
+ Y
+
+
+ not_delivery_percent
+ not_delivery_percent
+ Y
+
+
+ appear_date_is_good_percent
+ appear_date_is_good_percent
+ Y
+
+
+ N
+
+
+ 1472
+ 384
+
+
+
+ Table input (subpoena) регион/рег
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ WITH
+ids AS (
+ SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id
+),
+subpoena_data AS (
+ SELECT
+ s.id AS subpoena_id,
+ s.recruit_id,
+ s.department_id::uuid,
+ s.status_id,
+ (CASE
+ WHEN sr.type = '1' THEN 0
+ WHEN sr.type != '1' THEN 1
+ ELSE NULL
+ END)::numeric AS mil_reg,
+ 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,
+ rdi.status_applied,
+ ssi.delivery_code AS d_code,
+ ssi.act_number,
+ s.visit_date,
+ sh.rn,
+ rd.rn_d,
+ --rdi.rn_di,
+ ssi.rn_si
+ FROM subpoena s
+ JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn,
+ subpoena_id,
+ status_id,
+ date_time
+ FROM subpoena_history sh
+ ) sh on sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d,
+ subpoena_id,
+ id
+ FROM restriction_document
+ ) AS rd ON rd.subpoena_id = s.id
+ LEFT JOIN (
+ SELECT
+ restriction_document_create_id,
+ restriction_document_cancel_id,
+ status_applied,
+ applied_date,
+ id
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di,
+ *
+ FROM restriction_document_item
+ ) sub
+ WHERE rn_di = 1
+ ) AS rdi ON rdi.restriction_document_create_id = rd.id
+ LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si,
+ subpoena_id,
+ delivery_code,
+ act_number
+ FROM subpoena_send_info
+ --WHERE act_number is not null
+ ) AS ssi ON ssi.subpoena_id = s.id
+ WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1
+ --AND
+ sr.type IS NOT NULL
+ AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025
+ AND s.department_id::uuid IN (SELECT recruitment_id FROM ids)
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+uniq_ls AS (
+ SELECT
+ distinct
+ department_id,
+ mil_reg
+ FROM subpoena_data
+),
+t1 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_subpoena
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t2 AS (
+SELECT
+ ls.mil_reg,
+ ls.department_id,
+ ROUND(
+ AVG(
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0)
+ ELSE
+ GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0)
+ END
+ ) FILTER (WHERE
+ CASE
+ WHEN ls.sub_stat_hist = '4.2' THEN
+ EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp))
+ ELSE
+ EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp))
+ END > 0
+ ), 1
+ ) AS average_appeared
+FROM subpoena_data ls
+where rn = 1
+GROUP BY ls.department_id, ls.mil_reg
+),
+t3 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t4 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_appeared
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t5 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине
+ FROM subpoena_data ls
+ WHERE sub_stat_hist = '5.1' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t6 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t7 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_restrictions_applied
+ FROM subpoena_data ls
+ WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t8 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct recruit_id) AS count_introduced_measures
+ FROM subpoena_data ls
+ WHERE status_applied = '11' and rn = 1 and rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t9 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_paper
+ FROM subpoena_data ls
+ WHERE d_code != '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t10 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_electron
+ FROM subpoena_data ls
+ WHERE d_code = '7' and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t11 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct rdi_id) AS count_restrictions
+ FROM subpoena_data ls
+ where rn_d = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t12 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS count_not_delivery
+ FROM subpoena_data ls
+ WHERE act_number IS NOT NULL and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+),
+t13 AS (
+ SELECT
+ ls.mil_reg,
+ ls.department_id,
+ COUNT(distinct subpoena_id) AS appear_date_is_good
+ FROM subpoena_data ls
+ WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1
+ GROUP BY ls.department_id, ls.mil_reg
+)
+SELECT
+ COALESCE(t1.count_subpoena, 0) AS count_subpoena,
+ COALESCE(t2.average_appeared, 0) AS average_appeared,
+ COALESCE(t3.count_appeared, 0) AS count_appeared,
+ COALESCE(t4.count_not_appeared, 0) AS count_not_appeared,
+ COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason,
+ COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required,
+ COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied,
+ COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures,
+ COALESCE(t9.count_paper, 0) AS count_paper,
+ COALESCE(t10.count_electron, 0) AS count_electron,
+ COALESCE(t11.count_restrictions, 0) AS count_restrictions,
+ COALESCE(t12.count_not_delivery, 0) AS count_not_delivery,
+ COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good,
+ COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent,
+ COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent,
+ COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent,
+ COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent,
+ COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent,
+ COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent,
+ COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent,
+ COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent,
+ COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent,
+ COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent,
+ ls.department_id AS recruitment_id,
+ current_date AS recording_date,
+ ls.mil_reg
+FROM uniq_ls ls
+LEFT JOIN t1 ON ls.department_id = t1.department_id
+ AND ls.mil_reg = t1.mil_reg
+LEFT JOIN t2 ON ls.department_id = t2.department_id
+ AND ls.mil_reg = t2.mil_reg
+LEFT JOIN t3 ON ls.department_id = t3.department_id
+ AND ls.mil_reg = t3.mil_reg
+LEFT JOIN t4 ON ls.department_id = t4.department_id
+ AND ls.mil_reg = t4.mil_reg
+LEFT JOIN t5 ON ls.department_id = t5.department_id
+ AND ls.mil_reg = t5.mil_reg
+LEFT JOIN t6 ON ls.department_id = t6.department_id
+ AND ls.mil_reg = t6.mil_reg
+LEFT JOIN t7 ON ls.department_id = t7.department_id
+ AND ls.mil_reg = t7.mil_reg
+LEFT JOIN t8 ON ls.department_id = t8.department_id
+ AND ls.mil_reg = t8.mil_reg
+LEFT JOIN t9 ON ls.department_id = t9.department_id
+ AND ls.mil_reg = t9.mil_reg
+LEFT JOIN t10 ON ls.department_id = t10.department_id
+ AND ls.mil_reg = t10.mil_reg
+LEFT JOIN t11 ON ls.department_id = t11.department_id
+ AND ls.mil_reg = t11.mil_reg
+LEFT JOIN t12 ON ls.department_id = t12.department_id
+ AND ls.mil_reg = t12.mil_reg
+LEFT JOIN t13 ON ls.department_id = t13.department_id
+ AND ls.mil_reg = t13.mil_reg;
+ Y
+
+
+ 816
+ 384
+
+
+
+
+
+
diff --git a/map_v1/mil_district/appeals.reasons_appeal(m_d).hpl b/map_v1/mil_district/appeals.reasons_appeal(m_d).hpl
new file mode 100644
index 0000000..c6e04d0
--- /dev/null
+++ b/map_v1/mil_district/appeals.reasons_appeal(m_d).hpl
@@ -0,0 +1,351 @@
+
+
+
+ appeals.reasons_appeal(m_d)
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/01/28 10:29:54.859
+ -
+ 2025/01/28 10:29:54.859
+
+
+
+
+
+ Execute SQL script
+ Table input (appeal_document) регионы
+ Y
+
+
+ Get variables 3 2
+ Select values 3 2
+ Y
+
+
+ Insert / update (main_dashboard.appeals) 2
+ Execute SQL script 2
+ Y
+
+
+ Select values 3 2
+ Insert / update (main_dashboard.appeals) 2
+ Y
+
+
+ Table input (appeal_document) регионы
+ Get variables 3 2
+ Y
+
+
+
+ Execute SQL script
+ ExecSql
+
+ N
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ DELETE FROM appeals.reasons_appeal
+WHERE recording_date = current_date
+ AND schema = 'Region'
+ AND recruitment_id = '${MD_ID}'
+
+
+ 320
+ 256
+
+
+
+ Execute SQL script 2
+ ExecSql
+
+ N
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ DELETE FROM appeals.reasons_appeal
+WHERE recording_date = current_date
+ AND schema = 'MD_LVL'
+ AND recruitment_id = '${MD_ID}'
+
+
+ 1344
+ 256
+
+
+
+ Get variables 3 2
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ MD_ID
+ -1
+ none
+ String
+
+
+ -1
+ MD_ARRAY
+ -1
+ none
+ String
+
+
+
+
+ 752
+ 256
+
+
+
+ Insert / update (main_dashboard.appeals) 2
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruitment_id
+ MD_ID
+
+
+ =
+ schema
+ schema
+
+ appeals
+
+
+ id
+ id
+ Y
+
+
+ parent_id
+ parent_id
+ Y
+
+
+ schema
+ schema
+ Y
+
+
+ shortname
+ shortname
+ Y
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ idm_id
+ idm_id
+ N
+
+
+ N
+
+
+ 512
+ 208
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ SELECT
+ rt.id,
+ rt.fullname as shortname,
+ rt.parent_id,
+ rt.idm_id,
+ rt.schema,
+ rt.military_code AS code,
+ rt.updated_at--,
+ --ROW_NUMBER() OVER (ORDER BY rt.idm_id) AS rn_recruitment
+FROM public.recruitment rt
+WHERE
+ rt.idm_id ~ '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
+ AND (rt.schema = 'Ministry' OR (rt.schema IS NOT NULL AND rt.parent_id IS NOT NULL))
+ AND rt.hidden IS NOT TRUE
+ AND (
+ rt.fullname ILIKE '%военный%'
+ OR
+ rt.fullname ILIKE '%округ%'
+ OR
+ rt.fullname ILIKE '%министерство%'
+)
+ AND rt.fullname NOT ILIKE '%тест%'
+ N
+
+
+ 208
+ 208
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ N
+
recruitment
+ N
+ Y
+ N
+ Y
+
+
+ 480
+ 320
+
+
+
+
+
+
diff --git a/map_v1/predictive_metrics/data_collection.hpl b/map_v1/predictive_metrics/data_collection.hpl
new file mode 100644
index 0000000..068b5da
--- /dev/null
+++ b/map_v1/predictive_metrics/data_collection.hpl
@@ -0,0 +1,203 @@
+
+
+
+ data_collection
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/02/27 12:45:14.184
+ -
+ 2025/02/27 12:45:14.184
+
+
+
+
+
+ Table input
+ Merge join
+ Y
+
+
+ Table input 2
+ Merge join
+ Y
+
+
+ Merge join
+ Table output
+ Y
+
+
+
+ Merge join
+ MergeJoin
+
+ Y
+
+ 1
+
+ none
+
+
+ INNER
+
+ recruitment_id
+
+
+ idm_id
+
+ Table input
+ Table input 2
+
+
+ 768
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.person_registry
+ N
+ 0
+ WITH year_series AS (
+ SELECT generate_series(
+ date_trunc('year', CURRENT_DATE) - INTERVAL '54 years',
+ date_trunc('year', CURRENT_DATE) - INTERVAL '1 year',
+ INTERVAL '1 year'
+ )::date AS year_date
+)
+SELECT
+ COALESCE(r.target_recruitment_id, r.current_recruitment_id) as recruitment_id,
+ ys.year_date AS year,
+ COALESCE(COUNT(r.id) FILTER (
+ WHERE r.military_registration_date >= ys.year_date
+ AND r.military_registration_date < ys.year_date + INTERVAL '1 year'
+ ), 0) AS count_all,
+ COALESCE(COUNT(r.id) FILTER (
+ WHERE r.military_registration_date >= ys.year_date
+ AND r.military_registration_date < ys.year_date + INTERVAL '1 year'
+ AND DATE_PART('year', AGE(r.military_registration_date, r.birth_date)) < 18
+ ), 0) AS reaching_17_age,
+ COALESCE(COUNT(r.id) FILTER (
+ WHERE r.military_registration_date >= ys.year_date
+ AND r.military_registration_date < ys.year_date + INTERVAL '1 year'
+ AND r.gender = 'FEMALE'
+ ), 0) AS women_military_specialty,
+ 'Department' as schema
+FROM year_series ys
+LEFT JOIN recruits r ON 1=1
+GROUP BY ys.year_date, COALESCE(r.target_recruitment_id, r.current_recruitment_id)
+ORDER BY recruitment_id, year DESC;
+ N
+
+
+ 544
+ 304
+
+
+
+ Table input 2
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ -- Берем только записи с максимальной версией для каждого idm_id
+SELECT DISTINCT ON (idm_id) idm_id
+FROM ervu_dashboard.recruitment
+WHERE schema = 'Department'
+ORDER BY idm_id, updated_at DESC
+
+ N
+
+
+ 544
+ 496
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruitment_id
+ recruitment_id
+
+
+ recording_date
+ year
+
+
+ count_all
+ count_all
+
+
+ reaching_17_age
+ reaching_17_age
+
+
+ women_military_specialty
+ women_military_specialty
+
+
+ schema
+ schema
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ forecast
+ Y
+
registered_citizens
+ N
+ Y
+ Y
+ Y
+
+
+ 960
+ 368
+
+
+
+
+
+
diff --git a/map_v1/predictive_metrics/next_lvl_org_pm.hpl b/map_v1/predictive_metrics/next_lvl_org_pm.hpl
new file mode 100644
index 0000000..d868ab0
--- /dev/null
+++ b/map_v1/predictive_metrics/next_lvl_org_pm.hpl
@@ -0,0 +1,177 @@
+
+
+
+ next_lvl_org_pm
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/02/27 12:55:12.966
+ -
+ 2025/02/27 12:55:12.966
+
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH latest_hierarchy AS (
+ -- Берем только записи с максимальной версией для каждого idm_id
+ SELECT DISTINCT ON (idm_id) *
+ FROM ervu_dashboard.recruitment
+ ORDER BY idm_id, updated_at DESC
+),
+hierarchy_cte AS (
+ -- Строим связи между уровнями (Department → Organization → Region → Ministry)
+ SELECT
+ h.idm_id AS department_id,
+ h.parent_id AS organization_id,
+ h2.parent_id AS region_id,
+ h3.parent_id AS ministry_id
+ FROM latest_hierarchy h
+ LEFT JOIN latest_hierarchy h2 ON h.parent_id = h2.idm_id -- Organization
+ LEFT JOIN latest_hierarchy h3 ON h2.parent_id = h3.idm_id -- Region
+ WHERE h.schema = 'Department' -- Начинаем с Department
+),
+aggregated_counts AS (
+ -- Агрегируем для Organization
+ SELECT
+ h.organization_id AS level_id,
+ SUM(r.reaching_17_age) AS total_reaching_17_age,
+ SUM(r.women_military_specialty) AS total_women_military_specialty,
+ SUM(r.count_all) AS total_count_all,
+ recording_date AS recording_date,
+ 'Organization' AS level
+ FROM forecast.registered_citizens r
+ JOIN hierarchy_cte h ON r.recruitment_id = h.department_id
+ WHERE h.organization_id IS NOT NULL
+ GROUP BY h.organization_id, recording_date
+
+ UNION ALL
+
+ -- Агрегируем для Region
+ SELECT
+ h.region_id AS level_id,
+ SUM(r.reaching_17_age) AS total_reaching_17_age,
+ SUM(r.women_military_specialty) AS total_women_military_specialty,
+ SUM(r.count_all) AS total_count_all,
+ recording_date AS recording_date,
+ 'Region' AS level
+ FROM forecast.registered_citizens r
+ JOIN hierarchy_cte h ON r.recruitment_id = h.department_id
+ WHERE h.region_id IS NOT NULL
+ GROUP BY h.region_id, recording_date
+
+ UNION ALL
+
+ -- Агрегируем для Ministry
+ SELECT
+ h.ministry_id AS level_id,
+ SUM(r.reaching_17_age) AS total_reaching_17_age,
+ SUM(r.women_military_specialty) AS total_women_military_specialty,
+ SUM(r.count_all) AS total_count_all,
+ recording_date AS recording_date,
+ 'Ministry' AS level
+ FROM forecast.registered_citizens r
+ JOIN hierarchy_cte h ON r.recruitment_id = h.department_id
+ WHERE h.ministry_id IS NOT NULL
+ GROUP BY h.ministry_id, recording_date
+)
+SELECT * FROM aggregated_counts;
+ N
+
+
+ 672
+ 304
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruitment_id
+ level_id
+
+
+ reaching_17_age
+ total_reaching_17_age
+
+
+ women_military_specialty
+ total_women_military_specialty
+
+
+ count_all
+ total_count_all
+
+
+ recording_date
+ recording_date
+
+
+ schema
+ level
+
+
+ N
+ N
+ N
+ N
+
+ Y
+
+ N
+ forecast
+ Y
+
registered_citizens
+
+ N
+ Y
+ N
+ Y
+
+
+ 912
+ 304
+
+
+
+
+
+
diff --git a/map_v1/predictive_metrics/predictive.hwf b/map_v1/predictive_metrics/predictive.hwf
new file mode 100644
index 0000000..a307c17
--- /dev/null
+++ b/map_v1/predictive_metrics/predictive.hwf
@@ -0,0 +1,165 @@
+
+
+ predictive
+ Y
+
+
+
+ -
+ 2025/02/27 13:51:40.861
+ -
+ 2025/02/27 13:51:40.861
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 304
+ 352
+
+
+
+ data_collection.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/predictive_metrics/data_collection.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 448
+ 352
+
+
+
+ next_lvl_org_pm.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/predictive_metrics/next_lvl_org_pm.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 592
+ 352
+
+
+
+ predictive_data.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/predictive_metrics/predictive_data.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 736
+ 352
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 880
+ 352
+
+
+
+
+
+ Start
+ data_collection.hpl
+ Y
+ Y
+ Y
+
+
+ data_collection.hpl
+ next_lvl_org_pm.hpl
+ Y
+ Y
+ N
+
+
+ next_lvl_org_pm.hpl
+ predictive_data.hpl
+ Y
+ Y
+ N
+
+
+ predictive_data.hpl
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
+ debug_plugin
+
+
+
diff --git a/map_v1/predictive_metrics/predictive_data.hpl b/map_v1/predictive_metrics/predictive_data.hpl
new file mode 100644
index 0000000..14e9197
--- /dev/null
+++ b/map_v1/predictive_metrics/predictive_data.hpl
@@ -0,0 +1,461 @@
+
+
+
+ predictive_data
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/02/27 13:48:40.269
+ -
+ 2025/02/27 13:48:40.269
+
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ -- Адаптированный запрос для таблицы forecast.registered_citizens с учетом указанной структуры
+-- recording_date - год наблюдения
+-- recruitment_id - идентификатор военкомата
+-- count_all - всего на учете
+-- reaching_17_age - поставлено на учет по достижении 17 лет
+-- women_military_specialty - женщины, получившие ВУС
+-- schema - уровень военкомата
+
+-- 1. Проверяем наличие данных за весь необходимый период и создаем полную сетку лет
+
+WITH RECURSIVE years AS ( -- Теперь синтаксис правильный
+ SELECT
+ EXTRACT(YEAR FROM CURRENT_DATE)::int AS year,
+ 'Текущий год' AS prediction_type
+ UNION ALL
+ SELECT
+ year + 1,
+ 'Прогнозный год'
+ FROM years
+ WHERE year < EXTRACT(YEAR FROM CURRENT_DATE)::int + 49 -- +49, т.к. первый год уже включён
+),
+year_range AS (
+ SELECT
+ EXTRACT(YEAR FROM CURRENT_DATE) - 54 AS min_year, -- Для первых двух показателей
+ EXTRACT(YEAR FROM CURRENT_DATE) - 34 AS min_year_females, -- Для женщин с ВУС
+ EXTRACT(YEAR FROM CURRENT_DATE) AS max_year
+),
+
+all_years AS (
+ SELECT generate_series(min_year, max_year) AS year
+ FROM year_range
+),
+
+all_years_females AS (
+ SELECT generate_series(min_year_females, max_year) AS year
+ FROM year_range
+),
+
+all_regions AS (
+ SELECT DISTINCT recruitment_id, schema FROM forecast.registered_citizens
+),
+
+-- 2. Создаем полную сетку регион-год для всех показателей
+full_grid_males AS (
+ SELECT
+ r.recruitment_id,
+ r.schema,
+ y.year
+ FROM all_regions r
+ CROSS JOIN all_years y
+),
+
+full_grid_females AS (
+ SELECT
+ r.recruitment_id,
+ r.schema,
+ y.year
+ FROM all_regions r
+ CROSS JOIN all_years_females y
+),
+
+-- 3. Объединяем сетку с имеющимися данными, чтобы выявить пропуски
+males_data AS (
+ SELECT
+ g.recruitment_id,
+ g.schema,
+ g.year,
+ COALESCE(h.count_all, NULL) AS count_all,
+ COALESCE(h.reaching_17_age, NULL) AS reaching_17_age
+ FROM full_grid_males g
+ LEFT JOIN forecast.registered_citizens h ON g.recruitment_id = h.recruitment_id AND g.year = EXTRACT(YEAR FROM h.recording_date)
+),
+
+females_data AS (
+ SELECT
+ g.recruitment_id,
+ g.schema,
+ g.year,
+ COALESCE(h.women_military_specialty, NULL) AS women_military_specialty
+ FROM full_grid_females g
+ LEFT JOIN forecast.registered_citizens h ON g.recruitment_id = h.recruitment_id AND g.year = EXTRACT(YEAR FROM h.recording_date)
+),
+
+-- 4. Рассчитываем статистики для выявления выбросов
+males_stats AS (
+ SELECT
+ recruitment_id,
+ schema,
+ AVG(count_all) AS avg_count_all,
+ STDDEV(count_all) AS stddev_count_all, -- σ для фильтрации выбросов
+ AVG(reaching_17_age) AS avg_reaching_17_age,
+ STDDEV(reaching_17_age) AS stddev_reaching_17_age -- σ для фильтрации выбросов
+ FROM males_data
+ WHERE count_all IS NOT NULL AND reaching_17_age IS NOT NULL
+ GROUP BY recruitment_id, schema
+),
+
+females_stats AS (
+ SELECT
+ recruitment_id,
+ schema,
+ AVG(women_military_specialty) AS avg_women_military_specialty,
+ STDDEV(women_military_specialty) AS stddev_women_military_specialty -- σ для фильтрации выбросов
+ FROM females_data
+ WHERE women_military_specialty IS NOT NULL
+ GROUP BY recruitment_id, schema
+),
+
+-- 5. Выявляем выбросы и помечаем их для интерполяции
+males_outliers AS (
+ SELECT
+ m.recruitment_id,
+ m.schema,
+ m.year,
+ m.count_all,
+ CASE
+ WHEN m.count_all IS NULL OR ABS(m.count_all - s.avg_count_all) > s.stddev_count_all
+ THEN TRUE ELSE FALSE
+ END AS count_all_is_outlier,
+ m.reaching_17_age,
+ CASE
+ WHEN m.reaching_17_age IS NULL OR ABS(m.reaching_17_age - s.avg_reaching_17_age) > s.stddev_reaching_17_age
+ THEN TRUE ELSE FALSE
+ END AS reaching_17_age_is_outlier
+ FROM males_data m
+ JOIN males_stats s ON m.recruitment_id = s.recruitment_id AND m.schema = s.schema
+),
+
+females_outliers AS (
+ SELECT
+ f.recruitment_id,
+ f.schema,
+ f.year,
+ f.women_military_specialty,
+ CASE
+ WHEN f.women_military_specialty IS NULL OR ABS(f.women_military_specialty - s.avg_women_military_specialty) > s.stddev_women_military_specialty
+ THEN TRUE ELSE FALSE
+ END AS women_military_specialty_is_outlier
+ FROM females_data f
+ JOIN females_stats s ON f.recruitment_id = s.recruitment_id AND f.schema = s.schema
+),
+
+-- 6. Подготовка данных для интерполяции (находим ближайшие НЕ выбросы)
+males_interpolation_prep AS (
+ SELECT
+ mo.recruitment_id,
+ mo.schema,
+ mo.year,
+ mo.count_all,
+ mo.count_all_is_outlier,
+ mo.reaching_17_age,
+ mo.reaching_17_age_is_outlier,
+ -- Для интерполяции "Всего на учете" ищем ближайшие не-выбросы
+ (SELECT MAX(year) FROM males_outliers
+ WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year < mo.year AND NOT count_all_is_outlier) AS prev_year_count_all,
+ (SELECT MIN(year) FROM males_outliers
+ WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year > mo.year AND NOT count_all_is_outlier) AS next_year_count_all,
+ -- Для интерполяции "Поставлено на учет по достижении 17 лет" ищем ближайшие не-выбросы
+ (SELECT MAX(year) FROM males_outliers
+ WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year < mo.year AND NOT reaching_17_age_is_outlier) AS prev_year_reaching_17_age,
+ (SELECT MIN(year) FROM males_outliers
+ WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year > mo.year AND NOT reaching_17_age_is_outlier) AS next_year_reaching_17_age
+ FROM males_outliers mo
+),
+
+females_interpolation_prep AS (
+ SELECT
+ fo.recruitment_id,
+ fo.schema,
+ fo.year,
+ fo.women_military_specialty,
+ fo.women_military_specialty_is_outlier,
+ -- Для интерполяции "Женщины, получившие ВУС" ищем ближайшие не-выбросы
+ (SELECT MAX(year) FROM females_outliers
+ WHERE recruitment_id = fo.recruitment_id AND schema = fo.schema AND year < fo.year AND NOT women_military_specialty_is_outlier) AS prev_year_women_military_specialty,
+ (SELECT MIN(year) FROM females_outliers
+ WHERE recruitment_id = fo.recruitment_id AND schema = fo.schema AND year > fo.year AND NOT women_military_specialty_is_outlier) AS next_year_women_military_specialty
+ FROM females_outliers fo
+),
+
+-- 7. Выполняем линейную интерполяцию для выбросов и отсутствующих значений
+males_interpolated AS (
+ SELECT
+ m.recruitment_id,
+ m.schema,
+ m.year,
+ CASE
+ WHEN m.count_all_is_outlier AND m.prev_year_count_all IS NOT NULL AND m.next_year_count_all IS NOT NULL THEN
+ -- Linear interpolation formula: y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1)
+ (SELECT p.count_all FROM males_outliers p
+ WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_count_all) +
+ ((m.year - m.prev_year_count_all)::float / (m.next_year_count_all - m.prev_year_count_all)) *
+ ((SELECT n.count_all FROM males_outliers n
+ WHERE n.recruitment_id = m.recruitment_id AND n.schema = m.schema AND n.year = m.next_year_count_all) -
+ (SELECT p.count_all FROM males_outliers p
+ WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_count_all))
+ ELSE m.count_all
+ END AS count_all,
+ CASE
+ WHEN m.reaching_17_age_is_outlier AND m.prev_year_reaching_17_age IS NOT NULL AND m.next_year_reaching_17_age IS NOT NULL THEN
+ -- Linear interpolation formula: y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1)
+ (SELECT p.reaching_17_age FROM males_outliers p
+ WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_reaching_17_age) +
+ ((m.year - m.prev_year_reaching_17_age)::float / (m.next_year_reaching_17_age - m.prev_year_reaching_17_age)) *
+ ((SELECT n.reaching_17_age FROM males_outliers n
+ WHERE n.recruitment_id = m.recruitment_id AND n.schema = m.schema AND n.year = m.next_year_reaching_17_age) -
+ (SELECT p.reaching_17_age FROM males_outliers p
+ WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_reaching_17_age))
+ ELSE m.reaching_17_age
+ END AS reaching_17_age
+ FROM males_interpolation_prep m
+),
+
+females_interpolated AS (
+ SELECT
+ f.recruitment_id,
+ f.schema,
+ f.year,
+ CASE
+ WHEN f.women_military_specialty_is_outlier AND f.prev_year_women_military_specialty IS NOT NULL AND f.next_year_women_military_specialty IS NOT NULL THEN
+ -- Linear interpolation formula: y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1)
+ (SELECT p.women_military_specialty FROM females_outliers p
+ WHERE p.recruitment_id = f.recruitment_id AND p.schema = f.schema AND p.year = f.prev_year_women_military_specialty) +
+ ((f.year - f.prev_year_women_military_specialty)::float / (f.next_year_women_military_specialty - f.prev_year_women_military_specialty)) *
+ ((SELECT n.women_military_specialty FROM females_outliers n
+ WHERE n.recruitment_id = f.recruitment_id AND n.schema = f.schema AND n.year = f.next_year_women_military_specialty) -
+ (SELECT p.women_military_specialty FROM females_outliers p
+ WHERE p.recruitment_id = f.recruitment_id AND p.schema = f.schema AND p.year = f.prev_year_women_military_specialty))
+ ELSE f.women_military_specialty
+ END AS women_military_specialty
+ FROM females_interpolation_prep f
+),
+
+-- 8. Объединяем интерполированные данные
+combined_data AS (
+ SELECT
+ m.recruitment_id,
+ m.schema,
+ m.year,
+ m.count_all,
+ m.reaching_17_age,
+ f.women_military_specialty
+ FROM males_interpolated m
+ LEFT JOIN females_interpolated f ON m.recruitment_id = f.recruitment_id AND m.schema = f.schema AND m.year = f.year
+),
+
+
+
+-- 9. Рассчитываем параметры линейной регрессии
+average_values AS (
+ SELECT
+ recruitment_id,
+ schema,
+ year,
+ count_all,
+ reaching_17_age,
+ women_military_specialty,
+ -- Вычисляем средние значения отдельно
+ AVG(year) FILTER (WHERE count_all IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_x_count_all,
+ AVG(count_all) FILTER (WHERE count_all IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_y_count_all,
+ AVG(year) FILTER (WHERE reaching_17_age IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_x_reaching_17_age,
+ AVG(reaching_17_age) FILTER (WHERE reaching_17_age IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_y_reaching_17_age,
+ AVG(year) FILTER (WHERE women_military_specialty IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_x_women_military_specialty,
+ AVG(women_military_specialty) FILTER (WHERE women_military_specialty IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_y_women_military_specialty
+ FROM combined_data
+),
+regression_stats AS (
+ SELECT
+ recruitment_id,
+ schema,
+
+ -- count_all
+ COUNT(*) FILTER (WHERE count_all IS NOT NULL) AS n_count_all,
+ AVG(year) FILTER (WHERE count_all IS NOT NULL) AS avg_x_count_all,
+ AVG(count_all) FILTER (WHERE count_all IS NOT NULL) AS avg_y_count_all,
+ SUM((year - avg_x_count_all) * (count_all - avg_y_count_all)) FILTER (WHERE count_all IS NOT NULL) AS sum_xy_count_all,
+ SUM(POWER(year - avg_x_count_all, 2)) FILTER (WHERE count_all IS NOT NULL) AS sum_x_squared_count_all,
+
+ -- reaching_17_age
+ COUNT(*) FILTER (WHERE reaching_17_age IS NOT NULL) AS n_reaching_17_age,
+ AVG(year) FILTER (WHERE reaching_17_age IS NOT NULL) AS avg_x_reaching_17_age,
+ AVG(reaching_17_age) FILTER (WHERE reaching_17_age IS NOT NULL) AS avg_y_reaching_17_age,
+ SUM((year - avg_x_reaching_17_age) * (reaching_17_age - avg_y_reaching_17_age)) FILTER (WHERE reaching_17_age IS NOT NULL) AS sum_xy_reaching_17_age,
+ SUM(POWER(year - avg_x_reaching_17_age, 2)) FILTER (WHERE reaching_17_age IS NOT NULL) AS sum_x_squared_reaching_17_age,
+
+ -- women_military_specialty
+ COUNT(*) FILTER (WHERE women_military_specialty IS NOT NULL) AS n_women_military_specialty,
+ AVG(year) FILTER (WHERE women_military_specialty IS NOT NULL) AS avg_x_women_military_specialty,
+ AVG(women_military_specialty) FILTER (WHERE women_military_specialty IS NOT NULL) AS avg_y_women_military_specialty,
+ SUM((year - avg_x_women_military_specialty) * (women_military_specialty - avg_y_women_military_specialty)) FILTER (WHERE women_military_specialty IS NOT NULL) AS sum_xy_women_military_specialty,
+ SUM(POWER(year - avg_x_women_military_specialty, 2)) FILTER (WHERE women_military_specialty IS NOT NULL) AS sum_x_squared_women_military_specialty
+
+ FROM average_values
+ GROUP BY recruitment_id, schema
+),
+
+-- 10. Вычисляем параметры уравнения линейной регрессии
+regression_params AS (
+ SELECT
+ recruitment_id,
+ schema,
+ -- Параметры для count_all
+ CASE
+ WHEN sum_x_squared_count_all <> 0 THEN sum_xy_count_all / sum_x_squared_count_all
+ ELSE 0
+ END AS k_count_all,
+ avg_y_count_all - (CASE
+ WHEN sum_x_squared_count_all <> 0 THEN sum_xy_count_all / sum_x_squared_count_all
+ ELSE 0
+ END) * avg_x_count_all AS b_count_all,
+
+ -- Параметры для reaching_17_age
+ CASE
+ WHEN sum_x_squared_reaching_17_age <> 0 THEN sum_xy_reaching_17_age / sum_x_squared_reaching_17_age
+ ELSE 0
+ END AS k_reaching_17_age,
+ avg_y_reaching_17_age - (CASE
+ WHEN sum_x_squared_reaching_17_age <> 0 THEN sum_xy_reaching_17_age / sum_x_squared_reaching_17_age
+ ELSE 0
+ END) * avg_x_reaching_17_age AS b_reaching_17_age,
+
+ -- Параметры для women_military_specialty
+ CASE
+ WHEN sum_x_squared_women_military_specialty <> 0 THEN sum_xy_women_military_specialty / sum_x_squared_women_military_specialty
+ ELSE 0
+ END AS k_women_military_specialty,
+ avg_y_women_military_specialty - (CASE
+ WHEN sum_x_squared_women_military_specialty <> 0 THEN sum_xy_women_military_specialty / sum_x_squared_women_military_specialty
+ ELSE 0
+ END) * avg_x_women_military_specialty AS b_women_military_specialty
+ FROM regression_stats
+)
+
+-- 11. Рассчитываем прогнозные значения на текущий и следующий годы
+
+SELECT
+ r.recruitment_id,
+ r.schema,
+ MAKE_DATE(y.year, 1, 1) AS prediction_year,
+ ROUND(r.k_count_all * y.year + r.b_count_all) AS count_all,
+ ROUND(r.k_reaching_17_age * y.year + r.b_reaching_17_age) AS reaching_17_age,
+ ROUND(r.k_women_military_specialty * y.year + r.b_women_military_specialty) AS women_military_specialty,
+ y.prediction_type
+FROM years y
+CROSS JOIN regression_params r
+ORDER BY r.schema, r.recruitment_id, prediction_year;
+
+ N
+
+
+ 720
+ 304
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruitment_id
+ recruitment_id
+
+
+ schema
+ schema
+
+
+ recording_date
+ prediction_year
+
+
+ count_all
+ count_all
+
+
+ reaching_17_age
+ reaching_17_age
+
+
+ women_military_specialty
+ women_military_specialty
+
+
+ N
+ N
+ N
+ N
+
+ Y
+
+ N
+ forecast
+ Y
+
registered_citizens
+
+ N
+ Y
+ N
+ Y
+
+
+ 928
+ 304
+
+
+
+
+
+
diff --git a/map_v1/project-config.json b/map_v1/project-config.json
new file mode 100644
index 0000000..f8d4595
--- /dev/null
+++ b/map_v1/project-config.json
@@ -0,0 +1,9 @@
+{
+ "metadataBaseFolder" : "${PROJECT_HOME}/metadata",
+ "unitTestsBasePath" : "${PROJECT_HOME}",
+ "dataSetsCsvFolder" : "${PROJECT_HOME}/datasets",
+ "enforcingExecutionInHome" : true,
+ "config" : {
+ "variables" : [ ]
+ }
+}
\ No newline at end of file
diff --git a/map_v1/ratings/job_ratings.hwf b/map_v1/ratings/job_ratings.hwf
new file mode 100644
index 0000000..fb3352e
--- /dev/null
+++ b/map_v1/ratings/job_ratings.hwf
@@ -0,0 +1,350 @@
+
+
+ job_ratings
+ Y
+
+
+
+ 0
+ -
+ 2024/12/24 16:11:59.295
+ -
+ 2024/12/24 16:11:59.295
+
+
+ REG_ID
+
+
+
+
+ VK_ARRAY
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ Y
+ 464
+ 256
+
+
+
+ rows_id-array_reg.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/region/rows_id-array_reg.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 704
+ 256
+
+
+
+ ratings.appear_subpoena.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/ratings/ratings.appear_subpoena.hpl
+ Basic
+
+
+ VK_ARRAY
+ VK_ARRAY_ID
+
+
+ REG_ID
+ RECRUITMENT_REG_ID
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1104
+ 144
+
+
+
+ ratings.conscription_info.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/ratings/ratings.conscription_info.hpl
+ Basic
+
+
+ VK_ARRAY
+ VK_ARRAY_ID
+
+
+ REG_ID
+ RECRUITMENT_REG_ID
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 1104
+ 256
+
+
+
+ ratings.consideration_complaint.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/ratings/ratings.consideration_complaint.hpl
+ Basic
+
+
+ VK_ARRAY
+ VK_ARRAY_ID
+
+
+ REG_ID
+ RECRUITMENT_REG_ID
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1104
+ 368
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1296
+ 144
+
+
+
+ Success 2
+
+ SUCCESS
+
+ N
+ 1296
+ 256
+
+
+
+ Success 3
+
+ SUCCESS
+
+ N
+ 1296
+ 368
+
+
+
+ SQL ratings.appear_subppoena
+
+ SQL
+
+ ervu-dashboard
+ N
+ delete from ratings.appear_subppoena where recording_date = current_date
+ N
+ N
+ N
+ 832
+ 144
+
+
+
+ SQL ratings.conscription_info
+
+ SQL
+
+ ervu-dashboard
+ N
+ delete from ratings.conscription_info where recording_date = current_date
+ N
+ N
+ N
+ 832
+ 256
+
+
+
+ SQL ratings.consideration_complaint
+
+ SQL
+
+ ervu-dashboard
+ N
+ delete from ratings.consideration_complaint where recording_date = current_date
+ N
+ N
+ N
+ 832
+ 368
+
+
+
+
+
+ Start
+ rows_id-array_reg.hpl
+ Y
+ Y
+ Y
+
+
+ ratings.appear_subpoena.hpl
+ Success
+ Y
+ Y
+ N
+
+
+ ratings.consideration_complaint.hpl
+ Success 3
+ Y
+ Y
+ N
+
+
+ ratings.conscription_info.hpl
+ Success 2
+ Y
+ Y
+ N
+
+
+ rows_id-array_reg.hpl
+ SQL ratings.appear_subppoena
+ Y
+ Y
+ N
+
+
+ SQL ratings.appear_subppoena
+ ratings.appear_subpoena.hpl
+ Y
+ Y
+ N
+
+
+ rows_id-array_reg.hpl
+ SQL ratings.conscription_info
+ Y
+ Y
+ N
+
+
+ SQL ratings.conscription_info
+ ratings.conscription_info.hpl
+ Y
+ Y
+ N
+
+
+ rows_id-array_reg.hpl
+ SQL ratings.consideration_complaint
+ N
+ Y
+ N
+
+
+ SQL ratings.consideration_complaint
+ ratings.consideration_complaint.hpl
+ Y
+ Y
+ N
+
+
+ Start
+ SQL ratings.consideration_complaint
+ Y
+ Y
+ Y
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 26
+ 496
+ 48
+ запуск после отработки регионов /region/job_recruitments_region
+ 372
+
+
+
+
diff --git a/map_v1/ratings/ratings.appear_subpoena.hpl b/map_v1/ratings/ratings.appear_subpoena.hpl
new file mode 100644
index 0000000..1719485
--- /dev/null
+++ b/map_v1/ratings/ratings.appear_subpoena.hpl
@@ -0,0 +1,228 @@
+
+
+
+ ratings.appear_subpoena
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/12/24 16:15:10.943
+ -
+ 2024/12/24 16:15:10.943
+
+
+
+
+
+ Table input
+ Get variables
+ Y
+
+
+ Get variables
+ Select values
+ Y
+
+
+ Select values
+ Insert / update
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REG_ID
+ -1
+ none
+ String
+
+
+
+
+ 592
+ 256
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ id_region
+ REG_ID
+
+ ratings
+
appear_subppoena
+
+ appear_mil_com
+ appear_mil_com
+ Y
+
+
+ appear_mil_com_percent
+ appear_mil_com_percent
+ Y
+
+
+ id_region
+ region_id
+ N
+
+
+ N
+
+
+ 976
+ 256
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REG_ID
+ REG_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 768
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ WITH
+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,
+ ROW_NUMBER() OVER (PARTITION BY s.id ORDER BY sh.date_time DESC) AS rn
+ FROM public.subpoena s
+ JOIN subpoena_status ss ON s.status_id = ss.id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ JOIN subpoena_history AS sh ON sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ WHERE ('${VK_ARRAY}' IS NULL
+ OR '${VK_ARRAY}' = ''
+ OR s.department_id = ANY (
+ string_to_array(
+ trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
+ )::uuid[]
+ )
+ )
+ AND sr.type IS NOT NULL
+ AND ssh.code NOT IN ('3.7','3.72', '3.71')
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+last_status AS (
+ SELECT *
+ FROM subpoena_data
+ WHERE rn = 1
+),
+season_separations AS (
+ SELECT distinct
+ ls.recruitment_id,
+ ls.create_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_date
+ FROM last_status ls
+ WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE)
+)
+SELECT
+ '${REG_ID}' AS region_id,
+ COUNT(*) FILTER (WHERE tt.sub_stat_hist IN ('4.1', '4.2')) AS appear_mil_com,
+ ROUND(
+ COUNT(*) FILTER (WHERE tt.sub_stat_hist IN ('4.1', '4.2'))::NUMERIC / NULLIF(COUNT(*), 0) * 100, 2
+ ) AS appear_mil_com_percent
+FROM season_separations tt
+HAVING COUNT(*) FILTER (WHERE tt.sub_stat_hist IN ('4.1', '4.2')) > 0;
+
+ Y
+
+
+ 416
+ 256
+
+
+
+
+
+
diff --git a/map_v1/ratings/ratings.conscription_info.hpl b/map_v1/ratings/ratings.conscription_info.hpl
new file mode 100644
index 0000000..e967cbc
--- /dev/null
+++ b/map_v1/ratings/ratings.conscription_info.hpl
@@ -0,0 +1,242 @@
+
+
+
+ ratings.conscription_info
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/12/24 16:16:57.706
+ -
+ 2024/12/24 16:16:57.706
+
+
+
+
+
+ Get variables
+ Select values
+ Y
+
+
+ Select values
+ Insert / update
+ Y
+
+
+ Table input
+ Get variables
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REG_ID
+ -1
+ none
+ String
+
+
+
+
+ 816
+ 368
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ id_region
+ REG_ID
+
+
+ =
+ spring_autumn
+ spring_autumn
+
+ ratings
+
conscription_info
+
+ execution
+ appear_mil_com
+ Y
+
+
+ execution_percent
+ appear_mil_com_percent
+ Y
+
+
+ id_region
+ region_id
+ N
+
+
+ spring_autumn
+ spring_autumn
+ N
+
+
+ N
+
+
+ 1200
+ 368
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REG_ID
+ REG_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 992
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.subpoena
+ N
+ 0
+ WITH
+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--,
+ --ROW_NUMBER() OVER (PARTITION BY s.id ORDER BY sh.date_time DESC) AS rn
+ FROM public.subpoena s
+ JOIN subpoena_status ss ON s.status_id = ss.id
+ JOIN subpoena_reason AS sr ON sr.id = s.reason_id
+ JOIN subpoena_history AS sh ON sh.subpoena_id = s.id
+ JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
+ WHERE ('${VK_ARRAY}' IS NULL
+ OR '${VK_ARRAY}' = ''
+ OR s.department_id = ANY (
+ string_to_array(
+ trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
+ )::uuid[]
+ )
+ )
+ AND sr.type = '3'
+ AND ssh.code NOT IN ('3.7','3.72', '3.71')
+ AND EXISTS (
+ SELECT 1
+ FROM subpoena_history sh2
+ WHERE sh2.subpoena_id = s.id
+ AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3')
+ )
+),
+/*last_status AS (
+ SELECT *
+ FROM subpoena_data
+ WHERE rn = 1
+),*/
+season_separations AS (
+ SELECT distinct
+ ls.recruitment_id,
+ ls.create_date,
+ ls.sub_stat_hist,
+ ls.subpoena_id,
+ ls.history_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 subpoena_data ls
+ --WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE)
+)
+SELECT
+ '${REG_ID}' AS region_id,
+ tt.spring_autumn,
+ COUNT(distinct tt.subpoena_id) FILTER (WHERE tt.sub_stat_hist IN ('5')) AS appear_mil_com,
+ ROUND(
+ COUNT(distinct tt.subpoena_id) FILTER (WHERE tt.sub_stat_hist IN ('5'))::NUMERIC / NULLIF(COUNT(distinct tt.subpoena_id), 0) * 100, 2
+ ) AS appear_mil_com_percent
+FROM season_separations tt
+group by tt.spring_autumn
+ Y
+
+
+ 640
+ 368
+
+
+
+
+
+
diff --git a/map_v1/ratings/ratings.consideration_complaint.hpl b/map_v1/ratings/ratings.consideration_complaint.hpl
new file mode 100644
index 0000000..1ea3fb9
--- /dev/null
+++ b/map_v1/ratings/ratings.consideration_complaint.hpl
@@ -0,0 +1,219 @@
+
+
+
+ ratings.consideration_complaint
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/12/24 16:18:12.882
+ -
+ 2024/12/24 16:18:12.882
+
+
+
+
+
+ Table input
+ Get variables
+ N
+
+
+ Get variables
+ Select values
+ N
+
+
+ Select values
+ Insert / update
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Get variables
+ GetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ -1
+ REG_ID
+ -1
+ none
+ String
+
+
+
+
+ 624
+ 416
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ id_region
+ region_id
+
+
+
+ =
+ recording_date
+ recording_date
+
+
+ ratings
+
consideration_complaint
+
+ consideration_complaint
+ consideration_complaint
+ Y
+
+
+ consideration_complaint_percent
+ consideration_complaint_percent
+ Y
+
+
+ id_region
+ region_id
+ N
+
+
+ recording_date
+ recording_date
+ N
+
+
+ N
+
+
+ 976
+ 224
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ REG_ID
+ REG_ID
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 784
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ -- '1' - Удовлетворена, '2' - Частично удовлетворена, '3' - Отказано в удовлетворении
+--WITH total AS (
+-- SELECT *
+-- FROM public.appeal_document ad
+-- WHERE extra_info->>'result' IN ('1', '2', '3')
+-- AND (
+-- '${VK_ARRAY}' IS NULL
+-- OR '${VK_ARRAY}' = ''
+-- OR ad.vk_id = ANY (
+-- string_to_array(
+-- trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
+-- )::uuid[]
+-- )
+-- )
+--)
+--SELECT
+-- '${REG_ID}' AS region_id,
+-- COUNT(*) FILTER (WHERE tt.extra_info->>'result' IN ('1', '2')) AS consideration_complaint,
+-- ROUND(
+-- COUNT(*) FILTER (WHERE tt.extra_info->>'result' IN ('1', '2'))::NUMERIC / NULLIF(COUNT(*), 0) * 100, 2
+-- ) AS consideration_complaint_percent
+--FROM total tt;
+
+select
+count(*) as total_count,
+count(*) FILTER (where solution_type='Решено') AS consideration_complaint,
+COALESCE(ROUND((count(*) FILTER (where solution_type='Решено'))* 100 / NULLIF(count(*),0), 0),0) as consideration_complaint_percent,
+region_id,
+current_date as recording_date
+from appeals.appeals_list
+where region_id is not null
+group by region_id
+ N
+
+
+ 400
+ 224
+
+
+
+
+
+
diff --git a/map_v1/recording_date/job_last_recording_date.hwf b/map_v1/recording_date/job_last_recording_date.hwf
new file mode 100644
index 0000000..b4f60ab
--- /dev/null
+++ b/map_v1/recording_date/job_last_recording_date.hwf
@@ -0,0 +1,171 @@
+
+
+ job_last_recording_date
+ Y
+
+
+
+ -
+ 2024/08/21 15:46:54.029
+ -
+ 2024/08/21 15:46:54.029
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 208
+ 240
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 656
+ 240
+
+
+
+ last_recording_date
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${Internal.Entry.Current.Folder}/last_recording_date.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 496
+ 240
+
+
+
+ SQL.delete
+
+ SQL
+
+ ervu-dashboard
+ N
+ update public.last_recording_date
+set entry = '1',
+start_time = now()
+
+
+
+ N
+ N
+ N
+ 432
+ 64
+
+
+
+ SQL.delete 2
+
+ SQL
+
+ ervu-dashboard
+ N
+ delete from public.last_recording_date
+
+
+
+
+ N
+ N
+ N
+ 352
+ 240
+
+
+
+
+
+ Start
+ SQL.delete
+ N
+ Y
+ Y
+
+
+ SQL.delete
+ last_recording_date
+ N
+ N
+ Y
+
+
+ last_recording_date
+ Success
+ Y
+ Y
+ N
+
+
+ SQL.delete
+ Success
+ N
+ Y
+ N
+
+
+ Start
+ SQL.delete 2
+ Y
+ Y
+ Y
+
+
+ SQL.delete 2
+ last_recording_date
+ Y
+ Y
+ N
+
+
+
+
+
+
+ METASTORE.pentaho
+
+ Default Run Configuration
+ {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null}
+
+
+
+ {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"}
+
+ Pentaho local
+ {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]}
+
+
+
+
diff --git a/map_v1/recording_date/last_recording_date.hpl b/map_v1/recording_date/last_recording_date.hpl
new file mode 100644
index 0000000..be0aeb5
--- /dev/null
+++ b/map_v1/recording_date/last_recording_date.hpl
@@ -0,0 +1,100 @@
+
+
+ last_recording_date
+ Y
+
+
+
+ Normal
+ /
+
+
+ N
+ 1000
+ 100
+ -
+ 2024/10/07 16:03:14.552
+ -
+ 2024/10/07 16:03:14.552
+ H4sIAAAAAAAAAAMAAAAAAAAAAAA=
+ N
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ 100
+ N
+
+ public
+
+
+ waiting_registration_percent
+ waiting_registration_percent
+
+
+ N
+ Y
+
+
+ 992
+ 288
+
+
+
+
+
+
diff --git a/mappings/connections/external_to_test1.json b/mappings/connections/external_to_test1.json
new file mode 100644
index 0000000..45d636b
--- /dev/null
+++ b/mappings/connections/external_to_test1.json
@@ -0,0 +1,103 @@
+{
+ "variables" : [ {
+ "name" : "DB_PERSON_HOST",
+ "value" : "172.30.66.35",
+ "description" : ""
+ }, {
+ "name" : "DB_PERSON_PORT",
+ "value" : "5432",
+ "description" : ""
+ }, {
+ "name" : "DB_PERSON_NAME",
+ "value" : "ervu_person_registry",
+ "description" : ""
+ }, {
+ "name" : "DB_PERSON_USERNAME",
+ "value" : "readonly",
+ "description" : ""
+ }, {
+ "name" : "DB_PERSON_PASSWORD",
+ "value" : "readonly",
+ "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-test1",
+ "description" : ""
+ }, {
+ "name" : "DB_DASHBOARD_USERNAME",
+ "value" : "ervu-dashboard",
+ "description" : ""
+ }, {
+ "name" : "DB_DASHBOARD_PASSWORD",
+ "value" : "ervu-dashboard",
+ "description" : ""
+ }, {
+ "name" : "DB_APPEAL_HOST",
+ "value" : "172.30.66.35",
+ "description" : ""
+ }, {
+ "name" : "DB_APPEAL_PORT",
+ "value" : "5432",
+ "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" : "172.30.66.35",
+ "description" : ""
+ }, {
+ "name" : "DB_DECISION_PORT",
+ "value" : "5432",
+ "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.10.31.119",
+ "description" : ""
+ }, {
+ "name" : "DB_SUBPOENA_PORT",
+ "value" : "5432",
+ "description" : ""
+ }, {
+ "name" : "DB_SUBPOENA_NAME",
+ "value" : "ervu_subpoena_registry",
+ "description" : ""
+ }, {
+ "name" : "DB_SUBPOENA_USERNAME",
+ "value" : "ervu-dashboard",
+ "description" : ""
+ }, {
+ "name" : "DB_SUBPOENA_PASSWORD",
+ "value" : "ervu-dashboard",
+ "description" : ""
+ } ]
+}
\ No newline at end of file
diff --git a/mappings/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl b/mappings/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl
index 33ffcf7..1daa60f 100644
--- a/mappings/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl
+++ b/mappings/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl
@@ -133,7 +133,10 @@
'job_citizen_spouse',
'job_prosecution',
'job_punishment',
- 'job_snils_inn'
+ 'job_snils_inn',
+ 'job_citizen_liability_fz53',
+ 'job_citizen_criminal_liability_fz53',
+ 'job_citizen_appealing_violations_fz53'
)) AS has_error,
count(*) FILTER (
WHERE status = 'SUCCESS' AND job_name IN (
@@ -143,9 +146,12 @@
'job_citizen_spouse',
'job_prosecution',
'job_punishment',
- 'job_snils_inn'
+ 'job_snils_inn',
+ 'job_citizen_liability_fz53',
+ 'job_citizen_criminal_liability_fz53',
+ 'job_citizen_appealing_violations_fz53'
)
- ) = 7 AS all_success
+ ) = 10 AS all_success
FROM public.etl_checkpoints
)
SELECT
diff --git a/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl b/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl
index f686db8..56f3479 100644
--- a/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl
+++ b/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl
@@ -80,50 +80,6 @@
288
-
- Table input
- TableInput
-
- Y
-
- 1
-
- none
-
-
- ervu-dashboard
- N
- 0
- WITH status_check AS (
- SELECT
- bool_or(status = 'ERROR' AND job_name IN (
- 'job_citizen',
- 'job_recruits_info'
- )) AS has_error,
- count(*) FILTER (
- WHERE status = 'SUCCESS' AND job_name IN (
- 'job_citizen',
- 'job_recruits_info'
- )
- ) = 2 AS all_success
- FROM public.etl_checkpoints
-)
-SELECT
- 'job_parallel_recruits_info_citizen' as job_name,
- CASE
- WHEN has_error THEN 'ERROR'
- WHEN all_success THEN 'SUCCESS'
- ELSE 'ERROR'
- END AS status,
- current_timestamp AS record_created
-FROM status_check;
- N
-
-
- 720
- 288
-
- Set variablesSetVariable
@@ -154,6 +110,50 @@ FROM status_check;288
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_job',
+ 'recruits_info_job'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_job',
+ 'recruits_info_job'
+ )
+ ) = 2 AS all_success
+ FROM etl.job_execution
+)
+SELECT
+ 'job_parallel_recruits_info_citizen' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 720
+ 288
+
+ Write to logWriteToLog
diff --git a/mappings/info_recruits/citizen_tables/child/branching_child_delta.hpl b/mappings/info_recruits/citizen_tables/child/branching_child_delta.hpl
new file mode 100644
index 0000000..382688b
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/branching_child_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_child_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_child_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_child_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_child_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl
new file mode 100644
index 0000000..782c038
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl
new file mode 100644
index 0000000..7a7dc06
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl
new file mode 100644
index 0000000..a420549
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl
new file mode 100644
index 0000000..0c50fd3
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl
new file mode 100644
index 0000000..16a7007
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl
new file mode 100644
index 0000000..96e5db8
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl
new file mode 100644
index 0000000..c39e38f
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl
new file mode 100644
index 0000000..381c4fc
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl
new file mode 100644
index 0000000..460b876
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_child_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl
new file mode 100644
index 0000000..8035bc7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl
@@ -0,0 +1,103 @@
+
+
+
+ change_status_delta_child_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_child_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl
index 8be76b7..64b8f84 100644
--- a/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl
@@ -88,6 +88,46 @@
'PROCESSING' AS status,
'delta_child' AS job_name,
current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'child_delta_flow5' AS job_name,
+ current_timestamp AS record_created
--FROM public.etl_checkpointsN
diff --git a/mappings/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl b/mappings/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl
new file mode 100644
index 0000000..9097bd1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_child_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_child_flow1',
+ 'delta_child_flow2',
+ 'delta_child_flow3',
+ 'delta_child_flow4',
+ 'delta_child_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_child_flow1',
+ 'delta_child_flow2',
+ 'delta_child_flow3',
+ 'delta_child_flow4',
+ 'delta_child_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_child_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/job_child.hwf b/mappings/info_recruits/citizen_tables/child/job_child.hwf
index d7842b2..9dd20b8 100644
--- a/mappings/info_recruits/citizen_tables/child/job_child.hwf
+++ b/mappings/info_recruits/citizen_tables/child/job_child.hwf
@@ -304,8 +304,8 @@
variableSTATUSN
- 1840
- 1792
+ 1696
+ 1712
@@ -514,7 +514,7 @@
- delta_child.hpl
+ delta_child_flow1.hplPIPELINE
@@ -523,44 +523,28 @@
NNN
- N
- ${PROJECT_HOME}/info_recruits/citizen_tables/child/delta_child.hpl
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hplBasicM_R_UP_DATE${M_R_UP_DATE}
+
+ ID_F1
+ IDM_FLOW1
+ Y
- N
+ YlocalNNYN
- 2640
- 1792
-
-
-
- Success delta_citizen
-
- SUCCESS
-
- N
- 3216
- 1792
-
-
-
- error delta_citizen
-
- SUCCESS
-
- N
- 3216
- 1872
+ 2672
+ 1776
@@ -629,8 +613,8 @@
NYN
- 1136
- 400
+ 2368
+ 576
@@ -920,7 +904,7 @@
- Success new citizen 2
+ Success child after errorSUCCESS
@@ -1237,8 +1221,8 @@
NYN
- 2112
- 1280
+ 2416
+ 1472
@@ -1263,12 +1247,12 @@
NYN
- 2096
- 1792
+ 2320
+ 2304
- change_status_delta_child_success.hpl
+ change_status_delta_child_flow1_success.hplPIPELINE
@@ -1278,7 +1262,7 @@
NNN
- ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_success.hpl
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hplBasicY
@@ -1290,11 +1274,11 @@
YN2992
- 1792
+ 1776
- change_status_delta_child_error.hpl
+ change_status_delta_child_flow1_error.hplPIPELINE
@@ -1304,7 +1288,7 @@
NNN
- ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_error.hpl
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hplBasicY
@@ -1316,7 +1300,478 @@
YN2992
- 1872
+ 1856
+
+
+
+ recruitment_rows_five_flow_child.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2416
+ 2096
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2256
+ 2208
+
+
+
+ Simple delta_child WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2048
+ 2096
+
+
+
+ delta_child success
+
+ SUCCESS
+
+ N
+ 2144
+ 1904
+
+
+
+ branching_child_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/branching_child_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1792
+ 2096
+
+
+
+ checkpoint_job_child_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 2096
+
+
+
+ child_delta success
+
+ SUCCESS
+
+ N
+ 3712
+ 2096
+
+
+
+ delta_child_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1936
+
+
+
+ change_status_delta_child_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1936
+
+
+
+ change_status_delta_child_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2016
+
+
+
+ delta_child_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 2096
+
+
+
+ change_status_delta_child_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2096
+
+
+
+ change_status_delta_child_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2176
+
+
+
+ delta_child_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 2256
+
+
+
+ change_status_delta_child_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2256
+
+
+
+ change_status_delta_child_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2336
+
+
+
+ delta_child_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 2416
+
+
+
+ change_status_delta_child_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2416
+
+
+
+ change_status_delta_child_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2496
@@ -1433,20 +1888,6 @@
YN
-
- Simple job_child_exists check NEW
- change_status_to_processing.hpl
- Y
- Y
- N
-
-
- change_status_to_processing.hpl
- recruitment_rows_five_flow_child.hpl
- Y
- Y
- N
- child_flow1.hplchange_status_child_flow1_success.hpl
@@ -1666,7 +2107,7 @@
checkpoint_job_child.hpl 2
- Success new citizen 2
+ Success child after errorYYN
@@ -1756,61 +2197,257 @@
N
- Simple child WHERE ERROR
- change_status_to_processing.hpl 2
+ delta_child_flow1.hpl
+ change_status_delta_child_flow1_success.hplYYN
- change_status_to_processing.hpl 2
+ delta_child_flow1.hpl
+ change_status_delta_child_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ Simple job_child_exists check NEW
+ recruitment_rows_five_flow_child.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple child WHERE ERRORrecruitment_rows_five_flow_if_error.hplYYN
- Simple child WHERE SUCCESS
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2change_status_to_processing_delta.hplYYN
- delta_child.hpl
- change_status_delta_child_success.hpl
+ recruitment_rows_five_flow_child.hpl 2
+ Abort workflow 2 2YYN
- change_status_delta_child_success.hpl
- Success delta_citizen
- Y
- Y
- N
-
-
- delta_child.hpl
- change_status_delta_child_error.hpl
+ Simple delta_child WHERE ERROR
+ delta_child successYNN
- change_status_delta_child_error.hpl
- error delta_citizen
+ Simple delta_child WHERE ERROR
+ recruitment_rows_five_flow_child.hpl 2
+ Y
+ Y
+ Y
+
+
+ Simple child WHERE SUCCESS
+ branching_child_delta.hplYYN
- change_status_to_processing_delta.hpl
- delta_child.hpl
+ branching_child_delta.hpl
+ Simple delta_child WHERE ERROR
+ Y
+ Y
+ Y
+
+
+ checkpoint_job_child_delta.hpl
+ child_delta successYYN
+
+ change_status_delta_child_flow1_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow1_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ delta_child_flow2.hpl
+ change_status_delta_child_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow2.hpl
+ change_status_delta_child_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_child_flow3.hpl
+ change_status_delta_child_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow3.hpl
+ change_status_delta_child_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_child_flow4.hpl
+ change_status_delta_child_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow4.hpl
+ change_status_delta_child_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_child_flow5.hpl
+ change_status_delta_child_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_child_flow5.hpl
+ change_status_delta_child_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_child.hpl 2
+ delta_child_flow5.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_child_flow2_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow3_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow2_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow3_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow4_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow4_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow5_success.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
+
+ change_status_delta_child_flow5_error.hpl
+ checkpoint_job_child_delta.hpl
+ Y
+ N
+ Y
+
diff --git a/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl
new file mode 100644
index 0000000..8008a21
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl
new file mode 100644
index 0000000..c108637
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl
new file mode 100644
index 0000000..7908b8e
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl
new file mode 100644
index 0000000..32b4002
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl
new file mode 100644
index 0000000..1a55d69
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl
@@ -0,0 +1,143 @@
+
+
+
+ delta_child_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+ ervu_dashboard
+
citizen_child
+
+ recruit_id
+ recruit_id
+ N
+
+
+ birth_az_number
+ birth_az_number
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ death_az_number
+ death_az_number
+ Y
+
+
+ death_date
+ death_date
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ kinship_type
+ kinship_type
+ Y
+
+
+ N
+
+
+ 1168
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ with child as
+(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
+ ri.recruit_id
+from ervu_dashboard.recruits_info ri
+join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
+)
+select
+ r.recruit_id::uuid recruit_id,
+ ch->>'naimRodstvSvyazReb' kinship_type,
+ concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
+ ch->'svedFLBS'->'fio'->>'imya',
+ ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
+ make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
+ NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
+ make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
+ NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
+ ch->'svedSmert'->>'nomerZapis' death_az_number,
+ ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
+from ervu_dashboard.citizen r
+join child on r.recruit_id = child.recruit_id
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl
index e5f247b..0a663c3 100644
--- a/mappings/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl
+++ b/mappings/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl
@@ -57,7 +57,17 @@
ervu-dashboardN0
- WITH ordered AS (
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('child_flow1', 'child_flow2', 'child_flow3', 'child_flow4', 'child_flow5')
+),
+ordered AS (
SELECT
idm_id,
created_at,
@@ -68,132 +78,46 @@
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
- FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
FROM ordered
),
-flow_ranges AS (
- SELECT
- flow_num,
- MIN(created_at) AS min_date,
- MAX(created_at) AS max_date
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN idm_id::text END) AS idm_flow5
FROM splitted
- GROUP BY flow_num
-),
-recr_inf AS (
- SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
- FROM ervu_dashboard.citizen cit
- join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
-
-),
-flow_data AS (
- SELECT
- fr.flow_num,
- ri.idm_id,
- (SELECT r.created_at FROM ervu_dashboard.recruitment r
- WHERE r.idm_id = ri.idm_id
- AND r.created_at BETWEEN fr.min_date AND fr.max_date
- LIMIT 1) AS created_at
- FROM recr_inf ri
- CROSS JOIN flow_ranges fr
- WHERE EXISTS (
- SELECT 1 FROM ervu_dashboard.recruitment r
- WHERE r.idm_id = ri.idm_id
- )
-),
-result_ma as (
- SELECT
- MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
- (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
-
- MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
- (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
-
- MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
- (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
-
- MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
- (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
-
- MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
- (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
- FROM flow_data
-),
-result_max as ( --костыль
- SELECT
- CASE
- WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow1
- END AS cr_flow1,
- idm_flow1,
- CASE
- WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow2
- END AS cr_flow2,
- idm_flow2,
- CASE
- WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow3
- END AS cr_flow3,
- idm_flow3,
- CASE
- WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow4
- END AS cr_flow4,
- idm_flow4,
- CASE
- WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow5
- END AS cr_flow5,
- idm_flow5
- FROM result_ma
+ GROUP BY position
),
remains as (
- select
- CASE
- WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at
- ELSE null
- END as cr_flow1,
- CASE
- WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id
- ELSE null
- END as idm_flow1,
-
- CASE
- WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at
- ELSE null
- END as cr_flow2,
- CASE
- WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id
- ELSE null
- END as idm_flow2,
-
- CASE
- WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at
- ELSE null
- END as cr_flow3,
- CASE
- WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id
- ELSE null
- END as idm_flow3,
-
- CASE
- WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at
- ELSE null
- END as cr_flow4,
- CASE
- WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id
- ELSE null
- END as idm_flow4,
-
- CASE
- WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at
- ELSE null
- END as cr_flow5,
- CASE
- WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id
- ELSE null
- END as idm_flow5
- from splitted
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
),
idm1 as (
select
diff --git a/mappings/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl
new file mode 100644
index 0000000..6343877
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl
@@ -0,0 +1,86 @@
+
+
+
+ check_if_need_to_repeat_job
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 12:27:51.630
+ -
+ 2025/08/08 12:27:51.630
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ need_to_repeat_job
+ NEED_TO_REPEAT_JOB
+ ROOT_WORKFLOW
+
+
+ Y
+
+
+ 624
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (SELECT 1
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN etl.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'citizen_job'
+where je.status is null or je.status in ('ERROR', 'PROCESSING')
+limit 1
+) as need_to_repeat_job;
+ N
+
+
+ 336
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl b/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl
new file mode 100644
index 0000000..de7e0d2
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl
@@ -0,0 +1,113 @@
+
+
+
+ check_if_citizen_job_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 13:28:46.661
+ -
+ 2025/08/05 13:28:46.661
+
+
+
+
+
+ Set variables
+ Write to log
+ N
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_executed_flag
+ JOB_EXECUTED_FLAG
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 672
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (
+ SELECT 1
+ FROM etl.job_execution
+ WHERE job_name = 'citizen_job'
+ limit 1
+ ) AS job_executed_flag;
+ N
+
+
+ 384
+ 336
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 944
+ 224
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf
new file mode 100644
index 0000000..9048856
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf
@@ -0,0 +1,358 @@
+
+
+ citizen_job
+ Y
+
+
+
+ 0
+ -
+ 2025/08/05 12:45:28.561
+ -
+ 2025/08/05 12:45:28.561
+
+
+ COMMENT
+
+
+
+
+ LIMIT_FW
+ ;
+
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+ 0001-01-01 00:00:00
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 224
+ 304
+
+
+
+ check_if_citizen_job_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 416
+ 304
+
+
+
+ citizen_job_exists_check
+
+ SIMPLE_EVAL
+
+ boolean
+ false
+ equal
+ equal
+ N
+ variable
+ JOB_EXECUTED_FLAG
+ N
+ 688
+ 304
+
+
+
+ recruitments_five_flow.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 928
+ 304
+
+
+
+ recruitment_five_flow_on_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 928
+ 608
+
+
+
+ check_if_need_to_repeat_job.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 464
+
+
+
+ Simple evaluation
+
+ SIMPLE_EVAL
+
+ boolean
+ true
+ equal
+ equal
+ N
+ variable
+ NEED_TO_REPEAT_JOB
+ N
+ 688
+ 608
+
+
+
+ recruitment_five_flow_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/recruitment_five_flow_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 800
+
+
+
+
+
+ Start
+ check_if_citizen_job_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_citizen_job_exists.hpl
+ citizen_job_exists_check
+ Y
+ Y
+ N
+
+
+ citizen_job_exists_check
+ recruitments_five_flow.hpl
+ Y
+ Y
+ N
+
+
+ citizen_job_exists_check
+ check_if_need_to_repeat_job.hpl
+ Y
+ N
+ N
+
+
+ check_if_need_to_repeat_job.hpl
+ Simple evaluation
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_on_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_delta.hpl
+ Y
+ N
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 256
+ Первичка
+ 65
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 560
+ Повторка
+ 64
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 608
+ 720
+ Дельта
+ 49
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 150
+ 1200
+ 80
+ citizen_job
+
+M_R_UP_DATE
+
+M_R_CR_DATE
+
+0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+ 114
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl b/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl
index e5be261..8937b67 100644
--- a/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl
+++ b/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl
@@ -13,305 +13,14 @@
1000100-
- 2025/06/03 16:10:48.509
+ 2025/08/05 12:54:02.780-
- 2025/06/03 16:10:48.509
+ 2025/08/05 12:54:02.780
-
- Table input
- Insert / update
- Y
-
-
- Insert / update
- InsertUpdate
-
- Y
-
- 1
-
- none
-
-
- 100
- ervu-dashboard
-
-
- =
- recruit_id
- recruit_id
-
-
- ervu_dashboard
-
citizen
-
- recruit_id
- recruit_id
- N
-
-
- system_pgs_status
- system_pgs_status
- Y
-
-
- full_name
- full_name
- Y
-
-
- last_name
- last_name
- Y
-
-
- first_name
- first_name
- Y
-
-
- middle_name
- middle_name
- Y
-
-
- gender
- gender
- Y
-
-
- birth_date
- birth_date
- Y
-
-
- age
- age
- Y
-
-
- birth_place
- birth_place
- Y
-
-
- phone
- phone
- Y
-
-
- email
- email
- Y
-
-
- date_registration
- date_registration
- Y
-
-
- date_deregistration
- date_deregistration
- Y
-
-
- recruit_create_date
- recruit_create_date
- Y
-
-
- update_date
- update_date
- Y
-
-
- vu_current_info
- vu_current_info
- Y
-
-
- recruitment_id
- recruitment_id
- Y
-
-
- target_recruitment_id
- target_recruitment_id
- Y
-
-
- deferment_liberation
- deferment_liberation
- Y
-
-
- reason_registration
- reason_registration
- Y
-
-
- residence
- residence
- Y
-
-
- start_date_residence
- start_date_residence
- Y
-
-
- end_date_residence
- end_date_residence
- Y
-
-
- address_place_stay
- address_place_stay
- Y
-
-
- start_date_place_stay
- start_date_place_stay
- Y
-
-
- end_date_place_stay
- end_date_place_stay
- Y
-
-
- type_place_stay
- type_place_stay
- Y
-
-
- id_ern
- id_ern
- Y
-
-
- N
-
-
- 1104
- 352
-
-
-
- Table input
- TableInput
-
- Y
-
- 1
-
- none
-
-
- ervu_person_registry
- N
- 0
- with
-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
-WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date
- AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
-GROUP BY
- r.id
-)
-SELECT
- r.system_pgs_status,
- r.full_name,
- r.last_name,
- r.first_name,
- r.middle_name,
- r.gender,
- --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils,
- --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn,
- r.birth_date,
- EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
- r.birth_place,
- r.phone,
- r.email,
- r.id AS recruit_id, --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,
- --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
- r.system_create_date AS recruit_create_date,
- r.system_update_date AS update_date,
- CASE
- WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
- ELSE 'NOTCONVICT'
- END AS convicts,
- r.current_recruitment_id AS recruitment_id,
- r.target_recruitment_id,
- CASE
- WHEN ddd.hidden IS false then ddd.hidden
- ELSE true
- END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
- mrr.value AS reason_registration
- 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, -- тип регистрации
- -- address_actual -- Адрес фактического проживания ***1
- -- source_info_actual -- Источник сведений о месте фактического проживания ***1
- -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
- -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
- system_id_ern AS id_ern -- id единого регистра населения
-FROM public.recruits AS r
-JOIN public.recruits_info AS ri ON ri.recruit_id = r.id --AND '${ID_F1}' != '' -- Проверка на пустую строку
- --AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}'
- AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date
- AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
-LEFT JOIN (
- SELECT
- ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn,
- recruit_id,
- hidden
- FROM public.decision_deferment_dto
- ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 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
---WHERE r.system_update_date >= '${UP_D}'
-join adresses adr ON r.recruit_id=adr.recruit_id
-
--- ***1 - страница личные сведения есть поле, нет данных
- Y
-
-
- 624
- 352
-
-
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl
new file mode 100644
index 0000000..80cdd00
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl
@@ -0,0 +1,421 @@
+
+
+
+ citizen_flow
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 14:31:22.799
+ -
+ 2025/08/05 14:31:22.799
+
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table output
+ Block until transforms finish
+ N
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+ Block until transforms finish
+ Change job status on success
+ N
+
+
+ Table output
+ Change job status on success
+ N
+
+
+
+ Block until transforms finish
+ BlockUntilTransformsFinish
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+ 944
+ 160
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 944
+ 448
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 1200
+ 320
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id)
+VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
+
+
+
+
+ 288
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ /*
+with
+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
+WHERE '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
+GROUP BY
+ r.id
+)
+*/
+SELECT
+ r.system_pgs_status,
+ r.full_name,
+ r.last_name,
+ r.first_name,
+ r.middle_name,
+ r.gender,
+ --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils,
+ --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn,
+ r.birth_date,
+ EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
+ r.birth_place,
+ r.phone,
+ r.email,
+ r.id AS recruit_id, --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,
+ --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
+ r.system_create_date AS recruit_create_date,
+ r.system_update_date AS update_date,
+/*
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+*/
+ r.current_recruitment_id AS recruitment_id,
+ r.target_recruitment_id,
+ CASE
+ WHEN ddd.hidden IS false then ddd.hidden
+ ELSE true
+ END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
+ --mrr.value AS reason_registration,
+ --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, -- тип регистрации
+ -- address_actual -- Адрес фактического проживания ***1
+ -- source_info_actual -- Источник сведений о месте фактического проживания ***1
+ -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
+ -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
+ system_id_ern AS id_ern -- id единого регистра населения
+FROM public.recruits AS r
+JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${IDM_ID}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
+LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn,
+ recruit_id,
+ hidden
+ FROM public.decision_deferment_dto
+ ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 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
+--WHERE r.system_update_date >= '${UP_D}'
+--join adresses adr ON r.recruit_id=adr.recruit_id
+
+-- ***1 - страница личные сведения есть поле, нет данных
+
+${LIMIT_FW}
+ Y
+
+
+ 496
+ 320
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ system_pgs_status
+ system_pgs_status
+
+
+ full_name
+ full_name
+
+
+ last_name
+ last_name
+
+
+ first_name
+ first_name
+
+
+ middle_name
+ middle_name
+
+
+ gender
+ gender
+
+
+ birth_date
+ birth_date
+
+
+ age
+ age
+
+
+ birth_place
+ birth_place
+
+
+ phone
+ phone
+
+
+ email
+ email
+
+
+ vu_current_info
+ vu_current_info
+
+
+ date_registration
+ date_registration
+
+
+ date_deregistration
+ date_deregistration
+
+
+ recruit_create_date
+ recruit_create_date
+
+
+ update_date
+ update_date
+
+
+ recruitment_id
+ recruitment_id
+
+
+ target_recruitment_id
+ target_recruitment_id
+
+
+ deferment_liberation
+ deferment_liberation
+
+
+ id_ern
+ id_ern
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
citizen
+ N
+ Y
+ N
+ Y
+
+
+ 720
+ 320
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl
new file mode 100644
index 0000000..c504f9f
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl
@@ -0,0 +1,413 @@
+
+
+
+ citizen_flow_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/11 13:22:56.048
+ -
+ 2025/08/11 13:22:56.048
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Insert / update
+ Change job status on success
+ Y
+
+
+ Insert / update
+ Change job status on error
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_ERROR',
+ error_description = ?,
+ error_code = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 1040
+ 416
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 1040
+ 224
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET
+ status = 'DELTA_PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL
+where job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+ 336
+ 224
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
citizen
+
+ recruit_id
+ recruit_id
+ N
+
+
+ system_pgs_status
+ system_pgs_status
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ last_name
+ last_name
+ Y
+
+
+ first_name
+ first_name
+ Y
+
+
+ middle_name
+ middle_name
+ Y
+
+
+ gender
+ gender
+ Y
+
+
+ birth_date
+ birth_date
+ Y
+
+
+ age
+ age
+ Y
+
+
+ birth_place
+ birth_place
+ Y
+
+
+ phone
+ phone
+ Y
+
+
+ email
+ email
+ Y
+
+
+ vu_current_info
+ vu_current_info
+ Y
+
+
+ date_registration
+ date_registration
+ Y
+
+
+ date_deregistration
+ date_deregistration
+ Y
+
+
+ recruit_create_date
+ recruit_create_date
+ Y
+
+
+ update_date
+ update_date
+ Y
+
+
+ recruitment_id
+ recruitment_id
+ Y
+
+
+ target_recruitment_id
+ target_recruitment_id
+ Y
+
+
+ deferment_liberation
+ deferment_liberation
+ Y
+
+
+ id_ern
+ id_ern
+ Y
+
+
+ N
+
+
+ 784
+ 224
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ /*
+with
+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
+WHERE '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
+GROUP BY
+ r.id
+)
+*/
+SELECT
+ r.system_pgs_status,
+ r.full_name,
+ r.last_name,
+ r.first_name,
+ r.middle_name,
+ r.gender,
+ --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils,
+ --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn,
+ r.birth_date,
+ EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
+ r.birth_place,
+ r.phone,
+ r.email,
+ r.id AS recruit_id, --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,
+ --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
+ r.system_create_date AS recruit_create_date,
+ r.system_update_date AS update_date,
+/*
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+*/
+ r.current_recruitment_id AS recruitment_id,
+ r.target_recruitment_id,
+ CASE
+ WHEN ddd.hidden IS false then ddd.hidden
+ ELSE true
+ END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
+ --mrr.value AS reason_registration,
+ --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, -- тип регистрации
+ -- address_actual -- Адрес фактического проживания ***1
+ -- source_info_actual -- Источник сведений о месте фактического проживания ***1
+ -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
+ -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
+ system_id_ern AS id_ern -- id единого регистра населения
+FROM public.recruits AS r
+JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${IDM_ID}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
+LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn,
+ recruit_id,
+ hidden
+ FROM public.decision_deferment_dto
+ ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 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
+--WHERE r.system_update_date >= '${UP_D}'
+--join adresses adr ON r.recruit_id=adr.recruit_id
+
+-- ***1 - страница личные сведения есть поле, нет данных
+
+${LIMIT_FW}
+ Y
+
+
+ 544
+ 224
+
+
+
+
+ Insert / update
+ Change job status on error
+ Y
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl
new file mode 100644
index 0000000..fb6a4fa
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl
@@ -0,0 +1,414 @@
+
+
+
+ citizen_flow_repeat
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 13:25:52.319
+ -
+ 2025/08/08 13:25:52.319
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 976
+ 400
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 976
+ 208
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (
+ id,
+ job_name,
+ status,
+ execution_datetime,
+ error_description,
+ error_code,
+ recruitment_id
+)
+VALUES (
+ DEFAULT,
+ '${JOB_NAME}',
+ 'PROCESSING',
+ DEFAULT,
+ NULL,
+ NULL,
+ '${IDM_ID}'
+)
+ON CONFLICT (job_name, recruitment_id)
+DO UPDATE SET
+ status = 'PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL;
+
+
+ 272
+ 208
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ /*
+with
+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
+WHERE '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
+GROUP BY
+ r.id
+)
+*/
+SELECT
+ r.system_pgs_status,
+ r.full_name,
+ r.last_name,
+ r.first_name,
+ r.middle_name,
+ r.gender,
+ --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils,
+ --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn,
+ r.birth_date,
+ EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
+ r.birth_place,
+ r.phone,
+ r.email,
+ r.id AS recruit_id, --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,
+ --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
+ r.system_create_date AS recruit_create_date,
+ r.system_update_date AS update_date,
+/*
+ CASE
+ WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
+ ELSE 'NOTCONVICT'
+ END AS convicts,
+*/
+ r.current_recruitment_id AS recruitment_id,
+ r.target_recruitment_id,
+ CASE
+ WHEN ddd.hidden IS false then ddd.hidden
+ ELSE true
+ END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
+ -- mrr.value AS reason_registration,
+ --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, -- тип регистрации
+ -- address_actual -- Адрес фактического проживания ***1
+ -- source_info_actual -- Источник сведений о месте фактического проживания ***1
+ -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
+ -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
+ system_id_ern AS id_ern -- id единого регистра населения
+FROM public.recruits AS r
+JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${IDM_ID}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
+LEFT JOIN (
+ SELECT
+ ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn,
+ recruit_id,
+ hidden
+ FROM public.decision_deferment_dto
+ ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 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
+--WHERE r.system_update_date >= '${UP_D}'
+--join adresses adr ON r.recruit_id=adr.recruit_id
+
+-- ***1 - страница личные сведения есть поле, нет данных
+
+${LIMIT_FW}
+ Y
+
+
+ 480
+ 208
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ system_pgs_status
+ system_pgs_status
+
+
+ full_name
+ full_name
+
+
+ last_name
+ last_name
+
+
+ first_name
+ first_name
+
+
+ middle_name
+ middle_name
+
+
+ gender
+ gender
+
+
+ birth_date
+ birth_date
+
+
+ age
+ age
+
+
+ birth_place
+ birth_place
+
+
+ phone
+ phone
+
+
+ email
+ email
+
+
+ vu_current_info
+ vu_current_info
+
+
+ date_registration
+ date_registration
+
+
+ date_deregistration
+ date_deregistration
+
+
+ recruit_create_date
+ recruit_create_date
+
+
+ update_date
+ update_date
+
+
+ recruitment_id
+ recruitment_id
+
+
+ target_recruitment_id
+ target_recruitment_id
+
+
+ deferment_liberation
+ deferment_liberation
+
+
+ id_ern
+ id_ern
+
+
+ N
+ N
+ N
+ N
+
+ Y
+
+ N
+ ervu_dashboard
+ Y
+
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_appealing_violations_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
new file mode 100644
index 0000000..7cca14e
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_appealing_violations_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
new file mode 100644
index 0000000..20d3515
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
new file mode 100644
index 0000000..4c86e09
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
new file mode 100644
index 0000000..eff6309
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
new file mode 100644
index 0000000..dde1f6c
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
new file mode 100644
index 0000000..b8ea516
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
new file mode 100644
index 0000000..d615e08
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
new file mode 100644
index 0000000..25d529e
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
new file mode 100644
index 0000000..64c33fa
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_appealing_violations_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
new file mode 100644
index 0000000..57bec30
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
new file mode 100644
index 0000000..5a31b60
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
new file mode 100644
index 0000000..2bb7cb2
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
new file mode 100644
index 0000000..02f1d71
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
new file mode 100644
index 0000000..bad8452
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
new file mode 100644
index 0000000..c52e330
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
new file mode 100644
index 0000000..e5b0f66
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
new file mode 100644
index 0000000..ed8c6b6
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
new file mode 100644
index 0000000..b368dc1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
new file mode 100644
index 0000000..5f711e1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..6e63a1c
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_appealing_violations_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_appealing_violations_fz53_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..6ace1f9
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_snils_inn' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl
new file mode 100644
index 0000000..fc0f6b5
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_appealing_violations_fz53_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_appealing_violations_fz53') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_appealing_violations_fz53'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_appealing_violations_fz53'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl
new file mode 100644
index 0000000..c4c46a7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_citizen_appealing_violations_fz53_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
new file mode 100644
index 0000000..5483bad
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_appealing_violations_fz53_flow1',
+ 'citizen_appealing_violations_fz53_flow2',
+ 'citizen_appealing_violations_fz53_flow3',
+ 'citizen_appealing_violations_fz53_flow4',
+ 'citizen_appealing_violations_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_appealing_violations_fz53_flow1',
+ 'citizen_appealing_violations_fz53_flow2',
+ 'citizen_appealing_violations_fz53_flow3',
+ 'citizen_appealing_violations_fz53_flow4',
+ 'citizen_appealing_violations_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_appealing_violations_fz53' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
new file mode 100644
index 0000000..6c9fc6a
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_snils_inn_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf
new file mode 100644
index 0000000..7151cc4
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf
@@ -0,0 +1,2478 @@
+
+
+ job_citizen_appealing_violations_fz53
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 272
+ 400
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2832
+ 400
+
+
+
+ citizen_appealing_violations_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 80
+
+
+
+ citizen_appealing_violations_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 240
+
+
+
+ citizen_appealing_violations_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 400
+
+
+
+ citizen_appealing_violations_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 560
+
+
+
+ citizen_appealing_violations_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2816
+ 208
+
+
+
+ Success new citizen_appealing_violations_fz53
+
+ SUCCESS
+
+ N
+ 4720
+ 432
+
+
+
+ branching_citizen_appealing_violations_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple citizen_appealing_violations_fz53 WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1696
+ 1680
+
+
+
+ Simple citizen_appealing_violations_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2048
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2864
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2768
+ 1040
+
+
+
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1792
+
+
+
+ check_if_job_citizen_appealing_violations_fz53_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 528
+ 400
+
+
+
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 992
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2848
+ 560
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 80
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 160
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 240
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 320
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 400
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 480
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 560
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 640
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 720
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 800
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4320
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2848
+ 1424
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2864
+ 2304
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1792
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1872
+
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2832
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2816
+ 1952
+
+
+
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1952
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1952
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2032
+
+
+
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2112
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2112
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2192
+
+
+
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2272
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2272
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2352
+
+
+
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2432
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2432
+
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 2512
+
+
+
+ branching_citizen_appealing_violations_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1824
+ 2112
+
+
+
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2256
+ 2112
+
+
+
+ delta_citizen_appealing_violations_fz53 success
+
+ SUCCESS
+
+ N
+ 2368
+ 1904
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4384
+ 2112
+
+
+
+ Success delta_citizen_appealing_violations_fz53
+
+ SUCCESS
+
+ N
+ 4784
+ 2112
+
+
+
+ citizen_appealing_violations_fz53_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 960
+
+
+
+ citizen_appealing_violations_fz53_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1120
+
+
+
+ citizen_appealing_violations_fz53_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1280
+
+
+
+ citizen_appealing_violations_fz53_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1440
+
+
+
+ citizen_appealing_violations_fz53_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1600
+
+
+
+ Success citizen_appealing_violations_fz53 after error
+
+ SUCCESS
+
+ N
+ 4720
+ 1312
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 960
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1040
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1120
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1200
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1280
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1360
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1440
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1520
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1600
+
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3856
+ 1680
+
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 4320
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ citizen_appealing_violations_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_appealing_violations_fz53.hpl
+ Simple citizen_appealing_violations_fz53 WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_appealing_violations_fz53.hpl
+ Simple citizen_appealing_violations_fz53 WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_citizen_appealing_violations_fz53_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_citizen_appealing_violations_fz53_exists.hpl
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl
+ Success new citizen_appealing_violations_fz53
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl (2)
+ branching_citizen_appealing_violations_fz53.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+ checkpoint_job_citizen_appealing_violations_fz53.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_appealing_violations_fz53_exists check NEW
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple citizen_appealing_violations_fz53 WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ delta_citizen_appealing_violations_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple citizen_appealing_violations_fz53 WHERE SUCCESS
+ branching_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+ delta_citizen_appealing_violations_fz53 success
+ Y
+ N
+ N
+
+
+ branching_citizen_appealing_violations_fz53_delta.hpl
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_appealing_violations_fz53 WHERE ERROR
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_appealing_violations_fz53_delta.hpl
+ Success delta_citizen_appealing_violations_fz53
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow1.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow2.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow3.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow4.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_appealing_violations_fz53_flow5.hpl 2
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_appealing_violations_fz53.hpl 2
+ Success citizen_appealing_violations_fz53 after error
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_appealing_violations_fz53_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
new file mode 100644
index 0000000..d1ca18f
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl
@@ -0,0 +1,161 @@
+
+
+
+ citizen_appealing_violations_fz53_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 448
+ 288
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ =
+ create_date
+ create_date
+
+
+ ervu_dashboard
+
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 928
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 512
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
new file mode 100644
index 0000000..8ce8203
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl
@@ -0,0 +1,158 @@
+
+
+
+ citizen_appealing_violations_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 992
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 576
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
new file mode 100644
index 0000000..1446dc1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl
@@ -0,0 +1,158 @@
+
+
+
+ citizen_appealing_violations_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 896
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 480
+ 368
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
new file mode 100644
index 0000000..5614a92
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl
@@ -0,0 +1,158 @@
+
+
+
+ citizen_appealing_violations_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1104
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 688
+ 368
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl
new file mode 100644
index 0000000..d065de7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 976
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 560
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl
new file mode 100644
index 0000000..1c9afd1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1056
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 640
+ 336
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl
new file mode 100644
index 0000000..648df28
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1120
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 704
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl
new file mode 100644
index 0000000..7eef578
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1056
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 640
+ 368
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl
new file mode 100644
index 0000000..950b9b0
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl
@@ -0,0 +1,158 @@
+
+
+
+ delta_citizen_appealing_violations_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ create_date
+ create_date
+
+ ervu_dashboard
+
citizen_appealing_violations_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ create_date
+ create_date
+ N
+
+
+ number_appealed
+ number_appealed
+ Y
+
+
+ date_appealed
+ date_appealed
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ decision_date
+ decision_date
+ Y
+
+
+ result_appeal
+ result_appeal
+ Y
+
+
+ name_commission
+ name_commission
+ Y
+
+
+ grounds
+ grounds
+ Y
+
+
+ hidden
+ hidden
+ Y
+
+
+ N
+
+
+ 1008
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ ad.recruit_id,
+ ad.create_date, -- дата создания обжалования
+ ad.appeal_number AS number_appealed, -- номер обжалуемого решения
+ ad.appeal_date AS date_appealed, -- дата обжалуемого решения
+ ad.result_number AS case_number, -- номер принятого решения
+ ad.result_date AS decision_date, -- дата принятия решения
+ CASE
+ WHEN ad.result = '1' THEN 'Удовлетворена'
+ WHEN ad.result = '2' THEN 'Частично удовлетворена'
+ WHEN ad.result = '3' THEN 'Отказано в удовлетворении'
+ ELSE NULL
+ END AS result_appeal, -- код рассмотрения
+ ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение
+ ad.reason_for_add_entry AS grounds, -- основание для внесения записи
+ ad.hidden --has_appealing_violations_fz53
+FROM public.appeal_document_dto ad
+JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
+--WHERE hidden IS FALSE
+ Y
+
+
+ 592
+ 320
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..4b469b9
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('citizen_appealing_violations_fz53_flow1', 'citizen_appealing_violations_fz53_flow2', 'citizen_appealing_violations_fz53_flow3', 'citizen_appealing_violations_fz53_flow4', 'citizen_appealing_violations_fz53_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl
new file mode 100644
index 0000000..e077078
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_citizen_criminal_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_criminal_liability_fz53'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl
new file mode 100644
index 0000000..4402413
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_citizen_criminal_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_criminal_liability_fz53_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_citizen_criminal_liability_fz53_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_criminal_liability_fz53_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..4095df7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_criminal_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..3ef1f41
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_criminal_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..e729ca5
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..896e5f7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..63d1db3
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..cdaf266
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..0d74917
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..1c4519b
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..bf0f099
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..c7e8c88
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_criminal_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..748f1fd
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..3985742
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..d3a3687
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..c729385
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..0baf42b
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..0cfddb3
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..edaee70
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..c3ad66d
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..db5a6de
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..e773802
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_criminal_liability_fz53_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..e422b79
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_criminal_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_criminal_liability_fz53_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..9aea55f
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_citizen_criminal_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl
new file mode 100644
index 0000000..c8d9198
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_criminal_liability_fz53_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_criminal_liability_fz53') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_criminal_liability_fz53'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_criminal_liability_fz53'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl
new file mode 100644
index 0000000..6dec012
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_citizen_criminal_liability_fz53_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
new file mode 100644
index 0000000..dd178f2
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_criminal_liability_fz53_flow1',
+ 'citizen_criminal_liability_fz53_flow2',
+ 'citizen_criminal_liability_fz53_flow3',
+ 'citizen_criminal_liability_fz53_flow4',
+ 'citizen_criminal_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_criminal_liability_fz53_flow1',
+ 'citizen_criminal_liability_fz53_flow2',
+ 'citizen_criminal_liability_fz53_flow3',
+ 'citizen_criminal_liability_fz53_flow4',
+ 'citizen_criminal_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_criminal_liability_fz53' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
new file mode 100644
index 0000000..658a967
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_citizen_criminal_liability_fz53_flow1',
+ 'delta_citizen_criminal_liability_fz53_flow2',
+ 'delta_citizen_criminal_liability_fz53_flow3',
+ 'delta_citizen_criminal_liability_fz53_flow4',
+ 'delta_citizen_criminal_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_citizen_criminal_liability_fz53_flow1',
+ 'delta_citizen_criminal_liability_fz53_flow2',
+ 'delta_citizen_criminal_liability_fz53_flow3',
+ 'delta_citizen_criminal_liability_fz53_flow4',
+ 'delta_citizen_criminal_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_criminal_liability_fz53_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf
new file mode 100644
index 0000000..05ee576
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf
@@ -0,0 +1,2482 @@
+
+
+ job_citizen_criminal_liability_fz53
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 96
+ 400
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ citizen_criminal_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 80
+
+
+
+ citizen_criminal_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 240
+
+
+
+ citizen_criminal_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 400
+
+
+
+ citizen_criminal_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 560
+
+
+
+ citizen_criminal_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new citizen_criminal_liability_fz53
+
+ SUCCESS
+
+ N
+ 3920
+ 432
+
+
+
+ branching_citizen_criminal_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1584
+ 1280
+
+
+
+ Simple citizen_criminal_liability_fz53 WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1632
+ 1680
+
+
+
+ Simple citizen_criminal_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1984
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2288
+ 1040
+
+
+
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 1792
+
+
+
+ check_if_job_citizen_criminal_liability_fz53_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 448
+ 400
+
+
+
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 560
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 80
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 160
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 240
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 320
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 400
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 480
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 560
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 640
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 720
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 800
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3600
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2304
+ 1440
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2480
+ 2304
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1792
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1872
+
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2480
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2432
+ 1952
+
+
+
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 1952
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 1952
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2032
+
+
+
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 2112
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2112
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2192
+
+
+
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 2272
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2272
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2352
+
+
+
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2912
+ 2432
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2432
+
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3344
+ 2512
+
+
+
+ branching_citizen_criminal_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1632
+ 2112
+
+
+
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2032
+ 2112
+
+
+
+ delta_citizen_criminal_liability_fz53 success
+
+ SUCCESS
+
+ N
+ 2160
+ 1952
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3792
+ 2112
+
+
+
+ Success delta_citizen_criminal_liability_fz53
+
+ SUCCESS
+
+ N
+ 4208
+ 2112
+
+
+
+ citizen_criminal_liability_fz53_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 960
+
+
+
+ citizen_criminal_liability_fz53_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1120
+
+
+
+ citizen_criminal_liability_fz53_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1280
+
+
+
+ citizen_criminal_liability_fz53_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1440
+
+
+
+ citizen_criminal_liability_fz53_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2736
+ 1600
+
+
+
+ Success citizen_criminal_liability_fz53 after error
+
+ SUCCESS
+
+ N
+ 3968
+ 1312
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 960
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1040
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1120
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1200
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1280
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1360
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1440
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1520
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1600
+
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3136
+ 1680
+
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3600
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ citizen_criminal_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_criminal_liability_fz53.hpl
+ Simple citizen_criminal_liability_fz53 WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_criminal_liability_fz53.hpl
+ Simple citizen_criminal_liability_fz53 WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_citizen_criminal_liability_fz53_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_citizen_criminal_liability_fz53_exists.hpl
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl
+ Success new citizen_criminal_liability_fz53
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl (2)
+ branching_citizen_criminal_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+ checkpoint_job_citizen_criminal_liability_fz53.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_criminal_liability_fz53_exists check NEW
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple citizen_criminal_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ delta_citizen_criminal_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple citizen_criminal_liability_fz53 WHERE SUCCESS
+ branching_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+ delta_citizen_criminal_liability_fz53 success
+ Y
+ N
+ N
+
+
+ branching_citizen_criminal_liability_fz53_delta.hpl
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_criminal_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_criminal_liability_fz53_delta.hpl
+ Success delta_citizen_criminal_liability_fz53
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow1.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow2.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow3.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow4.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_criminal_liability_fz53_flow5.hpl 2
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_criminal_liability_fz53.hpl 2
+ Success citizen_criminal_liability_fz53 after error
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_criminal_liability_fz53_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..7593fb2
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl
@@ -0,0 +1,183 @@
+
+
+
+ citizen_criminal_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ =
+ created_at
+ created_at
+
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 448
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..29c6100
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 880
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 448
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..17ccb53
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1120
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 688
+ 384
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..67ebd63
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1104
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 672
+ 416
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..811495c
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl
@@ -0,0 +1,180 @@
+
+
+
+ citizen_criminal_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 944
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 512
+ 384
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..bd7d195
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 928
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 496
+ 336
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..eb09efe
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1040
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 608
+ 384
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..1fa9fe1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1056
+ 224
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 624
+ 224
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..f15f7f6
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 960
+ 416
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 528
+ 416
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..99a4d0a
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl
@@ -0,0 +1,180 @@
+
+
+
+ delta_citizen_criminal_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_criminal_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ sentence_date
+ sentence_date
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ decision_reason
+ decision_reason
+ Y
+
+
+ has_criminal_liability_fz53
+ has_criminal_liability_fz53
+ Y
+
+
+ N
+
+
+ 1184
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ --, -- сведения о факте уголовного преследования
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело
+ i.decision_number AS case_number, -- номер уголовного дела (судебный)
+ i.decision_date AS sentence_date, -- дата приговора
+ i.extra_info->>'court' AS court_decision, -- суд вынесший приговор
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы'
+ WHEN i.extra_info->>'punishment' = '3' THEN 'Арест'
+ WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы'
+ ELSE null
+ END AS decision_reason, -- Причины уголовного наказания в связи с фз53
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_criminal_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE --hidden IS FALSE AND
+ i.type = 'CRIMINAL'
+ Y
+
+
+ 752
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..b7e3e03
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('citizen_criminal_liability_fz53_flow1', 'citizen_criminal_liability_fz53_flow2', 'citizen_criminal_liability_fz53_flow3', 'citizen_criminal_liability_fz53_flow4', 'citizen_criminal_liability_fz53_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl
new file mode 100644
index 0000000..8ad6911
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl
@@ -0,0 +1,124 @@
+
+
+
+ branching_citizen_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ select
+ status as STATUS,
+ job_name AS PIPELINE
+from public.etl_checkpoints
+where job_name = 'job_citizen_liability_fz53'
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl
new file mode 100644
index 0000000..45f831f
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_citizen_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_liability_fz53_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_citizen_liability_fz53_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_liability_fz53_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..51525dd
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..516b012
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
@@ -0,0 +1,250 @@
+
+
+
+ change_status_citizen_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+/*
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'citizen_liability_fz53_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..5765a9e
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..f68afc4
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
@@ -0,0 +1,254 @@
+
+
+
+ change_status_citizen_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+*/
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2--,
+/*
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..4436574
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..8988f0c
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
@@ -0,0 +1,255 @@
+
+
+
+ change_status_citizen_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+*/
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3--,
+/*
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..3f3c5b7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..8e16f42
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+*/
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1--,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+*/
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4--,
+/*
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+*/
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+/*
+ union all
+
+ SELECT
+ 'job_citizen_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+*/
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..8b54d7e
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..ba11212
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
@@ -0,0 +1,256 @@
+
+
+
+ change_status_citizen_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 09:14:18.787
+ -
+ 2025/06/16 09:14:18.787
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ last_recruitment_id
+ last_recruitment_id
+ Y
+
+
+ record_created
+ record_created
+ Y
+
+
+ recruitment_created_date
+ recruitment_created_date
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1056
+ 400
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+/*
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
+*/
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+/*
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+*/
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+
+ FROM result_ma
+),
+for_checkpoints as (
+/*
+ SELECT
+ 'job_citizen_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_citizen_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+*/
+ SELECT
+ 'citizen_liability_fz53_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ from result_max
+
+)
+select * from for_checkpoints
+ N
+
+
+ 688
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl
new file mode 100644
index 0000000..84f72b4
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl
new file mode 100644
index 0000000..81381cb
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl
new file mode 100644
index 0000000..543c8ef
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl
new file mode 100644
index 0000000..24c35d7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl
new file mode 100644
index 0000000..4fd1742
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl
new file mode 100644
index 0000000..463529d
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl
new file mode 100644
index 0000000..2c43fdf
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl
new file mode 100644
index 0000000..4e3ac61
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl
new file mode 100644
index 0000000..87c2807
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl
new file mode 100644
index 0000000..befcfd5
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_citizen_liability_fz53_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
new file mode 100644
index 0000000..688659d
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
@@ -0,0 +1,142 @@
+
+
+
+ change_status_to_processing
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 16:14:31.162
+ -
+ 2025/06/11 16:14:31.162
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 784
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'job_citizen_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow1' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow2' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow3' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow4' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+
+UNION ALL
+
+SELECT
+ 'PROCESSING' AS status,
+ 'citizen_liability_fz53_flow5' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 368
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
new file mode 100644
index 0000000..46b50cc
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_to_processing_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 13:42:26.494
+ -
+ 2025/06/16 13:42:26.494
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1248
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'PROCESSING' AS status,
+ 'delta_citizen_liability_fz53' AS job_name,
+ current_timestamp AS record_created
+--FROM public.etl_checkpoints
+ N
+
+
+ 832
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl
new file mode 100644
index 0000000..e27b362
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl
@@ -0,0 +1,130 @@
+
+
+
+ check_if_job_citizen_liability_fz53_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/11 15:20:18.267
+ -
+ 2025/06/11 15:20:18.267
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+ Set variables
+ Write to log
+ N
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_name
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 688
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_citizen_liability_fz53') AS job_name,
+ COALESCE(status, 'NEW') AS status,
+ current_timestamp::timestamp as record_created
+FROM (
+ SELECT job_name, status
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_liability_fz53'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_citizen_liability_fz53'
+ )
+) t
+ N
+
+
+ 400
+ 352
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 960
+ 240
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl
new file mode 100644
index 0000000..0d9cb80
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl
@@ -0,0 +1,273 @@
+
+
+
+ checkpoint_snils_inn_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 10:01:04.895
+ -
+ 2025/06/09 10:01:04.895
+
+
+
+
+
+ Select values
+ Table output
+ N
+
+
+ Table input
+ Select values
+ N
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Select values
+ SelectValues
+
+ Y
+
+ 1
+
+ none
+
+
+
+ N
+
+ idm_id
+ idm_id
+ String
+ -2
+ -2
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+ 1008
+ 608
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FROM ordered
+),
+flow_ranges AS (
+ SELECT
+ flow_num,
+ MIN(created_at) AS min_date,
+ MAX(created_at) AS max_date
+ FROM splitted
+ GROUP BY flow_num
+),
+recr_inf AS (
+ SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
+ FROM ervu_dashboard.citizen cit
+ join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
+),
+flow_data AS (
+ SELECT
+ fr.flow_num,
+ ri.idm_id,
+ (SELECT r.created_at FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ AND r.created_at BETWEEN fr.min_date AND fr.max_date
+ LIMIT 1) AS created_at
+ FROM recr_inf ri
+ CROSS JOIN flow_ranges fr
+ WHERE EXISTS (
+ SELECT 1 FROM ervu_dashboard.recruitment r
+ WHERE r.idm_id = ri.idm_id
+ )
+),
+result_ma as (
+ SELECT
+ MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
+
+ MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
+
+ MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
+
+ MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
+
+ MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
+ (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
+ FROM flow_data
+),
+result_max as ( --костыль
+ SELECT
+ CASE
+ WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow1
+ END AS cr_flow1,
+ idm_flow1,
+ CASE
+ WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow2
+ END AS cr_flow2,
+ idm_flow2,
+ CASE
+ WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow3
+ END AS cr_flow3,
+ idm_flow3,
+ CASE
+ WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow4
+ END AS cr_flow4,
+ idm_flow4,
+ CASE
+ WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
+ ELSE cr_flow5
+ END AS cr_flow5,
+ idm_flow5
+ FROM result_ma
+),
+for_checkpoints as (
+ SELECT
+ 'job_child_flow1' as job_name,
+ idm_flow1 as last_recruitment_id,
+ cr_flow1 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow2' as job_name,
+ idm_flow2 as last_recruitment_id,
+ cr_flow2 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow3' as job_name,
+ idm_flow3 as last_recruitment_id,
+ cr_flow3 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow4' as job_name,
+ idm_flow4 as last_recruitment_id,
+ cr_flow4 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+
+ union all
+
+ SELECT
+ 'job_child_flow5' as job_name,
+ idm_flow5 as last_recruitment_id,
+ cr_flow5 as recruitment_created_date,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ from result_max
+)
+select * from for_checkpoints
+ N
+
+
+ 736
+ 448
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
etl_checkpoints
+ N
+ Y
+ N
+ Y
+
+
+ 1248
+ 448
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
new file mode 100644
index 0000000..a261d64
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'citizen_liability_fz53_flow1',
+ 'citizen_liability_fz53_flow2',
+ 'citizen_liability_fz53_flow3',
+ 'citizen_liability_fz53_flow4',
+ 'citizen_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'citizen_liability_fz53_flow1',
+ 'citizen_liability_fz53_flow2',
+ 'citizen_liability_fz53_flow3',
+ 'citizen_liability_fz53_flow4',
+ 'citizen_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_liability_fz53' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl
new file mode 100644
index 0000000..e5f3aa0
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_citizen_liability_fz53_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_citizen_liability_fz53_flow1',
+ 'delta_citizen_liability_fz53_flow2',
+ 'delta_citizen_liability_fz53_flow3',
+ 'delta_citizen_liability_fz53_flow4',
+ 'delta_citizen_liability_fz53_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_citizen_liability_fz53_flow1',
+ 'delta_citizen_liability_fz53_flow2',
+ 'delta_citizen_liability_fz53_flow3',
+ 'delta_citizen_liability_fz53_flow4',
+ 'delta_citizen_liability_fz53_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_citizen_liability_fz53_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf
new file mode 100644
index 0000000..b6fe762
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf
@@ -0,0 +1,2480 @@
+
+
+ job_citizen_liability_fz53
+ Y
+
+
+
+ 0
+ -
+ 2025/06/05 14:27:15.055
+ -
+ 2025/06/05 14:27:15.055
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 368
+ 400
+
+
+
+ checkpoint_job_citizen_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1136
+ 1280
+
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 400
+
+
+
+ citizen_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 80
+
+
+
+ citizen_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 240
+
+
+
+ citizen_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 400
+
+
+
+ citizen_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 560
+
+
+
+ citizen_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 720
+
+
+
+ Abort workflow
+
+ ABORT
+
+ N
+ N
+ 2336
+ 208
+
+
+
+ Success new citizen_liability_fz53
+
+ SUCCESS
+
+ N
+ 3728
+ 432
+
+
+
+ branching_citizen_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1536
+ 1280
+
+
+
+ Simple citizen_liability_fz53 WHERE SUCCESS
+
+ SIMPLE_EVAL
+
+ SUCCESS
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1584
+ 1680
+
+
+
+ Simple citizen_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1840
+ 1280
+
+
+
+ recruitment_rows_five_flow_if_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2384
+ 1280
+
+
+
+ Abort workflow 2
+
+ ABORT
+
+ N
+ N
+ 2320
+ 1040
+
+
+
+ delta_citizen_liability_fz53_flow1.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1792
+
+
+
+ check_if_job_citizen_liability_fz53_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 576
+ 400
+
+
+
+ Simple job_citizen_liability_fz53_exists check NEW
+
+ SIMPLE_EVAL
+
+ NEW
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 896
+ 400
+
+
+
+ change_status_to_processing.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2368
+ 560
+
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 80
+
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 160
+
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 240
+
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 320
+
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 400
+
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 480
+
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 560
+
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 640
+
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 720
+
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 800
+
+
+
+ checkpoint_job_citizen_liability_fz53.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 432
+
+
+
+ change_status_to_processing.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2288
+ 1424
+
+
+
+ change_status_to_processing_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2384
+ 2304
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1792
+
+
+
+ change_status_delta_citizen_liability_fz53_flow1_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1872
+
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2320
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2336
+ 1952
+
+
+
+ delta_citizen_liability_fz53_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1952
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1952
+
+
+
+ change_status_delta_citizen_liability_fz53_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2032
+
+
+
+ delta_citizen_liability_fz53_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2112
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2112
+
+
+
+ change_status_delta_citizen_liability_fz53_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2192
+
+
+
+ delta_citizen_liability_fz53_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2272
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2272
+
+
+
+ change_status_delta_citizen_liability_fz53_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2352
+
+
+
+ delta_citizen_liability_fz53_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl
+ Basic
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2432
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2432
+
+
+
+ change_status_delta_citizen_liability_fz53_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2512
+
+
+
+ branching_citizen_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1616
+ 2112
+
+
+
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 1936
+ 2112
+
+
+
+ delta_citizen_liability_fz53 success
+
+ SUCCESS
+
+ N
+ 2160
+ 1952
+
+
+
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3440
+ 2112
+
+
+
+ Success delta_citizen_liability_fz53
+
+ SUCCESS
+
+ N
+ 3728
+ 2112
+
+
+
+ citizen_liability_fz53_flow1.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
+ Basic
+
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 960
+
+
+
+ citizen_liability_fz53_flow2.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
+ Basic
+
+
+ ID_F2
+ IDM_FLOW2
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1120
+
+
+
+ citizen_liability_fz53_flow3.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
+ Basic
+
+
+ ID_F3
+ IDM_FLOW3
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1280
+
+
+
+ citizen_liability_fz53_flow4.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
+ Basic
+
+
+ ID_F4
+ IDM_FLOW4
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1440
+
+
+
+ citizen_liability_fz53_flow5.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
+ Basic
+
+
+ ID_F5
+ IDM_FLOW5
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2672
+ 1600
+
+
+
+ Success citizen_liability_fz53 after error
+
+ SUCCESS
+
+ N
+ 3728
+ 1312
+
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 960
+
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1040
+
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1120
+
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1200
+
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1280
+
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1360
+
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1440
+
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1520
+
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1600
+
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1680
+
+
+
+ checkpoint_job_citizen_liability_fz53.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3456
+ 1312
+
+
+
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ citizen_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Abort workflow
+ Y
+ N
+ N
+
+
+ branching_citizen_liability_fz53.hpl
+ Simple citizen_liability_fz53 WHERE ERROR
+ Y
+ N
+ Y
+
+
+ branching_citizen_liability_fz53.hpl
+ Simple citizen_liability_fz53 WHERE SUCCESS
+ Y
+ N
+ Y
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ Abort workflow 2
+ Y
+ N
+ N
+
+
+ Start
+ check_if_job_citizen_liability_fz53_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_job_citizen_liability_fz53_exists.hpl
+ Simple job_citizen_liability_fz53_exists check NEW
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl
+ change_status_citizen_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl
+ change_status_citizen_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow2.hpl
+ change_status_citizen_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow2.hpl
+ change_status_citizen_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow3.hpl
+ change_status_citizen_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow3.hpl
+ change_status_citizen_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow4.hpl
+ change_status_citizen_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow4.hpl
+ change_status_citizen_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow5.hpl
+ change_status_citizen_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow5.hpl
+ change_status_citizen_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_liability_fz53.hpl
+ Success new citizen_liability_fz53
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_liability_fz53.hpl (2)
+ branching_citizen_liability_fz53.hpl
+ Y
+ N
+ Y
+
+
+ Simple job_citizen_liability_fz53_exists check NEW
+ checkpoint_job_citizen_liability_fz53.hpl (2)
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow1.hpl
+ change_status_delta_citizen_liability_fz53_flow1_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow1.hpl
+ change_status_delta_citizen_liability_fz53_flow1_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_citizen_liability_fz53_exists check NEW
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple citizen_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow2.hpl
+ change_status_delta_citizen_liability_fz53_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow2.hpl
+ change_status_delta_citizen_liability_fz53_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow3.hpl
+ change_status_delta_citizen_liability_fz53_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow3.hpl
+ change_status_delta_citizen_liability_fz53_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow4.hpl
+ change_status_delta_citizen_liability_fz53_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow4.hpl
+ change_status_delta_citizen_liability_fz53_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_citizen_liability_fz53_flow5.hpl
+ change_status_delta_citizen_liability_fz53_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_citizen_liability_fz53_flow5.hpl
+ change_status_delta_citizen_liability_fz53_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ delta_citizen_liability_fz53_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple citizen_liability_fz53 WHERE SUCCESS
+ branching_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+ delta_citizen_liability_fz53 success
+ Y
+ N
+ N
+
+
+ branching_citizen_liability_fz53_delta.hpl
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_citizen_liability_fz53 WHERE ERROR
+ recruitment_rows_five_flow_citizen_liability_fz53.hpl (2)
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow1_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow3_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow2_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow2_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow1_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow3_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow4_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow4_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow5_success.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_citizen_liability_fz53_flow5_error.hpl
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_citizen_liability_fz53_delta.hpl
+ Success delta_citizen_liability_fz53
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl 2
+ change_status_citizen_liability_fz53_flow1_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow1.hpl 2
+ change_status_citizen_liability_fz53_flow1_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow2.hpl 2
+ change_status_citizen_liability_fz53_flow2_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow2.hpl 2
+ change_status_citizen_liability_fz53_flow2_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow3.hpl 2
+ change_status_citizen_liability_fz53_flow3_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow3.hpl 2
+ change_status_citizen_liability_fz53_flow3_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow4.hpl 2
+ change_status_citizen_liability_fz53_flow4_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow4.hpl 2
+ change_status_citizen_liability_fz53_flow4_error.hpl 2
+ Y
+ N
+ N
+
+
+ citizen_liability_fz53_flow5.hpl 2
+ change_status_citizen_liability_fz53_flow5_success.hpl 2
+ Y
+ Y
+ N
+
+
+ citizen_liability_fz53_flow5.hpl 2
+ change_status_citizen_liability_fz53_flow5_error.hpl 2
+ Y
+ N
+ N
+
+
+ change_status_citizen_liability_fz53_flow1_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow1_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow2_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow3_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow4_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow5_success.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ change_status_citizen_liability_fz53_flow5_error.hpl 2
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Y
+ N
+ Y
+
+
+ checkpoint_job_citizen_liability_fz53.hpl 2
+ Success citizen_liability_fz53 after error
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow3.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow2.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow1.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow4.hpl 2
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ citizen_liability_fz53_flow5.hpl 2
+ Y
+ Y
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 72
+ 1088
+ 176
+ 0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+
+ 114
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..61d564c
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl
@@ -0,0 +1,205 @@
+
+
+
+ citizen_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+ 0
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+
+ =
+ created_at
+ created_at
+
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 448
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..1950156
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 960
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 528
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..cb454d6
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1056
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 624
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..49a4f14
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1008
+ 384
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 576
+ 384
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..88a3711
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl
@@ -0,0 +1,202 @@
+
+
+
+ citizen_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/21 14:05:02.260
+ -
+ 2025/05/21 14:05:02.260
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1072
+ 368
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 640
+ 368
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl
new file mode 100644
index 0000000..d336de5
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1168
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 736
+ 336
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl
new file mode 100644
index 0000000..15704f1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1056
+ 240
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 624
+ 240
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl
new file mode 100644
index 0000000..e1fe0b5
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1152
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 720
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl
new file mode 100644
index 0000000..19d16e5
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1104
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 672
+ 336
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl
new file mode 100644
index 0000000..f18a7f4
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_citizen_liability_fz53_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ =
+ created_at
+ created_at
+
+ ervu_dashboard
+
citizen_liability_fz53
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ N
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ case_number_before
+ case_number_before
+ Y
+
+
+ date_initiation
+ date_initiation
+ Y
+
+
+ body_initiated
+ body_initiated
+ Y
+
+
+ case_number
+ case_number
+ Y
+
+
+ date_resolution
+ date_resolution
+ Y
+
+
+ article_koap_rf
+ article_koap_rf
+ Y
+
+
+ court_decision
+ court_decision
+ Y
+
+
+ name_vc
+ name_vc
+ Y
+
+
+ reason_use
+ reason_use
+ Y
+
+
+ start_date
+ start_date
+ Y
+
+
+ size_term_punishment
+ size_term_punishment
+ Y
+
+
+ type_punishment
+ type_punishment
+ Y
+
+
+ has_liability_fz53
+ has_liability_fz53
+ Y
+
+
+ N
+
+
+ 1184
+ 352
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ postgres.decision-document-service
+ N
+ 0
+ SELECT
+ i.recruit_id,
+ i.created_at,
+ i.updated_at,
+ i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный)
+ i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении
+ i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении
+ i.decision_number AS case_number, -- номер дела об административном правонарушении
+ i.decision_date AS date_resolution, -- дата постановления
+ i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ
+ i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление
+ i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер
+ CASE
+ WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету'
+ WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования'
+ WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета'
+ ELSE NULL
+ END AS reason_use, -- причина применения
+ i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера
+ i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания
+ CASE
+ WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение'
+ WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф'
+ ELSE NULL
+ END AS type_punishment, -- вид наказания
+ CASE
+ WHEN i.hidden is false THEN true
+ ELSE false
+ END AS has_liability_fz53
+FROM public.infringement i
+JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
+ AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}'
+ --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
+WHERE -- hidden IS FALSE AND
+ type = 'ADMINISTRATIVE'
+ Y
+
+
+ 752
+ 352
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl
new file mode 100644
index 0000000..92f9426
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl
@@ -0,0 +1,185 @@
+
+
+
+ recruitment_rows_five_flow_if_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/05/23 14:28:22.572
+ -
+ 2025/05/23 14:28:22.572
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 880
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('citizen_liability_fz53_flow1', 'citizen_liability_fz53_flow2', 'citizen_liability_fz53_flow3', 'citizen_liability_fz53_flow4', 'citizen_liability_fz53_flow5')
+),
+ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ FROM ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5
+ FROM splitted
+ GROUP BY position
+),
+remains as (
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
+),
+idm1 as (
+ select
+ cr_flow1,
+ idm_flow1
+ from remains
+ where cr_flow1 is not null and idm_flow1 is not null
+),
+idm2 as (
+ select
+ cr_flow2,
+ idm_flow2
+ from remains
+ where cr_flow2 is not null and idm_flow2 is not null
+),
+idm3 as (
+ select
+ cr_flow3,
+ idm_flow3
+ from remains
+ where cr_flow3 is not null and idm_flow3 is not null
+),
+idm4 as (
+ select
+ cr_flow4,
+ idm_flow4
+ from remains
+ where cr_flow4 is not null and idm_flow4 is not null
+),
+idm5 as (
+ select
+ cr_flow5,
+ idm_flow5
+ from remains
+ where cr_flow5 is not null and idm_flow5 is not null
+)
+select
+ i1.*,
+ i2.*,
+ i3.*,
+ i4.*,
+ i5.*
+FROM
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
+FULL OUTER JOIN
+ (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
+ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
+limit 2
+ N
+
+
+ 512
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl b/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl
index 4035f9c..aacbef5 100644
--- a/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl
+++ b/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl
@@ -79,7 +79,7 @@
status as STATUS,
job_name AS PIPELINE
from public.etl_checkpoints
-where job_name = 'job_citizen_spouse'
+where job_name = 'job_snils_inn'N
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl b/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl
new file mode 100644
index 0000000..0415b07
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl
@@ -0,0 +1,142 @@
+
+
+
+ branching_snils_inn_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/09 09:54:43.724
+ -
+ 2025/06/09 09:54:43.724
+
+
+
+
+
+ Set variables 2
+ Write to log 2
+ N
+
+
+ Table input
+ Set variables 2
+ Y
+
+
+
+ Set variables 2
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ pipeline
+ PIPE
+ PARENT_WORKFLOW
+
+
+ status
+ STATUS
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 1056
+ 256
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ COALESCE(job_name, 'job_snils_inn_delta') AS PIPELINE,
+ COALESCE(status, 'ERROR') AS STATUS,
+ current_timestamp::timestamp as record_created
+FROM (
+ select
+ CASE
+ WHEN status = 'PROCESSING' THEN 'ERROR'
+ ELSE status
+ END AS status,
+ job_name
+ from public.etl_checkpoints
+ where job_name = 'job_snils_inn_delta'
+
+ UNION ALL
+
+ SELECT NULL, NULL
+ WHERE NOT EXISTS (
+ SELECT 1
+ FROM public.etl_checkpoints
+ WHERE job_name = 'job_snils_inn_delta'
+ )
+) t
+ N
+
+
+ 816
+ 256
+
+
+
+ Write to log 2
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ pipeline
+
+
+ status
+
+
+ N
+ 0
+ Basic
+ ${PIPE}
+${STATUS}
+
+
+ 1280
+ 256
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl
new file mode 100644
index 0000000..272ccc9
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow1_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl
new file mode 100644
index 0000000..60a3e53
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow1_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow1' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl
new file mode 100644
index 0000000..c2dbe25
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl
@@ -0,0 +1,102 @@
+
+
+
+ change_status_delta_snils_inn_flow2_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl
new file mode 100644
index 0000000..549321d
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow2_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow2' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl
new file mode 100644
index 0000000..681da71
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow3_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl
new file mode 100644
index 0000000..2f7cad3
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow3_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow3' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl
new file mode 100644
index 0000000..13ffe89
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow4_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl
new file mode 100644
index 0000000..552dbf7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow4_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow4' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl
new file mode 100644
index 0000000..93465e3
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow5_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'ERROR' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl
new file mode 100644
index 0000000..c961ab0
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl
@@ -0,0 +1,101 @@
+
+
+
+ change_status_delta_snils_inn_flow5_success
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/16 12:20:06.191
+ -
+ 2025/06/16 12:20:06.191
+
+
+
+
+
+ Table input
+ Insert / update
+ Y
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1152
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ 'delta_snils_inn_flow5' as job_name,
+ 'SUCCESS' as status,
+ current_timestamp as record_created
+ N
+
+
+ 784
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl
index 3ad2861..d0e503c 100644
--- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl
@@ -86,7 +86,7 @@
0SELECT
'PROCESSING' AS status,
- 'job_citizen_spouse' AS job_name,
+ 'job_snils_inn' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
@@ -94,7 +94,7 @@ UNION ALL
SELECT
'PROCESSING' AS status,
- 'citizen_spouse_flow1' AS job_name,
+ 'snils_inn_flow1' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
@@ -102,7 +102,7 @@ UNION ALL
SELECT
'PROCESSING' AS status,
- 'citizen_spouse_flow2' AS job_name,
+ 'snils_inn_flow2' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
@@ -110,7 +110,7 @@ UNION ALL
SELECT
'PROCESSING' AS status,
- 'citizen_spouse_flow3' AS job_name,
+ 'snils_inn_flow3' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
@@ -118,7 +118,7 @@ UNION ALL
SELECT
'PROCESSING' AS status,
- 'citizen_spouse_flow4' AS job_name,
+ 'snils_inn_flow4' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
@@ -126,7 +126,7 @@ UNION ALL
SELECT
'PROCESSING' AS status,
- 'citizen_spouse_flow5' AS job_name,
+ 'snils_inn_flow5' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpointsN
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl
new file mode 100644
index 0000000..100f8e1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl
@@ -0,0 +1,869 @@
+
+
+
+ checkpoint_job_snils_inn_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 14:19:02.590
+ -
+ 2025/06/03 14:19:02.590
+
+
+
+
+
+ Filter rows
+ Abort
+ N
+
+
+ JSON input state_child_flow1.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow2.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow3.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow4.json
+ Filter rows
+ N
+
+
+ JSON input state_child_flow5.json
+ Filter rows
+ N
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow1.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow2.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow3.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow4.json
+ N
+
+
+ Dummy (do nothing)
+ JSON input state_child_flow5.json
+ N
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+ 0
+
+
+ 1264
+ 592
+
+
+
+ Dummy (do nothing)
+ Dummy
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 352
+ 592
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow1
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow2
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow3
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow4
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ child_flow5
+ String
+
+
+
+
+
+ =
+ status
+ N
+ AND
+
+ N
+ -1
+ constant
+ -1
+ ERROR
+ String
+
+
+
+ =
+ pipeline
+ N
+ OR
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ =
+ pipeline
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ recruits_info_flow1
+ String
+
+
+
+ Abort
+
+
+ 944
+ 592
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ job_name
+ job_name
+
+ public
+
etl_checkpoints
+
+ job_name
+ job_name
+ N
+
+
+ record_created
+ record_created
+ Y
+
+
+ status
+ status
+ Y
+
+
+ N
+
+
+ 1264
+ 208
+
+
+
+ JSON input state_child_flow1.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 432
+
+
+
+ JSON input state_child_flow2.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 512
+
+
+
+ JSON input state_child_flow3.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 592
+
+
+
+ JSON input state_child_flow4.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 672
+
+
+
+ JSON input state_child_flow5.json
+ JsonInput
+
+ Y
+
+ 1
+
+ none
+
+
+ N
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ Y
+ Y
+
+
+ ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json
+
+
+ N
+ N
+
+
+
+ pipeline
+ $.pipeline
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ status
+ $.status
+ String
+
+
+
+
+ -1
+ -1
+ none
+ N
+
+
+ 0
+ N
+ N
+
+
+
+
+
+
+
+
+
+
+
+ 640
+ 752
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH status_check AS (
+ SELECT
+ bool_or(status = 'ERROR' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )) AS has_error,
+ count(*) FILTER (
+ WHERE status = 'SUCCESS' AND job_name IN (
+ 'delta_snils_inn_flow1',
+ 'delta_snils_inn_flow2',
+ 'delta_snils_inn_flow3',
+ 'delta_snils_inn_flow4',
+ 'delta_snils_inn_flow5'
+ )
+ ) = 5 AS all_success
+ FROM public.etl_checkpoints
+)
+SELECT
+ 'job_snils_inn_delta' as job_name,
+ CASE
+ WHEN has_error THEN 'ERROR'
+ WHEN all_success THEN 'SUCCESS'
+ ELSE 'ERROR'
+ END AS status,
+ current_timestamp AS record_created
+FROM status_check;
+ N
+
+
+ 896
+ 208
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf b/mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf
index 68f2f5a..c94e531 100644
--- a/mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf
+++ b/mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf
@@ -304,8 +304,8 @@
variableSTATUSN
- 1840
- 1792
+ 1696
+ 1680
@@ -364,7 +364,7 @@
- delta_snils_inn.hpl
+ delta_snils_inn_flow1.hplPIPELINE
@@ -373,17 +373,25 @@
NNN
- N
- ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/delta_snils_inn.hpl
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl
+
+ BasicM_R_UP_DATE
+ ${M_R_UP_DATE}
+
+ ID_F1
+ IDM_FLOW1
+
+ Y
- N
+ YlocalNN
@@ -393,26 +401,6 @@
1792
-
- Success delta_snils_inn
-
- SUCCESS
-
- N
- 3280
- 1792
-
-
-
- error delta_snils_inn
-
- SUCCESS
-
- N
- 3280
- 1872
-
- check_if_job_snils_inn_exists.hpl
@@ -479,8 +467,8 @@
NYN
- 1264
- 400
+ 2368
+ 560
@@ -791,8 +779,8 @@
NYN
- 2112
- 1280
+ 2368
+ 1424
@@ -817,12 +805,12 @@
NYN
- 2144
- 1792
+ 2384
+ 2304
- change_status_delta_snils_inn_success.hpl
+ change_status_delta_snils_inn_flow1_success.hplPIPELINE
@@ -832,7 +820,9 @@
NNN
- ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_success.hpl
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl
+
+ BasicY
@@ -848,7 +838,7 @@
- change_status_delta_snils_inn_error.hpl
+ change_status_delta_snils_inn_flow1_error.hplPIPELINE
@@ -858,7 +848,7 @@
NNN
- ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_error.hpl
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hplBasicY
@@ -1024,7 +1014,7 @@
- Success new snils_inn 2
+ Success snils_inn after errorSUCCESS
@@ -1319,6 +1309,509 @@
1312
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 2352
+ 2112
+
+
+
+ Abort workflow 2 2
+
+ ABORT
+
+ N
+ N
+ 2336
+ 1952
+
+
+
+ delta_snils_inn_flow2.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F2
+ IDM_FLOW2
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 1952
+
+
+
+ change_status_delta_snils_inn_flow2_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 1952
+
+
+
+ change_status_delta_snils_inn_flow2_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2032
+
+
+
+ delta_snils_inn_flow3.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F3
+ IDM_FLOW3
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2112
+
+
+
+ change_status_delta_snils_inn_flow3_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2112
+
+
+
+ change_status_delta_snils_inn_flow3_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2192
+
+
+
+ delta_snils_inn_flow4.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F4
+ IDM_FLOW4
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2272
+
+
+
+ change_status_delta_snils_inn_flow4_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2272
+
+
+
+ change_status_delta_snils_inn_flow4_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2352
+
+
+
+ delta_snils_inn_flow5.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ Y
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl
+
+
+ Basic
+
+
+ M_R_UP_DATE
+
+ ${M_R_UP_DATE}
+
+
+ ID_F5
+ IDM_FLOW5
+
+
+ Y
+
+ Y
+ local
+ N
+ N
+ Y
+ N
+ 2640
+ 2432
+
+
+
+ change_status_delta_snils_inn_flow5_success.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2432
+
+
+
+ change_status_delta_snils_inn_flow5_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 2992
+ 2512
+
+
+
+ branching_snils_inn_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1824
+ 2112
+
+
+
+ Simple delta_snils_inn WHERE ERROR
+
+ SIMPLE_EVAL
+
+ ERROR
+ string
+ true
+ equal
+ equal
+ N
+ variable
+ STATUS
+ N
+ 2064
+ 2112
+
+
+
+ delta_snils_inn success
+
+ SUCCESS
+
+ N
+ 2160
+ 1952
+
+
+
+ checkpoint_job_snils_inn_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 3440
+ 2112
+
+
+
+ Success delta_snils_inn
+
+ SUCCESS
+
+ N
+ 3728
+ 2112
+
+
@@ -1398,20 +1891,6 @@
YN
-
- Simple job_snils_inn_exists check NEW
- change_status_to_processing.hpl
- Y
- Y
- N
-
-
- change_status_to_processing.hpl
- recruitment_rows_five_flow_snils_inn.hpl
- Y
- Y
- N
- snils_inn_flow1.hplchange_status_snils_inn_flow1_success.hpl
@@ -1574,61 +2053,19 @@
N
- Simple snils_inn WHERE ERROR
- change_status_to_processing.hpl (2)
+ delta_snils_inn_flow1.hpl
+ change_status_delta_snils_inn_flow1_success.hplYYN
- change_status_to_processing.hpl (2)
- recruitment_rows_five_flow_if_error.hpl
- Y
- Y
- N
-
-
- Simple snils_inn WHERE SUCCESS
- change_status_to_processing_delta.hpl
- Y
- Y
- N
-
-
- delta_snils_inn.hpl
- change_status_delta_snils_inn_success.hpl
- Y
- Y
- N
-
-
- change_status_delta_snils_inn_success.hpl
- Success delta_snils_inn
- Y
- Y
- N
-
-
- delta_snils_inn.hpl
- change_status_delta_snils_inn_error.hpl
+ delta_snils_inn_flow1.hpl
+ change_status_delta_snils_inn_flow1_error.hplYNN
-
- change_status_delta_snils_inn_error.hpl
- error delta_snils_inn
- Y
- Y
- N
-
-
- change_status_to_processing_delta.hpl
- delta_snils_inn.hpl
- Y
- Y
- N
- snils_inn_flow1.hpl 2change_status_snils_inn_flow1_success.hpl 2
@@ -1771,7 +2208,7 @@
checkpoint_job_snils_inn.hpl 2
- Success new snils_inn 2
+ Success snils_inn after errorYYN
@@ -1811,6 +2248,244 @@
YN
+
+ recruitment_rows_five_flow_snils_inn.hpl
+ change_status_to_processing.hpl
+ Y
+ Y
+ N
+
+
+ Simple job_snils_inn_exists check NEW
+ recruitment_rows_five_flow_snils_inn.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_if_error.hpl
+ change_status_to_processing.hpl (2)
+ Y
+ Y
+ N
+
+
+ Simple snils_inn WHERE ERROR
+ recruitment_rows_five_flow_if_error.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow1.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ change_status_to_processing_delta.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ Abort workflow 2 2
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow2.hpl
+ change_status_delta_snils_inn_flow2_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow2.hpl
+ change_status_delta_snils_inn_flow2_error.hpl
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow3.hpl
+ change_status_delta_snils_inn_flow3_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow3.hpl
+ change_status_delta_snils_inn_flow3_error.hpl
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow4.hpl
+ change_status_delta_snils_inn_flow4_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow4.hpl
+ change_status_delta_snils_inn_flow4_error.hpl
+ Y
+ N
+ N
+
+
+ delta_snils_inn_flow5.hpl
+ change_status_delta_snils_inn_flow5_success.hpl
+ Y
+ Y
+ N
+
+
+ delta_snils_inn_flow5.hpl
+ change_status_delta_snils_inn_flow5_error.hpl
+ Y
+ N
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow3.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow2.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow4.hpl
+ Y
+ Y
+ N
+
+
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ delta_snils_inn_flow5.hpl
+ Y
+ Y
+ N
+
+
+ Simple snils_inn WHERE SUCCESS
+ branching_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ Simple delta_snils_inn WHERE ERROR
+ delta_snils_inn success
+ Y
+ N
+ N
+
+
+ branching_snils_inn_delta.hpl
+ Simple delta_snils_inn WHERE ERROR
+ Y
+ Y
+ N
+
+
+ Simple delta_snils_inn WHERE ERROR
+ recruitment_rows_five_flow_snils_inn.hpl 2
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow1_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow3_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow2_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow2_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow1_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow3_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow4_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow4_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow5_success.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ change_status_delta_snils_inn_flow5_error.hpl
+ checkpoint_job_snils_inn_delta.hpl
+ Y
+ Y
+ N
+
+
+ checkpoint_job_snils_inn_delta.hpl
+ Success delta_snils_inn
+ Y
+ Y
+ N
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl
new file mode 100644
index 0000000..fc9877b
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow1
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl
new file mode 100644
index 0000000..dc170be
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow2
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl
new file mode 100644
index 0000000..9042d44
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow3
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl
new file mode 100644
index 0000000..655073f
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow4
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl
new file mode 100644
index 0000000..f2ffc7a
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl
@@ -0,0 +1,202 @@
+
+
+
+ delta_snils_inn_flow5
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/03 16:10:48.509
+ -
+ 2025/06/03 16:10:48.509
+
+
+
+
+
+ Table input
+ Insert / update inn
+ Y
+
+
+ Table input
+ Insert / update snils
+ Y
+
+
+
+ Insert / update inn
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ inn
+
+ ervu_dashboard
+
inn
+
+ recruit_id
+ recruit_id
+ N
+
+
+ inn
+ inn
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 320
+
+
+
+ Insert / update snils
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ IS NOT NULL
+ snils
+
+ ervu_dashboard
+
snils
+
+ recruit_id
+ recruit_id
+ N
+
+
+ snils
+ snils
+ Y
+
+
+ actual
+ actual
+ Y
+
+
+ N
+
+
+ 1184
+ 480
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH
+base as (
+ SELECT
+ ri.recruit_id,
+ ri.info
+ FROM ervu_dashboard.recruits_info ri
+ join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
+ --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
+ AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
+ AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
+)
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ true AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ null as inn,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
+ false AS actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ true as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
+
+UNION ALL
+
+SELECT
+ recruit_id,
+ REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
+ null as snils,
+ false as actual
+FROM base
+WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
+ Y
+
+
+ 704
+ 400
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl
index 3302b1a..a4a5b8a 100644
--- a/mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl
+++ b/mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl
@@ -57,7 +57,17 @@
ervu-dashboardN0
- WITH ordered AS (
+ WITH
+fr_check AS (
+ SELECT
+ last_recruitment_id AS recruitment_id,
+ recruitment_created_date,
+ status,
+ job_name
+ FROM public.etl_checkpoints
+ WHERE status = 'ERROR' AND job_name IN ('snils_inn_flow1', 'snils_inn_flow2', 'snils_inn_flow3', 'snils_inn_flow4', 'snils_inn_flow5')
+),
+ordered AS (
SELECT
idm_id,
created_at,
@@ -68,132 +78,46 @@
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
- FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
FROM ordered
),
-flow_ranges AS (
- SELECT
- flow_num,
- MIN(created_at) AS min_date,
- MAX(created_at) AS max_date
+pivoted AS (
+ SELECT
+ position,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN idm_id::text END) AS idm_flow1,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN idm_id::text END) AS idm_flow2,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN idm_id::text END) AS idm_flow3,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN idm_id::text END) AS idm_flow4,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN idm_id::text END) AS idm_flow5
FROM splitted
- GROUP BY flow_num
-),
-recr_inf AS (
- SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
- FROM ervu_dashboard.citizen cit
- join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id
-
-),
-flow_data AS (
- SELECT
- fr.flow_num,
- ri.idm_id,
- (SELECT r.created_at FROM ervu_dashboard.recruitment r
- WHERE r.idm_id = ri.idm_id
- AND r.created_at BETWEEN fr.min_date AND fr.max_date
- LIMIT 1) AS created_at
- FROM recr_inf ri
- CROSS JOIN flow_ranges fr
- WHERE EXISTS (
- SELECT 1 FROM ervu_dashboard.recruitment r
- WHERE r.idm_id = ri.idm_id
- )
-),
-result_ma as (
- SELECT
- MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
- (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
-
- MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
- (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
-
- MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
- (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
-
- MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
- (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
-
- MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
- (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
- FROM flow_data
-),
-result_max as ( --костыль
- SELECT
- CASE
- WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow1
- END AS cr_flow1,
- idm_flow1,
- CASE
- WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow2
- END AS cr_flow2,
- idm_flow2,
- CASE
- WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow3
- END AS cr_flow3,
- idm_flow3,
- CASE
- WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow4
- END AS cr_flow4,
- idm_flow4,
- CASE
- WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
- ELSE cr_flow5
- END AS cr_flow5,
- idm_flow5
- FROM result_ma
+ GROUP BY position
),
remains as (
- select
- CASE
- WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at
- ELSE null
- END as cr_flow1,
- CASE
- WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id
- ELSE null
- END as idm_flow1,
-
- CASE
- WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at
- ELSE null
- END as cr_flow2,
- CASE
- WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id
- ELSE null
- END as idm_flow2,
-
- CASE
- WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at
- ELSE null
- END as cr_flow3,
- CASE
- WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id
- ELSE null
- END as idm_flow3,
-
- CASE
- WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at
- ELSE null
- END as cr_flow4,
- CASE
- WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id
- ELSE null
- END as idm_flow4,
-
- CASE
- WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at
- ELSE null
- END as cr_flow5,
- CASE
- WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id
- ELSE null
- END as idm_flow5
- from splitted
+ SELECT
+ position,
+ cr_flow1,
+ idm_flow1::uuid,
+ cr_flow2,
+ idm_flow2::uuid,
+ cr_flow3,
+ idm_flow3::uuid,
+ cr_flow4,
+ idm_flow4::uuid,
+ cr_flow5,
+ idm_flow5::uuid
+ FROM pivoted
+ WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
+ OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
+ OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
+ OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
+ OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
+ order by position
),
idm1 as (
select
diff --git a/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl
new file mode 100644
index 0000000..dcb65d7
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl
@@ -0,0 +1,86 @@
+
+
+
+ check_if_need_to_repeat_job
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 12:27:51.630
+ -
+ 2025/08/08 12:27:51.630
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ need_to_repeat_job
+ NEED_TO_REPEAT_JOB
+ ROOT_WORKFLOW
+
+
+ Y
+
+
+ 624
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (SELECT 1
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN etl.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'work_activity_job'
+where je.status is null or je.status in ('ERROR', 'PROCESSING')
+limit 1
+) as need_to_repeat_job;
+ N
+
+
+ 336
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl b/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl
new file mode 100644
index 0000000..70c1393
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl
@@ -0,0 +1,113 @@
+
+
+
+ check_if_work_activity_job_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 13:28:46.661
+ -
+ 2025/08/05 13:28:46.661
+
+
+
+
+
+ Set variables
+ Write to log
+ N
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_executed_flag
+ JOB_EXECUTED_FLAG
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 672
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (
+ SELECT 1
+ FROM etl.job_execution
+ WHERE job_name = 'work_activity_job'
+ limit 1
+ ) AS job_executed_flag;
+ N
+
+
+ 384
+ 336
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 944
+ 224
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl b/mappings/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl
new file mode 100644
index 0000000..c42cfdd
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl
@@ -0,0 +1,27 @@
+
+
+
+ delta_work_activity
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 12:54:02.780
+ -
+ 2025/08/05 12:54:02.780
+
+
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
new file mode 100644
index 0000000..1ade769
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
@@ -0,0 +1,384 @@
+
+
+
+ work_activity_flow
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 14:31:22.799
+ -
+ 2025/08/05 14:31:22.799
+
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 992
+ 512
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 992
+ 320
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id)
+VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
+
+
+
+
+ 288
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 10
+ 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 ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL
+ WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array'
+ THEN
+ ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0
+ ELSE
+ ri.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 ervu_dashboard.recruits_info ri
+
+)
+SELECT ti.recruit_id::uuid,
+ (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date,
+ ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type,
+ (ti.trud_deyat ->> 'prAktMestRab' = '1') 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' IS NOT NULL THEN 'Юридическое лицо'
+ WHEN ti.employer->'svedIP' IS NOT 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,
+ (
+ (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND
+ (
+ (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR
+ (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date
+ )
+ ) 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,
+ ti.reg_ip IS NOT NULL AS active_ip,
+ ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date,
+ ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date,
+ ti.self_employment IS NOT NULL AS active_self_employment
+FROM trud_info ti;
+
+ Y
+
+
+ 496
+ 320
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ personnel_event_date
+ personnel_event_date
+
+
+ personnel_event_type
+ personnel_event_type
+
+
+ current_workplace
+ current_workplace
+
+
+ position
+ position
+
+
+ employer_name
+ employer_name
+
+
+ employer_kpp
+ employer_kpp
+
+
+ employer_category
+ employer_category
+
+
+ employer_inn
+ employer_inn
+
+
+ employer_address
+ employer_address
+
+
+ employer_ogrnip
+ employer_ogrnip
+
+
+ employer_unit_type
+ employer_unit_type
+
+
+ employer_unit_address
+ employer_unit_address
+
+
+ parental_leave_start_date
+ parental_leave_start_date
+
+
+ parental_leave_end_date
+ parental_leave_end_date
+
+
+ parental_leave_active
+ parental_leave_active
+
+
+ reg_ip_date
+ reg_ip_date
+
+
+ dereg_ip_date
+ dereg_ip_date
+
+
+ ogrnip_ip
+ ogrnip_ip
+
+
+ active_ip
+ active_ip
+
+
+ reg_self_employment_date
+ reg_self_employment_date
+
+
+ dereg_self_employment_date
+ dereg_self_employment_date
+
+
+ active_self_employment
+ active_self_employment
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
citizen_work_activity
+ N
+ Y
+ N
+ Y
+
+
+ 720
+ 320
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
new file mode 100644
index 0000000..1a50b86
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
@@ -0,0 +1,396 @@
+
+
+
+ work_activity_flow_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/11 13:22:56.048
+ -
+ 2025/08/11 13:22:56.048
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_ERROR',
+ error_description = ?,
+ error_code = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 1040
+ 416
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 1040
+ 224
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET
+ status = 'DELTA_PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL
+where job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+ 336
+ 224
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 10
+ 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 ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL
+ WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array'
+ THEN
+ ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0
+ ELSE
+ ri.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 ervu_dashboard.recruits_info ri
+
+)
+SELECT ti.recruit_id::uuid,
+ (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date,
+ ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type,
+ (ti.trud_deyat ->> 'prAktMestRab' = '1') 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' IS NOT NULL THEN 'Юридическое лицо'
+ WHEN ti.employer->'svedIP' IS NOT 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,
+ (
+ (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND
+ (
+ (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR
+ (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date
+ )
+ ) 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,
+ ti.reg_ip IS NOT NULL AS active_ip,
+ ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date,
+ ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date,
+ ti.self_employment IS NOT NULL AS active_self_employment
+FROM trud_info ti;
+
+ Y
+
+
+ 544
+ 224
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ personnel_event_date
+ personnel_event_date
+
+
+ personnel_event_type
+ personnel_event_type
+
+
+ current_workplace
+ current_workplace
+
+
+ position
+ position
+
+
+ employer_name
+ employer_name
+
+
+ employer_kpp
+ employer_kpp
+
+
+ employer_category
+ employer_category
+
+
+ employer_inn
+ employer_inn
+
+
+ employer_address
+ employer_address
+
+
+ employer_ogrnip
+ employer_ogrnip
+
+
+ employer_unit_type
+ employer_unit_type
+
+
+ employer_unit_address
+ employer_unit_address
+
+
+ parental_leave_start_date
+ parental_leave_start_date
+
+
+ parental_leave_end_date
+ parental_leave_end_date
+
+
+ parental_leave_active
+ parental_leave_active
+
+
+ reg_ip_date
+ reg_ip_date
+
+
+ dereg_ip_date
+ dereg_ip_date
+
+
+ ogrnip_ip
+ ogrnip_ip
+
+
+ active_ip
+ active_ip
+
+
+ reg_self_employment_date
+ reg_self_employment_date
+
+
+ dereg_self_employment_date
+ dereg_self_employment_date
+
+
+ active_self_employment
+ active_self_employment
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
citizen_work_activity
+ N
+ Y
+ N
+ Y
+
+
+ 768
+ 224
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
new file mode 100644
index 0000000..6d5d9cd
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
@@ -0,0 +1,407 @@
+
+
+
+ work_activity_flow_repeat
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 13:25:52.319
+ -
+ 2025/08/08 13:25:52.319
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 976
+ 400
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 976
+ 208
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (
+ id,
+ job_name,
+ status,
+ execution_datetime,
+ error_description,
+ error_code,
+ recruitment_id
+)
+VALUES (
+ DEFAULT,
+ '${JOB_NAME}',
+ 'PROCESSING',
+ DEFAULT,
+ NULL,
+ NULL,
+ '${IDM_ID}'
+)
+ON CONFLICT (job_name, recruitment_id)
+DO UPDATE SET
+ status = 'PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL;
+
+
+ 272
+ 208
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 10
+ 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 ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL
+ WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array'
+ THEN
+ ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0
+ ELSE
+ ri.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 ervu_dashboard.recruits_info ri
+
+)
+SELECT ti.recruit_id::uuid,
+ (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date,
+ ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type,
+ (ti.trud_deyat ->> 'prAktMestRab' = '1') 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' IS NOT NULL THEN 'Юридическое лицо'
+ WHEN ti.employer->'svedIP' IS NOT 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,
+ (
+ (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND
+ (
+ (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR
+ (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date
+ )
+ ) 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,
+ ti.reg_ip IS NOT NULL AS active_ip,
+ ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date,
+ ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date,
+ ti.self_employment IS NOT NULL AS active_self_employment
+FROM trud_info ti;
+
+ Y
+
+
+ 480
+ 208
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ personnel_event_date
+ personnel_event_date
+
+
+ personnel_event_type
+ personnel_event_type
+
+
+ current_workplace
+ current_workplace
+
+
+ position
+ position
+
+
+ employer_name
+ employer_name
+
+
+ employer_kpp
+ employer_kpp
+
+
+ employer_category
+ employer_category
+
+
+ employer_inn
+ employer_inn
+
+
+ employer_address
+ employer_address
+
+
+ employer_ogrnip
+ employer_ogrnip
+
+
+ employer_unit_type
+ employer_unit_type
+
+
+ employer_unit_address
+ employer_unit_address
+
+
+ parental_leave_start_date
+ parental_leave_start_date
+
+
+ parental_leave_end_date
+ parental_leave_end_date
+
+
+ parental_leave_active
+ parental_leave_active
+
+
+ reg_ip_date
+ reg_ip_date
+
+
+ dereg_ip_date
+ dereg_ip_date
+
+
+ ogrnip_ip
+ ogrnip_ip
+
+
+ active_ip
+ active_ip
+
+
+ reg_self_employment_date
+ reg_self_employment_date
+
+
+ dereg_self_employment_date
+ dereg_self_employment_date
+
+
+ active_self_employment
+ active_self_employment
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
citizen_work_activity
+ N
+ Y
+ N
+ Y
+
+
+ 704
+ 208
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl
new file mode 100644
index 0000000..c8787e1
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl
@@ -0,0 +1,360 @@
+
+
+
+ recruitment_five_flow_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/11 13:16:11.204
+ -
+ 2025/08/11 13:16:11.204
+
+
+
+
+
+ Table input
+ work_activity_flow_delta.hpl
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 2
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 3
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 4
+ Y
+
+
+ Table input
+ work_activity_flow_delta.hpl 5
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.idm_id as recruitment_id
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN public.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'work_activity_job'
+where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');
+ N
+
+
+ 352
+ 288
+
+
+
+ work_activity_flow_delta.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 128
+
+
+
+ work_activity_flow_delta.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 208
+
+
+
+ work_activity_flow_delta.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 288
+
+
+
+ work_activity_flow_delta.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 368
+
+
+
+ work_activity_flow_delta.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 544
+ 448
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl
new file mode 100644
index 0000000..e1aeda3
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl
@@ -0,0 +1,360 @@
+
+
+
+ recruitment_five_flow_on_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 12:54:50.126
+ -
+ 2025/08/05 12:54:50.126
+
+
+
+
+
+ Table input
+ work_activity_flow_repeat.hpl
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 3
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 2
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 4
+ Y
+
+
+ Table input
+ work_activity_flow_repeat.hpl 5
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.idm_id as recruitment_id
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN public.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'work_activity_job'
+where je.status is null or je.status in('ERROR', 'PROCESSING');
+ N
+
+
+ 272
+ 368
+
+
+
+ work_activity_flow_repeat.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 208
+
+
+
+ work_activity_flow_repeat.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 288
+
+
+
+ work_activity_flow_repeat.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 368
+
+
+
+ work_activity_flow_repeat.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 448
+
+
+
+ work_activity_flow_repeat.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 528
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl
new file mode 100644
index 0000000..b1c9b40
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl
@@ -0,0 +1,356 @@
+
+
+
+ recruitments_five_flow
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/04/18 09:48:01.970
+ -
+ 2025/04/18 09:48:01.970
+
+
+
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 2
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 3
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 4
+ Y
+
+
+ Get all recruitments ordered by created_date
+ work_activity_flow.hpl 5
+ Y
+
+
+
+ Get all recruitments ordered by created_date
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+idm_id AS recruitment
+FROM ervu_dashboard.recruitment;
+ N
+
+
+ 432
+ 304
+
+
+
+ work_activity_flow.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 144
+
+
+
+ work_activity_flow.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 224
+
+
+
+ work_activity_flow.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 304
+
+
+
+ work_activity_flow.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 384
+
+
+
+ work_activity_flow.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ work_activity_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 464
+
+
+
+
+
+
diff --git a/mappings/info_recruits/citizen_tables/work_activity/work_activity_job.hwf b/mappings/info_recruits/citizen_tables/work_activity/work_activity_job.hwf
new file mode 100644
index 0000000..e384c46
--- /dev/null
+++ b/mappings/info_recruits/citizen_tables/work_activity/work_activity_job.hwf
@@ -0,0 +1,309 @@
+
+
+ work_activity_job
+ Y
+
+
+
+ -
+ 2025/08/05 12:45:28.561
+ -
+ 2025/08/05 12:45:28.561
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 224
+ 304
+
+
+
+ check_if_ work_activity_job_was_executed.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 416
+ 304
+
+
+
+ work_activity_job_exists_check
+
+ SIMPLE_EVAL
+
+ boolean
+ false
+ equal
+ equal
+ N
+ variable
+ JOB_EXECUTED_FLAG
+ N
+ 688
+ 304
+
+
+
+ recruitments_five_flow.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 928
+ 304
+
+
+
+ recruitment_five_flow_on_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 928
+ 608
+
+
+
+ check_if_need_to_repeat_job.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 464
+
+
+
+ Simple evaluation
+
+ SIMPLE_EVAL
+
+ boolean
+ true
+ equal
+ equal
+ N
+ variable
+ NEED_TO_REPEAT_JOB
+ N
+ 688
+ 608
+
+
+
+ recruitment_five_flow_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 800
+
+
+
+
+
+ Start
+ check_if_ work_activity_job_was_executed.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_ work_activity_job_was_executed.hpl
+ work_activity_job_exists_check
+ Y
+ Y
+ N
+
+
+ work_activity_job_exists_check
+ recruitments_five_flow.hpl
+ Y
+ Y
+ N
+
+
+ work_activity_job_exists_check
+ check_if_need_to_repeat_job.hpl
+ Y
+ N
+ N
+
+
+ check_if_need_to_repeat_job.hpl
+ Simple evaluation
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_on_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_delta.hpl
+ Y
+ N
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 256
+ Первичка
+ 65
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 560
+ Повторка
+ 64
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 608
+ 720
+ Дельта
+ 49
+
+
+
+
diff --git a/mappings/info_recruits/job_general_info_recruits.hwf b/mappings/info_recruits/job_general_info_recruits.hwf
index 6835eac..c2a1fb7 100644
--- a/mappings/info_recruits/job_general_info_recruits.hwf
+++ b/mappings/info_recruits/job_general_info_recruits.hwf
@@ -167,8 +167,8 @@
NYN
- 944
- 672
+ 928
+ 880
@@ -185,8 +185,8 @@
variableSTATUSN
- 1280
- 672
+ 1264
+ 880
@@ -720,18 +720,14 @@
NN${PROJECT_HOME}/info_recruits/job_info_recruits_from_json.hwf
-
- NothingM_R_CR_DATE
- ${M_R_CR_DATE}M_R_UP_DATE
- ${M_R_UP_DATE}Y
@@ -918,6 +914,16 @@
1408
+
+ Success
+
+ SUCCESS
+
+ N
+ 2224
+ 560
+
+
@@ -937,7 +943,7 @@
Startbranching_job_general_info_recruits.hpl
- Y
+ NYY
@@ -951,7 +957,7 @@
IF job_general_info_recruits SUCCESSjob_recruitment.hwf
- Y
+ NYN
@@ -1021,7 +1027,7 @@
job_parallel_recruits_info_citizen.hwfcheck_status_parallel_recruits_info_citizen.hpl
- Y
+ NYN
@@ -1200,6 +1206,20 @@
YN
+
+ Start
+ job_recruitment.hwf
+ Y
+ Y
+ Y
+
+
+ job_parallel_recruits_info_citizen.hwf
+ Success
+ Y
+ Y
+ N
+
diff --git a/mappings/info_recruits/job_info_recruits_from_json.hwf b/mappings/info_recruits/job_info_recruits_from_json.hwf
index 6779b80..c852794 100644
--- a/mappings/info_recruits/job_info_recruits_from_json.hwf
+++ b/mappings/info_recruits/job_info_recruits_from_json.hwf
@@ -223,7 +223,7 @@
- Workflow 7
+ job_citizen_liability_fz53.hwfWORKFLOW
@@ -231,10 +231,21 @@
NNN
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf
+ Nothing
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+ YN
+ localNNY
@@ -244,7 +255,7 @@
- Workflow 8
+ job_citizen_criminal_liability_fz53.hwfWORKFLOW
@@ -252,10 +263,21 @@
NNN
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf
+ Nothing
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+ YN
+ localNNY
@@ -265,7 +287,7 @@
- Workflow 9
+ job_citizen_appealing_violations_fz53.hwfWORKFLOW
@@ -273,10 +295,21 @@
NNN
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf
+ Nothing
+
+ M_R_CR_DATE
+ ${M_R_CR_DATE}
+
+
+ M_R_UP_DATE
+ ${M_R_UP_DATE}
+ YN
+ localNNY
@@ -305,18 +338,14 @@
NN${PROJECT_HOME}/info_recruits/citizen_tables/punishment/job_punishment.hwf
-
- NothingM_R_UP_DATE
- ${M_R_UP_DATE}M_R_CR_DATE
- ${M_R_CR_DATE}Y
@@ -377,22 +406,22 @@
Start
- Workflow 7
- N
+ job_citizen_liability_fz53.hwf
+ YYYStart
- Workflow 8
- N
+ job_citizen_criminal_liability_fz53.hwf
+ YYYStart
- Workflow 9
- N
+ job_citizen_appealing_violations_fz53.hwf
+ YYY
@@ -439,21 +468,21 @@
N
- Workflow 7
+ job_citizen_liability_fz53.hwfSuccessYYN
- Workflow 8
+ job_citizen_criminal_liability_fz53.hwfSuccessYYN
- Workflow 9
+ job_citizen_appealing_violations_fz53.hwfSuccessYY
diff --git a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf
index f0fd3b4..4db745f 100644
--- a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf
+++ b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf
@@ -31,7 +31,7 @@
- job_citizen.hwf
+ citizen_job.hwfWORKFLOW
@@ -39,19 +39,15 @@
NNN
- ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf
-
-
+ ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/citizen_job.hwfNothingM_R_CR_DATE
- ${M_R_CR_DATE}M_R_UP_DATE
- ${M_R_UP_DATE}Y
@@ -67,7 +63,7 @@
- job_recruits_info.hwf
+ recruits_info_job.hwfWORKFLOW
@@ -75,19 +71,15 @@
NNN
- ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf
-
-
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruits_info_job.hwfNothingM_R_CR_DATE
- ${M_R_CR_DATE}M_R_UP_DATE
- ${M_R_UP_DATE}Y
@@ -131,7 +123,7 @@
NNN
- ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwfNothingY
@@ -149,14 +141,14 @@
- job_citizen.hwf
+ citizen_job.hwfSuccess job_citizenYYN
- job_recruits_info.hwf
+ recruits_info_job.hwfSuccess job_recruits_infoYY
@@ -171,14 +163,14 @@
job_recruit_last_update_date.hwf
- job_citizen.hwf
- Y
+ citizen_job.hwf
+ NYYjob_recruit_last_update_date.hwf
- job_recruits_info.hwf
+ recruits_info_job.hwfYNY
diff --git a/mappings/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl
new file mode 100644
index 0000000..406fb97
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl
@@ -0,0 +1,86 @@
+
+
+
+ check_if_need_to_repeat_job
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 12:27:51.630
+ -
+ 2025/08/08 12:27:51.630
+
+
+
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ need_to_repeat_job
+ NEED_TO_REPEAT_JOB
+ ROOT_WORKFLOW
+
+
+ Y
+
+
+ 624
+ 288
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (SELECT 1
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN etl.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'recruits_info_job'
+where je.status is null or je.status in ('ERROR', 'PROCESSING')
+limit 1
+) as need_to_repeat_job;
+ N
+
+
+ 336
+ 288
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl b/mappings/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl
new file mode 100644
index 0000000..566d553
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl
@@ -0,0 +1,113 @@
+
+
+
+ check_if_recruits_info_job_exists
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 13:28:46.661
+ -
+ 2025/08/05 13:28:46.661
+
+
+
+
+
+ Set variables
+ Write to log
+ N
+
+
+ Table input
+ Set variables
+ Y
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ job_executed_flag
+ JOB_EXECUTED_FLAG
+ PARENT_WORKFLOW
+
+
+ Y
+
+
+ 672
+ 336
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT EXISTS (
+ SELECT 1
+ FROM etl.job_execution
+ WHERE job_name = 'recruits_info_job'
+ limit 1
+ ) AS job_executed_flag;
+ N
+
+
+ 384
+ 336
+
+
+
+ Write to log
+ WriteToLog
+
+ Y
+
+ 1
+
+ none
+
+
+ Y
+
+
+ N
+ 0
+ Basic
+ ${STATUS}
+
+
+ 944
+ 224
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/delta_recruits_info.hpl b/mappings/info_recruits/raw_data/recruits_info/delta_recruits_info.hpl
new file mode 100644
index 0000000..9bf2453
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/delta_recruits_info.hpl
@@ -0,0 +1,27 @@
+
+
+
+ delta_recruits_info
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 12:54:02.780
+ -
+ 2025/08/05 12:54:02.780
+
+
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwf b/mappings/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwf
new file mode 100644
index 0000000..317a0d9
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwf
@@ -0,0 +1,124 @@
+
+
+ job_recruit_last_update_date
+ Y
+
+
+
+ -
+ 2025/06/02 14:48:05.666
+ -
+ 2025/06/02 14:48:05.666
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 592
+ 352
+
+
+
+ recruit_update_date_ervu_dashboard.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruit_update_date_ervu_dashboard.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 784
+ 352
+
+
+
+ row_last_recruit_update_date.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl
+
+
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 1056
+ 352
+
+
+
+ Success
+
+ SUCCESS
+
+ N
+ 1232
+ 352
+
+
+
+
+
+ Start
+ recruit_update_date_ervu_dashboard.hpl
+ Y
+ Y
+ Y
+
+
+ recruit_update_date_ervu_dashboard.hpl
+ row_last_recruit_update_date.hpl
+ Y
+ Y
+ N
+
+
+ row_last_recruit_update_date.hpl
+ Success
+ Y
+ Y
+ N
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl
new file mode 100644
index 0000000..87d8cea
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl
@@ -0,0 +1,381 @@
+
+
+
+ recruits_info_flow
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 14:31:22.799
+ -
+ 2025/08/05 14:31:22.799
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+ Table output
+ Filter rows
+ Y
+
+
+ Filter rows
+ Change job status on success
+ Y
+
+
+ Table output
+ Detect empty stream
+ Y
+
+
+ Detect empty stream
+ Change job status on success
+ Y
+
+
+ Change job status on error
+ Abort
+ Y
+
+
+ Table input
+ Identify last row in a stream
+ Y
+
+
+ Identify last row in a stream
+ Table output
+ Y
+
+
+
+ Abort
+ Abort
+
+ Y
+
+ 1
+
+ none
+
+
+ ABORT_WITH_ERROR
+ Y
+
+ 0
+
+
+ 1376
+ 512
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 1024
+ 512
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 1632
+ 160
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id)
+VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
+
+
+
+
+ 288
+ 320
+
+
+
+ Detect empty stream
+ DetectEmptyStream
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 1632
+ 320
+
+
+
+ Filter rows
+ FilterRows
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+
+
+ =
+ last_row
+ N
+ -
+
+ N
+ -1
+ constant
+ -1
+ Y
+ Boolean
+
+
+
+ Change job status on success
+
+
+ 1024
+ 160
+
+
+
+ Identify last row in a stream
+ DetectLastRow
+
+ Y
+
+ 1
+
+ none
+
+
+ last_row
+
+
+ 736
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ SELECT
+ r.system_create_date AS created_at,
+ r.system_update_date AS updated_at,
+ ri.recruit_id,
+ ri.info,
+ ri.gir_import_data_version_id,
+ r.current_recruitment_id,
+ r.target_recruitment_id,
+ r.full_name,
+ r.addresses
+FROM recruits_info ri
+JOIN recruits r ON r.id = ri.recruit_id
+WHERE
+ '${IDM_ID}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date
+ --AND '${CR_DATE}' < ri.created_at
+--ORDER BY ri.created_at ASC;
+
+${LIMIT_FW}
+ Y
+
+
+ 496
+ 320
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ created_at
+ created_at
+
+
+ updated_at
+ updated_at
+
+
+ info
+ info
+
+
+ gir_import_data_version_id
+ gir_import_data_version_id
+
+
+ current_recruitment_id
+ current_recruitment_id
+
+
+ target_recruitment_id
+ target_recruitment_id
+
+
+ full_name
+ full_name
+
+
+ addresses
+ addresses
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ ervu_dashboard
+ Y
+
recruits_info
+ N
+ Y
+ N
+ Y
+
+
+ 1024
+ 320
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+ error_description
+
+ error_code
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl
new file mode 100644
index 0000000..4475ed7
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl
@@ -0,0 +1,282 @@
+
+
+
+ recruits_info_flow_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/11 13:22:56.048
+ -
+ 2025/08/11 13:22:56.048
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Insert / update
+ Y
+
+
+ Insert / update
+ Change job status on success
+ Y
+
+
+ Insert / update
+ Change job status on error
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+
+ Y
+
+ N
+
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_ERROR',
+ error_description = ?,
+ error_code = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+
+ 1040
+ 416
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'DELTA_SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 1040
+ 224
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET
+ status = 'DELTA_PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL
+where job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+ 336
+ 224
+
+
+
+ Insert / update
+ InsertUpdate
+
+ Y
+
+ 1
+
+ none
+
+
+ 100
+ ervu-dashboard
+
+
+ =
+ recruit_id
+ recruit_id
+
+
+ ervu_dashboard
+
recruits_info
+
+ recruit_id
+ recruit_id
+ N
+
+
+ created_at
+ created_at
+ Y
+
+
+ updated_at
+ updated_at
+ Y
+
+
+ info
+ info
+ Y
+
+
+ gir_import_data_version_id
+ gir_import_data_version_id
+ Y
+
+
+ current_recruitment_id
+ current_recruitment_id
+ Y
+
+
+ target_recruitment_id
+ target_recruitment_id
+ Y
+
+
+ full_name
+ full_name
+ Y
+
+
+ addresses
+ addresses
+ Y
+
+
+ N
+
+
+ 784
+ 224
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ SELECT
+ r.system_create_date AS created_at,
+ r.system_update_date AS updated_at,
+ ri.recruit_id,
+ ri.info,
+ ri.gir_import_data_version_id,
+ r.current_recruitment_id,
+ r.target_recruitment_id,
+ r.full_name,
+ r.addresses
+FROM recruits_info ri
+JOIN recruits r ON r.id = ri.recruit_id
+WHERE
+ '${IDM_ID}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date
+ AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
+ --AND '${CR_DATE}' < ri.created_at
+--ORDER BY ri.created_at ASC;
+
+${LIMIT_FW}
+ Y
+
+
+ 544
+ 224
+
+
+
+
+ Insert / update
+ Change job status on error
+ Y
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl
new file mode 100644
index 0000000..fe599e2
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl
@@ -0,0 +1,291 @@
+
+
+
+ recruits_info_flow_repeat
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/08 13:25:52.319
+ -
+ 2025/08/08 13:25:52.319
+
+
+
+
+
+ Create job execution record
+ Table input
+ Y
+
+
+ Table input
+ Table output
+ Y
+
+
+ Table output
+ Change job status on success
+ Y
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+
+ Change job status on error
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ error_description
+
+
+ error_code
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ Y
+ N
+ UPDATE etl.job_execution
+SET status = 'ERROR',
+ error_description = ?
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 976
+ 400
+
+
+
+ Change job status on success
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ Y
+ N
+ Y
+ N
+ N
+ UPDATE etl.job_execution
+SET status = 'SUCCESS'
+WHERE job_name = '${JOB_NAME}'
+and recruitment_id = '${IDM_ID}';
+
+
+
+
+ 976
+ 208
+
+
+
+ Create job execution record
+ ExecSql
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ ervu-dashboard
+ N
+ N
+ Y
+ N
+ N
+ INSERT INTO etl.job_execution (
+ id,
+ job_name,
+ status,
+ execution_datetime,
+ error_description,
+ error_code,
+ recruitment_id
+)
+VALUES (
+ DEFAULT,
+ '${JOB_NAME}',
+ 'PROCESSING',
+ DEFAULT,
+ NULL,
+ NULL,
+ '${IDM_ID}'
+)
+ON CONFLICT (job_name, recruitment_id)
+DO UPDATE SET
+ status = 'PROCESSING',
+ execution_datetime = DEFAULT,
+ error_description = NULL,
+ error_code = NULL;
+
+
+ 272
+ 208
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+
+ SELECT
+ r.system_create_date AS created_at,
+ r.system_update_date AS updated_at,
+ ri.recruit_id,
+ ri.info,
+ ri.gir_import_data_version_id,
+ r.current_recruitment_id,
+ r.target_recruitment_id,
+ r.full_name,
+ r.addresses
+FROM recruits_info ri
+JOIN recruits r ON r.id = ri.recruit_id
+WHERE
+ '${IDM_ID}' != '' -- Проверка на пустую строку
+ AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}'
+ AND '${M_R_CR_DATE}' >= r.system_create_date
+ --AND '${CR_DATE}' < ri.created_at
+--ORDER BY ri.created_at ASC;
+
+${LIMIT_FW}
+ Y
+
+
+ 480
+ 208
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ recruit_id
+ recruit_id
+
+
+ created_at
+ created_at
+
+
+ updated_at
+ updated_at
+
+
+ info
+ info
+
+
+ gir_import_data_version_id
+ gir_import_data_version_id
+
+
+ current_recruitment_id
+ current_recruitment_id
+
+
+ target_recruitment_id
+ target_recruitment_id
+
+
+ full_name
+ full_name
+
+
+ addresses
+ addresses
+
+
+ N
+ N
+ N
+ N
+
+ Y
+
+ N
+ ervu_dashboard
+ Y
+
recruits_info
+
+ N
+ Y
+ N
+ Y
+
+
+ 736
+ 208
+
+
+
+
+ Table output
+ Change job status on error
+ Y
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/recruit_update_date_ervu_dashboard.hpl b/mappings/info_recruits/raw_data/recruits_info/recruit_update_date_ervu_dashboard.hpl
new file mode 100644
index 0000000..f0b4186
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/recruit_update_date_ervu_dashboard.hpl
@@ -0,0 +1,95 @@
+
+
+
+ recruit_update_date_ervu_dashboard
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/02 14:50:31.833
+ -
+ 2025/06/02 14:50:31.833
+
+
+
+
+
+ Table input
+ Table output
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ created_at AS system_create_date,
+ updated_at AS system_update_date,
+ current_timestamp AS record_created,
+ 'job_recruits_info' AS workflow
+FROM ervu_dashboard.recruits_info
+WHERE updated_at = (SELECT MAX(updated_at) FROM ervu_dashboard.recruits_info)
+limit 1
+ N
+
+
+ 896
+ 304
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+ Y
+ N
+ public
+ N
+
recruit_create
+ N
+ Y
+ N
+ Y
+
+
+ 1216
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl
new file mode 100644
index 0000000..a839742
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl
@@ -0,0 +1,360 @@
+
+
+
+ recruitment_five_flow_delta
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/11 13:16:11.204
+ -
+ 2025/08/11 13:16:11.204
+
+
+
+
+
+ Table input
+ recruits_info_flow_delta.hpl
+ Y
+
+
+ Table input
+ recruits_info_flow_delta.hpl 2
+ Y
+
+
+ Table input
+ recruits_info_flow_delta.hpl 3
+ Y
+
+
+ Table input
+ recruits_info_flow_delta.hpl 4
+ Y
+
+
+ Table input
+ recruits_info_flow_delta.hpl 5
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.idm_id as recruitment_id
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN public.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'recruits_info_job'
+where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');
+ N
+
+
+ 352
+ 288
+
+
+
+ recruits_info_flow_delta.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 576
+ 128
+
+
+
+ recruits_info_flow_delta.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 576
+ 208
+
+
+
+ recruits_info_flow_delta.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 576
+ 288
+
+
+
+ recruits_info_flow_delta.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 576
+ 368
+
+
+
+ recruits_info_flow_delta.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 576
+ 448
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl
new file mode 100644
index 0000000..21c9f3d
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl
@@ -0,0 +1,360 @@
+
+
+
+ recruitment_five_flow_on_error
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/08/05 12:54:50.126
+ -
+ 2025/08/05 12:54:50.126
+
+
+
+
+
+ Table input
+ recruits_info_flow_repeat.hpl
+ Y
+
+
+ Table input
+ recruits_info_flow_repeat.hpl 2
+ Y
+
+
+ Table input
+ recruits_info_flow_repeat.hpl 3
+ Y
+
+
+ Table input
+ recruits_info_flow_repeat.hpl 4
+ Y
+
+
+ Table input
+ recruits_info_flow_repeat.hpl 5
+ Y
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ r.idm_id as recruitment_id
+FROM ervu_dashboard.recruitment r
+ LEFT JOIN public.job_execution je
+ ON r.idm_id = je.recruitment_id
+ and job_name = 'recruits_info_job'
+where je.status is null or je.status in('ERROR', 'PROCESSING');
+ N
+
+
+ 272
+ 368
+
+
+
+ recruits_info_flow_repeat.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 208
+
+
+
+ recruits_info_flow_repeat.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 288
+
+
+
+ recruits_info_flow_repeat.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 368
+
+
+
+ recruits_info_flow_repeat.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 448
+
+
+
+ recruits_info_flow_repeat.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment_id
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 464
+ 528
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl
new file mode 100644
index 0000000..7826784
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl
@@ -0,0 +1,356 @@
+
+
+
+ recruitments_five_flow
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/04/18 09:48:01.970
+ -
+ 2025/04/18 09:48:01.970
+
+
+
+
+
+ Get all recruitments ordered by created_date
+ recruits_info_flow.hpl
+ Y
+
+
+ Get all recruitments ordered by created_date
+ recruits_info_flow.hpl 2
+ Y
+
+
+ Get all recruitments ordered by created_date
+ recruits_info_flow.hpl 3
+ Y
+
+
+ Get all recruitments ordered by created_date
+ recruits_info_flow.hpl 4
+ Y
+
+
+ Get all recruitments ordered by created_date
+ recruits_info_flow.hpl 5
+ Y
+
+
+
+ Get all recruitments ordered by created_date
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+idm_id AS recruitment
+FROM ervu_dashboard.recruitment;
+ N
+
+
+ 432
+ 304
+
+
+
+ recruits_info_flow.hpl
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 144
+
+
+
+ recruits_info_flow.hpl 2
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 224
+
+
+
+ recruits_info_flow.hpl 3
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 304
+
+
+
+ recruits_info_flow.hpl 4
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 384
+
+
+
+ recruits_info_flow.hpl 5
+ PipelineExecutor
+
+ Y
+
+ 1
+
+ none
+
+
+ local
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl
+ N
+
+ 1
+
+
+
+
+ IDM_ID
+ recruitment
+
+
+
+ JOB_NAME
+
+ recruits_info_job
+
+ Y
+
+
+ ExecutionTime
+ ExecutionResult
+ ExecutionNrErrors
+ ExecutionLinesRead
+ ExecutionLinesWritten
+ ExecutionLinesInput
+ ExecutionLinesOutput
+ ExecutionLinesRejected
+ ExecutionLinesUpdated
+ ExecutionLinesDeleted
+ ExecutionFilesRetrieved
+ ExecutionExitStatus
+ ExecutionLogText
+ ExecutionLogChannelId
+
+
+ FileName
+
+
+
+ 704
+ 464
+
+
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf b/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf
new file mode 100644
index 0000000..d67afe8
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf
@@ -0,0 +1,353 @@
+
+
+ recruits_info_job
+ Y
+
+
+
+ 0
+ -
+ 2025/08/05 12:45:28.561
+ -
+ 2025/08/05 12:45:28.561
+
+
+ LIMIT_FW
+ ;
+
+
+
+ M_R_CR_DATE
+ 3001-01-01 00:00:00
+
+
+
+ M_R_UP_DATE
+ 0001-01-01 00:00:00
+
+
+
+
+
+ Start
+
+ SPECIAL
+
+ 1
+ 12
+ 60
+ 0
+ 0
+ N
+ 0
+ 1
+ N
+ 224
+ 304
+
+
+
+ check_if_recruits_info_job_exists.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 416
+ 304
+
+
+
+ recruits_info_job_exists_check
+
+ SIMPLE_EVAL
+
+ boolean
+ false
+ equal
+ equal
+ N
+ variable
+ JOB_EXECUTED_FLAG
+ N
+ 688
+ 304
+
+
+
+ recruitments_five_flow.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ Y
+ 928
+ 304
+
+
+
+ recruitment_five_flow_on_error.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 928
+ 608
+
+
+
+ check_if_need_to_repeat_job.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 464
+
+
+
+ Simple evaluation
+
+ SIMPLE_EVAL
+
+ boolean
+ true
+ equal
+ equal
+ N
+ variable
+ NEED_TO_REPEAT_JOB
+ N
+ 688
+ 608
+
+
+
+ recruitment_five_flow_delta.hpl
+
+ PIPELINE
+
+ N
+ N
+ N
+ N
+ N
+ N
+ ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl
+ Basic
+
+ Y
+
+ N
+ local
+ N
+ N
+ Y
+ N
+ 688
+ 800
+
+
+
+
+
+ Start
+ check_if_recruits_info_job_exists.hpl
+ Y
+ Y
+ Y
+
+
+ check_if_recruits_info_job_exists.hpl
+ recruits_info_job_exists_check
+ Y
+ Y
+ N
+
+
+ recruits_info_job_exists_check
+ recruitments_five_flow.hpl
+ Y
+ Y
+ N
+
+
+ recruits_info_job_exists_check
+ check_if_need_to_repeat_job.hpl
+ Y
+ N
+ N
+
+
+ check_if_need_to_repeat_job.hpl
+ Simple evaluation
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_on_error.hpl
+ Y
+ Y
+ N
+
+
+ Simple evaluation
+ recruitment_five_flow_delta.hpl
+ Y
+ N
+ N
+
+
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 256
+ Первичка
+ 65
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 800
+ 560
+ Повторка
+ 64
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ -1
+ 26
+ 608
+ 720
+ Дельта
+ 49
+
+
+ 251
+ 232
+ 201
+ 90
+ 58
+ 14
+ N
+ 90
+ 58
+ 14
+ N
+ Segoe UI
+ 9
+ 150
+ 1200
+ 80
+ recruits_info_job
+
+M_R_UP_DATE
+
+M_R_CR_DATE
+
+0001-01-01 00:00:00
+
+3001-01-01 00:00:00
+ 114
+
+
+
+
diff --git a/mappings/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl b/mappings/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl
new file mode 100644
index 0000000..47ce152
--- /dev/null
+++ b/mappings/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl
@@ -0,0 +1,108 @@
+
+
+
+ row_last_recruit_update_date
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/06/02 14:51:59.611
+ -
+ 2025/06/02 14:51:59.611
+
+
+
+
+
+ Copy rows to result
+ Set variables
+ Y
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 992
+ 320
+
+
+
+ Set variables
+ SetVariable
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ MAX_RECRUIT_UPDATE_DATE
+ M_R_UP_DATE
+ GP_WORKFLOW
+
+
+ Y
+
+
+ 1232
+ 320
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ SELECT
+ system_update_date AS MAX_RECRUIT_UPDATE_DATE--,
+--record_created
+FROM public.recruit_create
+WHERE system_update_date = (select max(system_update_date) from public.recruit_create)
+and workflow = 'job_recruits_info'
+order by record_created desc
+limit 1
+ N
+
+
+ 688
+ 320
+
+
+
+
+
+
diff --git a/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl b/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
new file mode 100644
index 0000000..f40a0ca
--- /dev/null
+++ b/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl
@@ -0,0 +1,121 @@
+
+
+
+ recruitment_rows_five_flow_citizen_appealing_violations_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/04/18 09:48:01.970
+ -
+ 2025/04/18 09:48:01.970
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 832
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ from ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+
+ MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1,
+
+ MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2,
+
+ MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3,
+
+ MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4,
+
+ MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5
+
+ FROM splitted
+ GROUP BY position
+ ORDER BY position
+)
+SELECT
+ cr_flow1,
+ IDM_FLOW1::uuid,
+ cr_flow2,
+ IDM_FLOW2::uuid,
+ cr_flow3,
+ IDM_FLOW3::uuid,
+ cr_flow4,
+ IDM_FLOW4::uuid,
+ cr_flow5,
+ IDM_FLOW5::uuid
+FROM pivoted
+limit 3
+ N
+
+
+ 464
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl b/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
new file mode 100644
index 0000000..6a8e5ea
--- /dev/null
+++ b/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl
@@ -0,0 +1,121 @@
+
+
+
+ recruitment_rows_five_flow_citizen_criminal_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/04/18 09:48:01.970
+ -
+ 2025/04/18 09:48:01.970
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 832
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ from ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+
+ MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1,
+
+ MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2,
+
+ MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3,
+
+ MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4,
+
+ MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5
+
+ FROM splitted
+ GROUP BY position
+ ORDER BY position
+)
+SELECT
+ cr_flow1,
+ IDM_FLOW1::uuid,
+ cr_flow2,
+ IDM_FLOW2::uuid,
+ cr_flow3,
+ IDM_FLOW3::uuid,
+ cr_flow4,
+ IDM_FLOW4::uuid,
+ cr_flow5,
+ IDM_FLOW5::uuid
+FROM pivoted
+limit 3
+ N
+
+
+ 464
+ 304
+
+
+
+
+
+
diff --git a/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl b/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl
new file mode 100644
index 0000000..711a8a9
--- /dev/null
+++ b/mappings/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl
@@ -0,0 +1,121 @@
+
+
+
+ recruitment_rows_five_flow_citizen_liability_fz53
+ Y
+
+
+
+ Normal
+
+
+ N
+ 1000
+ 100
+ -
+ 2025/04/18 09:48:01.970
+ -
+ 2025/04/18 09:48:01.970
+
+
+
+
+
+ Table input
+ Copy rows to result
+ Y
+
+
+
+ Copy rows to result
+ RowsToResult
+
+ Y
+
+ 1
+
+ none
+
+
+
+
+ 832
+ 304
+
+
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu-dashboard
+ N
+ 0
+ WITH ordered AS (
+ SELECT
+ idm_id,
+ created_at,
+ ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
+ COUNT(*) OVER () AS total_rows
+ from ervu_dashboard.recruitment
+),
+splitted AS (
+ SELECT *,
+ CEIL(total_rows / 5.0) AS part_size,
+ FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
+ ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
+ FROM ordered
+),
+pivoted AS (
+ SELECT
+ position,
+
+ MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1,
+ MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1,
+
+ MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2,
+ MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2,
+
+ MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3,
+ MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3,
+
+ MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4,
+ MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4,
+
+ MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5,
+ MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5
+
+ FROM splitted
+ GROUP BY position
+ ORDER BY position
+)
+SELECT
+ cr_flow1,
+ IDM_FLOW1::uuid,
+ cr_flow2,
+ IDM_FLOW2::uuid,
+ cr_flow3,
+ IDM_FLOW3::uuid,
+ cr_flow4,
+ IDM_FLOW4::uuid,
+ cr_flow5,
+ IDM_FLOW5::uuid
+FROM pivoted
+limit 3
+ N
+
+
+ 464
+ 304
+
+
+
+
+
+
diff --git a/mappings/mil_com/job_recruitments_milcom.hwf b/mappings/mil_com/job_recruitments_milcom.hwf
index f429311..e70eb4f 100644
--- a/mappings/mil_com/job_recruitments_milcom.hwf
+++ b/mappings/mil_com/job_recruitments_milcom.hwf
@@ -693,8 +693,6 @@ WHERE recording_date = current_date
NN${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf
-
- NothingY
@@ -1888,7 +1886,7 @@ WHERE recording_date = current_date
Startrecruitment_campaign.subpoenas(m_c).hwf
- Y
+ NYY