072 responsibles
This commit is contained in:
+38
-7
@@ -12,9 +12,9 @@
|
||||
|
||||
<cfquery name="qStorage" datasource="billing-vc" ><!--- cachedWithin=#createTimeSpan(0, 0, 25, 0)# --->
|
||||
SELECT
|
||||
<d:field_set titleMapOut="titleMap" lengthOut="fieldCount">
|
||||
<d:field_set titleMapOut="titleMapStor" lengthOut="fieldCountStor">
|
||||
<d:field title="Тенант">t.name AS tenant</d:field>
|
||||
<d:field title="WZ">m.clientid AS wz</d:field>
|
||||
<d:field title="WZ">upper(m.clientid) AS wz</d:field>
|
||||
<d:field title="status">m.status</d:field>
|
||||
<d:field title="End of Test">m.end_test_date</d:field>
|
||||
<d:field title="End of Test">null as dt_end_of_test</d:field>
|
||||
@@ -51,7 +51,12 @@ WHERE c.timestamp >= <cfqueryparam cfsqltype="cf_sql_timestamp" value=#dateAdd("
|
||||
GROUP BY
|
||||
m.clientid, v.name, p.name, sp.name, t.name,
|
||||
m.status, m.end_test_date, tm.ts
|
||||
</cfquery>
|
||||
|
||||
<cfquery name="qResponsible"><!--- cachedWithin=#createTimeSpan(0, 0, 25, 0)# ---><!--- имя колонки __id мы не принимаем почему-то --->
|
||||
SELECT upper(k.id_klienta) as wz, k.__id as id, c.__name as responsible, c.email as responsible_email, c.__status_status as responsible_status
|
||||
from elma.companies k
|
||||
LEFT OUTER JOIN elma.comp_users_ext c on (k.responsible=c.__id)
|
||||
</cfquery>
|
||||
|
||||
<!--- patch date --->
|
||||
@@ -69,11 +74,31 @@ GROUP BY
|
||||
|
||||
<cfset db = new MemoryDbHelper()/>
|
||||
<cfset db.register("qStorage", qStorage, "inmem")/>
|
||||
<!--- лень переделывать, мы пользуемся аннотацией от первого запроса, просто добавляя ко второму сортировку --->
|
||||
<cfset db.register("qResponsible", qResponsible, "inmem")/><!--- имя колонки __id мы не принимаем почему-то --->
|
||||
|
||||
<cfquery name="qRead" datasource="inmem">
|
||||
select * from qStorage
|
||||
ORDER BY
|
||||
<m:order_build sortArray=#pageInfo.settings.sort.sortArray# fieldCount=#fieldCount#/>
|
||||
select
|
||||
<d:field_set titleMapOut="titleMap" lengthOut="fieldCount">
|
||||
<d:field title="Тенант">s.tenant</d:field>
|
||||
<d:field title="WZ">s.wz</d:field>
|
||||
<d:field title="status">s.status</d:field>
|
||||
<d:field title="End of Test">s.end_test_date</d:field>
|
||||
<d:field title="End of Test">s.dt_end_of_test</d:field>
|
||||
<d:field title="VDC">s.vdc</d:field>
|
||||
<d:field title="Provider VDC">s.provider_vdc</d:field>
|
||||
<d:field title="code">s.code</d:field>
|
||||
<d:field title="Storage Profile">s.storage_profile</d:field>
|
||||
<d:field title="Limit GB">s.limit_gb</d:field>
|
||||
<d:field title="Allocation GB">s.alloc_gb</d:field>
|
||||
<d:field title="Timestamp">s.ts</d:field>
|
||||
<d:field title="Ответственный за к/а">r.responsible</d:field>
|
||||
<d:field title="Email отв-го">r.responsible_email</d:field>
|
||||
<d:field title="Статус отв-го">r.responsible_status</d:field>
|
||||
</d:field_set>
|
||||
from qStorage s
|
||||
LEFT OUTER JOIN qResponsible r ON (s.wz=r.wz)
|
||||
ORDER BY
|
||||
<m:order_build sortArray=#pageInfo.settings.sort.sortArray# fieldCount=#fieldCount#/>
|
||||
</cfquery>
|
||||
|
||||
|
||||
@@ -121,6 +146,9 @@ GROUP BY
|
||||
<th><layout:column_head name="limit_gb"/></th>
|
||||
<th><layout:column_head name="alloc_gb"/></th>
|
||||
<th><layout:column_head name="ts"/></th>
|
||||
<th><layout:column_head name="responsible"/></th>
|
||||
<th><layout:column_head name="responsible_email"/></th>
|
||||
<th><layout:column_head name="responsible_status"/></th>
|
||||
</layout:grid_head>
|
||||
<cfoutput query="qRead">
|
||||
<tr>
|
||||
@@ -136,7 +164,10 @@ GROUP BY
|
||||
<td>#storage_profile#</td>
|
||||
<td class="r<cfif NOT (status EQ "prod" OR status EQ "internal-test") AND isDate(dt_end_of_test) AND dt_end_of_test LE Now()> b err</cfif>">#limit_gb#</td>
|
||||
<td class="r<cfif NOT (status EQ "prod" OR status EQ "internal-test") AND isDate(dt_end_of_test) AND dt_end_of_test LE Now()> b err</cfif>">#alloc_gb#</td>
|
||||
<td>#dateFormaT(ts,"YYYY-MM-DD")# #timeFormaT(ts,"HH-MM")#</td>
|
||||
<td>#dateFormaT(ts,"YYYY-MM-DD")# #timeFormaT(ts,"HH-MM")#</td>
|
||||
<td<cfif responsible_status NEQ 2> class="err"</cfif>>#responsible#</td>
|
||||
<td<cfif responsible_status NEQ 2> class="err"</cfif>>#responsible_email#</td>
|
||||
<td<cfif responsible_status NEQ 2> class="err"</cfif>>#responsible_status#</td>
|
||||
</tr>
|
||||
</cfoutput>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user