From 1541e4806d153a8f76e137398ff89dc635d35464 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Oct 2026 16:57:39 +0300 Subject: [PATCH] 095 strict filtering, deleted s3 instances removed --- Application.cfc | 2 +- payg.cfm | 16 ++++++++++------ s3_ls.cfm | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Application.cfc b/Application.cfc index cca0adf..20d6560 100644 --- a/Application.cfc +++ b/Application.cfc @@ -89,7 +89,7 @@ - + diff --git a/payg.cfm b/payg.cfm index 8e6aa4a..0ba9ed6 100644 --- a/payg.cfm +++ b/payg.cfm @@ -16,8 +16,9 @@ + - + @@ -63,9 +64,7 @@ AS (VALUES ('Закрыта неуспешно',7,0),('Закрыта успешно',6,100),('Договор подписан',5,100),('Договор на подписании',15,90),('Договор на согласовании',12,70), ('Тестирование',8,50),('Отправлено ТКП',10,20),('Внутреннее согласование',37,10),('Проработка решения',4,10),('Сбор потребностей',1,0) - ) - - + ) select upper(trim(k.id_klienta)) as wz, k.__id::text as contragent_uid, p.code, @@ -86,7 +85,7 @@ /*,p.__name as line_key*/, p.ed_izm, p.name as component, p.type, p.cnt*coalesce(siv.cnt,1) as component_quantity, aa.__name as additional_agreement, aa.__id::text as additional_agreement_uid --, aa.is_actual - ,siv.end_customer as end_customer_uid + ,siv.end_customer::text as end_customer_uid ,z.id_klienta as end_customer_wz ,z.__name as end_customer_name --,ft.free_tier @@ -117,6 +116,9 @@ AND p.code like + + + AND p.type=3 --AND k.id_klienta='WZ01031' --AND k.id_klienta='WZ01112' @@ -358,6 +360,7 @@ select qS3OpsTrfAge:#getTickCount()-request.startTickCount# + WITH current_state AS ( SELECT *, ROW_NUMBER() OVER (PARTITION BY instance_uid ORDER BY version DESC) as rn @@ -367,6 +370,7 @@ select FROM current_state s JOIN instance e on (s.instance_uid=e.instance_uid) WHERE rn = 1 AND e.service_id=12 + AND NOT cast(s.instance_data->>'isDeleted' as boolean) qS3User:#getTickCount()-request.startTickCount# @@ -820,7 +824,7 @@ S3 операции и трафик: #deal# - #WZE# + #WZE# #component# #user_description# diff --git a/s3_ls.cfm b/s3_ls.cfm index 77d5afe..ffc1513 100644 --- a/s3_ls.cfm +++ b/s3_ls.cfm @@ -54,6 +54,7 @@ left join contract d on (p.contract_id=d.contract_id) left join contragent k on (d.contragent_id=k.contragent_id) WHERE rn = 1 AND e.service_id=12 + AND NOT cast(s.instance_data->>'isDeleted' as boolean) /*не вдаваясь в другие статусы*/