diff --git a/Application.cfc b/Application.cfc index ce5a80b..7bc68cd 100644 --- a/Application.cfc +++ b/Application.cfc @@ -89,7 +89,7 @@ - + diff --git a/s3_ls.cfm b/s3_ls.cfm index 3806685..77d5afe 100644 --- a/s3_ls.cfm +++ b/s3_ls.cfm @@ -39,6 +39,22 @@ from s3billing.user_info u cross join (select max(timestamp_addition) as timestamp_addition from s3billing.bucket_stat) t + + + WITH current_state AS ( + SELECT *, ROW_NUMBER() OVER (PARTITION BY instance_uid ORDER BY version DESC) as rn + FROM instance_state + ) + SELECT s.instance_data->'job'->>'contragentCode' as wz, s.instance_data->'job'->>'userId' AS user_id, e.display_name + ,k.contragent_id, k.external_code, k.contragent + FROM current_state s + JOIN instance e on (s.instance_uid=e.instance_uid) + left join specification_item i on (e.specification_item_id=i.specification_item_id) + left join specification p on (i.specification_id=p.specification_id) + 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 + - -select count(*) as cnt from s3billing.user_info where 1=1 - select upper(trim(k.id_klienta)) as wz, k.__id::text as contragent_uid, k.__name as contragent, @@ -60,13 +73,14 @@ select count(*) as cnt from s3billing.user_info where 1=1 + select - s.id + s.id s.owner s.bucket_cnt s.size_byte @@ -76,13 +90,27 @@ select c.contragent_uid c.responsible c.responsible_email + + u.user_id + u.wz as wzs + u.external_code + u.contragent as cmdb_contragent + u.display_name from qS3 s left outer join qContragent c on (s.wz=c.wz) +full outer join qS3User u on (s.owner=u.user_id) where 1=1 order by + +select count(*) as cnt +from qS3 s +left outer join qContragent c on (s.wz=c.wz) +full outer join qS3User u on (s.owner=u.user_id) + + - Учетки S3 + Учетные записи S3 - дефектовка @@ -115,37 +143,53 @@ order by + + + Биллинг (из S3 CEPH) + CMDB + - - - - + + - + + + + + + + - #id# - class="err">#owner# - + #wz# #contragent# #responsible# #responsible_email# + #id# + class="err">#owner# + #bucket_cnt# #size_byte# #buckets# + + style="background-color:LightCoral">#display_name# + #user_id# + style="background-color:LightCoral">#wzs# + #external_code# + #cmdb_contragent#