Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 2a6eca6

Browse files
committed
refine ucsc report
1 parent 3cc83d8 commit 2a6eca6

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

src-admintool/queries/producer_files_query.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,16 @@ def get_sql
8181
select
8282
distinct o.ark,
8383
loc.local_id,
84-
o.erc_what,
85-
o.erc_when,
86-
o.erc_who,
87-
os.file_count,
84+
replace(o.erc_what, '"', "'") as erc_what,
85+
replace(o.erc_when, '"', "'") as erc_when,
86+
replace(o.erc_who, '"', "'") as erc_who,
87+
(
88+
select count(*)
89+
from inv.inv_versions v
90+
inner join inv.inv_files f
91+
on f.inv_object_id = o.id and f.inv_version_id = v.id and f.source='producer' and o.version_number = v.number
92+
where v.inv_object_id = o.id
93+
) as file_count,
8894
os.billable_size,
8995
concat('http://n2t.net/', o.ark) as permalink,
9096
(
@@ -125,7 +131,7 @@ def get_params
125131
end
126132

127133
def get_headers(_results)
128-
['Ark', 'Local Id', 'erc_what', 'erc_when', 'erc_who', 'file_count', 'billable_size', 'permalink', 'mimetypes']
134+
['Ark', 'Local Id', 'erc_what', 'erc_when', 'erc_who', 'producer file count', 'billable_size', 'permalink', 'mimetypes']
129135
end
130136

131137
def get_types(_results)

0 commit comments

Comments
 (0)