diff --git a/v1_apache-hop dash mapping/info_recruits/info_recruits.hpl b/v1_apache-hop dash mapping/info_recruits/info_recruits.hpl
index 5192cc7..b1dc312 100644
--- a/v1_apache-hop dash mapping/info_recruits/info_recruits.hpl
+++ b/v1_apache-hop dash mapping/info_recruits/info_recruits.hpl
@@ -320,15 +320,18 @@ type_place_stay
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
FROM
public.recruits_info ri
+ JOIN
+ public.recruits r ON ri.recruit_id = r.id
WHERE
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
+ AND r.system_update_date >= '${UP_D}'
),
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
+ (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
FROM
extracted_children
),
@@ -349,6 +352,7 @@ registration_reasons AS (
FROM public.recruits AS r
JOIN public.military_registration_reason AS mrr
ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
+ WHERE r.system_update_date >= '${UP_D}'
),
driver_license AS (
@@ -360,9 +364,12 @@ driver_license AS (
) AS driver_license
FROM
public.recruits_info ri
+ JOIN
+ public.recruits r ON ri.recruit_id = r.id
LEFT JOIN LATERAL
jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') AS sved_vodit
ON true
+ WHERE r.system_update_date >= '${UP_D}'
GROUP BY ri.recruit_id
),
@@ -439,6 +446,8 @@ sports_category AS ( -- проверка на наличие спортивно
ELSE null -- Неопределенное значение для всех других случаев
END AS sports_category
FROM public.recruits_info ri
+ JOIN public.recruits r ON ri.recruit_id = r.id
+ WHERE r.system_update_date >= '${UP_D}'
),
disability_group AS (
@@ -454,6 +463,8 @@ disability_group AS (
ELSE 'Нет информации об инвалидности'
END AS disability_group
FROM public.recruits_info ri
+ JOIN public.recruits r ON ri.recruit_id = r.id
+ WHERE r.system_update_date >= '${UP_D}'
),
tractor_license AS (
@@ -470,6 +481,8 @@ tractor_license AS (
ELSE null
END AS tractor_license
FROM public.recruits_info ri
+ JOIN public.recruits r ON ri.recruit_id = r.id
+ WHERE r.system_update_date >= '${UP_D}'
),
is_wanted AS (
@@ -507,6 +520,8 @@ is_wanted AS (
ELSE NULL
END AS criminal_prosecution
FROM public.recruits_info ri
+ JOIN public.recruits r ON ri.recruit_id = r.id
+ WHERE r.system_update_date >= '${UP_D}'
),
employment AS (
@@ -568,6 +583,8 @@ employment AS (
END
) AS employment_status
FROM public.recruits_info ri
+ JOIN public.recruits r ON ri.recruit_id = r.id
+ WHERE r.system_update_date >= '${UP_D}'
)
SELECT
diff --git a/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf b/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf
index 65313d5..7319365 100644
--- a/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf
+++ b/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf
@@ -32,8 +32,8 @@
0
1
N
- 592
- 1536
+ 496
+ 1936
@@ -89,8 +89,8 @@
N
N
N
- 880
- 2752
+ 864
+ 1872
@@ -118,20 +118,24 @@
N
Y
N
- N
+ Y
${Internal.Entry.Current.Folder}/opekun.hpl
Basic
+
+ UP_D
+ UPDATE_DATE
+
Y
- N
+ Y
local
N
N
Y
N
- 928
- 2256
+ 992
+ 1664
@@ -156,8 +160,8 @@
N
Y
N
- 976
- 2752
+ 992
+ 1776
@@ -741,8 +745,8 @@
N
Y
N
- 864
- 1536
+ 832
+ 1664
@@ -757,7 +761,7 @@
SQL.spouse
spouse
- Y
+ N
Y
N
@@ -778,14 +782,14 @@
spouse
Success
- N
+ Y
Y
N
opekun
Success
- N
+ Y
Y
N
@@ -1076,17 +1080,10 @@
Y
N
-
- Start
- opekun
- N
- Y
- Y
-
select_delta_time.hpl
info_recruits
- Y
+ N
Y
N
@@ -1097,6 +1094,20 @@
Y
Y
+
+ select_delta_time.hpl
+ opekun
+ Y
+ Y
+ N
+
+
+ select_delta_time.hpl
+ spouse
+ Y
+ Y
+ N
+
diff --git a/v1_apache-hop dash mapping/info_recruits/opekun.hpl b/v1_apache-hop dash mapping/info_recruits/opekun.hpl
index 1274ad2..521127a 100644
--- a/v1_apache-hop dash mapping/info_recruits/opekun.hpl
+++ b/v1_apache-hop dash mapping/info_recruits/opekun.hpl
@@ -31,77 +31,6 @@
Y
-
- Table input
- TableInput
-
- Y
-
- 1
-
- none
-
-
- ervu_person_registry
- N
- 0
- with person as
-(select jsonb_array_elements(ri.info->'svedOpekun'->'svedSoczPod') ch,
- ri.recruit_id
-from public.recruits_info ri
-where jsonb_typeof(ri.info->'svedOpekun'->'svedSoczPod') = 'array')
-select
- r.id 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 public.recruits r
-join person on r.id = person.recruit_id
- N
-
-
- 288
- 240
-
-
-
- Table output
- TableOutput
-
- Y
-
- 1
-
- none
-
-
- 1000
- ervu-dashboard
-
-
- N
- N
- N
- N
- Y
- N
- ervu_dashboard
- N
-
- N
- Y
- N
- Y
-
-
- 480
- 112
-
-
Insert / update
InsertUpdate
@@ -120,7 +49,6 @@ join person on r.id = person.recruit_id
=
recruit_id
recruit_id
-
ervu_dashboard
@@ -152,6 +80,82 @@ join person on r.id = person.recruit_id
240
+
+ Table input
+ TableInput
+
+ Y
+
+ 1
+
+ none
+
+
+ ervu_person_registry
+ N
+ 0
+ with person as
+(select jsonb_array_elements(ri.info->'svedOpekun'->'svedSoczPod') ch,
+ ri.recruit_id
+from public.recruits_info ri
+where jsonb_typeof(ri.info->'svedOpekun'->'svedSoczPod') = 'array')
+select
+ r.id 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 public.recruits r
+join person on r.id = person.recruit_id
+where
+r.system_update_date >= '${UP_D}'
+ Y
+
+
+ 288
+ 240
+
+
+
+ Table output
+ TableOutput
+
+ Y
+
+ 1
+
+ none
+
+
+ 1000
+ ervu-dashboard
+
+
+ N
+ N
+ N
+ N
+
+ Y
+
+ N
+ ervu_dashboard
+ N
+
+
+ N
+ Y
+ N
+ Y
+
+
+ 496
+ 112
+
+