Commit da2744f5ed4c7922dd19d1cb8f569da092bd738d
1 parent
2cc3d19e
Exists in
master
and in
1 other branch
Atualizando WS de Assinatura do documentos em bloco
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
controlador_ws.php
... | ... | @@ -175,7 +175,6 @@ $app->group('/api/v1',function(){ |
175 | 175 | $rn = new MdWsSeiDocumentoRN(); |
176 | 176 | return $response->withJSON($rn->apiAssinarDocumentos( |
177 | 177 | $request->getParam('arrDocumento'), |
178 | - $request->getParam('documento'), | |
179 | 178 | $request->getParam('orgao'), |
180 | 179 | $request->getParam('cargo'), |
181 | 180 | $request->getParam('login'), | ... | ... |
rn/MdWsSeiDocumentoRN.php
... | ... | @@ -144,6 +144,10 @@ class MdWsSeiDocumentoRN extends InfraRN { |
144 | 144 | */ |
145 | 145 | public function apiAssinarDocumentos($arrIdDocumento, $idOrgao, $strCargoFuncao, $siglaUsuario, $senhaUsuario, $idUsuario){ |
146 | 146 | $arrDocumentoDTO = array(); |
147 | + //força a criação do array no caso de somente um parametro inteiro | |
148 | + if(!is_array($arrIdDocumento)) { | |
149 | + $arrIdDocumento = array($arrIdDocumento); | |
150 | + } | |
147 | 151 | foreach($arrIdDocumento as $dblIdDocumento){ |
148 | 152 | $documentoDTO = new DocumentoDTO(); |
149 | 153 | $documentoDTO->setDblIdDocumento($dblIdDocumento); | ... | ... |