fix delta
This commit is contained in:
parent
fb50f28984
commit
bba9e320c1
8 changed files with 15 additions and 40 deletions
|
|
@ -320,6 +320,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
i.recruit_id,
|
||||
i.created_at,
|
||||
|
|
@ -360,7 +361,6 @@ JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Пров
|
|||
|
||||
AND '${M_R_CR_DATE}' >= i.created_at
|
||||
|
||||
--AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
|
||||
|
||||
WHERE --hidden IS FALSE AND
|
||||
|
||||
|
|
@ -455,14 +455,11 @@ ${LIMIT_FW}</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_criminal_liability_fz53</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -487,19 +484,16 @@ ${LIMIT_FW}</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_criminal_liability_fz53</field>
|
||||
<name>has_criminal_liability_fz53</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -328,13 +328,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>created_at</field>
|
||||
<name>created_at</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_criminal_liability_fz53</table>
|
||||
|
|
@ -434,6 +432,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
i.recruit_id,
|
||||
i.created_at,
|
||||
|
|
@ -468,8 +467,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
FROM public.infringement i
|
||||
JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}'
|
||||
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp --coalesce(i.updated_at,i.created_at)
|
||||
--AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
|
||||
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp
|
||||
WHERE --hidden IS FALSE AND
|
||||
i.type = 'CRIMINAL'
|
||||
|
||||
|
|
@ -495,19 +493,16 @@ ${LIMIT_FW}</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_criminal_liability_fz53</field>
|
||||
<name>has_criminal_liability_fz53</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -328,13 +328,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>created_at</field>
|
||||
<name>created_at</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_liability_fz53</table>
|
||||
|
|
@ -439,6 +437,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
i.recruit_id,
|
||||
i.created_at,
|
||||
|
|
@ -472,8 +471,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
FROM public.infringement i
|
||||
JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}'
|
||||
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp --coalesce(i.updated_at,i.created_at)
|
||||
--AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты
|
||||
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp
|
||||
WHERE -- hidden IS FALSE AND
|
||||
type = 'ADMINISTRATIVE'
|
||||
|
||||
|
|
@ -499,19 +497,16 @@ ${LIMIT_FW}</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_liability_fz53</field>
|
||||
<name>has_liability_fz53</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -328,7 +328,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>id</field>
|
||||
<name>id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>recruit_archive</table>
|
||||
|
|
@ -388,6 +387,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu_person_archive</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
id,
|
||||
recruit_id,
|
||||
|
|
@ -404,7 +404,7 @@ FROM public.recruit_archive
|
|||
WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND vk_id = '${IDM_ID}'
|
||||
--AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
||||
AND updated_at >= '${M_R_UP_DATE}'::timestamp</sql>
|
||||
AND updated_at >= '${M_RECARCH_UP_DATE}'::timestamp</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -426,19 +426,16 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>card_in_archive</field>
|
||||
<name>card_in_archive</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -273,13 +273,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>id</field>
|
||||
<name>id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>created_at</field>
|
||||
<name>created_at</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>restriction_document</table>
|
||||
|
|
@ -374,13 +372,14 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
*
|
||||
FROM public.restriction_document
|
||||
WHERE
|
||||
'${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND vk_id = '${IDM_ID}'
|
||||
AND updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
AND updated_at >= '${M_RESTRDOC_UP_DATE}'::timestamp
|
||||
|
||||
${LIMIT_FW}</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
|
|
|
|||
|
|
@ -328,13 +328,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>id</field>
|
||||
<name>id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>created_at</field>
|
||||
<name>created_at</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>restriction_document_item</table>
|
||||
|
|
@ -434,6 +432,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>select
|
||||
s.recruit_id,
|
||||
CASE
|
||||
|
|
@ -449,7 +448,7 @@ s.id = rd.subpoena_id
|
|||
WHERE
|
||||
'${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND rd.vk_id = '${IDM_ID}'
|
||||
AND rdi.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
AND rdi.updated_at >= '${M_RDI_UP_DATE}'::timestamp
|
||||
|
||||
${LIMIT_FW}</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
|
|
@ -473,19 +472,16 @@ ${LIMIT_FW}</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_active_temporary_measure</field>
|
||||
<name>has_active_temporary_measure</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -273,13 +273,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>id</field>
|
||||
<name>id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>created_date_time</field>
|
||||
<name>created_date_time</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>subpoena_appearance</table>
|
||||
|
|
@ -339,13 +337,14 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>select sa.*
|
||||
from public.subpoena_appearance sa
|
||||
join public.subpoena s on s.id = sa.subpoena_id
|
||||
WHERE
|
||||
'${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND s.department_id = '${IDM_ID}'
|
||||
AND sa.change_date_time >= '${M_R_UP_DATE}'::timestamp
|
||||
AND sa.change_date_time >= '${M_SA_UP_DATE}'::timestamp
|
||||
|
||||
${LIMIT_FW}</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
|
|
|
|||
|
|
@ -273,7 +273,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>id</field>
|
||||
<name>id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>subpoena_send_info</table>
|
||||
|
|
@ -368,13 +367,14 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>select ssi.*
|
||||
from public.subpoena_send_info ssi
|
||||
join public.subpoena s on s.id = ssi.subpoena_id
|
||||
WHERE
|
||||
'${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND s.department_id = '${IDM_ID}'
|
||||
AND s.status_change_date >= '${M_R_UP_DATE}'::timestamp
|
||||
AND s.status_change_date >= '${M_S_UP_DATE}'::timestamp
|
||||
${LIMIT_FW}</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue