本文整理汇总了PHP中Historico::findDatos方法的典型用法代码示例。如果您正苦于以下问题:PHP Historico::findDatos方法的具体用法?PHP Historico::findDatos怎么用?PHP Historico::findDatos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Historico
的用法示例。
在下文中一共展示了Historico::findDatos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLiquidados
/**
*
*/
public static function getLiquidados($telefono = '', $codcliatis = '', $codsercms = '', $codclicms = '')
{
$numeroSql = '';
$tipo_averia = '';
//buscar en liquidados si no se encontraron registros
/*****************/
if ($telefono != '' || $codcliatis != '') {
//7
$sql = " SELECT peticion\n FROM schedulle_sistemas.prov_liq_bas_pais\n WHERE telefono=? OR cod_cliente=? AND cod_cliente<>''\n AND cod_cliente<>'0' AND peticion<>0 ";
$query = DB::select($sql, array($telefono, $codcliatis));
if (count($query) > 0 && $query != '') {
$numeroSql = '7';
$peticion = $query[0]->peticion;
} else {
//8
$sql = " SELECT codigo_req as peticion\n FROM schedulle_sistemas.prov_liq_catv_pais\n WHERE codigo_del_cliente=? AND codigo_req<>0 ";
$query = DB::select($sql, array($codcliatis));
if (count($query) > 0 && $query != '') {
$tipo_averia = 'CATV';
$numeroSql = '8';
$peticion = $query[0]->peticion;
} else {
//9 AVERIAS
$sql = " SELECT numero_osiptel as peticion\n FROM schedulle_sistemas.aver_liq_adsl_pais\n WHERE telefono=? ";
$query = DB::select($sql, array($telefono));
if (count($query) > 0 && $query != '' && trim($telefono) != '') {
$tipo_averia = 'ADSL';
$numeroSql = '9';
$peticion = $query[0]->peticion;
} else {
//10
$sql = " SELECT numero_osiptel as peticion\n FROM schedulle_sistemas.aver_liq_bas_lima\n WHERE telefono=? ";
$query = DB::select($sql, array($telefono));
if (count($query) > 0 && $query != '' && trim($telefono) != '') {
$numeroSql = '10';
$peticion = $query[0]->peticion;
} else {
//11
$sql = " SELECT inscripcion as peticion\n FROM schedulle_sistemas.aver_liq_bas_prov_pedidos\n WHERE telefono=? ";
$query = DB::select($sql, array($telefono));
if (count($query) > 0 && $query != '' && trim($telefono) != '') {
$numeroSql = '11';
$peticion = $query[0]->peticion;
} else {
//12
$sql = " SELECT codigoreq as peticion\n FROM schedulle_sistemas.aver_liq_catv_pais\n WHERE codigodelcliente=? ";
$query = DB::select($sql, array($codcliatis));
if (count($query) > 0 && $query != '' && trim($codcliatis) != '') {
$tipo_averia = 'CATV';
$numeroSql = '12';
$peticion = $query[0]->peticion;
}
}
}
}
}
}
} elseif ($codsercms != '') {
//12
$tipo_averia = 'CATV';
$sql = " SELECT codigoreq as peticion\n FROM schedulle_sistemas.aver_liq_catv_pais\n WHERE codigodelservicio=? ";
$query = DB::select($sql, array($codsercms));
if (count($query) > 0 && $query != '') {
$numeroSql = '12';
$peticion = $query[0]->peticion;
}
}
//verificar si existe una consulta
if ($numeroSql != '') {
$queryLiq = Historico::findDatos($peticion, $numeroSql);
//verificar si hay registro
if (count($queryLiq) > 0 && $queryLiq != '') {
$query = $queryLiq;
//se debe enviar X Y de geolocalizacion
$query = Historico::findGeolocalizacion($query, $tipo_averia);
return $query;
}
return array();
}
return array();
}