Commit 8c54b305ee855fb79c198fe784f08a8b7ef84109
1 parent
e1822a08
Alterações
Showing
4 changed files
with
50 additions
and
10 deletions
Show diff stats
.editorconfig
pen_procedimento_expedir.php
rn/ExpedirProcedimentoRN.php
... | ... | @@ -787,15 +787,30 @@ class ExpedirProcedimentoRN extends InfraRN { |
787 | 787 | throw new InfraException('Parâmetro $objProcesso não informado.'); |
788 | 788 | } |
789 | 789 | |
790 | - $arrParticipantesDTO = $this->listarInteressados($dblIdProcedimento); | |
790 | + $arrObjContatosDTO = $this->listarInteressados($dblIdProcedimento); | |
791 | 791 | |
792 | - if(isset($arrParticipantesDTO) && count($arrParticipantesDTO) > 0){ | |
792 | + if(isset($arrObjContatosDTO) && count($arrObjContatosDTO) > 0){ | |
793 | 793 | $objProcesso->interessado = array(); |
794 | 794 | |
795 | - foreach ($arrParticipantesDTO as $participanteDTO) { | |
796 | - $interessado = new stdClass(); | |
797 | - $interessado->nome = utf8_encode($participanteDTO->getStrNomeContato()); | |
798 | - $objProcesso->interessado[] = $interessado; | |
795 | + foreach ($arrObjContatosDTO as $objContatoDTO) { | |
796 | + | |
797 | + $objInteressado = new stdClass(); | |
798 | + $objInteressado->nome = utf8_encode($objContatoDTO->getStrNome()); | |
799 | + $objInteressado->cpf = $objContatoDTO->getDblCpf(); | |
800 | + $objInteressado->rg = $objContatoDTO->getDblRg(); | |
801 | + $objInteressado->orgao_expedidor = utf8_encode('Carteira de Identidade'); | |
802 | + $objInteressado->endereco = $objContatoDTO->utf8_encode(getStrEndereco()); | |
803 | + $objInteressado->complemento = $objContatoDTO->utf8_encode(getStrComplemento()); | |
804 | + $objInteressado->bairro = $objContatoDTO->utf8_encode(getStrBairro()); | |
805 | + $objInteressado->natureza_contato = $objContatoDTO->utf8_encode(getStrStaNaturezaContatoAssociado()); | |
806 | + $objInteressado->nome_cidade = $objContatoDTO->utf8_encode(getStrNomeCidade()); | |
807 | + $objInteressado->sigla_uf = $objContatoDTO->getStrSiglaUf(); | |
808 | + $objInteressado->nome_pais = $objContatoDTO->utf8_encode(getStrNomePais()); | |
809 | + $objInteressado->cep = $objContatoDTO->getStrCep(); | |
810 | + $objInteressado->genero = $objContatoDTO->getStrStaGenero(); | |
811 | + $objInteressado->data_nasc = $objContatoDTO->getDtaNascimento(); | |
812 | + //.... | |
813 | + $objProcesso->interessado[] = $objInteressado; | |
799 | 814 | } |
800 | 815 | } |
801 | 816 | } |
... | ... | @@ -1498,13 +1513,36 @@ class ExpedirProcedimentoRN extends InfraRN { |
1498 | 1513 | throw new InfraException('Parâmetro $numIdProtocolo não informado.'); |
1499 | 1514 | } |
1500 | 1515 | |
1516 | + //Busca lista de interessados do processo | |
1501 | 1517 | $objParticipanteDTO = new ParticipanteDTO(); |
1502 | 1518 | $objParticipanteDTO->retNumIdContato(); |
1503 | - $objParticipanteDTO->retStrNomeContato(); | |
1504 | 1519 | $objParticipanteDTO->setDblIdProtocolo($numIdProtocolo); |
1505 | 1520 | $objParticipanteDTO->setStrStaParticipacao(ParticipanteRN::$TP_INTERESSADO); |
1506 | - | |
1507 | - return $this->objParticipanteRN->listarRN0189($objParticipanteDTO); | |
1521 | + $arrObjParticipantes = $this->objParticipanteRN->listarRN0189($objParticipanteDTO); | |
1522 | + | |
1523 | + // Recupera detalhes do contato de cada um dos interessados | |
1524 | + $arrNumIdsContatos = InfraArray::converterArrInfraDTO($arrObjParticipantes, "IdContato"); | |
1525 | + $objContatoDTOFiltro = new ContatoDTO(); | |
1526 | + $objContatoDTOFiltro->retStrNome(); | |
1527 | + $objContatoDTOFiltro->retDblCpf(); | |
1528 | + $objContatoDTOFiltro->retStrStaNaturezaContatoAssociado(); | |
1529 | + $objContatoDTOFiltro->retStrEndereco(); | |
1530 | + $objContatoDTOFiltro->retStrBairro(); | |
1531 | + $objContatoDTOFiltro->retStrNomeCidade(); | |
1532 | + $objContatoDTOFiltro->retStrSiglaUf(); | |
1533 | + $objContatoDTOFiltro->retStrNomePais(); | |
1534 | + $objContatoDTOFiltro->retStrCep(); | |
1535 | + $objContatoDTOFiltro->retStrStaGenero(); | |
1536 | + $objContatoDTOFiltro->retDtaNascimento(); | |
1537 | + $objContatoDTOFiltro->retStrComplemento(); | |
1538 | + $objContatoDTOFiltro->retDblRg(); | |
1539 | + $objContatoDTOFiltro->retStrOrgaoExpedidor(); | |
1540 | + //$arrObjContatoDTO = $objContatoDTOFiltro->setNumIdContato($arrNumIdsContatos, InfraDTO::$OPER_IN); | |
1541 | + | |
1542 | + $objContatoRN = new ContatoRN(); | |
1543 | + $ret = $objContatoRN->listarRN0325($objContatoDTOFiltro); | |
1544 | + | |
1545 | + return $ret; | |
1508 | 1546 | } |
1509 | 1547 | |
1510 | 1548 | private function consultarProtocoloDocumento($numIdProcedimento) | ... | ... |
rn/ReceberProcedimentoRN.php
... | ... | @@ -920,6 +920,7 @@ class ReceberProcedimentoRN extends InfraRN |
920 | 920 | $objParticipanteDTO = new ParticipanteDTO(); |
921 | 921 | $objParticipanteDTO->setStrSiglaContato($objInteressado->numeroDeIdentificacao); |
922 | 922 | $objParticipanteDTO->setStrNomeContato(utf8_decode($objInteressado->nome)); |
923 | + $objParticipanteDTO->setStrNomeCidade(utf8_decode($objInteressado->nome_cidade)); | |
923 | 924 | $objParticipanteDTO->setStrStaParticipacao(ParticipanteRN::$TP_INTERESSADO); |
924 | 925 | $objParticipanteDTO->setNumSequencia($i); |
925 | 926 | $arrObjParticipantesDTO[] = $objParticipanteDTO; | ... | ... |