|
|
@@ -68,8 +68,8 @@ switch ($action) {
|
|
|
$sql = "select f_column, min(menu_id) as menu_id, max(menu_icon_font) as menu_icon_font from public.ra_online_permission where has_new_version=true and default_check = true group by f_column ORDER BY min(order_by)";
|
|
|
$rs = common::excuteListSql($sql);
|
|
|
}
|
|
|
- $menuSetting = array("Ocean Booking" => array("label"=>"Booking","path"=>"/booking"),
|
|
|
- "Ocean B/L Info." => array("label"=>"Tracking","path"=>"/tracking"));
|
|
|
+ $menuSetting = array("Ocean Booking" => array("label"=>"Booking","path"=>"/booking","icon"=>"icon_booking__fill_b"),
|
|
|
+ "Ocean B/L Info." => array("label"=>"Tracking","path"=>"/tracking","icon"=>"icon_tracking__fill_b"));
|
|
|
$menuList = array();
|
|
|
$menuList[] = array("index"=>'1',"label"=>"Dashboard","icon"=>"icon_data_fill_b","path"=>"/dashboard");
|
|
|
$index = 2;
|
|
|
@@ -88,7 +88,7 @@ switch ($action) {
|
|
|
foreach ($ll as $v) {
|
|
|
if($v['s_column'] =="Ocean Booking" || $v['s_column'] =="Ocean B/L Info."){
|
|
|
$urlData = $menuSetting[$v['s_column']];
|
|
|
- $menuList[] = array("index"=>$index,"label"=>$urlData['label'],"icon"=>"icon_booking__fill_b","path"=>$urlData['path']);
|
|
|
+ $menuList[] = array("index"=>$index,"label"=>$urlData['label'],"icon"=>$urlData['icon'],"path"=>$urlData['path']);
|
|
|
$index = $index + 1;
|
|
|
}
|
|
|
}
|
|
|
@@ -640,7 +640,7 @@ switch ($action) {
|
|
|
exit();
|
|
|
break;
|
|
|
case 'main_map_new':
|
|
|
- //include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
|
|
|
+ include ONLINE_ROOT . 'libs' . DS . 'map_config.ini.php';
|
|
|
//修改添加port_of_transshipment 和port_of_transshipment_name的坐标获取(有为空的可能)
|
|
|
$serial_no = $_REQUEST["serial_no"];
|
|
|
//$serial_no = "F41E6016-1A97-4C93-8198-53D8B3B26220";
|
|
|
@@ -657,13 +657,13 @@ switch ($action) {
|
|
|
)
|
|
|
, rr as (
|
|
|
select lon as lng, lat as lat, 'Origin' as label, port_of_loading as infor, 1 as sort, null::timestamp without time zone as stime, 'pol'::text as ptype
|
|
|
- from vessel.vt_unlocode, aa where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=fport_of_loading_un
|
|
|
+ from vessel.vt_unlocode, aa where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=fport_of_loading_un
|
|
|
union all
|
|
|
select lon as lng, lat as lat, 'Destination' as label, port_of_discharge as infor, 2 as sort, null::timestamp without time zone as stime, 'pod'::text as ptype
|
|
|
- from vessel.vt_unlocode, aa where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=mport_of_discharge_un
|
|
|
+ from vessel.vt_unlocode, aa where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=mport_of_discharge_un
|
|
|
union all
|
|
|
select lon as lng, lat as lat, 'Transfer' as label, port_of_transshipment_name as infor, 3 as sort, null::timestamp without time zone as stime, 'poe'::text as ptype
|
|
|
- from vessel.vt_unlocode, aa where lon<>0 and lat<>0 and lon is not null and lat is not null and uncode=port_of_transshipment_un
|
|
|
+ from vessel.vt_unlocode, aa where (lat<=90 or lat>=-90) and (lon<=180 or lon>=-180) and lon is not null and lat is not null and uncode=port_of_transshipment_un
|
|
|
)
|
|
|
select * from rr order by sort, stime";
|
|
|
$rss = common::excuteListSql($sql);
|
|
|
@@ -673,35 +673,31 @@ switch ($action) {
|
|
|
// {"lng":"100.88333333","lat":"13.08333333","label":"Destination","infor":"LAEM CHABANG PORT,THAILAND","sort":"1","stime":null,"ptype":"pol"},
|
|
|
// {"lng":"-122.28640000","lat":"37.79784000","label":"Transfer","infor":"OAKLAND, CA, USA","sort":"2","stime":null,"ptype":"pod"}]';
|
|
|
//$rss = json_decode($json,true);
|
|
|
- // global $mapdb;
|
|
|
- // //查询线(包含所有的线)
|
|
|
- // error_log("select * from get_track_data('$serial_no',true)");
|
|
|
- // $map_sql = "select * from get_track_data('$serial_no',true)";
|
|
|
- // $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
|
|
|
+ global $mapdb;
|
|
|
+ //查询线(包含所有的线)
|
|
|
+ error_log("select * from get_track_data('$serial_no',true)");
|
|
|
+ $map_sql = "select * from get_track_data('$serial_no',true)";
|
|
|
+ $Line = $mapdb->GetAll($map_sql) or ( (!$mapdb->ErrorMsg()) or error_log(common::dbLog($mapdb, $map_sql), 0));
|
|
|
|
|
|
- // error_log("total:".count($Line));
|
|
|
- // $solidLine = array();
|
|
|
- // $dottedLine = array();
|
|
|
- // $rangePoint = array();
|
|
|
- // foreach($Line as $line){
|
|
|
- // if($line['tp'] == "1"){
|
|
|
- // $solidLine[] = $line;
|
|
|
- // }elseif($line['tp'] == "0"){
|
|
|
- // $dottedLine[] = $line;
|
|
|
- // }else{
|
|
|
- // $rangePoint[] = $line;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // error_log("total_1:".count($solidLine));
|
|
|
- // error_log("total_2:".count($dottedLine));
|
|
|
- // error_log("total_3:".count($rangePoint));
|
|
|
- // //如果没有虚线,这这个范围点也是异常的,不需要显示
|
|
|
- // if(empty($dottedLine)){
|
|
|
- // $rangePoint = array();
|
|
|
- // }
|
|
|
- // $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
|
|
|
- // common::echo_json_encode(200, $data);
|
|
|
- common::echo_json_encode(200, $rss);
|
|
|
+ $solidLine = array();
|
|
|
+ $dottedLine = array();
|
|
|
+ $rangePoint = array();
|
|
|
+ foreach($Line as $line){
|
|
|
+ if($line['tp'] == "1"){
|
|
|
+ $solidLine[] = $line;
|
|
|
+ }elseif($line['tp'] == "0"){
|
|
|
+ $dottedLine[] = $line;
|
|
|
+ }else{
|
|
|
+ $rangePoint[] = $line;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //如果没有虚线,这这个范围点也是异常的,不需要显示
|
|
|
+ if(empty($dottedLine)){
|
|
|
+ $rangePoint = array();
|
|
|
+ }
|
|
|
+ $data = array("point"=>$rss,"solidLine"=>$solidLine,"dottedLine"=>$dottedLine,"rangePoint"=>$rangePoint);
|
|
|
+ common::echo_json_encode(200, $data);
|
|
|
+ //common::echo_json_encode(200, $rss);
|
|
|
exit();
|
|
|
break;
|
|
|
case 'main_welcome':
|