039 added svc_short
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@
|
||||
|
||||
//variables.framework.docs={};
|
||||
variables.framework.docs.APIName="Deck API";
|
||||
variables.framework.docs.APIVersion="0.038";
|
||||
variables.framework.docs.APIVersion="0.039";
|
||||
|
||||
variables.framework.globalHeaders = structNew();
|
||||
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
<cfset var local={}/>
|
||||
|
||||
<cfquery name="local.qSvc">
|
||||
select svc from svc where svc_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.service_id#/>
|
||||
select coalesce(svc_short,svc) as svc_short from svc where svc_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.service_id#/>
|
||||
</cfquery>
|
||||
|
||||
<cfquery name="local.qInst">
|
||||
@@ -312,11 +312,11 @@
|
||||
join contragent k on (d.contragent_id=k.contragent_id)
|
||||
join usr u on (k.contragent_id=u.contragent_id)
|
||||
where u.usr_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.usr_id#/>
|
||||
AND lower(e.display_name) like lower(<cfqueryparam cfsqltype="cf_sql_varchar" value="#local.qSvc.svc#%"/>)
|
||||
AND lower(e.display_name) like lower(<cfqueryparam cfsqltype="cf_sql_varchar" value="#local.qSvc.svc_short#%"/>)
|
||||
AND service_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.service_id#/>
|
||||
</cfquery>
|
||||
|
||||
<cfset var prefixLen=len(local.qSvc.svc)+1/>
|
||||
<cfset var prefixLen=len(local.qSvc.svc_short)+1/>
|
||||
<cfset var i=1/>
|
||||
<cfloop query="local.qInst">
|
||||
<cfif len(local.qInst.display_name) GT prefixLen>
|
||||
@@ -327,7 +327,7 @@
|
||||
</cfif>
|
||||
</cfloop>
|
||||
|
||||
<cfreturn "#local.qSvc.svc#-#i+1#"/>
|
||||
<cfreturn "#local.qSvc.svc_short#-#i+1#"/>
|
||||
</cffunction>
|
||||
|
||||
</cfcomponent>
|
||||
@@ -23,6 +23,7 @@
|
||||
<m:field_set titleMapOut="local.titleMap" lengthOut="local.fieldCount">
|
||||
<m:field title="ID" cfSqlType="CF_SQL_INTEGER">s.svc_id</m:field>
|
||||
<m:field>s.svc</m:field>
|
||||
<m:field>s.svc_short</m:field>
|
||||
<m:field>s.code</m:field>
|
||||
<m:field title="URL создания">(select url from svc_operation so where so.operation='create' AND so.svc_id=s.svc_id limit 1) as create_url</m:field>
|
||||
<m:field>s.is_production_ready</m:field>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
svc_id={prefix="s", type="integer"},
|
||||
is_production_ready={prefix="s", type="boolean"},
|
||||
svc={prefix="s", type="string"},
|
||||
svc_short={prefix="s", type="string"},
|
||||
code={prefix="s", type="string"},
|
||||
descr={prefix="s", type="string"},
|
||||
man={prefix="s", type="string"}
|
||||
@@ -56,6 +57,7 @@
|
||||
<m:field_set titleMapOut="local.titleMap" lengthOut="local.fieldCount">
|
||||
<m:field title="ID" cfSqlType="CF_SQL_INTEGER">s.svc_id</m:field>
|
||||
<m:field title="Сервис">s.svc</m:field>
|
||||
<m:field title="Сокращение">s.svc_short</m:field>
|
||||
<m:field title="Код">s.code</m:field>
|
||||
<m:field title="URL создания">(select url from svc_operation so where so.operation='create' AND so.svc_id=s.svc_id limit 1) as create_url</m:field>
|
||||
<m:field>s.is_production_ready</m:field>
|
||||
|
||||
Reference in New Issue
Block a user