добавил первоначальный учет 3 блока
This commit is contained in:
parent
dddeac0b1b
commit
09112b19aa
8 changed files with 2930 additions and 15 deletions
|
|
@ -564,9 +564,26 @@
|
|||
|
||||
SELECT
|
||||
CASE
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201) THEN 3
|
||||
WHEN CAST(sr.code AS INTEGER) IN (202) THEN 4
|
||||
WHEN CAST(sr.code AS INTEGER) IN (203) THEN 5
|
||||
WHEN CAST(sr.code AS INTEGER) IN (204) THEN 6
|
||||
WHEN CAST(sr.code AS INTEGER) IN (205) THEN 7
|
||||
WHEN CAST(sr.code AS INTEGER) IN (206) THEN 8
|
||||
WHEN CAST(sr.code AS INTEGER) IN (207) THEN 9
|
||||
WHEN CAST(sr.code AS INTEGER) IN (208) THEN 10
|
||||
WHEN CAST(sr.code AS INTEGER) IN (209) THEN 11
|
||||
WHEN CAST(sr.code AS INTEGER) IN (210) THEN 12
|
||||
WHEN CAST(sr.code AS INTEGER) IN (211) THEN 13
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102) THEN 15
|
||||
WHEN CAST(sr.code AS INTEGER) IN (103) THEN 16
|
||||
WHEN CAST(sr.code AS INTEGER) IN (104) THEN 17
|
||||
WHEN CAST(sr.code AS INTEGER) IN (105) THEN 18
|
||||
WHEN CAST(sr.code AS INTEGER) IN (106) THEN 19
|
||||
WHEN CAST(sr.code AS INTEGER) IN (107) THEN 20
|
||||
WHEN CAST(sr.code AS INTEGER) IN (301) THEN 21
|
||||
ELSE NULL
|
||||
END AS summonses_reason_id,
|
||||
|
|
|
|||
|
|
@ -563,10 +563,27 @@
|
|||
<sql>---- На данные момент это костыль в recruitment_id
|
||||
|
||||
SELECT
|
||||
CASE
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
CASE
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201) THEN 3
|
||||
WHEN CAST(sr.code AS INTEGER) IN (202) THEN 4
|
||||
WHEN CAST(sr.code AS INTEGER) IN (203) THEN 5
|
||||
WHEN CAST(sr.code AS INTEGER) IN (204) THEN 6
|
||||
WHEN CAST(sr.code AS INTEGER) IN (205) THEN 7
|
||||
WHEN CAST(sr.code AS INTEGER) IN (206) THEN 8
|
||||
WHEN CAST(sr.code AS INTEGER) IN (207) THEN 9
|
||||
WHEN CAST(sr.code AS INTEGER) IN (208) THEN 10
|
||||
WHEN CAST(sr.code AS INTEGER) IN (209) THEN 11
|
||||
WHEN CAST(sr.code AS INTEGER) IN (210) THEN 12
|
||||
WHEN CAST(sr.code AS INTEGER) IN (211) THEN 13
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102) THEN 15
|
||||
WHEN CAST(sr.code AS INTEGER) IN (103) THEN 16
|
||||
WHEN CAST(sr.code AS INTEGER) IN (104) THEN 17
|
||||
WHEN CAST(sr.code AS INTEGER) IN (105) THEN 18
|
||||
WHEN CAST(sr.code AS INTEGER) IN (106) THEN 19
|
||||
WHEN CAST(sr.code AS INTEGER) IN (107) THEN 20
|
||||
WHEN CAST(sr.code AS INTEGER) IN (301) THEN 21
|
||||
ELSE NULL
|
||||
END AS summonses_reason_id,
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@
|
|||
<created_date>2024/12/09 13:18:43.055</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/09 13:18:43.055</modified_date>
|
||||
<key_for_session_key/>
|
||||
<key_for_session_key/>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
|
|
@ -564,9 +564,26 @@
|
|||
|
||||
SELECT
|
||||
CASE
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201) THEN 3
|
||||
WHEN CAST(sr.code AS INTEGER) IN (202) THEN 4
|
||||
WHEN CAST(sr.code AS INTEGER) IN (203) THEN 5
|
||||
WHEN CAST(sr.code AS INTEGER) IN (204) THEN 6
|
||||
WHEN CAST(sr.code AS INTEGER) IN (205) THEN 7
|
||||
WHEN CAST(sr.code AS INTEGER) IN (206) THEN 8
|
||||
WHEN CAST(sr.code AS INTEGER) IN (207) THEN 9
|
||||
WHEN CAST(sr.code AS INTEGER) IN (208) THEN 10
|
||||
WHEN CAST(sr.code AS INTEGER) IN (209) THEN 11
|
||||
WHEN CAST(sr.code AS INTEGER) IN (210) THEN 12
|
||||
WHEN CAST(sr.code AS INTEGER) IN (211) THEN 13
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102) THEN 15
|
||||
WHEN CAST(sr.code AS INTEGER) IN (103) THEN 16
|
||||
WHEN CAST(sr.code AS INTEGER) IN (104) THEN 17
|
||||
WHEN CAST(sr.code AS INTEGER) IN (105) THEN 18
|
||||
WHEN CAST(sr.code AS INTEGER) IN (106) THEN 19
|
||||
WHEN CAST(sr.code AS INTEGER) IN (107) THEN 20
|
||||
WHEN CAST(sr.code AS INTEGER) IN (301) THEN 21
|
||||
ELSE NULL
|
||||
END AS summonses_reason_id,
|
||||
|
|
|
|||
839
mappings_old/metrics/decision_formation_status.ktr
Normal file
839
mappings_old/metrics/decision_formation_status.ktr
Normal file
|
|
@ -0,0 +1,839 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<transformation>
|
||||
<info>
|
||||
<name>decision_formation_status</name>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<trans_version/>
|
||||
<trans_type>Normal</trans_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<log>
|
||||
<trans-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<size_limit_lines/>
|
||||
<interval/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STATUS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STATUS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STARTDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STARTDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ENDDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ENDDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>DEPDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>DEPDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>REPLAYDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>REPLAYDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_FIELD</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_FIELD</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>EXECUTING_SERVER</id>
|
||||
<enabled>N</enabled>
|
||||
<name>EXECUTING_SERVER</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>EXECUTING_USER</id>
|
||||
<enabled>N</enabled>
|
||||
<name>EXECUTING_USER</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CLIENT</id>
|
||||
<enabled>N</enabled>
|
||||
<name>CLIENT</name>
|
||||
</field>
|
||||
</trans-log-table>
|
||||
<perf-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<interval/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>SEQ_NR</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>SEQ_NR</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEPNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEPNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEP_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEP_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>INPUT_BUFFER_ROWS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>INPUT_BUFFER_ROWS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OUTPUT_BUFFER_ROWS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OUTPUT_BUFFER_ROWS</name>
|
||||
</field>
|
||||
</perf-log-table>
|
||||
<channel-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGGING_OBJECT_TYPE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGGING_OBJECT_TYPE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_NAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_NAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>REPOSITORY_DIRECTORY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>REPOSITORY_DIRECTORY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>FILENAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>FILENAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_REVISION</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_REVISION</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>PARENT_CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>PARENT_CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ROOT_CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ROOT_CHANNEL_ID</name>
|
||||
</field>
|
||||
</channel-log-table>
|
||||
<step-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEPNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEPNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEP_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEP_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_FIELD</id>
|
||||
<enabled>N</enabled>
|
||||
<name>LOG_FIELD</name>
|
||||
</field>
|
||||
</step-log-table>
|
||||
<metrics-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_CODE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_CODE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_DESCRIPTION</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_DESCRIPTION</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_SUBJECT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_SUBJECT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_TYPE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_TYPE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_VALUE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_VALUE</name>
|
||||
</field>
|
||||
</metrics-log-table>
|
||||
</log>
|
||||
<maxdate>
|
||||
<connection/>
|
||||
<table/>
|
||||
<field/>
|
||||
<offset>0.0</offset>
|
||||
<maxdiff>0.0</maxdiff>
|
||||
</maxdate>
|
||||
<size_rowset>10000</size_rowset>
|
||||
<sleep_time_empty>50</sleep_time_empty>
|
||||
<sleep_time_full>50</sleep_time_full>
|
||||
<unique_connections>N</unique_connections>
|
||||
<feedback_shown>Y</feedback_shown>
|
||||
<feedback_size>50000</feedback_size>
|
||||
<using_thread_priorities>Y</using_thread_priorities>
|
||||
<shared_objects_file/>
|
||||
<capture_step_performance>N</capture_step_performance>
|
||||
<step_performance_capturing_delay>1000</step_performance_capturing_delay>
|
||||
<step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<partitionschemas>
|
||||
</partitionschemas>
|
||||
<slaveservers>
|
||||
</slaveservers>
|
||||
<clusterschemas>
|
||||
</clusterschemas>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/12/10 14:51:36.276</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/10 14:51:36.276</modified_date>
|
||||
<key_for_session_key/>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<connection>
|
||||
<name>ervu-person-registry</name>
|
||||
<server>person-dbhost</server>
|
||||
<type>POSTGRESQL</type>
|
||||
<access>Native</access>
|
||||
<database>person-dbname</database>
|
||||
<port>4444</port>
|
||||
<username>person-dbuser</username>
|
||||
<password>Encrypted 2be98afc86aa7f2e4cb79ce10db80b9cf</password>
|
||||
<servername/>
|
||||
<data_tablespace/>
|
||||
<index_tablespace/>
|
||||
<attributes>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>IS_CLUSTERED</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PORT_NUMBER</code>
|
||||
<attribute>5432</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PRESERVE_RESERVED_WORD_CASE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>QUOTE_ALL_FIELDS</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>USE_POOLING</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</connection>
|
||||
<connection>
|
||||
<name>metrics</name>
|
||||
<server>metrics-dbhost</server>
|
||||
<type>POSTGRESQL</type>
|
||||
<access>Native</access>
|
||||
<database>metrics-dbname</database>
|
||||
<port>7777</port>
|
||||
<username>metrics-dbuser</username>
|
||||
<password>Encrypted 657276755ddceddca104c281979414ab64cc9bacc9</password>
|
||||
<servername/>
|
||||
<data_tablespace/>
|
||||
<index_tablespace/>
|
||||
<attributes>
|
||||
<attribute>
|
||||
<code>EXTRA_OPTION_POSTGRESQL.stringtype</code>
|
||||
<attribute>unspecified</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>IS_CLUSTERED</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PORT_NUMBER</code>
|
||||
<attribute>5432</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PRESERVE_RESERVED_WORD_CASE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>QUOTE_ALL_FIELDS</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>USE_POOLING</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</connection>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<step>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-person-registry</connection>
|
||||
<sql>
|
||||
WITH
|
||||
main_data AS (
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
d.status->>'code' AS status,
|
||||
d.type->>'code' AS type,
|
||||
r.source,
|
||||
d.status->>'value' AS decision_status, -- статус решения
|
||||
ROW_NUMBER() OVER (PARTITION BY r.id ORDER BY d.decision_date DESC) AS rn
|
||||
FROM public.recruits r
|
||||
JOIN public.decision d
|
||||
ON d.recruit_id = r.id
|
||||
WHERE -- d.status->>'code' = '2' -- Поставлен на учёт
|
||||
-- AND
|
||||
d.type->>'code' IN (
|
||||
'24', -- Первоначальная постановка на учёт в год достижения 17 лет
|
||||
'1', -- Первоначальная постановка на учёт. Считаем, что первоначальная постановка при достижении 18 лет
|
||||
'2' -- Первоначальная постановка на учёт. Считаем, что первоначальная постановка при достижении 18 лет
|
||||
)
|
||||
AND r.source IN (
|
||||
'1', -- ГИР ВУ
|
||||
'2', -- Личное посещение (Ручной ввод специалистом)
|
||||
'3' -- ЕПГУ
|
||||
)
|
||||
AND d.status->>'value' IN (
|
||||
'Решение сформировано', -- решение На подписании
|
||||
'Решение подписано', -- решение Подписано
|
||||
'Проект решения отклонен' -- решение Отклонено
|
||||
)
|
||||
),
|
||||
|
||||
last_data AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
type,
|
||||
source,
|
||||
decision_status AS ds
|
||||
FROM main_data
|
||||
WHERE rn = 1
|
||||
),
|
||||
|
||||
p17_gir_vu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '1' AND ld.ds = 'Решение подписано'), 0) AS count_signed, -- Подписано
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '1' AND ld.ds = 'Решение сформировано'), 0) AS count_waiting_sign, -- На подписании
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '1' AND ld.ds = 'Проект решения отклонен'), 0) AS count_refused, -- Отклонено
|
||||
'GIR_VU' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 17 лет/ГИР ВУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p18_gir_vu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1' AND ld.ds = 'Решение подписано'), 0) AS count_signed, -- Подписано
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1' AND ld.ds = 'Решение сформировано'), 0) AS count_waiting_sign, -- На подписании
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1' AND ld.ds = 'Проект решения отклонен'), 0) AS count_refused, -- Отклонено
|
||||
'GIR_VU' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 18 лет/ГИР ВУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p17_epgu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '3' AND ld.ds = 'Решение подписано'), 0) AS count_signed, -- Подписано
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '3' AND ld.ds = 'Решение сформировано'), 0) AS count_waiting_sign, -- На подписании
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '3' AND ld.ds = 'Проект решения отклонен'), 0) AS count_refused, -- Отклонено
|
||||
'EPGU' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 17 лет/ЕПГУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p18_epgu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '3' AND ld.ds = 'Решение подписано'), 0) AS count_signed, -- Подписано
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '3' AND ld.ds = 'Решение сформировано'), 0) AS count_waiting_sign, -- На подписании
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '3' AND ld.ds = 'Проект решения отклонен'), 0) AS count_refused, -- Отклонено
|
||||
'EPGU' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 18 лет/ЕПГУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p17_p_v AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '2' AND ld.ds = 'Решение подписано'), 0) AS count_signed, -- Подписано
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '2' AND ld.ds = 'Решение сформировано'), 0) AS count_waiting_sign, -- На подписании
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('24') AND ld.source = '2' AND ld.ds = 'Проект решения отклонен'), 0) AS count_refused, -- Отклонено
|
||||
'PERSONAL_VISIT' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 17 лет/Личное посещение
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p18_p_v AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '2' AND ld.ds = 'Решение подписано'), 0) AS count_signed, -- Подписано
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '2' AND ld.ds = 'Решение сформировано'), 0) AS count_waiting_sign, -- На подписании
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '2' AND ld.ds = 'Проект решения отклонен'), 0) AS count_refused, -- Отклонено
|
||||
'PERSONAL_VISIT' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 18 лет/Личное посещение
|
||||
FROM last_data ld
|
||||
)
|
||||
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_signed,
|
||||
count_waiting_sign,
|
||||
count_refused
|
||||
FROM p17_gir_vu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_signed,
|
||||
count_waiting_sign,
|
||||
count_refused
|
||||
FROM p18_gir_vu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_signed,
|
||||
count_waiting_sign,
|
||||
count_refused
|
||||
FROM p17_epgu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_signed,
|
||||
count_waiting_sign,
|
||||
count_refused
|
||||
FROM p18_epgu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_signed,
|
||||
count_waiting_sign,
|
||||
count_refused
|
||||
FROM p17_p_v
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_signed,
|
||||
count_waiting_sign,
|
||||
count_refused
|
||||
FROM p18_p_v;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<remotesteps>
|
||||
<input>
|
||||
</input>
|
||||
<output>
|
||||
</output>
|
||||
</remotesteps>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>320</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</step>
|
||||
<step>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>metrics</connection>
|
||||
<schema>init_registration_info</schema>
|
||||
<table>decision_formation_status</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruitment_id</column_name>
|
||||
<stream_name>recruitment_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_date</column_name>
|
||||
<stream_name>info_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_source</column_name>
|
||||
<stream_name>info_source</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_age</column_name>
|
||||
<stream_name>info_age</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_signed</column_name>
|
||||
<stream_name>count_signed</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_waiting_sign</column_name>
|
||||
<stream_name>count_waiting_sign</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_refused</column_name>
|
||||
<stream_name>count_refused</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<remotesteps>
|
||||
<input>
|
||||
</input>
|
||||
<output>
|
||||
</output>
|
||||
</remotesteps>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>320</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</step>
|
||||
<step_error_handling>
|
||||
</step_error_handling>
|
||||
<slave-step-copy-partition-distribution>
|
||||
</slave-step-copy-partition-distribution>
|
||||
<slave_transformation>N</slave_transformation>
|
||||
<attributes/>
|
||||
</transformation>
|
||||
925
mappings_old/metrics/info_sent_to_lk_epgu_registration_info.ktr
Normal file
925
mappings_old/metrics/info_sent_to_lk_epgu_registration_info.ktr
Normal file
|
|
@ -0,0 +1,925 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<transformation>
|
||||
<info>
|
||||
<name>info_sent_to_lk_epgu_registration_info</name>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<trans_version/>
|
||||
<trans_type>Normal</trans_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<log>
|
||||
<trans-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<size_limit_lines/>
|
||||
<interval/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STATUS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STATUS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STARTDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STARTDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ENDDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ENDDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>DEPDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>DEPDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>REPLAYDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>REPLAYDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_FIELD</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_FIELD</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>EXECUTING_SERVER</id>
|
||||
<enabled>N</enabled>
|
||||
<name>EXECUTING_SERVER</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>EXECUTING_USER</id>
|
||||
<enabled>N</enabled>
|
||||
<name>EXECUTING_USER</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CLIENT</id>
|
||||
<enabled>N</enabled>
|
||||
<name>CLIENT</name>
|
||||
</field>
|
||||
</trans-log-table>
|
||||
<perf-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<interval/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>SEQ_NR</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>SEQ_NR</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEPNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEPNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEP_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEP_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>INPUT_BUFFER_ROWS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>INPUT_BUFFER_ROWS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OUTPUT_BUFFER_ROWS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OUTPUT_BUFFER_ROWS</name>
|
||||
</field>
|
||||
</perf-log-table>
|
||||
<channel-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGGING_OBJECT_TYPE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGGING_OBJECT_TYPE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_NAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_NAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>REPOSITORY_DIRECTORY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>REPOSITORY_DIRECTORY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>FILENAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>FILENAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_REVISION</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_REVISION</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>PARENT_CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>PARENT_CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ROOT_CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ROOT_CHANNEL_ID</name>
|
||||
</field>
|
||||
</channel-log-table>
|
||||
<step-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEPNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEPNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEP_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEP_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_FIELD</id>
|
||||
<enabled>N</enabled>
|
||||
<name>LOG_FIELD</name>
|
||||
</field>
|
||||
</step-log-table>
|
||||
<metrics-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_CODE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_CODE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_DESCRIPTION</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_DESCRIPTION</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_SUBJECT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_SUBJECT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_TYPE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_TYPE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_VALUE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_VALUE</name>
|
||||
</field>
|
||||
</metrics-log-table>
|
||||
</log>
|
||||
<maxdate>
|
||||
<connection/>
|
||||
<table/>
|
||||
<field/>
|
||||
<offset>0.0</offset>
|
||||
<maxdiff>0.0</maxdiff>
|
||||
</maxdate>
|
||||
<size_rowset>10000</size_rowset>
|
||||
<sleep_time_empty>50</sleep_time_empty>
|
||||
<sleep_time_full>50</sleep_time_full>
|
||||
<unique_connections>N</unique_connections>
|
||||
<feedback_shown>Y</feedback_shown>
|
||||
<feedback_size>50000</feedback_size>
|
||||
<using_thread_priorities>Y</using_thread_priorities>
|
||||
<shared_objects_file/>
|
||||
<capture_step_performance>N</capture_step_performance>
|
||||
<step_performance_capturing_delay>1000</step_performance_capturing_delay>
|
||||
<step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<partitionschemas>
|
||||
</partitionschemas>
|
||||
<slaveservers>
|
||||
</slaveservers>
|
||||
<clusterschemas>
|
||||
</clusterschemas>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/12/10 13:34:49.577</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/10 13:34:49.577</modified_date>
|
||||
<key_for_session_key/>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<connection>
|
||||
<name>ervu-person-registry</name>
|
||||
<server>person-dbhost</server>
|
||||
<type>POSTGRESQL</type>
|
||||
<access>Native</access>
|
||||
<database>person-dbname</database>
|
||||
<port>4444</port>
|
||||
<username>person-dbuser</username>
|
||||
<password>Encrypted 2be98afc86aa7f2e4cb79ce10db80b9cf</password>
|
||||
<servername/>
|
||||
<data_tablespace/>
|
||||
<index_tablespace/>
|
||||
<attributes>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>IS_CLUSTERED</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PORT_NUMBER</code>
|
||||
<attribute>5432</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PRESERVE_RESERVED_WORD_CASE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>QUOTE_ALL_FIELDS</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>USE_POOLING</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</connection>
|
||||
<connection>
|
||||
<name>metrics</name>
|
||||
<server>metrics-dbhost</server>
|
||||
<type>POSTGRESQL</type>
|
||||
<access>Native</access>
|
||||
<database>metrics-dbname</database>
|
||||
<port>7777</port>
|
||||
<username>metrics-dbuser</username>
|
||||
<password>Encrypted 657276755ddceddca104c281979414ab64cc9bacc9</password>
|
||||
<servername/>
|
||||
<data_tablespace/>
|
||||
<index_tablespace/>
|
||||
<attributes>
|
||||
<attribute>
|
||||
<code>EXTRA_OPTION_POSTGRESQL.stringtype</code>
|
||||
<attribute>unspecified</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>IS_CLUSTERED</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PORT_NUMBER</code>
|
||||
<attribute>5432</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PRESERVE_RESERVED_WORD_CASE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>QUOTE_ALL_FIELDS</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>USE_POOLING</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</connection>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<step>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-person-registry</connection>
|
||||
<sql>
|
||||
WITH latest_status AS (
|
||||
SELECT
|
||||
rh.recruit_id,
|
||||
rh.status,
|
||||
rh.date_time,
|
||||
ROW_NUMBER() OVER (PARTITION BY rh.recruit_id ORDER BY rh.date_time DESC) AS rn, -- последнее изменение статуса
|
||||
ROW_NUMBER() OVER (PARTITION BY rh.recruit_id ORDER BY d.decision_date DESC) AS rnd, -- последнее решение
|
||||
r.source,
|
||||
d.type->>'code' AS dtype
|
||||
FROM public.recruits_history rh
|
||||
JOIN public.recruit_ervu_status res
|
||||
ON res.code = rh.status
|
||||
JOIN public.recruits r
|
||||
ON r.id = rh.recruit_id
|
||||
JOIN public.sources_recruit sr
|
||||
ON r.source = sr.code
|
||||
JOIN public.decision d
|
||||
ON d.recruit_id = r.id
|
||||
WHERE rh.status IN (
|
||||
'16.2', -- Доставлено уведомление в ЛК ЕПГУ
|
||||
'16.3', -- Ошибка отправки уведомления в ЛК ЕПГУ
|
||||
'16.4', -- Просмотрено уведомлений в ЛК ЕПГУ
|
||||
'16.1', -- Отправлено уведомление в ЛК ЕПГУ
|
||||
'16.5', -- null //value уведомление не сформировано
|
||||
'16.6', -- null //value уведомление сформировано
|
||||
'16.7', -- null //value превышено время ожидания отправки уведомления
|
||||
'16.8' -- null //value превышено время ожидания доставки уведомления
|
||||
)
|
||||
AND d.status->>'code' = '2' -- Поставлен на учёт
|
||||
AND d.type->>'code' IN (
|
||||
'24', -- Первоначальная постановка на учёт в год достижения 17 лет
|
||||
'1', -- Первоначальная постановка на учёт. Считаем, что первоначальная постановка при достижении 18 лет
|
||||
'2' -- Первоначальная постановка на учёт. Считаем, что первоначальная постановка при достижении 18 лет
|
||||
)
|
||||
AND r.source IN (
|
||||
'1', -- ГИР ВУ
|
||||
'2', -- Ручной ввод
|
||||
'3' -- Заявление с ЕПГУ
|
||||
-- '4' -- Личный прием
|
||||
)
|
||||
),
|
||||
main_data AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
status,
|
||||
source,
|
||||
dtype
|
||||
FROM latest_status
|
||||
WHERE rn = 1 -- Берем только последнюю запись для каждого recruit_id
|
||||
AND rnd = 1
|
||||
),
|
||||
|
||||
p17_gir_vu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.3', '16.4', '16.6', '16.7', '16.8') AND md.source = '1' AND md.dtype IN ('24')), 0) AS count_status_form, --"Сфоримировано уведомлений в ЛК гражданина"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.4', '16.8') AND md.source = '1' AND md.dtype IN ('24')), 0) AS count_sended, -- "Отправлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2', '16.4') AND md.source = '1' AND md.dtype IN ('24')), 0) AS count_delivered, -- "Доставлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.3') AND md.source = '1' AND md.dtype IN ('24')), 0) AS count_error, -- "Ошибка отправки уведомления"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.4') AND md.source = '1' AND md.dtype IN ('24')), 0) AS count_viewed, -- "Просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2') AND md.source = '1' AND md.dtype IN ('24')), 0) AS count_not_viewed, -- "Не просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.5') AND md.source = '1' AND md.dtype IN ('24')), 0) AS count_status_not_formed, -- "Не сформировано"
|
||||
'GIR_VU' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- 17/ГИР ВУ
|
||||
FROM main_data md
|
||||
),
|
||||
|
||||
p18_gir_vu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.3', '16.4', '16.6', '16.7', '16.8') AND md.source = '1' AND md.dtype IN ('1', '2')), 0) AS count_status_form, --"Сфоримировано уведомлений в ЛК гражданина"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.4', '16.8') AND md.source = '1' AND md.dtype IN ('1', '2')), 0) AS count_sended, -- "Отправлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2', '16.4') AND md.source = '1' AND md.dtype IN ('1', '2')), 0) AS count_delivered, -- "Доставлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.3') AND md.source = '1' AND md.dtype IN ('1', '2')), 0) AS count_error, -- "Ошибка отправки уведомления"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.4') AND md.source = '1' AND md.dtype IN ('1', '2')), 0) AS count_viewed, -- "Просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2') AND md.source = '1' AND md.dtype IN ('1', '2')), 0) AS count_not_viewed, -- "Не просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.5') AND md.source = '1' AND md.dtype IN ('1', '2')), 0) AS count_status_not_formed, -- "Не сформировано"
|
||||
'GIR_VU' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- 18/ГИР ВУ
|
||||
FROM main_data md
|
||||
),
|
||||
|
||||
p17_epgu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.3', '16.4', '16.6', '16.7', '16.8') AND md.source = '3' AND md.dtype IN ('24')), 0) AS count_status_form, --"Сфоримировано уведомлений в ЛК гражданина"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.4', '16.8') AND md.source = '3' AND md.dtype IN ('24')), 0) AS count_sended, -- "Отправлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2', '16.4') AND md.source = '3' AND md.dtype IN ('24')), 0) AS count_delivered, -- "Доставлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.3') AND md.source = '3' AND md.dtype IN ('24')), 0) AS count_error, -- "Ошибка отправки уведомления"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.4') AND md.source = '3' AND md.dtype IN ('24')), 0) AS count_viewed, -- "Просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2') AND md.source = '3' AND md.dtype IN ('24')), 0) AS count_not_viewed, -- "Не просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.5') AND md.source = '3' AND md.dtype IN ('24')), 0) AS count_status_not_formed, -- "Не сформировано"
|
||||
'EPGU' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- 17/ЕПГУ
|
||||
FROM main_data md
|
||||
),
|
||||
|
||||
p18_epgu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.3', '16.4', '16.6', '16.7', '16.8') AND md.source = '3' AND md.dtype IN ('1', '2')), 0) AS count_status_form, --"Сфоримировано уведомлений в ЛК гражданина"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.4', '16.8') AND md.source = '3' AND md.dtype IN ('1', '2')), 0) AS count_sended, -- "Отправлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2', '16.4') AND md.source = '3' AND md.dtype IN ('1', '2')), 0) AS count_delivered, -- "Доставлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.3') AND md.source = '3' AND md.dtype IN ('1', '2')), 0) AS count_error, -- "Ошибка отправки уведомления"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.4') AND md.source = '3' AND md.dtype IN ('1', '2')), 0) AS count_viewed, -- "Просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2') AND md.source = '3' AND md.dtype IN ('1', '2')), 0) AS count_not_viewed, -- "Не просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.5') AND md.source = '3' AND md.dtype IN ('1', '2')), 0) AS count_status_not_formed, -- "Не сформировано"
|
||||
'EPGU' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
-- 18/ЕПГУ
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
FROM main_data md
|
||||
),
|
||||
|
||||
p17_p_v AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.3', '16.4', '16.6', '16.7', '16.8') AND md.source = '2' AND md.dtype IN ('24')), 0) AS count_status_form, --"Сфоримировано уведомлений в ЛК гражданина"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.4', '16.8') AND md.source = '2' AND md.dtype IN ('24')), 0) AS count_sended, -- "Отправлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2', '16.4') AND md.source = '2' AND md.dtype IN ('24')), 0) AS count_delivered, -- "Доставлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.3') AND md.source = '2' AND md.dtype IN ('24')), 0) AS count_error, -- "Ошибка отправки уведомления"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.4') AND md.source = '2' AND md.dtype IN ('24')), 0) AS count_viewed, -- "Просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2') AND md.source = '2' AND md.dtype IN ('24')), 0) AS count_not_viewed, -- "Не просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.5') AND md.source = '2' AND md.dtype IN ('24')), 0) AS count_status_not_formed, -- "Не сформировано"
|
||||
'PERSONAL_VISIT' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- 17/Ручной ввод (личное посещение)
|
||||
FROM main_data md
|
||||
),
|
||||
|
||||
p18_p_v AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.3', '16.4', '16.6', '16.7', '16.8') AND md.source = '2' AND md.dtype IN ('1', '2')), 0) AS count_status_form, --"Сфоримировано уведомлений в ЛК гражданина"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.1', '16.2', '16.4', '16.8') AND md.source = '2' AND md.dtype IN ('1', '2')), 0) AS count_sended, -- "Отправлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2', '16.4') AND md.source = '2' AND md.dtype IN ('1', '2')), 0) AS count_delivered, -- "Доставлено"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.3') AND md.source = '2' AND md.dtype IN ('1', '2')), 0) AS count_error, -- "Ошибка отправки уведомления"
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.4') AND md.source = '2' AND md.dtype IN ('1', '2')), 0) AS count_viewed, -- "Просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.2') AND md.source = '2' AND md.dtype IN ('1', '2')), 0) AS count_not_viewed, -- "Не просмотрено",
|
||||
COALESCE(COUNT(md.recruit_id) FILTER (WHERE md.status IN ('16.5') AND md.source = '2' AND md.dtype IN ('1', '2')), 0) AS count_status_not_formed, -- "Не сформировано"
|
||||
'PERSONAL_VISIT' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- 18/Ручной ввод (личное посещение)
|
||||
FROM main_data md
|
||||
)
|
||||
SELECT
|
||||
recruitment_id,
|
||||
info_date,
|
||||
info_source,
|
||||
info_age,
|
||||
count_status_form,
|
||||
count_sended,
|
||||
count_delivered,
|
||||
count_error,
|
||||
count_viewed,
|
||||
count_not_viewed,
|
||||
count_status_not_formed
|
||||
FROM p17_gir_vu
|
||||
UNION ALL
|
||||
SELECT
|
||||
recruitment_id,
|
||||
info_date,
|
||||
info_source,
|
||||
info_age,
|
||||
count_status_form,
|
||||
count_sended,
|
||||
count_delivered,
|
||||
count_error,
|
||||
count_viewed,
|
||||
count_not_viewed,
|
||||
count_status_not_formed
|
||||
FROM p18_gir_vu
|
||||
UNION ALL
|
||||
SELECT
|
||||
recruitment_id,
|
||||
info_date,
|
||||
info_source,
|
||||
info_age,
|
||||
count_status_form,
|
||||
count_sended,
|
||||
count_delivered,
|
||||
count_error,
|
||||
count_viewed,
|
||||
count_not_viewed,
|
||||
count_status_not_formed
|
||||
FROM p17_epgu
|
||||
UNION ALL
|
||||
SELECT
|
||||
recruitment_id,
|
||||
info_date,
|
||||
info_source,
|
||||
info_age,
|
||||
count_status_form,
|
||||
count_sended,
|
||||
count_delivered,
|
||||
count_error,
|
||||
count_viewed,
|
||||
count_not_viewed,
|
||||
count_status_not_formed
|
||||
FROM p18_epgu
|
||||
UNION ALL
|
||||
SELECT
|
||||
recruitment_id,
|
||||
info_date,
|
||||
info_source,
|
||||
info_age,
|
||||
count_status_form,
|
||||
count_sended,
|
||||
count_delivered,
|
||||
count_error,
|
||||
count_viewed,
|
||||
count_not_viewed,
|
||||
count_status_not_formed
|
||||
FROM p17_p_v
|
||||
UNION ALL
|
||||
SELECT
|
||||
recruitment_id,
|
||||
info_date,
|
||||
info_source,
|
||||
info_age,
|
||||
count_status_form,
|
||||
count_sended,
|
||||
count_delivered,
|
||||
count_error,
|
||||
count_viewed,
|
||||
count_not_viewed,
|
||||
count_status_not_formed
|
||||
FROM p18_p_v;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<remotesteps>
|
||||
<input>
|
||||
</input>
|
||||
<output>
|
||||
</output>
|
||||
</remotesteps>
|
||||
<GUI>
|
||||
<xloc>496</xloc>
|
||||
<yloc>272</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</step>
|
||||
<step>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>metrics</connection>
|
||||
<schema>init_registration_info</schema>
|
||||
<table>info_sent_to_lk_epgu</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruitment_id</column_name>
|
||||
<stream_name>recruitment_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_date</column_name>
|
||||
<stream_name>info_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_source</column_name>
|
||||
<stream_name>info_source</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_age</column_name>
|
||||
<stream_name>info_age</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_status_formed</column_name>
|
||||
<stream_name>count_status_form</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_sended</column_name>
|
||||
<stream_name>count_sended</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_delivered</column_name>
|
||||
<stream_name>count_delivered</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_error</column_name>
|
||||
<stream_name>count_error</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_viewed</column_name>
|
||||
<stream_name>count_viewed</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_not_viewed</column_name>
|
||||
<stream_name>count_not_viewed</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_status_not_formed</column_name>
|
||||
<stream_name>count_status_not_formed</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<remotesteps>
|
||||
<input>
|
||||
</input>
|
||||
<output>
|
||||
</output>
|
||||
</remotesteps>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>272</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</step>
|
||||
<step_error_handling>
|
||||
<error>
|
||||
<source_step>Table output</source_step>
|
||||
<target_step>Table input</target_step>
|
||||
<is_enabled>N</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</step_error_handling>
|
||||
<slave-step-copy-partition-distribution>
|
||||
</slave-step-copy-partition-distribution>
|
||||
<slave_transformation>N</slave_transformation>
|
||||
<attributes/>
|
||||
</transformation>
|
||||
|
|
@ -24,6 +24,10 @@
|
|||
<data_tablespace/>
|
||||
<index_tablespace/>
|
||||
<attributes>
|
||||
<attribute>
|
||||
<code>EXTRA_OPTION_POSTGRESQL.stringtype</code>
|
||||
<attribute>unspecified</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
|
|
@ -1049,7 +1053,12 @@ DELETE FROM summonses_list.info_sent_to_lk_epgu;
|
|||
DELETE FROM summonses_list.all_summonses;
|
||||
DELETE FROM summonses_list.recruit_office_visit;
|
||||
DELETE FROM summonses_list.formed_summonses;
|
||||
DELETE FROM summonses_list.imposition_tmp_measures;</sql>
|
||||
DELETE FROM summonses_list.imposition_tmp_measures;
|
||||
DELETE FROM init_registration_info.decision_formation_status;
|
||||
DELETE FROM init_registration_info.records_info_id_uk_id_ern;
|
||||
DELETE FROM init_registration_info.info_sent_to_lk_epgu;
|
||||
|
||||
</sql>
|
||||
<useVariableSubstitution>F</useVariableSubstitution>
|
||||
<sqlfromfile>F</sqlfromfile>
|
||||
<sqlfilename/>
|
||||
|
|
@ -1062,6 +1071,156 @@ DELETE FROM summonses_list.imposition_tmp_measures;</sql>
|
|||
<yloc>768</yloc>
|
||||
<attributes_kjc/>
|
||||
</entry>
|
||||
<entry>
|
||||
<name>decision_formation_status</name>
|
||||
<description/>
|
||||
<type>TRANS</type>
|
||||
<attributes/>
|
||||
<specification_method>filename</specification_method>
|
||||
<trans_object_id/>
|
||||
<filename>${Internal.Entry.Current.Directory}/decision_formation_status.ktr</filename>
|
||||
<transname/>
|
||||
<arg_from_previous>N</arg_from_previous>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<clear_rows>N</clear_rows>
|
||||
<clear_files>N</clear_files>
|
||||
<set_logfile>N</set_logfile>
|
||||
<logfile/>
|
||||
<logext/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<loglevel>Basic</loglevel>
|
||||
<cluster>N</cluster>
|
||||
<slave_server_name/>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<follow_abort_remote>N</follow_abort_remote>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<logging_remote_work>N</logging_remote_work>
|
||||
<run_configuration>Pentaho local</run_configuration>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<parallel>N</parallel>
|
||||
<draw>Y</draw>
|
||||
<nr>0</nr>
|
||||
<xloc>704</xloc>
|
||||
<yloc>1168</yloc>
|
||||
<attributes_kjc/>
|
||||
</entry>
|
||||
<entry>
|
||||
<name>Success 13</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<draw>Y</draw>
|
||||
<nr>0</nr>
|
||||
<xloc>896</xloc>
|
||||
<yloc>1168</yloc>
|
||||
<attributes_kjc/>
|
||||
</entry>
|
||||
<entry>
|
||||
<name>records_info_id_uk_id_ern</name>
|
||||
<description/>
|
||||
<type>TRANS</type>
|
||||
<attributes/>
|
||||
<specification_method>filename</specification_method>
|
||||
<trans_object_id/>
|
||||
<filename>${Internal.Entry.Current.Directory}/records_info_id_uk_id_ern.ktr</filename>
|
||||
<transname/>
|
||||
<arg_from_previous>N</arg_from_previous>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<clear_rows>N</clear_rows>
|
||||
<clear_files>N</clear_files>
|
||||
<set_logfile>N</set_logfile>
|
||||
<logfile/>
|
||||
<logext/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<loglevel>Basic</loglevel>
|
||||
<cluster>N</cluster>
|
||||
<slave_server_name/>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<follow_abort_remote>N</follow_abort_remote>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<logging_remote_work>N</logging_remote_work>
|
||||
<run_configuration>Pentaho local</run_configuration>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<parallel>N</parallel>
|
||||
<draw>Y</draw>
|
||||
<nr>0</nr>
|
||||
<xloc>704</xloc>
|
||||
<yloc>1232</yloc>
|
||||
<attributes_kjc/>
|
||||
</entry>
|
||||
<entry>
|
||||
<name>Success 14</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<draw>Y</draw>
|
||||
<nr>0</nr>
|
||||
<xloc>896</xloc>
|
||||
<yloc>1232</yloc>
|
||||
<attributes_kjc/>
|
||||
</entry>
|
||||
<entry>
|
||||
<name>info_sent_to_lk_epgu_registration_info</name>
|
||||
<description/>
|
||||
<type>TRANS</type>
|
||||
<attributes/>
|
||||
<specification_method>filename</specification_method>
|
||||
<trans_object_id/>
|
||||
<filename>${Internal.Entry.Current.Directory}/info_sent_to_lk_epgu_registration_info.ktr</filename>
|
||||
<transname/>
|
||||
<arg_from_previous>N</arg_from_previous>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<clear_rows>N</clear_rows>
|
||||
<clear_files>N</clear_files>
|
||||
<set_logfile>N</set_logfile>
|
||||
<logfile/>
|
||||
<logext/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<loglevel>Basic</loglevel>
|
||||
<cluster>N</cluster>
|
||||
<slave_server_name/>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<follow_abort_remote>N</follow_abort_remote>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<logging_remote_work>N</logging_remote_work>
|
||||
<run_configuration>Pentaho local</run_configuration>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<parallel>N</parallel>
|
||||
<draw>Y</draw>
|
||||
<nr>0</nr>
|
||||
<xloc>704</xloc>
|
||||
<yloc>1312</yloc>
|
||||
<attributes_kjc/>
|
||||
</entry>
|
||||
<entry>
|
||||
<name>Success 15</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<draw>Y</draw>
|
||||
<nr>0</nr>
|
||||
<xloc>896</xloc>
|
||||
<yloc>1312</yloc>
|
||||
<attributes_kjc/>
|
||||
</entry>
|
||||
</entries>
|
||||
<hops>
|
||||
<hop>
|
||||
|
|
@ -1289,6 +1448,60 @@ DELETE FROM summonses_list.imposition_tmp_measures;</sql>
|
|||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL</from>
|
||||
<to>decision_formation_status</to>
|
||||
<from_nr>0</from_nr>
|
||||
<to_nr>0</to_nr>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>decision_formation_status</from>
|
||||
<to>Success 13</to>
|
||||
<from_nr>0</from_nr>
|
||||
<to_nr>0</to_nr>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL</from>
|
||||
<to>records_info_id_uk_id_ern</to>
|
||||
<from_nr>0</from_nr>
|
||||
<to_nr>0</to_nr>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>records_info_id_uk_id_ern</from>
|
||||
<to>Success 14</to>
|
||||
<from_nr>0</from_nr>
|
||||
<to_nr>0</to_nr>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>info_sent_to_lk_epgu_registration_info</from>
|
||||
<to>Success 15</to>
|
||||
<from_nr>0</from_nr>
|
||||
<to_nr>0</to_nr>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL</from>
|
||||
<to>info_sent_to_lk_epgu_registration_info</to>
|
||||
<from_nr>0</from_nr>
|
||||
<to_nr>0</to_nr>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
|
|||
870
mappings_old/metrics/records_info_id_uk_id_ern.ktr
Normal file
870
mappings_old/metrics/records_info_id_uk_id_ern.ktr
Normal file
|
|
@ -0,0 +1,870 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<transformation>
|
||||
<info>
|
||||
<name>records_info_id_uk_id_ern</name>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<trans_version/>
|
||||
<trans_type>Normal</trans_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<log>
|
||||
<trans-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<size_limit_lines/>
|
||||
<interval/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STATUS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STATUS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
<subject/>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STARTDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STARTDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ENDDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ENDDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>DEPDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>DEPDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>REPLAYDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>REPLAYDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_FIELD</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_FIELD</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>EXECUTING_SERVER</id>
|
||||
<enabled>N</enabled>
|
||||
<name>EXECUTING_SERVER</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>EXECUTING_USER</id>
|
||||
<enabled>N</enabled>
|
||||
<name>EXECUTING_USER</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CLIENT</id>
|
||||
<enabled>N</enabled>
|
||||
<name>CLIENT</name>
|
||||
</field>
|
||||
</trans-log-table>
|
||||
<perf-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<interval/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>SEQ_NR</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>SEQ_NR</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGDATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGDATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEPNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEPNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEP_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEP_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>INPUT_BUFFER_ROWS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>INPUT_BUFFER_ROWS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OUTPUT_BUFFER_ROWS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OUTPUT_BUFFER_ROWS</name>
|
||||
</field>
|
||||
</perf-log-table>
|
||||
<channel-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOGGING_OBJECT_TYPE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOGGING_OBJECT_TYPE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_NAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_NAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>REPOSITORY_DIRECTORY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>REPOSITORY_DIRECTORY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>FILENAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>FILENAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>OBJECT_REVISION</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>OBJECT_REVISION</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>PARENT_CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>PARENT_CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ROOT_CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ROOT_CHANNEL_ID</name>
|
||||
</field>
|
||||
</channel-log-table>
|
||||
<step-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>TRANSNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>TRANSNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEPNAME</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEPNAME</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>STEP_COPY</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>STEP_COPY</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_READ</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_READ</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_WRITTEN</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_WRITTEN</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_UPDATED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_UPDATED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_INPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_INPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_OUTPUT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_OUTPUT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LINES_REJECTED</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LINES_REJECTED</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>ERRORS</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ERRORS</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_FIELD</id>
|
||||
<enabled>N</enabled>
|
||||
<name>LOG_FIELD</name>
|
||||
</field>
|
||||
</step-log-table>
|
||||
<metrics-log-table>
|
||||
<connection/>
|
||||
<schema/>
|
||||
<table/>
|
||||
<timeout_days/>
|
||||
<field>
|
||||
<id>ID_BATCH</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>ID_BATCH</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>CHANNEL_ID</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>CHANNEL_ID</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>LOG_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>LOG_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_DATE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_DATE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_CODE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_CODE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_DESCRIPTION</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_DESCRIPTION</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_SUBJECT</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_SUBJECT</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_TYPE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_TYPE</name>
|
||||
</field>
|
||||
<field>
|
||||
<id>METRICS_VALUE</id>
|
||||
<enabled>Y</enabled>
|
||||
<name>METRICS_VALUE</name>
|
||||
</field>
|
||||
</metrics-log-table>
|
||||
</log>
|
||||
<maxdate>
|
||||
<connection/>
|
||||
<table/>
|
||||
<field/>
|
||||
<offset>0.0</offset>
|
||||
<maxdiff>0.0</maxdiff>
|
||||
</maxdate>
|
||||
<size_rowset>10000</size_rowset>
|
||||
<sleep_time_empty>50</sleep_time_empty>
|
||||
<sleep_time_full>50</sleep_time_full>
|
||||
<unique_connections>N</unique_connections>
|
||||
<feedback_shown>Y</feedback_shown>
|
||||
<feedback_size>50000</feedback_size>
|
||||
<using_thread_priorities>Y</using_thread_priorities>
|
||||
<shared_objects_file/>
|
||||
<capture_step_performance>N</capture_step_performance>
|
||||
<step_performance_capturing_delay>1000</step_performance_capturing_delay>
|
||||
<step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
<partitionschemas>
|
||||
</partitionschemas>
|
||||
<slaveservers>
|
||||
</slaveservers>
|
||||
<clusterschemas>
|
||||
</clusterschemas>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/12/10 14:21:53.612</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/10 14:21:53.612</modified_date>
|
||||
<key_for_session_key/>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<connection>
|
||||
<name>ervu-person-registry</name>
|
||||
<server>person-dbhost</server>
|
||||
<type>POSTGRESQL</type>
|
||||
<access>Native</access>
|
||||
<database>person-dbname</database>
|
||||
<port>4444</port>
|
||||
<username>person-dbuser</username>
|
||||
<password>Encrypted 2be98afc86aa7f2e4cb79ce10db80b9cf</password>
|
||||
<servername/>
|
||||
<data_tablespace/>
|
||||
<index_tablespace/>
|
||||
<attributes>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>IS_CLUSTERED</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PORT_NUMBER</code>
|
||||
<attribute>5432</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PRESERVE_RESERVED_WORD_CASE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>QUOTE_ALL_FIELDS</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>USE_POOLING</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</connection>
|
||||
<connection>
|
||||
<name>metrics</name>
|
||||
<server>metrics-dbhost</server>
|
||||
<type>POSTGRESQL</type>
|
||||
<access>Native</access>
|
||||
<database>metrics-dbname</database>
|
||||
<port>7777</port>
|
||||
<username>metrics-dbuser</username>
|
||||
<password>Encrypted 657276755ddceddca104c281979414ab64cc9bacc9</password>
|
||||
<servername/>
|
||||
<data_tablespace/>
|
||||
<index_tablespace/>
|
||||
<attributes>
|
||||
<attribute>
|
||||
<code>EXTRA_OPTION_POSTGRESQL.stringtype</code>
|
||||
<attribute>unspecified</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_LOWERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>FORCE_IDENTIFIERS_TO_UPPERCASE</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>IS_CLUSTERED</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PORT_NUMBER</code>
|
||||
<attribute>5432</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>PRESERVE_RESERVED_WORD_CASE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>QUOTE_ALL_FIELDS</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_BOOLEAN_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>SUPPORTS_TIMESTAMP_DATA_TYPE</code>
|
||||
<attribute>Y</attribute>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<code>USE_POOLING</code>
|
||||
<attribute>N</attribute>
|
||||
</attribute>
|
||||
</attributes>
|
||||
</connection>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<step>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-person-registry</connection>
|
||||
<sql>WITH
|
||||
main_data AS (
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
d.status->>'code' AS status,
|
||||
d.type->>'code' AS type,
|
||||
r.source,
|
||||
r.system_doc_id,
|
||||
r.registration_reasons,
|
||||
r.gender,
|
||||
ROW_NUMBER() OVER (PARTITION BY r.id ORDER BY d.decision_date DESC) AS rn
|
||||
FROM public.recruits r
|
||||
JOIN public.decision d
|
||||
ON d.recruit_id = r.id
|
||||
WHERE d.status->>'code' = '2' -- Поставлен на учёт
|
||||
AND d.type->>'code' IN (
|
||||
'24', -- Первоначальная постановка на учёт в год достижения 17 лет
|
||||
'1', -- Первоначальная постановка на учёт. Считаем, что первоначальная постановка при достижении 18 лет
|
||||
'2' -- Первоначальная постановка на учёт. Считаем, что первоначальная постановка при достижении 18 лет
|
||||
)
|
||||
AND r.source IN (
|
||||
'1', -- ГИР ВУ
|
||||
'2', -- Личное посещение (Ручной ввод специалистом)
|
||||
'3' -- ЕПГУ
|
||||
)
|
||||
),
|
||||
|
||||
last_data AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
type,
|
||||
source,
|
||||
system_doc_id,
|
||||
registration_reasons,
|
||||
gender
|
||||
FROM main_data
|
||||
WHERE rn = 1
|
||||
),
|
||||
|
||||
p17_gir_vu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '1'), 0) AS count_all, -- записей поступило
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '1' AND system_doc_id IS NOT NULL), 0) AS records_with_id_uk, -- записей, обогащенных ИД УК
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '1' AND system_doc_id IS NULL), 0) AS records_without_id_uk, -- записей, не имеющих ИД УК
|
||||
'GIR_VU' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 17 лет/ГИР ВУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p18_gir_vu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1'), 0) AS count_all, -- записей поступило
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1' AND system_doc_id IS NOT NULL), 0) AS records_with_id_uk, -- записей, обогащенных ИД УК
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1' AND system_doc_id IS NULL), 0) AS records_without_id_uk, -- записей, не имеющих ИД УК
|
||||
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1' AND ld.registration_reasons @> '"3"' AND ld.gender = 'FEMALE'), 0) AS wom_with_vus, -- женщины имеющие ВУС
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '1' AND ld.registration_reasons @> '"2"'), 0) AS recived_citizenship, -- граждан, получивших гражданство
|
||||
|
||||
'GIR_VU' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 18 лет/ГИР ВУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p17_epgu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '3'), 0) AS count_all, -- записей поступило
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '3' AND system_doc_id IS NOT NULL), 0) AS records_with_id_uk, -- записей, обогащенных ИД УК
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '3' AND system_doc_id IS NULL), 0) AS records_without_id_uk, -- записей, не имеющих ИД УК
|
||||
'EPGU' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 17 лет/ЕПГУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p18_epgu AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '3'), 0) AS count_all, -- записей поступило
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '3' AND system_doc_id IS NOT NULL), 0) AS records_with_id_uk, -- записей, обогащенных ИД УК
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '3' AND system_doc_id IS NULL), 0) AS records_without_id_uk, -- записей, не имеющих ИД УК
|
||||
'EPGU' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 18 лет/ЕПГУ
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p17_p_v AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '2'), 0) AS count_all, -- записей поступило
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '2' AND system_doc_id IS NOT NULL), 0) AS records_with_id_uk, -- записей, обогащенных ИД УК
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type = '24' AND ld.source = '2' AND system_doc_id IS NULL), 0) AS records_without_id_uk, -- записей, не имеющих ИД УК
|
||||
'PERSONAL_VISIT' AS info_source,
|
||||
'17_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 17 лет/Личное посещение
|
||||
FROM last_data ld
|
||||
),
|
||||
|
||||
p18_p_v AS (
|
||||
SELECT
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '2'), 0) AS count_all, -- записей поступило
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '2' AND system_doc_id IS NOT NULL), 0) AS records_with_id_uk, -- записей, обогащенных ИД УК
|
||||
COALESCE(COUNT(ld.recruit_id) FILTER (WHERE ld.type IN ('1', '2') AND ld.source = '2' AND system_doc_id IS NULL), 0) AS records_without_id_uk, -- записей, не имеющих ИД УК
|
||||
'PERSONAL_VISIT' AS info_source,
|
||||
'18_YEARS' AS info_age,
|
||||
TO_CHAR(NOW() - INTERVAL '1 day', 'YYYY-MM-DD') AS info_date,
|
||||
'300cee57-2ce7-4b82-847b-bfbe14d6c7ea' AS recruitment_id
|
||||
-- для первоначальной 18 лет/Личное посещение
|
||||
FROM last_data ld
|
||||
)
|
||||
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_all,
|
||||
records_with_id_uk,
|
||||
records_without_id_uk,
|
||||
|
||||
null AS wom_with_vus,
|
||||
null AS recived_citizenship
|
||||
FROM p17_gir_vu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_all,
|
||||
records_with_id_uk,
|
||||
records_without_id_uk,
|
||||
|
||||
wom_with_vus,
|
||||
recived_citizenship
|
||||
FROM p18_gir_vu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_all,
|
||||
records_with_id_uk,
|
||||
records_without_id_uk,
|
||||
|
||||
null AS wom_with_vus,
|
||||
null AS recived_citizenship
|
||||
FROM p17_epgu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_all,
|
||||
records_with_id_uk,
|
||||
records_without_id_uk,
|
||||
|
||||
null AS wom_with_vus,
|
||||
null AS recived_citizenship
|
||||
FROM p18_epgu
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_all,
|
||||
records_with_id_uk,
|
||||
records_without_id_uk,
|
||||
|
||||
null AS wom_with_vus,
|
||||
null AS recived_citizenship
|
||||
FROM p17_p_v
|
||||
UNION ALL
|
||||
SELECT
|
||||
info_date,
|
||||
recruitment_id,
|
||||
info_source,
|
||||
info_age,
|
||||
count_all,
|
||||
records_with_id_uk,
|
||||
records_without_id_uk,
|
||||
|
||||
null AS wom_with_vus,
|
||||
null AS recived_citizenship
|
||||
FROM p18_p_v;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<remotesteps>
|
||||
<input>
|
||||
</input>
|
||||
<output>
|
||||
</output>
|
||||
</remotesteps>
|
||||
<GUI>
|
||||
<xloc>288</xloc>
|
||||
<yloc>272</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</step>
|
||||
<step>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>metrics</connection>
|
||||
<schema>init_registration_info</schema>
|
||||
<table>records_info_id_uk_id_ern</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruitment_id</column_name>
|
||||
<stream_name>recruitment_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_date</column_name>
|
||||
<stream_name>info_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_source</column_name>
|
||||
<stream_name>info_source</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>info_age</column_name>
|
||||
<stream_name>info_age</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>count_all</column_name>
|
||||
<stream_name>count_all</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>records_with_id_uk</column_name>
|
||||
<stream_name>records_with_id_uk</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>records_without_id_uk</column_name>
|
||||
<stream_name>records_without_id_uk</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<remotesteps>
|
||||
<input>
|
||||
</input>
|
||||
<output>
|
||||
</output>
|
||||
</remotesteps>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>272</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</step>
|
||||
<step_error_handling>
|
||||
<error>
|
||||
<source_step>Table output</source_step>
|
||||
<target_step>Table input</target_step>
|
||||
<is_enabled>N</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</step_error_handling>
|
||||
<slave-step-copy-partition-distribution>
|
||||
</slave-step-copy-partition-distribution>
|
||||
<slave_transformation>N</slave_transformation>
|
||||
<attributes/>
|
||||
</transformation>
|
||||
|
|
@ -562,9 +562,26 @@
|
|||
<connection>subpoena</connection>
|
||||
<sql>SELECT
|
||||
CASE
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
WHEN CAST(sr.code AS INTEGER) IN (101) THEN 1
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211) THEN 2
|
||||
WHEN CAST(sr.code AS INTEGER) IN (201) THEN 3
|
||||
WHEN CAST(sr.code AS INTEGER) IN (202) THEN 4
|
||||
WHEN CAST(sr.code AS INTEGER) IN (203) THEN 5
|
||||
WHEN CAST(sr.code AS INTEGER) IN (204) THEN 6
|
||||
WHEN CAST(sr.code AS INTEGER) IN (205) THEN 7
|
||||
WHEN CAST(sr.code AS INTEGER) IN (206) THEN 8
|
||||
WHEN CAST(sr.code AS INTEGER) IN (207) THEN 9
|
||||
WHEN CAST(sr.code AS INTEGER) IN (208) THEN 10
|
||||
WHEN CAST(sr.code AS INTEGER) IN (209) THEN 11
|
||||
WHEN CAST(sr.code AS INTEGER) IN (210) THEN 12
|
||||
WHEN CAST(sr.code AS INTEGER) IN (211) THEN 13
|
||||
-- WHEN CAST(sr.code AS INTEGER) IN (102, 103, 104, 105, 106, 107) THEN 14
|
||||
WHEN CAST(sr.code AS INTEGER) IN (102) THEN 15
|
||||
WHEN CAST(sr.code AS INTEGER) IN (103) THEN 16
|
||||
WHEN CAST(sr.code AS INTEGER) IN (104) THEN 17
|
||||
WHEN CAST(sr.code AS INTEGER) IN (105) THEN 18
|
||||
WHEN CAST(sr.code AS INTEGER) IN (106) THEN 19
|
||||
WHEN CAST(sr.code AS INTEGER) IN (107) THEN 20
|
||||
WHEN CAST(sr.code AS INTEGER) IN (301) THEN 21
|
||||
ELSE NULL
|
||||
END AS summonses_reason_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue