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