Commit 41dcf538a6f2b5555ec2a851e4b3c0639e88bb17
1 parent
60476df6
Exists in
master
and in
1 other branch
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,6 +32,9 @@ class MdWsSeiContatoRN extends InfraRN | ||
32 | if($filter) | 32 | if($filter) |
33 | $contatoDTO->setStrNome('%'.utf8_decode($filter).'%',InfraDTO::$OPER_LIKE); | 33 | $contatoDTO->setStrNome('%'.utf8_decode($filter).'%',InfraDTO::$OPER_LIKE); |
34 | 34 | ||
35 | + $contatoCountDTO = new ContatoDTO(); | ||
36 | + $contatoCountDTO->retNumIdContato(); | ||
37 | + | ||
35 | IF($limit) | 38 | IF($limit) |
36 | $contatoDTO->setNumMaxRegistrosRetorno($limit); | 39 | $contatoDTO->setNumMaxRegistrosRetorno($limit); |
37 | 40 | ||
@@ -44,6 +47,8 @@ class MdWsSeiContatoRN extends InfraRN | @@ -44,6 +47,8 @@ class MdWsSeiContatoRN extends InfraRN | ||
44 | 47 | ||
45 | $contatoRN = new ContatoRN(); | 48 | $contatoRN = new ContatoRN(); |
46 | $arrContatoDTO = $contatoRN->listarRN0325($contatoDTO); | 49 | $arrContatoDTO = $contatoRN->listarRN0325($contatoDTO); |
50 | + | ||
51 | + $contatoCountDTO = $contatoRN->listarRN0325($contatoCountDTO); | ||
47 | 52 | ||
48 | $arrayRetorno = array(); | 53 | $arrayRetorno = array(); |
49 | if($arrContatoDTO){ | 54 | if($arrContatoDTO){ |
@@ -57,7 +62,7 @@ class MdWsSeiContatoRN extends InfraRN | @@ -57,7 +62,7 @@ class MdWsSeiContatoRN extends InfraRN | ||
57 | } | 62 | } |
58 | 63 | ||
59 | $total = 0; | 64 | $total = 0; |
60 | - $total = count($arrayRetorno); | 65 | + $total = count($contatoCountDTO); |
61 | 66 | ||
62 | return MdWsSeiRest::formataRetornoSucessoREST(null, $arrayRetorno, $total); | 67 | return MdWsSeiRest::formataRetornoSucessoREST(null, $arrayRetorno, $total); |
63 | } catch (Exception $e) { | 68 | } catch (Exception $e) { |