Commit 9a178994f2f6facbb85ffba749e2d3549ef5f08c
1 parent
3e4a6207
Exists in
master
Alterações na obrigatoriedade de parâmetros
Showing
3 changed files
with
16 additions
and
14 deletions
Show diff stats
rn/CguRN.php
| ... | ... | @@ -46,8 +46,7 @@ class CguRN extends InfraRN { |
| 46 | 46 | $objInfraException->adicionarValidacao('Sinalizador de retorno para destinatários inválido.'); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - | |
| 50 | - $dto = new DocumentoDTO(); | |
| 49 | + $dto = new DocumentoDTO(); | |
| 51 | 50 | $dto->retDblIdDocumento(); |
| 52 | 51 | $dto->retDblIdProcedimento(); |
| 53 | 52 | $dto->retStrProtocoloDocumentoFormatado(); |
| ... | ... | @@ -59,7 +58,8 @@ class CguRN extends InfraRN { |
| 59 | 58 | $dto->retDtaGeracaoProtocolo(); |
| 60 | 59 | $dto->retStrStaProtocoloProtocolo(); |
| 61 | 60 | $dto->retStrSinBloqueado(); |
| 62 | - | |
| 61 | + $dto->retStrStaDocumento(); | |
| 62 | + | |
| 63 | 63 | $dto->retNumIdUnidadeGeradoraProtocolo(); |
| 64 | 64 | $dto->retStrSiglaUnidadeGeradoraProtocolo(); |
| 65 | 65 | $dto->retStrDescricaoUnidadeGeradoraProtocolo(); |
| ... | ... | @@ -68,6 +68,15 @@ class CguRN extends InfraRN { |
| 68 | 68 | |
| 69 | 69 | if ($objDocumentoDTO!='') { |
| 70 | 70 | |
| 71 | + if ($objDocumentoDTO->getStrProtocoloDocumentoFormatado()=='' | |
| 72 | + && $objDocumentoDTO->getStrProtocoloProcedimentoFormatado() =='' | |
| 73 | + && $objDocumentoDTO->getStrNumero()=='' | |
| 74 | + && $objDocumentoDTO->getNumIdSerie()=='') { | |
| 75 | + | |
| 76 | + $objInfraException->lancarValidacao('É necessário informar ao menos um dos parâmetros da pesquisa.'); | |
| 77 | + | |
| 78 | + } | |
| 79 | + | |
| 71 | 80 | if ($objDocumentoDTO->getStrProtocoloDocumentoFormatado()!='') { |
| 72 | 81 | $dto->setStrProtocoloDocumentoFormatadoPesquisa($objDocumentoDTO->getStrProtocoloDocumentoFormatado()); |
| 73 | 82 | } | ... | ... |
ws/CguWS.php
| ... | ... | @@ -62,16 +62,9 @@ class CguWS extends InfraWS { |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $objDocumentoDTO = new DocumentoDTO(); |
| 65 | - if($ProtocoloDocumento!='') { | |
| 66 | - $objDocumentoDTO->setStrProtocoloDocumentoFormatado($ProtocoloDocumento); | |
| 67 | - } | |
| 68 | - if($ProtocoloProcedimento!='') { | |
| 69 | - $objDocumentoDTO->setStrProtocoloProcedimentoFormatado($ProtocoloProcedimento); | |
| 70 | - } | |
| 71 | - if($NumeroDocumento!='') { | |
| 72 | - $objDocumentoDTO->setStrNumero($NumeroDocumento); | |
| 73 | - } | |
| 74 | - | |
| 65 | + $objDocumentoDTO->setStrProtocoloDocumentoFormatado($ProtocoloDocumento); | |
| 66 | + $objDocumentoDTO->setStrProtocoloProcedimentoFormatado($ProtocoloProcedimento); | |
| 67 | + $objDocumentoDTO->setStrNumero($NumeroDocumento); | |
| 75 | 68 | $objDocumentoDTO->setNumIdSerie($Serie); |
| 76 | 69 | $objDocumentoDTO->setNumIdUnidadeGeradoraProtocolo($UnidadeElaboradora); |
| 77 | 70 | ... | ... |
ws/cgu.wsdl
| ... | ... | @@ -403,7 +403,7 @@ |
| 403 | 403 | |
| 404 | 404 | <wsdl:service name="CguService"> |
| 405 | 405 | <wsdl:port name="CguPortService" binding="tns:CguBinding"> |
| 406 | - <soap:address location="https://sei.cgu.gov.br/sei/modulos/cgu/wscomplementar/ws/CguWS.php"/> | |
| 406 | + <soap:address location="[servidor]/modulos/cgu/wscomplementar/ws/CguWS.php"/> | |
| 407 | 407 | </wsdl:port> |
| 408 | 408 | </wsdl:service> |
| 409 | 409 | ... | ... |