Merge remote-tracking branch 'origin/ervu/tmp_makets' into ervu/tmp_makets

* origin/ervu/tmp_makets:
  центрирование кнопок и нажатие
  ERVU-168_appeals
  ERVU-168_db_incidents
This commit is contained in:
Фоат Саляхов 2024-11-14 13:59:21 +03:00
commit 0bf1d4247f
3 changed files with 703 additions and 39 deletions

View file

@ -647,10 +647,382 @@
round(count_criminal::numeric * 100 / (count_administrative + count_criminal)) AS percent_criminal,
round(count_administrative::numeric * 100 / (count_administrative + count_criminal)) AS percent_administrative
FROM metrics.criminal_administrative_liability;
CREATE TABLE IF NOT EXISTS metrics.incidents_change_data_from_gir_vu
(
incidents_change_data_from_gir_vu_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_epgu_citizen_appeal bigint NOT NULL DEFAULT 0,
count_manual bigint NOT NULL DEFAULT 0,
count_send_to_gir_vu bigint NOT NULL DEFAULT 0,
count_accepted bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS metrics.incidents_change_data_from_gir_vu OWNER to ervu_business_metrics;
COMMENT ON TABLE metrics.incidents_change_data_from_gir_vu IS 'Инциденты. Изменения сведений из ГИР ВУ';
CREATE INDEX IF NOT EXISTS idx_incidents_change_data_from_gir_vu_date ON metrics.incidents_change_data_from_gir_vu (info_date);
CREATE INDEX IF NOT EXISTS idx_incidents_change_data_from_gir_vu_recr ON metrics.incidents_change_data_from_gir_vu (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_incidents_change_data_from_gir_vu_recr_date ON metrics.incidents_change_data_from_gir_vu (recruitment_id, info_date);
CREATE OR REPLACE VIEW metrics.view_incidents_change_data_from_gir_vu AS
SELECT
incidents_change_data_from_gir_vu_id,
count_epgu_citizen_appeal + count_manual + count_send_to_gir_vu + count_accepted AS count_all,
round(count_epgu_citizen_appeal::numeric * 100 / (count_epgu_citizen_appeal + count_manual + count_send_to_gir_vu + count_accepted)) AS percent_epgu_citizen_appeal,
round(count_manual::numeric * 100 / (count_epgu_citizen_appeal + count_manual + count_send_to_gir_vu + count_accepted)) AS percent_manual,
round(count_send_to_gir_vu::numeric * 100 / (count_epgu_citizen_appeal + count_manual + count_send_to_gir_vu + count_accepted)) AS percent_send_to_gir_vu,
round(count_accepted::numeric * 100 / (count_epgu_citizen_appeal + count_manual + count_send_to_gir_vu + count_accepted)) AS percent_accepted
FROM metrics.incidents_change_data_from_gir_vu;
CREATE TABLE IF NOT EXISTS metrics.incidents_recieved_by_data_from_gir_vu
(
incidents_recieved_by_data_from_gir_vu_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_confirmed bigint NOT NULL DEFAULT 0,
count_not_confirmed bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS metrics.incidents_recieved_by_data_from_gir_vu OWNER to ervu_business_metrics;
COMMENT ON TABLE metrics.incidents_recieved_by_data_from_gir_vu IS 'Инциденты. Принятые решения на основании данных из ГИР ВУ';
CREATE INDEX IF NOT EXISTS idx_incidents_recieved_by_data_from_gir_vu_date ON metrics.incidents_recieved_by_data_from_gir_vu (info_date);
CREATE INDEX IF NOT EXISTS idx_incidents_recieved_by_data_from_gir_vu_recr ON metrics.incidents_recieved_by_data_from_gir_vu (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_incidents_recieved_by_data_from_gir_vu_recr_date ON metrics.incidents_recieved_by_data_from_gir_vu (recruitment_id, info_date);
CREATE OR REPLACE VIEW metrics.view_incidents_recieved_by_data_from_gir_vu AS
SELECT
incidents_recieved_by_data_from_gir_vu_id,
count_confirmed + count_not_confirmed AS count_all,
round(count_confirmed::numeric * 100 / (count_confirmed + count_not_confirmed)) AS percent_confirmed,
round(count_not_confirmed::numeric * 100 / (count_confirmed + count_not_confirmed)) AS percent_not_confirmed
FROM metrics.incidents_recieved_by_data_from_gir_vu;
CREATE TABLE IF NOT EXISTS metrics.incidents_closed
(
incidents_closed_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_refused_to_archive bigint NOT NULL DEFAULT 0,
count_accepted_to_archive bigint NOT NULL DEFAULT 0,
count_auto_closed bigint NOT NULL DEFAULT 0,
count_manual_closed bigint NOT NULL DEFAULT 0,
count_returned bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS metrics.incidents_closed OWNER to ervu_business_metrics;
COMMENT ON TABLE metrics.incidents_closed IS 'Инциденты. Закрытые инциденты';
CREATE INDEX IF NOT EXISTS idx_incidents_closed_date ON metrics.incidents_closed (info_date);
CREATE INDEX IF NOT EXISTS idx_incidents_closed_recr ON metrics.incidents_closed (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_incidents_closed_recr_date ON metrics.incidents_closed (recruitment_id, info_date);
CREATE OR REPLACE VIEW metrics.view_incidents_closed AS
SELECT
incidents_closed_id,
count_refused_to_archive + count_accepted_to_archive + count_auto_closed + count_manual_closed + count_returned AS count_all,
round(count_refused_to_archive::numeric * 100 / (count_refused_to_archive + count_accepted_to_archive + count_auto_closed + count_manual_closed + count_returned)) AS percent_refused_to_archive,
round(count_accepted_to_archive::numeric * 100 / (count_refused_to_archive + count_accepted_to_archive + count_auto_closed + count_manual_closed + count_returned)) AS percent_accepted_to_archive,
round(count_auto_closed::numeric * 100 / (count_refused_to_archive + count_accepted_to_archive + count_auto_closed + count_manual_closed + count_returned)) AS percent_auto_closed,
round(count_manual_closed::numeric * 100 / (count_refused_to_archive + count_accepted_to_archive + count_auto_closed + count_manual_closed + count_returned)) AS percent_manual_closed,
round(count_returned::numeric * 100 / (count_refused_to_archive + count_accepted_to_archive + count_auto_closed + count_manual_closed + count_returned)) AS percent_returned
FROM metrics.incidents_closed;
</sql>
</changeSet>
<!-- <changeSet id="0005" author="akochetkov">-->
<changeSet id="0005" author="ilyin">
<comment>add table </comment>
<sql>
CREATE TABLE IF NOT EXISTS metrics.citizen_appeals
(
citizen_appeals_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_submitted bigint NOT NULL DEFAULT 0,
count_satisfided bigint NOT NULL DEFAULT 0,
count_not_satisfided bigint NOT NULL DEFAULT 0,
count_accepted_expired bigint NOT NULL DEFAULT 0,
count_accepted_on_time bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS metrics.citizen_appeals OWNER to ervu_business_metrics;
COMMENT ON TABLE metrics.citizen_appeals IS 'Обжалования. Обжалования граждан';
COMMENT ON COLUMN metrics.citizen_appeals.count_submitted IS 'Подано обращений';
COMMENT ON COLUMN metrics.citizen_appeals.count_satisfided IS 'Удовлетворенных';
COMMENT ON COLUMN metrics.citizen_appeals.count_not_satisfided IS 'Не удовлетворенных';
COMMENT ON COLUMN metrics.citizen_appeals.count_accepted_expired IS 'Просроченных';
COMMENT ON COLUMN metrics.citizen_appeals.count_accepted_on_time IS 'Принято в срок';
CREATE INDEX IF NOT EXISTS idx_citizen_appeals_date ON metrics.citizen_appeals (info_date);
CREATE INDEX IF NOT EXISTS idx_citizen_appeals_recr ON metrics.citizen_appeals (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_citizen_appeals_recr_date ON metrics.citizen_appeals (recruitment_id, info_date);
CREATE OR REPLACE VIEW metrics.view_citizen_appeals AS
SELECT
citizen_appeals_id,
count_satisfided + count_not_satisfided + count_accepted_expired + count_accepted_on_time AS count_accepted_to_consideration,
round((count_satisfided + count_not_satisfided + count_accepted_expired + count_accepted_on_time)::numeric * 100 / count_submitted) AS percent_accepted_to_consideration,
round(count_satisfided::numeric * 100 / (count_satisfided + count_not_satisfided + count_accepted_expired + count_accepted_on_time)) AS percent_satisfided,
round(count_not_satisfided::numeric * 100 / (count_satisfided + count_not_satisfided + count_accepted_expired + count_accepted_on_time)) AS percent_not_satisfided,
round(count_accepted_expired::numeric * 100 / (count_satisfided + count_not_satisfided + count_accepted_expired + count_accepted_on_time)) AS percent_accepted_expired,
round(count_accepted_on_time::numeric * 100 / (count_satisfided + count_not_satisfided + count_accepted_expired + count_accepted_on_time)) AS percent_accepted_on_time
FROM metrics.citizen_appeals;
CREATE TABLE IF NOT EXISTS metrics.fz_53_appeals
(
fz_53_appeals_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_accepted bigint NOT NULL DEFAULT 0,
count_refused bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS metrics.fz_53_appeals OWNER to ervu_business_metrics;
COMMENT ON TABLE metrics.fz_53_appeals IS 'Обжалования. Обжалования решений ФЗ-53';
COMMENT ON COLUMN metrics.fz_53_appeals.count_accepted IS 'Удовлетворенных жалоб';
COMMENT ON COLUMN metrics.fz_53_appeals.count_refused IS 'Отклоненных жалоб';
CREATE INDEX IF NOT EXISTS idx_fz_53_appeals_date ON metrics.fz_53_appeals (info_date);
CREATE INDEX IF NOT EXISTS idx_fz_53_appeals_recr ON metrics.fz_53_appeals (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_fz_53_appeals_recr_date ON metrics.fz_53_appeals (recruitment_id, info_date);
CREATE OR REPLACE VIEW metrics.view_fz_53_appeals AS
SELECT
fz_53_appeals_id,
count_accepted + count_refused AS count_all,
round(count_accepted::numeric * 100 / (count_accepted + count_refused)) AS percent_accepted,
round(count_refused::numeric * 100 / (count_accepted + count_refused)) AS percent_refused
FROM metrics.fz_53_appeals;
CREATE TABLE IF NOT EXISTS metrics.active_applications
(
active_applications_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_active_applications bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS metrics.active_applications OWNER to ervu_business_metrics;
COMMENT ON TABLE metrics.active_applications IS 'Обжалования. Активные заявления в ГИС ЕРВУ';
CREATE INDEX IF NOT EXISTS idx_active_applications_date ON metrics.active_applications (info_date);
CREATE INDEX IF NOT EXISTS idx_active_applications_recr ON metrics.active_applications (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_active_applications_recr_date ON metrics.active_applications (recruitment_id, info_date);
CREATE TABLE IF NOT EXISTS metrics.records_about_citizen
(
records_about_citizen_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_records_about_citizen bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS metrics.records_about_citizen OWNER to ervu_business_metrics;
COMMENT ON TABLE metrics.records_about_citizen IS 'Обжалования. Записи о гражданах, обновленных в ГИС ЕРВУ';
CREATE INDEX IF NOT EXISTS idx_records_about_citizen_date ON metrics.records_about_citizen (info_date);
CREATE INDEX IF NOT EXISTS idx_records_about_citizen_recr ON metrics.records_about_citizen (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_records_about_citizen_recr_date ON metrics.records_about_citizen (recruitment_id, info_date);
ALTER TABLE metrics.convert_info_records_from_easu ADD COLUMN IF NOT EXISTS count_all bigint NOT NULL DEFAULT 0;
DROP VIEW IF EXISTS metrics.view_convert_info_records_from_easu;
CREATE OR REPLACE VIEW metrics.view_convert_info_records_from_easu AS
SELECT
convert_info_records_from_easu_id,
round(count_unique::numeric * 100 / count_all) AS percent_unique,
round(count_flk_and_duplicate::numeric * 100 / count_all) AS percent_flk_and_duplicate,
count_all - count_unique AS count_without_unique,
count_all - count_flk_and_duplicate AS count_without_flk_and_duplicate
FROM metrics.convert_info_records_from_easu;
</sql>
</changeSet>
<changeSet id="0006" author="ilyin">
<comment>create schema summonses_list_subsystem</comment>
<sql>
CREATE SCHEMA IF NOT EXISTS summonses_list_subsystem;
CREATE TABLE IF NOT EXISTS summonses_list_subsystem.personal_accounts
(
personal_accounts_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_registered bigint NOT NULL DEFAULT 0,
count_not_registered bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS summonses_list_subsystem.personal_accounts OWNER to ervu_business_metrics;
COMMENT ON TABLE summonses_list_subsystem.personal_accounts IS 'Реестр повесток подсистема. Личные кабинеты';
CREATE INDEX IF NOT EXISTS idx_personal_accounts_date ON summonses_list_subsystem.personal_accounts (info_date);
CREATE INDEX IF NOT EXISTS idx_personal_accounts_recr ON summonses_list_subsystem.personal_accounts (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_personal_accounts_recr_date ON summonses_list_subsystem.personal_accounts (recruitment_id, info_date);
COMMENT ON COLUMN summonses_list_subsystem.personal_accounts.count_registered IS 'Состоящих на учете';
COMMENT ON COLUMN summonses_list_subsystem.personal_accounts.count_not_registered IS 'Не состоящих на учете';
CREATE OR REPLACE VIEW summonses_list_subsystem.view_personal_accounts AS
SELECT
personal_accounts_id,
count_registered + count_not_registered AS count_all,
round(count_registered::numeric * 100 / (count_registered + count_not_registered)) AS percent_registered,
round(count_not_registered::numeric * 100 / (count_registered + count_not_registered)) AS percent_not_registered
FROM summonses_list_subsystem.personal_accounts;
CREATE TABLE IF NOT EXISTS summonses_list_subsystem.summonses_direct_to_pers_acc
(
summonses_direct_to_pers_acc_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_draft_board bigint NOT NULL DEFAULT 0,
count_place_of_military_service bigint NOT NULL DEFAULT 0,
count_med_inspection bigint NOT NULL DEFAULT 0,
count_doc_clarification bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS summonses_list_subsystem.summonses_direct_to_pers_acc OWNER to ervu_business_metrics;
COMMENT ON TABLE summonses_list_subsystem.summonses_direct_to_pers_acc IS 'Реестр повесток подсистема. Направление повесток в ЛК РП';
CREATE INDEX IF NOT EXISTS idx_summonses_direct_to_pers_acc_date ON summonses_list_subsystem.summonses_direct_to_pers_acc (info_date);
CREATE INDEX IF NOT EXISTS idx_summonses_direct_to_pers_acc_recr ON summonses_list_subsystem.summonses_direct_to_pers_acc (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_summonses_direct_to_pers_acc_recr_date ON summonses_list_subsystem.summonses_direct_to_pers_acc (recruitment_id, info_date);
COMMENT ON COLUMN summonses_list_subsystem.summonses_direct_to_pers_acc.count_draft_board IS 'Для прохождения призывной комиссии';
COMMENT ON COLUMN summonses_list_subsystem.summonses_direct_to_pers_acc.count_place_of_military_service IS 'Для отправки к месту службы';
COMMENT ON COLUMN summonses_list_subsystem.summonses_direct_to_pers_acc.count_med_inspection IS 'Для медосвидетельствования';
COMMENT ON COLUMN summonses_list_subsystem.summonses_direct_to_pers_acc.count_doc_clarification IS 'Для уточнения документов ВУ';
CREATE OR REPLACE VIEW summonses_list_subsystem.view_summonses_direct_to_pers_acc AS
SELECT
summonses_direct_to_pers_acc_id,
count_draft_board + count_place_of_military_service + count_med_inspection + count_doc_clarification AS count_all,
round(count_draft_board::numeric * 100 / (count_draft_board + count_place_of_military_service + count_med_inspection + count_doc_clarification)) AS percent_draft_board,
round(count_place_of_military_service::numeric * 100 / (count_draft_board + count_place_of_military_service + count_med_inspection + count_doc_clarification)) AS percent_place_of_military_service,
round(count_med_inspection::numeric * 100 / (count_draft_board + count_place_of_military_service + count_med_inspection + count_doc_clarification)) AS percent_med_inspection,
round(count_doc_clarification::numeric * 100 / (count_draft_board + count_place_of_military_service + count_med_inspection + count_doc_clarification)) AS percent_doc_clarification
FROM summonses_list_subsystem.summonses_direct_to_pers_acc;
CREATE TABLE IF NOT EXISTS summonses_list_subsystem.summonses_list
(
summonses_list_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
summonse_type character varying NOT NULL,
count_view_arrived bigint NOT NULL DEFAULT 0,
count_not_view_arrived bigint NOT NULL DEFAULT 0,
count_view_less_20_days bigint NOT NULL DEFAULT 0,
count_not_view_less_20_days bigint NOT NULL DEFAULT 0,
count_view_greater_20_days bigint NOT NULL DEFAULT 0,
count_not_view_greater_20_days bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS summonses_list_subsystem.summonses_list OWNER to ervu_business_metrics;
COMMENT ON TABLE summonses_list_subsystem.summonses_list IS 'Реестр повесток подсистема. Для прохождения призывной комиссии';
CREATE INDEX IF NOT EXISTS idx_summonses_list_date ON summonses_list_subsystem.summonses_list (info_date);
CREATE INDEX IF NOT EXISTS idx_summonses_list_recr ON summonses_list_subsystem.summonses_list (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_summonses_list_recr_date ON summonses_list_subsystem.summonses_list (recruitment_id, info_date);
COMMENT ON COLUMN summonses_list_subsystem.summonses_list.summonse_type IS 'Тип повестки (DRAFT_BOARD = призывная комиссия; MILITARY_SERVICE = отправка к месту службы; MED_INSPECTION = медосвидетельствование; DOC_CLARIFICATION = уточнение документов; NOT_REGISTERED = не состоит на учете)';
COMMENT ON COLUMN summonses_list_subsystem.summonses_list.count_view_arrived IS 'Гражданин явился, просмотрено';
COMMENT ON COLUMN summonses_list_subsystem.summonses_list.count_not_view_arrived IS 'Гражданин явился, не просмотрено';
COMMENT ON COLUMN summonses_list_subsystem.summonses_list.count_view_less_20_days IS 'Менее 20 дней, просмотрено';
COMMENT ON COLUMN summonses_list_subsystem.summonses_list.count_not_view_less_20_days IS 'Менее 20 дней, не просмотрено';
COMMENT ON COLUMN summonses_list_subsystem.summonses_list.count_view_greater_20_days IS 'Более 20 дней, просмотрено';
COMMENT ON COLUMN summonses_list_subsystem.summonses_list.count_not_view_greater_20_days IS 'Более 20 дней, не просмотрено';
CREATE OR REPLACE VIEW summonses_list_subsystem.view_summonses_list AS
SELECT
summonses_list_id,
count_view_arrived + count_not_view_arrived AS count_arrived_all,
round(count_view_arrived::numeric * 100 / (count_view_arrived + count_not_view_arrived)) AS percent_view_arrived,
round(count_not_view_arrived::numeric * 100 / (count_view_arrived + count_not_view_arrived)) AS percent_not_view_arrived,
count_view_less_20_days + count_not_view_less_20_days AS count_less_20_days_all,
round(count_view_less_20_days::numeric * 100 / (count_view_less_20_days + count_not_view_less_20_days)) AS percent_view_less_20_days,
round(count_not_view_less_20_days::numeric * 100 / (count_view_less_20_days + count_not_view_less_20_days)) AS percent_not_view_less_20_days,
count_view_greater_20_days + count_not_view_greater_20_days AS count_greater_20_days_all,
round(count_view_greater_20_days::numeric * 100 / (count_view_greater_20_days + count_not_view_greater_20_days)) AS percent_view_greater_20_days,
round(count_not_view_greater_20_days::numeric * 100 / (count_view_greater_20_days + count_not_view_greater_20_days)) AS percent_not_view_greater_20_days
FROM summonses_list_subsystem.summonses_list;
CREATE TABLE IF NOT EXISTS summonses_list_subsystem.requests_direct_to_pers_acc
(
requests_direct_to_pers_acc_id bigserial NOT NULL PRIMARY KEY,
recruitment_id varchar(36) NOT NULL constraint fk_criminal_administrative_liability_recruitment_id references metrics.recruitment,
update_date timestamp without time zone NOT NULL DEFAULT now(),
info_date date NOT NULL,
count_registered bigint NOT NULL DEFAULT 0,
count_registered_formed bigint NOT NULL DEFAULT 0,
count_not_registered bigint NOT NULL DEFAULT 0,
count_not_registered_formed bigint NOT NULL DEFAULT 0
)
WITH (OIDS = FALSE);
ALTER TABLE IF EXISTS summonses_list_subsystem.requests_direct_to_pers_acc OWNER to ervu_business_metrics;
COMMENT ON TABLE summonses_list_subsystem.requests_direct_to_pers_acc IS 'Реестр повесток подсистема. Направление запросов в ЛК РП для выписки';
CREATE INDEX IF NOT EXISTS idx_requests_direct_to_pers_acc_date ON summonses_list_subsystem.requests_direct_to_pers_acc (info_date);
CREATE INDEX IF NOT EXISTS idx_requests_direct_to_pers_acc_recr ON summonses_list_subsystem.requests_direct_to_pers_acc (recruitment_id);
CREATE INDEX IF NOT EXISTS idx_requests_direct_to_pers_acc_recr_date ON summonses_list_subsystem.requests_direct_to_pers_acc (recruitment_id, info_date);
COMMENT ON COLUMN summonses_list_subsystem.requests_direct_to_pers_acc.count_registered IS 'состоящие на ВУ';
COMMENT ON COLUMN summonses_list_subsystem.requests_direct_to_pers_acc.count_registered_formed IS 'сформировано для состоящих на ВУ';
COMMENT ON COLUMN summonses_list_subsystem.requests_direct_to_pers_acc.count_not_registered IS 'не состоящие на ВУ';
COMMENT ON COLUMN summonses_list_subsystem.requests_direct_to_pers_acc.count_not_registered_formed IS 'сформировано для не состоящих на ВУ';
CREATE OR REPLACE VIEW summonses_list_subsystem.view_requests_direct_to_pers_acc AS
SELECT
requests_direct_to_pers_acc_id,
count_registered + count_not_registered AS count_all,
round(count_registered::numeric * 100 / (count_registered + count_not_registered)) AS percent_registered,
round(count_not_registered::numeric * 100 / (count_registered + count_not_registered)) AS percent_not_registered,
round(count_registered_formed::numeric * 100 / count_registered) AS percent_registered_formed,
round(count_not_registered_formed::numeric * 100 / count_not_registered) AS percent_not_registered_formed
FROM summonses_list_subsystem.requests_direct_to_pers_acc;
</sql>
</changeSet>
<!-- <changeSet id="0007" author="ilyin">-->
<!-- <comment>add table </comment>-->
<!-- <sql>-->

View file

@ -26,6 +26,7 @@
<componentRootId>ca19ee9e-5b4b-4ed4-b20d-cc4dc772a09e</componentRootId>
<name>ГК Выпадающие списки</name>
<container>true</container>
<expanded>false</expanded>
<childrenReordered>false</childrenReordered>
<scripts id="bf098f19-480e-44e4-9084-aa42955c4d0f"/>
<scripts id="b6068710-0f31-48ec-8e03-c0c1480a40c0">
@ -1626,7 +1627,7 @@
<entry>
<key>label</key>
<value>
<simple>"Загрузка записей из ЕАСУ \"Горизонт-МР\" - ТБД МО"</simple>
<simple>"Загрузка записей из ЕАСУ \"Горизонт-МР\" - ТБД МО (файл в csv)"</simple>
</value>
</entry>
</properties>
@ -2447,13 +2448,30 @@
<entry>
<key>label</key>
<value>
<simple>"95%"</simple>
<simple>null</simple>
</value>
</entry>
<entry>
<key>textFormatter</key>
<value>
<implRef/>
<complex>
<entry>
<key>unitsLabel</key>
<value>
<simple>"%"</simple>
</value>
</entry>
<entry>
<key>unitsText</key>
<value>
<simple>{"objectId":"2f993951-8c36-4640-856a-5ab477000709","packageName":"component","className":"Text","type":"TS"}</simple>
</value>
</entry>
</complex>
<implRef type="TS">
<className>UnitsLabelReplaceValueTextFormatter</className>
<packageName>ervu_business_metrics.formatter</packageName>
</implRef>
</value>
</entry>
</properties>
@ -2646,13 +2664,30 @@
<entry>
<key>label</key>
<value>
<simple>"56%"</simple>
<simple>null</simple>
</value>
</entry>
<entry>
<key>textFormatter</key>
<value>
<implRef/>
<complex>
<entry>
<key>unitsLabel</key>
<value>
<simple>"%"</simple>
</value>
</entry>
<entry>
<key>unitsText</key>
<value>
<simple>{"objectId":"5d79ceba-c6d8-4964-8dff-668831000c79","packageName":"component","className":"Text","type":"TS"}</simple>
</value>
</entry>
</complex>
<implRef type="TS">
<className>UnitsLabelReplaceValueTextFormatter</className>
<packageName>ervu_business_metrics.formatter</packageName>
</implRef>
</value>
</entry>
</properties>
@ -2764,7 +2799,7 @@
<entry>
<key>initialValue</key>
<value>
<simple>"записей идентифицированы в ГИР ВУ"</simple>
<simple>"записей граждан с ошибками ФЛК и дубликаты"</simple>
</value>
</entry>
<entry>
@ -3061,6 +3096,79 @@
<entry>
<key>centerLabelConfigurations</key>
<value>
<item id="6734368b-1137-4d7b-b4b0-a95dd12b5307" removed="false">
<value>
<complex>
<entry>
<key>aggregationFunction</key>
<value>
<simple>"SUM"</simple>
</value>
</entry>
<entry>
<key>color</key>
<value>
<simple>"#FFFFFFFF"</simple>
</value>
</entry>
<entry>
<key>font</key>
<value>
<complex>
<entry>
<key>family</key>
<value>
<simple>"Gilray"</simple>
</value>
</entry>
<entry>
<key>size</key>
<value>
<simple>50</simple>
</value>
</entry>
<entry>
<key>weight</key>
<value>
<simple>"800"</simple>
</value>
</entry>
</complex>
</value>
</entry>
<entry>
<key>loadDao</key>
<value>
<complex>
<entry>
<key>graph</key>
<value>
<simple>{"conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"nodeByIndex":{"0":{"tableName":"convert_info_not_identifited_records","schemaName":"metrics","x":334.0,"y":196.0,"alias":"convert_info_not_identifited_records","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"},"1":{"tableName":"recruitment","schemaName":"metrics","x":169.0,"y":196.0,"alias":"recruitment","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"},"2":{"tableName":"view_convert_info_not_identifited_records","schemaName":"metrics","x":512.0,"y":195.0,"alias":"view_convert_info_not_identifited_records","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"}},"nodes":[{"tableName":"convert_info_not_identifited_records","schemaName":"metrics","x":334.0,"y":196.0,"alias":"convert_info_not_identifited_records","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"},{"tableName":"recruitment","schemaName":"metrics","x":169.0,"y":196.0,"alias":"recruitment","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"},{"tableName":"view_convert_info_not_identifited_records","schemaName":"metrics","x":512.0,"y":195.0,"alias":"view_convert_info_not_identifited_records","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"}],"nodeByEntityName":{"recruitment":{"tableName":"recruitment","schemaName":"metrics","x":169.0,"y":196.0,"alias":"recruitment","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"},"view_convert_info_not_identifited_records":{"tableName":"view_convert_info_not_identifited_records","schemaName":"metrics","x":512.0,"y":195.0,"alias":"view_convert_info_not_identifited_records","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"},"convert_info_not_identifited_records":{"tableName":"convert_info_not_identifited_records","schemaName":"metrics","x":334.0,"y":196.0,"alias":"convert_info_not_identifited_records","conditionGroup":{"operator":"AND","conditions":[],"groups":[]},"emptyEntityAction":"IGNORE_OR_DELETE"}},"matrix":[[null,{"refOnEntityName":"convert_info_not_identifited_records","refToEntityName":"recruitment","refToColumns":[{"schema":"metrics","table":"recruitment","entity":"recruitment","name":"id"}],"refOnColumns":[{"schema":"metrics","table":"convert_info_not_identifited_records","entity":"convert_info_not_identifited_records","name":"recruitment_id"}],"required":false,"cyclic":false,"conditionGroup":{"operator":"AND","conditions":[],"groups":[]}},null],[null,null,null],[{"refOnEntityName":"view_convert_info_not_identifited_records","refToEntityName":"convert_info_not_identifited_records","refToColumns":[{"schema":"metrics","table":"convert_info_not_identifited_records","entity":"convert_info_not_identifited_records","name":"convert_info_not_identifited_records_id"}],"refOnColumns":[{"schema":"metrics","table":"view_convert_info_not_identifited_records","entity":"view_convert_info_not_identifited_records","name":"convert_info_not_identifited_records_id"}],"required":false,"cyclic":false,"conditionGroup":{"operator":"AND","conditions":[],"groups":[]}},null,null]],"mainNodeIndex":0}</simple>
</value>
</entry>
</complex>
<implRef type="JAVA">
<className>DefaultLoadDao</className>
<packageName>database.dao</packageName>
</implRef>
</value>
</entry>
<entry>
<key>valueColumn</key>
<value>
<simple>{"schema":"metrics","table":"view_convert_info_not_identifited_records","entity":"view_convert_info_not_identifited_records","name":"count_all"}</simple>
</value>
</entry>
</complex>
<implRef type="JAVA">
<className>DefaultRoundLabelConfiguration</className>
<packageName>ervu_business_metrics.component.chart.label</packageName>
</implRef>
</value>
</item>
<item id="1a87b676-3af8-4a3d-99fd-c3d27efbfa35" removed="true"/>
<item id="1f231bdb-ce60-490b-aa70-ed311ae8f971" removed="true"/>
<item id="b8ec106d-9475-4397-b14b-1e9aa08b0ce7" removed="true"/>
<item id="3b53c490-3f86-42ec-bfdb-3c7c3cc3b2c1" removed="true"/>
</value>
</entry>
@ -3239,6 +3347,18 @@
<simple>true</simple>
</value>
</entry>
<entry>
<key>noDataFont</key>
<value>
<simple>"15px Arial"</simple>
</value>
</entry>
<entry>
<key>visible</key>
<value>
<simple>true</simple>
</value>
</entry>
</properties>
</scripts>
<scripts id="e8ae84fa-0c91-4f8c-8425-e95b8271cc04">
@ -3255,7 +3375,6 @@
<packageName>ervu_business_metrics.component.filter</packageName>
</classRef>
<enabled>true</enabled>
<expanded>true</expanded>
<properties>
<entry>
<key>references</key>
@ -3307,7 +3426,6 @@
<packageName>ervu_business_metrics.component.filter</packageName>
</classRef>
<enabled>true</enabled>
<expanded>true</expanded>
<properties>
<entry>
<key>filterComponents</key>
@ -3333,6 +3451,20 @@
</value>
</entry>
</properties>
</scripts>
<scripts id="2f1c6b7a-370c-4aa7-a0aa-6413927ec1e0">
<classRef type="JAVA">
<className>RoundSingleChartDataSetService</className>
<packageName>ervu_business_metrics.component.chart</packageName>
</classRef>
<properties>
<entry>
<key>dataSetConfigurations</key>
<value>
<item id="2d7ce06e-7ed1-47f9-9b15-4c8fd07835dd" removed="false"/>
</value>
</entry>
</properties>
</scripts>
</children>
</children>
@ -3381,6 +3513,40 @@
<simple>null</simple>
</value>
</entry>
<entry>
<key>textFormatter</key>
<value>
<complex>
<entry>
<key>replaceModels</key>
<value>
<item id="46b042b6-e347-4387-915a-120d936de1ea" removed="false">
<value>
<complex>
<entry>
<key>value</key>
<value>
<simple>"null"</simple>
</value>
</entry>
<entry>
<key>valueToReplace</key>
<value>
<simple>"0"</simple>
</value>
</entry>
</complex>
</value>
</item>
</value>
</entry>
</complex>
<implRef type="TS">
<className>ReplaceValueTextFormatter</className>
<packageName>ervu_business_metrics.formatter</packageName>
</implRef>
</value>
</entry>
</properties>
</scripts>
<scripts id="737b67e2-295f-4356-a1e1-9419344d8c85"/>
@ -5859,7 +6025,6 @@
<componentRootId>ea4d0df5-9e4f-48b2-bf91-3a72d3a90640</componentRootId>
<name>ГК третий ряд показателей</name>
<container>true</container>
<expanded>false</expanded>
<childrenReordered>false</childrenReordered>
<scripts id="bf098f19-480e-44e4-9084-aa42955c4d0f">
<properties>
@ -7987,6 +8152,7 @@
<packageName>ervu_business_metrics.component.chart</packageName>
</classRef>
<enabled>true</enabled>
<expanded>true</expanded>
<properties>
<entry>
<key>bars</key>
@ -8134,7 +8300,6 @@
<componentRootId>a7b44f97-c49f-4356-b45d-64c4d6e71f8b</componentRootId>
<name>ВК Результат сопоставления csv и xml файлов</name>
<container>true</container>
<expanded>false</expanded>
<childrenReordered>false</childrenReordered>
<scripts id="bf098f19-480e-44e4-9084-aa42955c4d0f">
<properties>
@ -9162,28 +9327,6 @@
</entry>
</properties>
</scripts>
<scripts id="b1cdea3a-5453-4f44-a6a2-b8af91fd813b">
<classRef type="TS">
<className>BarDataLabelChartPlugin</className>
<packageName>ervu_business_metrics.component.chart.plugin</packageName>
</classRef>
<enabled>true</enabled>
<expanded>true</expanded>
<properties>
<entry>
<key>color</key>
<value>
<simple>"#B3B3B3FF"</simple>
</value>
</entry>
<entry>
<key>useStaticColor</key>
<value>
<simple>true</simple>
</value>
</entry>
</properties>
</scripts>
<scripts id="170d7b45-785c-4d74-b70d-d931d35b3822">
<classRef type="TS">
<className>FilterGroupDelegate</className>

View file

@ -1477,7 +1477,6 @@
<componentRootId>7b47ba81-1c81-4780-b0f6-7fe726e099a7</componentRootId>
<name>Постановка в 17 лет</name>
<container>true</container>
<expanded>false</expanded>
<childrenReordered>false</childrenReordered>
<scripts id="d1ce20ca-453b-4610-a2a5-bb6498db5cf5">
<properties>
@ -1498,7 +1497,6 @@
<componentRootId>44fcde44-f00c-4320-9a6e-f730b0e0fd65</componentRootId>
<name>Hbox17</name>
<container>true</container>
<expanded>false</expanded>
<childrenReordered>false</childrenReordered>
<scripts id="bf098f19-480e-44e4-9084-aa42955c4d0f">
<properties>
@ -1507,7 +1505,7 @@
<value>
<item id="67c33e97-8260-435e-b9a2-db0cd6b3053b" removed="false">
<value>
<simple>null</simple>
<simple>"pull-center"</simple>
</value>
</item>
</value>
@ -1518,6 +1516,82 @@
<scripts id="fe04d7fb-6c5b-46c4-b723-667732d81f4f"/>
<scripts id="5c566210-2a60-4048-a2d1-84c7dd023248"/>
<scripts id="3171b2e1-b4af-4335-95fa-1b2592604b84"/>
<children id="4f6cfc3f-9d19-4238-b13a-61444afcdbd6">
<prototypeId>98594cec-0a9b-4cef-af09-e1b71cb2ad9e</prototypeId>
<componentRootId>4f6cfc3f-9d19-4238-b13a-61444afcdbd6</componentRootId>
<name>AC_0</name>
<container>false</container>
<childrenReordered>false</childrenReordered>
<scripts id="37dff5c8-1599-4984-b107-c44a87b6da2e">
<properties>
<entry>
<key>eventRefs</key>
<value>
<item id="7b27c6b9-316f-43da-9fe2-a0acc51f5f8f" removed="false">
<value>
<complex>
<entry>
<key>behavior</key>
<value>
<simple>{"objectId":"00a72a76-3da4-4f9c-819f-f019eef5818a","packageName":"component.container","className":"VBox","type":"TS"}</simple>
</value>
</entry>
<entry>
<key>propertyName</key>
<value>
<simple>"beforeStart"</simple>
</value>
</entry>
</complex>
</value>
</item>
</value>
</entry>
<entry>
<key>ifCondition</key>
<value>
<complex>
<entry>
<key>logicalOperation</key>
<value>
<simple>null</simple>
</value>
</entry>
</complex>
</value>
</entry>
<entry>
<key>thenActions</key>
<value>
<item id="7c6ab9eb-0da0-40e5-9001-d27dbd28028c" removed="false">
<value>
<complex>
<entry>
<key>behavior</key>
<value>
<simple>{"objectId":"53fe8995-85ce-4067-982f-e67603e217ee","packageName":"component.button","className":"Button","type":"TS"}</simple>
</value>
</entry>
<entry>
<key>method</key>
<value>
<simple>"onClick"</simple>
</value>
</entry>
<entry>
<key>value</key>
<value>
<simple>null</simple>
</value>
</entry>
</complex>
</value>
</item>
</value>
</entry>
</properties>
</scripts>
</children>
<children id="60b1bcbe-1dfc-40d2-814a-f177831e493b">
<prototypeId>98594cec-0a9b-4cef-af09-e1b71cb2ad9e</prototypeId>
<componentRootId>60b1bcbe-1dfc-40d2-814a-f177831e493b</componentRootId>
@ -1776,6 +1850,7 @@
</complex>
</value>
</item>
<item id="eb4f4598-18c4-4a46-a61e-82944a14054a" removed="true"/>
</value>
</entry>
</properties>
@ -14326,7 +14401,6 @@
<componentRootId>8ce33491-362c-4be8-b964-2abec01f4e30</componentRootId>
<name>Постановка в 18 лет и старше</name>
<container>true</container>
<expanded>false</expanded>
<childrenReordered>false</childrenReordered>
<scripts id="d1ce20ca-453b-4610-a2a5-bb6498db5cf5">
<properties>
@ -14347,7 +14421,6 @@
<componentRootId>8510221a-dfcf-4645-b1c5-9eaed32b32c9</componentRootId>
<name>Hbox18</name>
<container>true</container>
<expanded>false</expanded>
<childrenReordered>false</childrenReordered>
<scripts id="bf098f19-480e-44e4-9084-aa42955c4d0f">
<properties>
@ -14356,7 +14429,7 @@
<value>
<item id="67c33e97-8260-435e-b9a2-db0cd6b3053b" removed="false">
<value>
<simple>null</simple>
<simple>"pull-center"</simple>
</value>
</item>
</value>
@ -14367,6 +14440,82 @@
<scripts id="fe04d7fb-6c5b-46c4-b723-667732d81f4f"/>
<scripts id="5c566210-2a60-4048-a2d1-84c7dd023248"/>
<scripts id="3171b2e1-b4af-4335-95fa-1b2592604b84"/>
<children id="5d4a4366-273d-43e9-bc16-ad31cd43b51c">
<prototypeId>98594cec-0a9b-4cef-af09-e1b71cb2ad9e</prototypeId>
<componentRootId>5d4a4366-273d-43e9-bc16-ad31cd43b51c</componentRootId>
<name>AC_0</name>
<container>false</container>
<childrenReordered>false</childrenReordered>
<scripts id="37dff5c8-1599-4984-b107-c44a87b6da2e">
<properties>
<entry>
<key>eventRefs</key>
<value>
<item id="7b27c6b9-316f-43da-9fe2-a0acc51f5f8f" removed="false">
<value>
<complex>
<entry>
<key>behavior</key>
<value>
<simple>{"objectId":"00a72a76-3da4-4f9c-819f-f019eef5818a","packageName":"component.container","className":"VBox","type":"TS"}</simple>
</value>
</entry>
<entry>
<key>propertyName</key>
<value>
<simple>"beforeStart"</simple>
</value>
</entry>
</complex>
</value>
</item>
</value>
</entry>
<entry>
<key>ifCondition</key>
<value>
<complex>
<entry>
<key>logicalOperation</key>
<value>
<simple>null</simple>
</value>
</entry>
</complex>
</value>
</entry>
<entry>
<key>thenActions</key>
<value>
<item id="7c6ab9eb-0da0-40e5-9001-d27dbd28028c" removed="false">
<value>
<complex>
<entry>
<key>behavior</key>
<value>
<simple>{"objectId":"96b92d36-05c5-4368-bb0e-120c23f5c01c","packageName":"component.button","className":"Button","type":"TS"}</simple>
</value>
</entry>
<entry>
<key>method</key>
<value>
<simple>"onClick"</simple>
</value>
</entry>
<entry>
<key>value</key>
<value>
<simple>null</simple>
</value>
</entry>
</complex>
</value>
</item>
</value>
</entry>
</properties>
</scripts>
</children>
<children id="e985f9b5-11ca-42c7-a647-01a8520bc0af">
<prototypeId>98594cec-0a9b-4cef-af09-e1b71cb2ad9e</prototypeId>
<componentRootId>e985f9b5-11ca-42c7-a647-01a8520bc0af</componentRootId>