Merge remote-tracking branch 'origin/ervu/tmp_makets' into ervu/tmp_makets
* origin/ervu/tmp_makets: легенды справа ERVU-168 registration_change_address
This commit is contained in:
commit
17f48f7693
5 changed files with 4773 additions and 4370 deletions
|
|
@ -144,13 +144,6 @@ public class ApplicationsReceivedFromEpgu extends TableImpl<ApplicationsReceived
|
|||
*/
|
||||
public final TableField<ApplicationsReceivedFromEpguRecord, Long> COUNT_ALL = createField(DSL.name("count_all"), SQLDataType.BIGINT.nullable(false).defaultValue(DSL.field(DSL.raw("0"), SQLDataType.BIGINT)), this, "");
|
||||
|
||||
/**
|
||||
* The column
|
||||
* <code>init_registration_info.applications_received_from_epgu.info_source</code>.
|
||||
* информация об источнике - 17_YEARS, 18_YEARS, CHANGE_ADDRESS
|
||||
*/
|
||||
public final TableField<ApplicationsReceivedFromEpguRecord, String> INFO_SOURCE = createField(DSL.name("info_source"), SQLDataType.VARCHAR.nullable(false), this, "информация об источнике - 17_YEARS, 18_YEARS, CHANGE_ADDRESS");
|
||||
|
||||
private ApplicationsReceivedFromEpgu(Name alias, Table<ApplicationsReceivedFromEpguRecord> aliased) {
|
||||
this(alias, aliased, (Field<?>[]) null, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,24 +241,6 @@ public class ApplicationsReceivedFromEpguRecord extends UpdatableRecordImpl<Appl
|
|||
return (Long) get(12);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for
|
||||
* <code>init_registration_info.applications_received_from_epgu.info_source</code>.
|
||||
* информация об источнике - 17_YEARS, 18_YEARS, CHANGE_ADDRESS
|
||||
*/
|
||||
public void setInfoSource(String value) {
|
||||
set(13, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for
|
||||
* <code>init_registration_info.applications_received_from_epgu.info_source</code>.
|
||||
* информация об источнике - 17_YEARS, 18_YEARS, CHANGE_ADDRESS
|
||||
*/
|
||||
public String getInfoSource() {
|
||||
return (String) get(13);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Primary key information
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
@ -282,7 +264,7 @@ public class ApplicationsReceivedFromEpguRecord extends UpdatableRecordImpl<Appl
|
|||
/**
|
||||
* Create a detached, initialised ApplicationsReceivedFromEpguRecord
|
||||
*/
|
||||
public ApplicationsReceivedFromEpguRecord(Long applicationsReceivedFromEpguId, String recruitmentId, Timestamp updateDate, Date infoDate, Long countExecutorAppointed, Long countRegistered, Long countRegistrationRefusal, Long countRefusalProvideService, Long countExecutorNotAppointedExpired, Long countExecutorNotAppointedOnTime, Long countReceived, Long countProvided, Long countAll, String infoSource) {
|
||||
public ApplicationsReceivedFromEpguRecord(Long applicationsReceivedFromEpguId, String recruitmentId, Timestamp updateDate, Date infoDate, Long countExecutorAppointed, Long countRegistered, Long countRegistrationRefusal, Long countRefusalProvideService, Long countExecutorNotAppointedExpired, Long countExecutorNotAppointedOnTime, Long countReceived, Long countProvided, Long countAll) {
|
||||
super(ApplicationsReceivedFromEpgu.APPLICATIONS_RECEIVED_FROM_EPGU);
|
||||
|
||||
setApplicationsReceivedFromEpguId(applicationsReceivedFromEpguId);
|
||||
|
|
@ -298,7 +280,6 @@ public class ApplicationsReceivedFromEpguRecord extends UpdatableRecordImpl<Appl
|
|||
setCountReceived(countReceived);
|
||||
setCountProvided(countProvided);
|
||||
setCountAll(countAll);
|
||||
setInfoSource(infoSource);
|
||||
resetChangedOnNotNull();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1026,7 +1026,259 @@
|
|||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- <changeSet id="0009" author="ilyin">-->
|
||||
<changeSet id="0009" author="ilyin">
|
||||
<comment>create schema registration_change_address</comment>
|
||||
<sql>
|
||||
CREATE SCHEMA IF NOT EXISTS registration_change_address;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.change_data_from_gir_vu
|
||||
(
|
||||
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_all bigint NOT NULL DEFAULT 0,
|
||||
count_requested_to_send bigint NOT NULL DEFAULT 0,
|
||||
count_accepted_to_send_from_first bigint NOT NULL DEFAULT 0,
|
||||
count_sent_from_first bigint NOT NULL DEFAULT 0,
|
||||
count_solution_send_signed bigint NOT NULL DEFAULT 0,
|
||||
count_unloaded bigint NOT NULL DEFAULT 0,
|
||||
count_solutions_registration_formed bigint NOT NULL DEFAULT 0,
|
||||
count_solutions_registration_signed bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.change_data_from_gir_vu OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.change_data_from_gir_vu IS 'Постановка на воинский учет при смене адреса. Изменение сведений из ГИР ВУ';
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_change_data_from_gir_vu_date ON registration_change_address.change_data_from_gir_vu (info_date);
|
||||
CREATE INDEX IF NOT EXISTS idx_change_data_from_gir_vu_recr ON registration_change_address.change_data_from_gir_vu (recruitment_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_change_data_from_gir_vu_recr_date ON registration_change_address.change_data_from_gir_vu (recruitment_id, info_date);
|
||||
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_all IS 'всего';
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_requested_to_send IS 'запрошено личных дел';
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_accepted_to_send_from_first IS 'принято решений о направлении дела из первого вк';
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_sent_from_first IS 'отправлено';
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_solution_send_signed IS 'подписано решений о направлении';
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_unloaded IS 'выгружено дел';
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_solutions_registration_formed IS 'сформировано решений по постановке на ВУ по новому адресу';
|
||||
COMMENT ON COLUMN registration_change_address.change_data_from_gir_vu.count_solutions_registration_signed IS 'подписано решений по постановке на ВУ по новому адресу';
|
||||
|
||||
CREATE OR REPLACE VIEW registration_change_address.view_change_data_from_gir_vu AS
|
||||
SELECT
|
||||
change_data_from_gir_vu_id,
|
||||
round(count_requested_to_send::numeric * 100 / count_all ) AS percent_requested_to_send,
|
||||
round(count_accepted_to_send_from_first::numeric * 100 / count_all ) AS percent_accepted_to_send_from_first,
|
||||
round(count_sent_from_first::numeric * 100 / count_all ) AS percent_sent_from_first,
|
||||
round(count_solution_send_signed::numeric * 100 / count_all ) AS percent_requested_solution_send_signed,
|
||||
round(count_unloaded::numeric * 100 / count_all ) AS percent_requested_unloaded,
|
||||
round(count_solutions_registration_formed::numeric * 100 / count_all ) AS percent_requested_solutions_formed,
|
||||
round(count_solutions_registration_signed::numeric * 100 / count_all ) AS percent_solutions_registration_signed
|
||||
FROM registration_change_address.change_data_from_gir_vu;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.summonses_sign
|
||||
(
|
||||
summonses_sign_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,
|
||||
info_source varchar NOT NULL,
|
||||
count_refused_in_second bigint NOT NULL DEFAULT 0,
|
||||
count_accepted_in_second bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.summonses_sign OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.summonses_sign IS 'Постановка на воинский учет при смене адреса. Повестки, подписанные в первом ВК';
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_summonses_sign_date ON registration_change_address.summonses_sign (info_date);
|
||||
CREATE INDEX IF NOT EXISTS idx_summonses_sign_recr ON registration_change_address.summonses_sign (recruitment_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_summonses_sign_recr_date ON registration_change_address.summonses_sign (recruitment_id, info_date);
|
||||
|
||||
COMMENT ON COLUMN registration_change_address.summonses_sign.info_source IS 'информация об источнике - PERSONAL_VISIT, GIR_VU, EPGU';
|
||||
COMMENT ON COLUMN registration_change_address.summonses_sign.count_refused_in_second IS 'отмененные во 2 ВК';
|
||||
COMMENT ON COLUMN registration_change_address.summonses_sign.count_accepted_in_second IS 'подтвержденные во 2 ВК';
|
||||
|
||||
CREATE OR REPLACE VIEW registration_change_address.view_summonses_sign AS
|
||||
SELECT
|
||||
summonses_sign_id,
|
||||
count_refused_in_second + count_accepted_in_second AS count_all,
|
||||
round(count_refused_in_second::numeric * 100 / (count_refused_in_second + count_accepted_in_second)) AS percent_refused_in_second,
|
||||
round(count_accepted_in_second::numeric * 100 / (count_refused_in_second + count_accepted_in_second)) AS percent_accepted_in_second
|
||||
FROM registration_change_address.summonses_sign;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.info_sent_to_lk_epgu
|
||||
(
|
||||
info_sent_to_lk_epgu_id bigserial NOT NULL PRIMARY KEY,
|
||||
recruitment_id varchar(36) NOT NULL constraint fk_conv_info_records_from_easu_recruitment_id references metrics.recruitment,
|
||||
update_date timestamp without time zone NOT NULL DEFAULT now(),
|
||||
info_date date NOT NULL,
|
||||
info_source character varying NOT NULL,
|
||||
count_status_formed bigint NOT NULL DEFAULT 0,
|
||||
count_sended bigint NOT NULL DEFAULT 0,
|
||||
count_delivered bigint NOT NULL DEFAULT 0,
|
||||
count_error bigint NOT NULL DEFAULT 0,
|
||||
count_viewed bigint NOT NULL DEFAULT 0,
|
||||
count_not_viewed bigint NOT NULL DEFAULT 0,
|
||||
count_status_not_formed bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.info_sent_to_lk_epgu OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.info_sent_to_lk_epgu IS 'Постановка на воинский учет при смене адреса. Отправка уведомлений в ЛК на ЕПГУ';
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_info_sent_to_lk_epgu_date ON registration_change_address.info_sent_to_lk_epgu (info_date);
|
||||
CREATE INDEX IF NOT EXISTS idx_info_sent_to_lk_epgu_recr ON registration_change_address.info_sent_to_lk_epgu (recruitment_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_info_sent_to_lk_epgu_recr_date ON registration_change_address.info_sent_to_lk_epgu (recruitment_id, info_date);
|
||||
|
||||
CREATE OR REPLACE VIEW registration_change_address.view_info_sent_to_lk_epgu AS
|
||||
SELECT
|
||||
info_sent_to_lk_epgu_id,
|
||||
round(count_status_formed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_status_formed,
|
||||
round(count_status_not_formed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_status_not_formed,
|
||||
round(count_sended::numeric* 100 / (count_status_formed + count_status_not_formed)) AS percent_sended,
|
||||
round(count_delivered::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_delivered,
|
||||
round(count_error::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_error,
|
||||
round(count_viewed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_viewed,
|
||||
round(count_not_viewed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_not_viewed
|
||||
FROM registration_change_address.info_sent_to_lk_epgu;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.records_about_registrated_citizen
|
||||
(
|
||||
records_about_registrated_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_registrated_by_app_vk bigint NOT NULL DEFAULT 0,
|
||||
count_registrated_another_vk bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.records_about_registrated_citizen OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.records_about_registrated_citizen IS 'Постановка на воинский учет при смене адреса. Граждане, поставленные на ВУ';
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_records_about_citizen_date ON registration_change_address.records_about_registrated_citizen (info_date);
|
||||
CREATE INDEX IF NOT EXISTS idx_records_about_registrated_citizen_recr ON registration_change_address.records_about_registrated_citizen (recruitment_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_records_about_registrated_citizen_recr_date ON registration_change_address.records_about_registrated_citizen (recruitment_id, info_date);
|
||||
|
||||
|
||||
CREATE OR REPLACE VIEW registration_change_address.view_records_about_registrated_citizen AS
|
||||
SELECT
|
||||
records_about_registrated_citizen_id,
|
||||
count_registrated_by_app_vk + count_registrated_another_vk AS count_all,
|
||||
round(count_registrated_by_app_vk::numeric * 100 / (count_registrated_by_app_vk + count_registrated_another_vk)) AS percent_registrated_by_app_vk,
|
||||
round(count_registrated_another_vk::numeric * 100 / (count_registrated_by_app_vk + count_registrated_another_vk)) AS percent_registrated_another_vk
|
||||
FROM registration_change_address.records_about_registrated_citizen;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.personal_info_stat
|
||||
(
|
||||
personal_info_stat_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 bigint NOT NULL DEFAULT 0,
|
||||
count_unloaded bigint NOT NULL DEFAULT 0,
|
||||
count_accepted_to_send bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.personal_info_stat OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.personal_info_stat IS 'Постановка на воинский учет при смене адреса. Статистика по запросу личных дел';
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_records_about_citizen_date ON registration_change_address.personal_info_stat (info_date);
|
||||
CREATE INDEX IF NOT EXISTS idx_personal_info_stat_recr ON registration_change_address.personal_info_stat (recruitment_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_personal_info_stat_recr_date ON registration_change_address.personal_info_stat (recruitment_id, info_date);
|
||||
|
||||
|
||||
CREATE OR REPLACE VIEW registration_change_address.view_personal_info_stat AS
|
||||
SELECT
|
||||
personal_info_stat_id,
|
||||
count_refused + count_accepted_to_send AS count_all,
|
||||
round(count_refused::numeric * 100 / (count_refused + count_accepted_to_send)) AS percent_refused,
|
||||
round(count_unloaded::numeric * 100 / (count_refused + count_accepted_to_send)) AS percent_unloaded,
|
||||
round(count_accepted_to_send::numeric * 100 / (count_refused + count_accepted_to_send)) AS percent_accepted_to_send
|
||||
FROM registration_change_address.personal_info_stat;
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.compare_citizen_data
|
||||
(
|
||||
compare_citizen_data_id bigserial NOT NULL PRIMARY KEY,
|
||||
recruitment_id varchar(36) NOT NULL constraint fk_conv_info_records_from_easu_recruitment_id references metrics.recruitment,
|
||||
update_date timestamp without time zone NOT NULL DEFAULT now(),
|
||||
info_date date NOT NULL,
|
||||
count_compare_record bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.compare_citizen_data OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.compare_citizen_data IS 'Постановка на воинский учет при смене адреса. Сопоставление записей о гражданине в ГИС ЕРВУ';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.inactive_app_epgu
|
||||
(
|
||||
inactive_app_epgu_id bigserial NOT NULL PRIMARY KEY,
|
||||
recruitment_id varchar(36) NOT NULL constraint fk_conv_info_records_from_easu_recruitment_id references metrics.recruitment,
|
||||
update_date timestamp without time zone NOT NULL DEFAULT now(),
|
||||
info_date date NOT NULL,
|
||||
count_inactive_app_epgu bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.inactive_app_epgu OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.inactive_app_epgu IS 'Постановка на воинский учет при смене адреса. Кол-во неактивных заявлений в ЕПГУ';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS registration_change_address.change_data_personal_visit
|
||||
(
|
||||
change_data_personal_visit_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_for_sign bigint NOT NULL DEFAULT 0,
|
||||
count_signed bigint NOT NULL DEFAULT 0
|
||||
)
|
||||
WITH (OIDS = FALSE);
|
||||
ALTER TABLE IF EXISTS registration_change_address.change_data_personal_visit OWNER to ervu_business_metrics;
|
||||
|
||||
COMMENT ON TABLE registration_change_address.change_data_personal_visit IS 'Постановка на воинский учет при смене адреса. Изменения сведений при личной явке';
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_records_about_citizen_date ON registration_change_address.change_data_personal_visit (info_date);
|
||||
CREATE INDEX IF NOT EXISTS idx_change_data_personal_visit_recr ON registration_change_address.change_data_personal_visit (recruitment_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_change_data_personal_visit_recr_date ON registration_change_address.change_data_personal_visit (recruitment_id, info_date);
|
||||
|
||||
|
||||
CREATE OR REPLACE VIEW registration_change_address.view_change_data_personal_visit AS
|
||||
SELECT
|
||||
change_data_personal_visit_id,
|
||||
count_for_sign + count_signed AS count_all,
|
||||
round(count_for_sign::numeric * 100 / (count_for_sign + count_signed)) AS percent_for_sign,
|
||||
round(count_signed::numeric * 100 / (count_for_sign + count_signed)) AS percent_signed
|
||||
FROM registration_change_address.change_data_personal_visit;
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="0010" author="ilyin">
|
||||
<comment>add init_registration_info.view_info_sent_to_lk_epgu </comment>
|
||||
<sql>
|
||||
CREATE OR REPLACE VIEW init_registration_info.view_info_sent_to_lk_epgu AS
|
||||
SELECT
|
||||
info_sent_to_lk_epgu_id,
|
||||
round(count_status_formed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_status_formed,
|
||||
round(count_status_not_formed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_status_not_formed,
|
||||
round(count_sended::numeric* 100 / (count_status_formed + count_status_not_formed)) AS percent_sended,
|
||||
round(count_delivered::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_delivered,
|
||||
round(count_error::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_error,
|
||||
round(count_viewed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_viewed,
|
||||
round(count_not_viewed::numeric * 100 / (count_status_formed + count_status_not_formed)) AS percent_not_viewed
|
||||
FROM init_registration_info.info_sent_to_lk_epgu;
|
||||
</sql>
|
||||
</changeSet>
|
||||
|
||||
<!-- <changeSet id="0011" author="ilyin">-->
|
||||
<!-- <comment>add table </comment>-->
|
||||
<!-- <sql>-->
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue