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 | 271 | } |
| 272 | 272 | $objEDocRN = new EDocRN(); |
| 273 | 273 | $html = $objEDocRN->consultarHTMLDocumentoRN1204($documentoDTO); |
| 274 | + | |
| 274 | 275 | return MdWsSeiRest::formataRetornoSucessoREST(null, array('html' => $html)); |
| 275 | 276 | }else if ($documentoDTO->getStrStaDocumento() == DocumentoRN::$TD_EDITOR_INTERNO){ |
| 276 | 277 | $editorDTO = new EditorDTO(); |
| ... | ... | @@ -293,6 +294,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { |
| 293 | 294 | |
| 294 | 295 | $auditoriaProtocoloRN = new AuditoriaProtocoloRN(); |
| 295 | 296 | $auditoriaProtocoloRN->auditarVisualizacao($auditoriaProtocoloDTO); |
| 297 | + | |
| 296 | 298 | return MdWsSeiRest::formataRetornoSucessoREST(null, array('html' => $html)); |
| 297 | 299 | }else if ($documentoDTO->getStrStaProtocoloProtocolo() == ProtocoloRN::$TP_DOCUMENTO_RECEBIDO){ |
| 298 | 300 | $anexoDTO = new AnexoDTO(); |
| ... | ... | @@ -325,8 +327,7 @@ class MdWsSeiDocumentoRN extends DocumentoRN { |
| 325 | 327 | $aditoriaProtocoloRN = new AuditoriaProtocoloRN(); |
| 326 | 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 | 332 | }catch (Exception $e){ |
| 332 | 333 | return MdWsSeiRest::formataRetornoErroREST($e); | ... | ... |