|
|
|
@ -80,7 +80,7 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
/* |
|
|
|
|
* Personalise esta função se necessitar de outras opções de filtro. |
|
|
|
|
*/ |
|
|
|
|
$filtro = '<table class="filtro" border="0" cellspacing="1" cellpadding="1">'; |
|
|
|
|
$filtro = '<table class="filtro" border="0" cellspacing="1" cellpadding="1" style="font-size: 10px">'; |
|
|
|
|
/* |
|
|
|
|
* Rotulos. |
|
|
|
|
*/ |
|
|
|
@ -106,20 +106,20 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
$filtro .= '<tr>'; |
|
|
|
|
$filtro .= '<td> </td>'; |
|
|
|
|
$filtro .= sprintf('<td>%s</td>', $dacs); |
|
|
|
|
$filtro .= '<td><input name="dataIni" id="dataIni" type="text" size="15" maxlength="16" value="%s" onkeyup="formataDataHora(this)" title="dd/mm/aaaa HH:mm"></td>'; |
|
|
|
|
$filtro .= '<td><input name="dataIni" id="dataIni" type="text" size="15" maxlength="16" value="%s" onkeyup="formataDataHora(this)" title="dd/mm/aaaa HH:mm"></td>'; |
|
|
|
|
$filtro .= '<td><input name="dataFim" id="dataFim" type="text" size="15" maxlength="16" value="%s" onkeyup="formataDataHora(this)" title="dd/mm/aaaa HH:mm"></td>'; |
|
|
|
|
$filtro .= '<td><div class="geral"> '; |
|
|
|
|
$filtro .= sprintf('<input name="tempoDuracao" class="clean" type="radio" id="tempoDuracao" value="1" %s>Todos' |
|
|
|
|
. '<input name="tempoDuracao" class="clean" type="radio" id="tempoDuracao" value="2" %s>maior que(>0)' |
|
|
|
|
. '<input name="tempoDuracao" class="clean" type="radio" id="tempoDuracao" value="3" %s>Igual a 0 (= 0)', $this->___tempoDuracao == 1 ? 'checked' : '', $this->___tempoDuracao == 2 ? 'checked' : '', $this->___tempoDuracao == 3 ? 'checked' : ''); |
|
|
|
|
$filtro .= sprintf('<input style="font-size: 10px" name="tempoDuracao" class="clean" type="radio" id="tempoDuracao" value="1" %s>Todos' |
|
|
|
|
. '<input style="font-size: 10px" name="tempoDuracao" class="clean" type="radio" id="tempoDuracao" value="2" %s>>0 ' |
|
|
|
|
. '<input style="font-size: 10px" name="tempoDuracao" class="clean" type="radio" id="tempoDuracao" value="3" %s>= 0', $this->___tempoDuracao == 1 ? 'checked' : '', $this->___tempoDuracao == 2 ? 'checked' : '', $this->___tempoDuracao == 3 ? 'checked' : ''); |
|
|
|
|
$filtro .= '</div></td>'; |
|
|
|
|
$filtro .= sprintf('<td><div class="geral"> ' |
|
|
|
|
. '<input name="tipoAtendimento" class="clean" type="radio" id="tipoAtendimento" value="1" %s>Ambos' |
|
|
|
|
. '<input name="tipoAtendimento" class="clean" type="radio" id="tipoAtendimento" value="2" %s>Atendida' |
|
|
|
|
. '<input name="tipoAtendimento" class="clean" type="radio" id="tipoAtendimento" value="3" %s>Não Atendida' |
|
|
|
|
. '</div></td>', $this->___tipoAtendimento == 1 ? 'checked' : '', $this->___tipoAtendimento == 2 ? 'checked' : '', $this->___tipoAtendimento == 3 ? 'checked' : ''); |
|
|
|
|
$filtro .= '<td><input name="telefone" type="text" id="telefone" value="%s" /></td>'; |
|
|
|
|
$filtro .= '<td><input name="entrada" type="text" id="entrada" value="%s" /></td>'; |
|
|
|
|
$filtro .= '<td><input style="max-width: 120px" name="telefone" type="text" id="telefone" value="%s" /></td>'; |
|
|
|
|
$filtro .= '<td><input style="max-width: 100px" name="entrada" type="text" id="entrada" value="%s" /></td>'; |
|
|
|
|
$filtro .= '<td><input type="submit" name="btConsulta" id="btConsulta" value="Consultar"></td>'; |
|
|
|
|
$filtro .= '<td>%s</td>'; |
|
|
|
|
$filtro .= '</tr>'; |
|
|
|
@ -205,8 +205,8 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
|
|
|
|
|
$dataRel[] = GenerateCsvFromArray($filtro); |
|
|
|
|
|
|
|
|
|
$dadosCabecalio = array('Data/Hora', 'Origem', 'Destino', 'Tipo', 'Duracao', 'Atendida', 'Fila', 'Agente', 'Municipio', 'UF'); |
|
|
|
|
$dadosField = array('calldate', 'src', 'dst', 'tplg_descricao', 'tempo_atendimento', 'status', 'fila', 'agente', 'nome_municipio', 'uf'); |
|
|
|
|
$dadosCabecalio = array('Data/Hora', 'Origem', 'Destino', 'Tipo', 'Duracao', 'Atendida', 'Fila', 'Agente', 'Entrada', 'Municipio', 'UF'); |
|
|
|
|
$dadosField = array('calldate', 'src', 'dst', 'tplg_descricao', 'tempo_atendimento', 'status', 'fila', 'agente', 'entrada', 'nome_municipio', 'uf'); |
|
|
|
|
|
|
|
|
|
$dataRel[] = GenerateCsvFromArray(array_keys($dadosCabecalio)); |
|
|
|
|
|
|
|
|
@ -217,6 +217,7 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
* Inicia o relat�rio. |
|
|
|
|
*/ |
|
|
|
|
foreach ($this->GetData()[0] as $row) { |
|
|
|
|
$row['entrada'] = explode('"', $row['entrada'])[1]; |
|
|
|
|
$row['src'] = ocultarTelefone($row['src']); |
|
|
|
|
$row["calldate"] = date('d/m/Y H:i', strtotime($row["calldate"])); |
|
|
|
|
$row["tplg_descricao"] = str_replace("Entrada", "", $row["tplg_descricao"]); |
|
|
|
@ -270,8 +271,8 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
|
|
|
|
|
$dataRel[] = $linha; |
|
|
|
|
|
|
|
|
|
$dadosCabecalio = array('Data/Hora', 'Origem', 'Destino', 'Tipo', 'Duracao', 'Atendida', 'Fila', 'Agente', 'Municipio', 'UF'); |
|
|
|
|
$dadosField = array('calldate', 'src', 'dst', 'tplg_descricao', 'tempo_atendimento', 'status', 'fila', 'agente', 'nome_municipio', 'uf'); |
|
|
|
|
$dadosCabecalio = array('Data/Hora', 'Origem', 'Destino', 'Tipo', 'Duracao', 'Atendida', 'Fila', 'Agente', 'Entrada', 'Municipio', 'UF'); |
|
|
|
|
$dadosField = array('calldate', 'src', 'dst', 'tplg_descricao', 'tempo_atendimento', 'status', 'fila', 'agente', 'entrada', 'nome_municipio', 'uf'); |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* Monta a linha de cabecalio. |
|
|
|
@ -288,6 +289,7 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
* Linhas de dados. |
|
|
|
|
*/ |
|
|
|
|
foreach ($this->GetData()[0] as $row) { |
|
|
|
|
$row['entrada'] = explode('"', $row['entrada'])[1]; |
|
|
|
|
$row['src'] = ocultarTelefone($row['src']); |
|
|
|
|
$row["calldate"] = date('d/m/Y H:i', strtotime($row["calldate"])); |
|
|
|
|
$row["tplg_descricao"] = str_replace("Entrada", "", $row["tplg_descricao"]); |
|
|
|
@ -344,7 +346,7 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
/* |
|
|
|
|
* Inicia o relatorio. |
|
|
|
|
*/ |
|
|
|
|
$dataRel[] = '<table width="90%" cellpadding="2" class="grid">'; |
|
|
|
|
$dataRel[] = '<table width="100%" cellpadding="2" class="grid">'; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* Monta a linha de cabecalio. |
|
|
|
@ -417,6 +419,7 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
$somaQtd = 0; |
|
|
|
|
$somaTempo = 0; |
|
|
|
|
foreach ($this->GetData()[0] as $row) { |
|
|
|
|
$dados[$x]['entrada'] = explode('"', $row['entrada'])[1]; |
|
|
|
|
$dados[$x]["calldate"] = date('d/m/Y H', strtotime($row["calldate"])); |
|
|
|
|
$dados[$x]["src"] = ocultarTelefone($row['src']); |
|
|
|
|
$dados[$x]["dst"] = $row["dst"]; |
|
|
|
@ -442,6 +445,7 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
'Atend.' => 'C', |
|
|
|
|
'Fila' => 'L', |
|
|
|
|
'Agente' => 'L', |
|
|
|
|
'Entrada' => 'L', |
|
|
|
|
'Município' => 'L', |
|
|
|
|
'UF' => 'C' |
|
|
|
|
); |
|
|
|
@ -454,10 +458,11 @@ class ChamadasEntrantesGeral extends Relatorios
|
|
|
|
|
'status' => 'C', |
|
|
|
|
'fila' => 'L', |
|
|
|
|
'agente' => 'L', |
|
|
|
|
'entrada' => 'L', |
|
|
|
|
'nome_municipio' => 'L', |
|
|
|
|
'uf' => 'C' |
|
|
|
|
); |
|
|
|
|
$widthHeader = array(20, 25, 15, 25, 15, 10, 20, 20, 30, 10); |
|
|
|
|
$widthHeader = array(20, 20, 15, 25, 15, 10, 20, 20, 20, 20, 10); |
|
|
|
|
$totaliza = array('Total', "Registros: ", $somaQtd, 'Duração:', SecondToStrTime($somaTempo), '', '', '', '', ''); |
|
|
|
|
|
|
|
|
|
//Monta o array para passar para o prepara; Necessário passar 6 parametros |
|
|
|
|