config_change
This commit is contained in:
parent
032be4bd78
commit
27c43a9eba
2 changed files with 25 additions and 26 deletions
|
|
@ -16,7 +16,7 @@
|
||||||
',"dio":'|| coalesce('"'||department_id_old::text||'"','null')||
|
',"dio":'|| coalesce('"'||department_id_old::text||'"','null')||
|
||||||
',"st":'|| coalesce('"'||system_pgs_status::text||'"','null')||'}')::jsonb
|
',"st":'|| coalesce('"'||system_pgs_status::text||'"','null')||'}')::jsonb
|
||||||
)
|
)
|
||||||
where id in ${endpointArguments} ${extraConditions};
|
where id in ${endpointArguments};
|
||||||
end
|
end
|
||||||
$$;
|
$$;
|
||||||
]]>
|
]]>
|
||||||
|
|
@ -39,23 +39,23 @@
|
||||||
DO
|
DO
|
||||||
$$
|
$$
|
||||||
BEGIN
|
BEGIN
|
||||||
DELETE FROM subpoena_history where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM subpoena_history where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments};
|
||||||
DELETE FROM subpoena_appearance where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions}));
|
DELETE FROM subpoena_appearance where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments}));
|
||||||
DELETE FROM subpoena_send_info where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions}));
|
DELETE FROM subpoena_send_info where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments}));
|
||||||
|
|
||||||
DELETE FROM notification_item where restriction_document_item_id in (
|
DELETE FROM notification_item where restriction_document_item_id in (
|
||||||
select id from restriction_document_item where restriction_document_create_id in (
|
select id from restriction_document_item where restriction_document_create_id in (
|
||||||
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions}))));
|
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments}))));
|
||||||
DELETE FROM notification_item where restriction_document_item_id in (
|
DELETE FROM notification_item where restriction_document_item_id in (
|
||||||
select id from restriction_document_item where restriction_document_cancel_id in (
|
select id from restriction_document_item where restriction_document_cancel_id in (
|
||||||
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions}))));
|
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments}))));
|
||||||
|
|
||||||
DELETE FROM restriction_document_item where restriction_document_create_id in (
|
DELETE FROM restriction_document_item where restriction_document_create_id in (
|
||||||
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions})));
|
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments})));
|
||||||
DELETE FROM restriction_document_item where restriction_document_cancel_id in (
|
DELETE FROM restriction_document_item where restriction_document_cancel_id in (
|
||||||
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions})));
|
select id FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments})));
|
||||||
DELETE FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions}));
|
DELETE FROM restriction_document where subpoena_id in (select id FROM subpoena where recruit_id in ${endpointArguments}));
|
||||||
DELETE FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM subpoena where recruit_id in ${endpointArguments};
|
||||||
END
|
END
|
||||||
$$;
|
$$;
|
||||||
]]>
|
]]>
|
||||||
|
|
@ -80,8 +80,8 @@
|
||||||
BEGIN
|
BEGIN
|
||||||
DELETE
|
DELETE
|
||||||
FROM incident_history
|
FROM incident_history
|
||||||
where incident_id in (select id from incident where recruit_id in ${endpointArguments} ${extraConditions}));
|
where incident_id in (select id from incident where recruit_id in ${endpointArguments}));
|
||||||
DELETE FROM incident where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM incident where recruit_id in ${endpointArguments};
|
||||||
END
|
END
|
||||||
$$;
|
$$;
|
||||||
]]>
|
]]>
|
||||||
|
|
@ -103,8 +103,12 @@
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
DO
|
DO
|
||||||
$$
|
$$
|
||||||
|
DECLARE
|
||||||
|
var1 uuid[] := '{
|
||||||
|
${endpointArguments}
|
||||||
|
}';
|
||||||
BEGIN
|
BEGIN
|
||||||
DELETE FROM notifications where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM notifications where recruit_id = any (var1);
|
||||||
END
|
END
|
||||||
$$;
|
$$;
|
||||||
]]>
|
]]>
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
DO
|
DO
|
||||||
$$
|
$$
|
||||||
BEGIN
|
BEGIN
|
||||||
DELETE FROM summoned_list where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM summoned_list where recruit_id in ${endpointArguments};
|
||||||
DELETE FROM recruit_active_list where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM recruit_active_list where recruit_id in ${endpointArguments};
|
||||||
DELETE FROM documents where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM documents where recruit_id in ${endpointArguments};
|
||||||
DELETE FROM subpoena where recruit_id in ${endpointArguments} ${extraConditions};
|
DELETE FROM subpoena where recruit_id in ${endpointArguments};
|
||||||
END
|
END
|
||||||
$$;
|
$$;
|
||||||
]]>
|
]]>
|
||||||
|
|
@ -28,9 +28,6 @@
|
||||||
<SqlRequest>
|
<SqlRequest>
|
||||||
<RequestURL>
|
<RequestURL>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
DO
|
|
||||||
$$
|
|
||||||
begin
|
|
||||||
update recruits
|
update recruits
|
||||||
set current_recruitment_id = jsonb_extract_path_text(extra_info,'blocked','cur')::uuid
|
set current_recruitment_id = jsonb_extract_path_text(extra_info,'blocked','cur')::uuid
|
||||||
,target_recruitment_id = jsonb_extract_path_text(extra_info,'blocked','trg')::uuid
|
,target_recruitment_id = jsonb_extract_path_text(extra_info,'blocked','trg')::uuid
|
||||||
|
|
@ -38,9 +35,7 @@
|
||||||
,system_pgs_status = '1.2'
|
,system_pgs_status = '1.2'
|
||||||
,conscription = null
|
,conscription = null
|
||||||
,extra_info = extra_info - ('blocked')
|
,extra_info = extra_info - ('blocked')
|
||||||
where id in ${endpointArguments} ${extraConditions};
|
where id in ${endpointArguments};
|
||||||
end
|
|
||||||
$$;
|
|
||||||
]]>
|
]]>
|
||||||
</RequestURL>
|
</RequestURL>
|
||||||
<SqlConnectionParams>
|
<SqlConnectionParams>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue