punishment
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
10000
ervu-dashboard
=
recruit_id
recruit_id
ervu_dashboard
authority_name
authority_name
Y
law_point
law_point
Y
punishment_code
punishment_code
Y
punishment_type
punishment_type
Y
recruit_id
recruit_id
N
release_date
release_date
Y
release_reason
release_reason
Y
sentence
sentence
Y
sentence_changed
sentence_changed
Y
sentence_place
sentence_place
Y
sentense_date
sentense_date
Y
start_date
start_date
Y
N
784
304
Table input
TableInput
Y
1
none
ervu_person_registry
N
0
with ugol as
(select jsonb_array_elements(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') = 'array'
--AND r.system_update_date >= '${UP_D}'
)
select
r.id recruit_id,
u->>'naimSuda' authority_name,
u->>'srokNakaz' sentence,
u->>'adresNakaz' sentence_place,
u->>'kodVidNakaz' punishment_code,
u->>'izmSrokNakaz' sentence_changed,
u->>'naimVidNakaz' punishment_type,
to_date(u->>'dataNachSrok', 'YYYY-MM-DD') start_date,
to_date(u->>'dataOsvobozhd', 'YYYY-MM-DD') release_date,
to_date(u->>'dataOsuzhd', 'YYYY-MM-DD') sentense_date,
u->>'ugolovZakon' law_point,
u->>'osnovOsvobozhd' release_reason
from public.recruits r
join ugol on r.id = ugol.recruit_id
Y
528
304
Table output
TableOutput
Y
1
none
1000
ervu-dashboard
N
N
N
N
Y
N
ervu_dashboard
N
N
Y
N
Y
752
176