forked from Claudio/integracao
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.8 KiB
62 lines
1.8 KiB
<?php |
|
|
|
require_once 'Integracao.php'; |
|
|
|
$registros = array( |
|
"id" => '', |
|
"reg_ura" => $ura, |
|
"reg_tronco" => $tronco, |
|
"reg_uniqueid" => $uid, |
|
"reg_id_metodo" => $idMetodo, |
|
"reg_uniqueid" => $uid, |
|
"reg_uniqueid_old" => $uidOld, |
|
"reg_fone" => $numero, |
|
"reg_status_exec" => '1', |
|
"reg_inicio" => date()); |
|
|
|
$int = new Integracao(); |
|
|
|
$int->db()->setRegistros($registros); |
|
|
|
$principal = $int->agi()->get_variable('URAOPCAO', true); |
|
$sub = $int->agi()->get_variable('EXTEN', true); |
|
|
|
if (CONF_AUDIO_ERROR) { |
|
$int->db()->setIdAudioError(CONF_AUDIO_ERROR); |
|
} |
|
|
|
$itgcTela = array( |
|
"OPCAO_URA_PRINCIPAL" => $principal, |
|
"OPCAO_SUB_URA" => $sub . " -> " . subUraOpcao($principal)[$sub], |
|
); |
|
$int->integracaoAgente($itgcTela, array('OPCAO_URA_PRINCIPAL', 'OPCAO_SUB_URA')); |
|
|
|
$int->agi()->exec_goto($int->db()->getAnuncio('INT_HORARIO_ATENDIMENTO')); |
|
|
|
$int->db()->atualizaIntegracao(); |
|
|
|
|
|
function subUraOpcao($principal){ |
|
|
|
if($principal == 1){ |
|
return array(1 => 'AGENDAMENTO DE CONSULTA', 2 => 'AGENDAMENTO DE EXAMES'); |
|
} |
|
|
|
if($principal == 2){ |
|
return array(1 => 'ORÇAMENTO DE CONSULTA', 2 => 'ORÇAMENTO DE EXAMES'); |
|
} |
|
|
|
if($principal == 3){ |
|
return array(1 => 'SETOR DE EXAMES', 2 => 'SETOR DE LAUDOS', 3 => 'SETOR FATURAMENTO/FINANCEIRO'); |
|
} |
|
|
|
if($principal == 4){ |
|
return array(1 => 'SETOR DE FATURAMENTO', 2 => 'SETOR DE FINANCEIRO', 3 => 'SETOR ADMINISTRAÇÃO', 4 => 'SETOR COMERCIAL', 5 => 'SETOR DE COMPRAS'); |
|
} |
|
|
|
if($principal == 5){ |
|
return array(1 => 'INFO. SOBRE CONSULTAS', 2 => 'ORIENTAÇÃO DE EXAMES', 3 => 'INFO. GERAIS'); |
|
} |
|
} |
|
?> |
|
|
|
|