本文整理汇总了PHP中Historico::findGeolocalizacion方法的典型用法代码示例。如果您正苦于以下问题:PHP Historico::findGeolocalizacion方法的具体用法?PHP Historico::findGeolocalizacion怎么用?PHP Historico::findGeolocalizacion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Historico
的用法示例。
在下文中一共展示了Historico::findGeolocalizacion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMaestro
/**
*
*/
public static function getMaestro($telefono = '', $codcliatis = '', $codsercms = '', $codclicms = '')
{
//temporal, maestro cliente
$qryTelefono = $qryCodcliatis = $qryCodsercms = $qryCodclicms = '';
if ($telefono != '') {
$where = " l.telefono='" . $telefono . "' AND ";
}
if ($codcliatis != '') {
$where = " l.codclie='" . $codcliatis . "' AND ";
}
if ($codsercms != '') {
$where = " l.codservcms='" . $codsercms . "' AND ";
}
if ($codclicms != '') {
$where = " l.codclicms='" . $codclicms . "' AND ";
}
$sql = "SELECT l.tiposerv, l.telefono, l.tipocalle, l.nomcalle,l.numcalle,\n l.codclie, l.codservcms, l.nombre, l.appater, l.apmater, l.zonal,\n l.mdf, l.armario, l.cabprim AS cable, l.cajater AS terminal,\n l.xtroba, l.ytroba, l.xtap, l.ytap, l.xterminal, l.yterminal,\n IFNULL(\n (SELECT direccion\n FROM geo_tap gt\n WHERE gt.coord_x=l.xtroba\n AND gt.coord_y=l.ytroba), 'sin dirección') as dir_troba,\n IFNULL(\n (SELECT direccion\n FROM geo_tap gt\n WHERE gt.coord_x=l.xterminal\n AND gt.coord_y=l.yterminal), 'sin dirección') as dir_term,\n IFNULL(\n (SELECT direccion\n FROM geo_tap gt\n WHERE gt.coord_x=l.xtap\n AND gt.coord_y=l.ytap), 'sin dirección') as dir_tab,\n IFNULL(m.eecc,'') as eecc,\n IFNULL(m.lejano,'') as lejano,\n IFNULL(m.zona_critico,'') as microzona,\n (select id from empresas where nombre like m.eecc) as empresa_id\n FROM webpsi_coc.tb_lineas_servicio_total l\n LEFT JOIN webpsi_fftt.mdfs_eecc_regiones m\n ON l.mdf=m.mdf\n WHERE {$where}\n TRIM(REPLACE(l.telefono,' ','')) REGEXP '^[0-9]+\$' AND\n TRIM(REPLACE(l.telefono,' ','')) >2\n AND LENGTH(REPLACE(l.telefono,'1',''))!=0\n GROUP BY l.telefono,l.codclie,l.codservcms,l.codclicms";
$query = DB::select($sql);
//verificar si hay registros
if (count($query) > 0 && $query !== '') {
//se debe enviar X Y de geolocalizacion
$query = Historico::findGeolocalizacion($query, '');
return $query;
}
return array();
}