示例#1
0
 /**
  * Adiciona uma nova senha na fila de chamada do painel de senhas
  * @param Unidade $unidade
  * @param Atendimento $atendimento
  */
 public function chamarSenha(Unidade $unidade, Atendimento $atendimento)
 {
     $senha = new PainelSenha();
     $senha->setUnidade($unidade);
     $senha->setServico($atendimento->getServicoUnidade()->getServico());
     $senha->setNumeroSenha($atendimento->getSenha()->getNumero());
     $senha->setSiglaSenha($atendimento->getSenha()->getSigla());
     $senha->setMensagem($atendimento->getSenha()->getLegenda());
     // local
     $senha->setLocal($atendimento->getServicoUnidade()->getLocal()->getNome());
     $senha->setNumeroLocal($atendimento->getLocal());
     // prioridade
     $senha->setPeso($atendimento->getSenha()->getPrioridade()->getPeso());
     $senha->setPrioridade($atendimento->getSenha()->getPrioridade()->getNome());
     // cliente
     $senha->setNomeCliente($atendimento->getCliente()->getNome());
     $senha->setDocumentoCliente($atendimento->getCliente()->getDocumento());
     $this->em->persist($senha);
     $this->em->flush();
     AppConfig::getInstance()->hook("panel.call", array($atendimento, $senha));
 }
 /**
  * {@inheritDoc}
  */
 public function getServicoUnidade()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getServicoUnidade', array());
     return parent::getServicoUnidade();
 }