当前位置: 首页>>代码示例>>PHP>>正文


PHP Historico::findGeolocalizacion方法代码示例

本文整理汇总了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();
 }
开发者ID:lcalderonc,项目名称:hdc2016,代码行数:29,代码来源:Historico.php


注:本文中的Historico::findGeolocalizacion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。