Commit 27b2ce4cd8fae69e30ccd58d6bf0697a1b049a32
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing
2 changed files
with
10 additions
and
8 deletions
Show diff stats
src/Cacic/CommonBundle/Entity/LogAcessoRepository.php
... | ... | @@ -216,16 +216,18 @@ GROUP BY c0_.te_node_address, |
216 | 216 | $rsm->addScalarResult('sg_so', 'sgSo'); |
217 | 217 | $rsm->addScalarResult('nm_local', 'nmLocal'); |
218 | 218 | $rsm->addScalarResult('nm_rede', 'nmRede'); |
219 | + $rsm->addScalarResult('te_ip_rede', 'teIpRede'); | |
219 | 220 | $rsm->addScalarResult('max_data', 'data'); |
220 | 221 | |
222 | + | |
221 | 223 | $sql = " |
222 | -SELECT c0_.te_node_address AS te_node_address, | |
224 | +SELECT string_agg(DISTINCT c0_.nm_computador, ', ') AS nm_computador, | |
225 | + c0_.te_node_address AS te_node_address, | |
223 | 226 | string_agg(DISTINCT c0_.te_ip_computador, ', ') as te_ip_computador, |
224 | - string_agg(DISTINCT c0_.nm_computador, ', ') AS nm_computador, | |
225 | 227 | string_agg(DISTINCT s2_.sg_so, ', ') AS sg_so, |
226 | - string_agg(DISTINCT r3_.nm_rede, ', ') AS nm_rede, | |
227 | - max(l1_.data) AS max_data, | |
228 | - l4_.nm_local AS nm_local | |
228 | + l4_.nm_local AS nm_local, | |
229 | + string_agg(DISTINCT r3_.nm_rede, ', ') AS nm_rede,string_agg(DISTINCT r3_.te_ip_rede, ', ') AS te_ip_rede, | |
230 | + max(l1_.data) AS max_data | |
229 | 231 | FROM log_acesso l1_ |
230 | 232 | INNER JOIN computador c0_ ON l1_.id_computador = c0_.id_computador |
231 | 233 | INNER JOIN so s2_ ON c0_.id_so = s2_.id_so | ... | ... |
src/Cacic/RelatorioBundle/Controller/FaturamentoController.php
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | $tmpfile = tempnam(sys_get_temp_dir(), 'Faturamento'); |
166 | 166 | $file = new \SplFileObject($tmpfile, 'w'); |
167 | 167 | $writer = new CsvWriter($file); |
168 | - $writer->writeItem(array('Computador', 'Mac Address','Endereço IP','Sistema Operacional','Local','Subrede','Data/Hora da Última Coleta')); | |
168 | + $writer->writeItem(array('Computador','Mac Address','Endereço IP','Sistema Operacional','Local','Subrede','IP Subrede','Data/Hora da Última Coleta')); | |
169 | 169 | $workflow->addWriter($writer); |
170 | 170 | |
171 | 171 | // Process the workflow |
... | ... | @@ -285,7 +285,7 @@ |
285 | 285 | $tmpfile = tempnam(sys_get_temp_dir(), 'Máquinas sem Coletas'); |
286 | 286 | $file = new \SplFileObject($tmpfile, 'w'); |
287 | 287 | $writer = new CsvWriter($file); |
288 | - $writer->writeItem(array('Computador', 'Mac Address','Endereço IP','Sistema Operacional','Local','Subrede')); | |
288 | + $writer->writeItem(array('Computador', 'Mac Address','Endereço IP','Sistema Operacional','Local','Subrede','IP Subrede')); | |
289 | 289 | $workflow->addWriter($writer); |
290 | 290 | |
291 | 291 | // Process the workflow |
... | ... | @@ -371,4 +371,4 @@ |
371 | 371 | ) |
372 | 372 | ); |
373 | 373 | } |
374 | 374 | -} |
375 | +} | |
375 | 376 | \ No newline at end of file | ... | ... |