163 svc resourceRealmCnt
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
descr={prefix="s", type="string"},
|
||||
man={prefix="s", type="string"},
|
||||
svc_group_id={prefix="sg", type="integer"},
|
||||
svc_group={prefix="g", type="string"}
|
||||
svc_group={prefix="g", type="string"},
|
||||
resource_realm_cnt={type="integer"}
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -74,10 +75,25 @@
|
||||
<m:field>sg.svc_group_id</m:field>
|
||||
<m:field>g.svc_group</m:field>
|
||||
<m:field>(coalesce(s.svc,'') ||' '|| coalesce(s.svc_short,'') ||' '|| coalesce(s.synonyms,'')) as svc_extended_name</m:field>
|
||||
<m:field>(select count(distinct r.resource_realm)
|
||||
from resource_realm r
|
||||
join resource_realm_access a on (
|
||||
r.resource_realm_id=a.resource_realm_id
|
||||
AND (a.contract_id IN (
|
||||
select contract_id
|
||||
from contract d
|
||||
where d.contragent_id=k.contragent_id AND NOT d.is_closed
|
||||
) OR a.contract_id=0) /*0 means access to any contract*/
|
||||
AND a.is_enabled)
|
||||
where r.resource_realm_type_id=s.resource_realm_type_id) as resource_realm_cnt
|
||||
</m:field> <!--- количество доступных ресурсных платформ --->
|
||||
</m:field_set>
|
||||
from svc s
|
||||
left outer join svc_group_svc sg on (s.svc_id=sg.svc_id AND sg.is_enabled)
|
||||
left outer join svc_group g on (sg.svc_group_id=g.svc_group_id)
|
||||
left outer join contragent k on (
|
||||
k.external_uid=<cfqueryparam cfsqltype="CF_SQL_OTHER" value=#arguments.companyUid# null=#!isValid("guid", arguments.companyUid)#/>
|
||||
)
|
||||
where 1=1 <m:filter_build filter=#filter#/>
|
||||
order by g.sort, g.svc_group_id
|
||||
<!--- <m:order_build sortCollection=#this.helper.parseNumericOrder(local.titleMap, arguments.orderBy)# fieldCount=0/><!---no sort --->length limit--->
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
"code"={type="string"},
|
||||
"version"={type="string"},
|
||||
"descr"={type="string"},
|
||||
"man"={type="string"}
|
||||
"man"={type="string"},
|
||||
"resource_realm_cnt"={type="integer"}
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user