Commit dea5ecdcc127348b12952d60b6ef7cb3c5827c03
1 parent
64a21495
Exists in
master
and in
1 other branch
Alterando ordem de apresentaçao de dados no CSV.
Showing
1 changed file
with
7 additions
and
5 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 | ... | ... |