This commit is contained in:
Michele Artini 2022-09-27 12:03:56 +02:00
parent 5523ab8657
commit c990fc945b
3 changed files with 7 additions and 2 deletions

View File

@ -15,13 +15,15 @@ import org.hibernate.annotations.TypeDefs;
import com.vladmihalcea.hibernate.type.json.JsonBinaryType;
import com.vladmihalcea.hibernate.type.json.JsonStringType;
import eu.dnetlib.organizations.model.utils.OpenaireGraphNode;
@Entity
@Table(name = "organizations_view")
@TypeDefs({
@TypeDef(name = "json", typeClass = JsonStringType.class),
@TypeDef(name = "jsonb", typeClass = JsonBinaryType.class)
})
public class OrganizationView implements Serializable {
public class OrganizationView extends OpenaireGraphNode implements Serializable {
/**
*

View File

@ -533,6 +533,8 @@ CREATE VIEW organizations_view AS SELECT
org.ec_enterprise,
org.ec_smevalidated,
org.ec_nutscode,
substr(org.id, 1, 14)||md5(substr(org.id, 15)) as openaire_id,
count(po.id) > 0 as openaire_persistent,
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE oid.otherid IS NOT NULL), '[]') AS other_ids,
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('name', n.name, 'lang', n.lang)) FILTER (WHERE n.name IS NOT NULL), '[]') AS other_names,
COALESCE(jsonb_agg(DISTINCT a.acronym) FILTER (WHERE a.acronym IS NOT NULL), '[]') AS acronyms,
@ -546,6 +548,7 @@ FROM
LEFT OUTER JOIN urls u ON (org.id = u.id)
LEFT OUTER JOIN relationships r ON (org.id = r.id1)
LEFT OUTER JOIN organizations relorg ON (relorg.id = r.id2)
LEFT OUTER JOIN persistent_orgs po ON (org.id = po.id)
GROUP BY
org.id,
org.name,

View File

@ -4,7 +4,7 @@
'text-white bg-success' : show == 'success',
'text-white bg-info' : show == 'info',
'bg-secondary' : show == 'secondary',
}">{{orgTitle}}</div>
}">{{orgTitle}} <span class="badge badge-warning" title="It is probably related to an Institutional Dashboard" ng-show="org.persistent">persistent ID</span></div>
<table class="table table-sm table-condensed" style="table-layout: fixed">
<tr class="d-flex">
<th class="col-4 pl-3">Name</th>