Commit 41dcf538a6f2b5555ec2a851e4b3c0639e88bb17

Authored by Ezequiel Lafuente
1 parent 60476df6
Exists in master and in 1 other branch desenv

Ajustes no count de totais vindos da pesquisa de contatos, agora independente de…

… start e limit o retorno é o total da consulta
Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
rn/MdWsSeiContatoRN.php
... ... @@ -32,6 +32,9 @@ class MdWsSeiContatoRN extends InfraRN
32 32 if($filter)
33 33 $contatoDTO->setStrNome('%'.utf8_decode($filter).'%',InfraDTO::$OPER_LIKE);
34 34  
  35 + $contatoCountDTO = new ContatoDTO();
  36 + $contatoCountDTO->retNumIdContato();
  37 +
35 38 IF($limit)
36 39 $contatoDTO->setNumMaxRegistrosRetorno($limit);
37 40  
... ... @@ -44,6 +47,8 @@ class MdWsSeiContatoRN extends InfraRN
44 47  
45 48 $contatoRN = new ContatoRN();
46 49 $arrContatoDTO = $contatoRN->listarRN0325($contatoDTO);
  50 +
  51 + $contatoCountDTO = $contatoRN->listarRN0325($contatoCountDTO);
47 52  
48 53 $arrayRetorno = array();
49 54 if($arrContatoDTO){
... ... @@ -57,7 +62,7 @@ class MdWsSeiContatoRN extends InfraRN
57 62 }
58 63  
59 64 $total = 0;
60   - $total = count($arrayRetorno);
  65 + $total = count($contatoCountDTO);
61 66  
62 67 return MdWsSeiRest::formataRetornoSucessoREST(null, $arrayRetorno, $total);
63 68 } catch (Exception $e) {
... ...