Commit 8647d45f936d135ab3155184086503668eebaffe
1 parent
6a12a3d2
Exists in
master
and in
1 other branch
[Refact] Refazendo download de documento.
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
rn/MdWsSeiDocumentoRN.php
| @@ -271,6 +271,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { | @@ -271,6 +271,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { | ||
| 271 | } | 271 | } |
| 272 | $objEDocRN = new EDocRN(); | 272 | $objEDocRN = new EDocRN(); |
| 273 | $html = $objEDocRN->consultarHTMLDocumentoRN1204($documentoDTO); | 273 | $html = $objEDocRN->consultarHTMLDocumentoRN1204($documentoDTO); |
| 274 | + | ||
| 274 | return MdWsSeiRest::formataRetornoSucessoREST(null, array('html' => $html)); | 275 | return MdWsSeiRest::formataRetornoSucessoREST(null, array('html' => $html)); |
| 275 | }else if ($documentoDTO->getStrStaDocumento() == DocumentoRN::$TD_EDITOR_INTERNO){ | 276 | }else if ($documentoDTO->getStrStaDocumento() == DocumentoRN::$TD_EDITOR_INTERNO){ |
| 276 | $editorDTO = new EditorDTO(); | 277 | $editorDTO = new EditorDTO(); |
| @@ -293,6 +294,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { | @@ -293,6 +294,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { | ||
| 293 | 294 | ||
| 294 | $auditoriaProtocoloRN = new AuditoriaProtocoloRN(); | 295 | $auditoriaProtocoloRN = new AuditoriaProtocoloRN(); |
| 295 | $auditoriaProtocoloRN->auditarVisualizacao($auditoriaProtocoloDTO); | 296 | $auditoriaProtocoloRN->auditarVisualizacao($auditoriaProtocoloDTO); |
| 297 | + | ||
| 296 | return MdWsSeiRest::formataRetornoSucessoREST(null, array('html' => $html)); | 298 | return MdWsSeiRest::formataRetornoSucessoREST(null, array('html' => $html)); |
| 297 | }else if ($documentoDTO->getStrStaProtocoloProtocolo() == ProtocoloRN::$TP_DOCUMENTO_RECEBIDO){ | 299 | }else if ($documentoDTO->getStrStaProtocoloProtocolo() == ProtocoloRN::$TP_DOCUMENTO_RECEBIDO){ |
| 298 | $anexoDTO = new AnexoDTO(); | 300 | $anexoDTO = new AnexoDTO(); |
| @@ -325,8 +327,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { | @@ -325,8 +327,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { | ||
| 325 | $aditoriaProtocoloRN = new AuditoriaProtocoloRN(); | 327 | $aditoriaProtocoloRN = new AuditoriaProtocoloRN(); |
| 326 | $aditoriaProtocoloRN->auditarVisualizacao($aditoriaProtocoloDTO); | 328 | $aditoriaProtocoloRN->auditarVisualizacao($aditoriaProtocoloDTO); |
| 327 | 329 | ||
| 328 | - InfraPagina::montarHeaderDownload(null, null, 'Content-Type: text/html; charset=iso-8859-1'); | ||
| 329 | - die($html); | 330 | + return MdWsSeiRest::formataRetornoSucessoREST(null, array('html' => $html)); |
| 330 | } | 331 | } |
| 331 | }catch (Exception $e){ | 332 | }catch (Exception $e){ |
| 332 | return MdWsSeiRest::formataRetornoErroREST($e); | 333 | return MdWsSeiRest::formataRetornoErroREST($e); |