|
|
@@ -1066,8 +1066,9 @@ class common {
|
|
|
|
|
|
public static function getManagement(){
|
|
|
//Management 自己配置需要创建表保存
|
|
|
- $user_management = common::excuteOneSql("select management from ra_online_user where user_login = '"._getLoginName()."'");
|
|
|
+ $user_management_data = common::excuteObjectSql("select management,dashboard_filter from ra_online_user where user_login = '"._getLoginName()."'");
|
|
|
//为空,配置使用默认值
|
|
|
+ $user_management = $user_management_data['management'];
|
|
|
if(empty($user_management)){
|
|
|
$Management = common::getdefaultManagement();
|
|
|
}else{
|
|
|
@@ -1077,7 +1078,7 @@ class common {
|
|
|
$Management[$key]['switchValue'] = $val['switchValue'] == "true" ? true : false;
|
|
|
}
|
|
|
}
|
|
|
- return $Management;
|
|
|
+ return array("Management" => $Management,"dashboard_filter" =>$user_management_data['dashboard_filter']);
|
|
|
}
|
|
|
|
|
|
public static function getItemStyle($type,$code){
|
|
|
@@ -1309,10 +1310,16 @@ class common {
|
|
|
"value" =>$orgin['num'],
|
|
|
"textcolor" =>"#FFF");
|
|
|
}
|
|
|
+ //查询uncode,对应的city
|
|
|
if($toporiginType == "shippr_uncode"){
|
|
|
-
|
|
|
+ $public_ports_sql = "select uncity as city from public.ports where uncode = '".$orgin['shippr_uncode']."' order by id limit 1";
|
|
|
+ $city = common::excuteObjectSql($public_ports_sql);
|
|
|
+ if(empty($city)){
|
|
|
+ $sfs_ports_sql = "select uncity as city from sfs.ports where uncode = '".$orgin['shippr_uncode']."' order by id limit 1";
|
|
|
+ $city = common::excuteObjectSql($sfs_ports_sql);
|
|
|
+ }
|
|
|
}
|
|
|
- $toporigin[] = array("name"=>$orgin['shippr_uncode'],"city_name"=>"","value"=>$orgin['num'],"color"=>common::getItemStyle("top",$i));
|
|
|
+ $toporigin[] = array("name"=>$orgin['shippr_uncode'],"city_name"=>$city['city'],"value"=>$orgin['num'],"color"=>common::getItemStyle("top",$i));
|
|
|
$origiNunMax = $origiNunMax < $orgin['num'] ? $orgin['num'] : $origiNunMax;
|
|
|
}
|
|
|
|
|
|
@@ -1337,7 +1344,17 @@ class common {
|
|
|
"value" =>$agent['num'],
|
|
|
"textcolor" =>"#FFF");
|
|
|
}
|
|
|
- $topdestination[] = array("name"=>$agent['consignee_uncode'],"value"=>$agent['num'],"color"=>common::getItemStyle("top",$i));
|
|
|
+
|
|
|
+ //查询uncode,对应的city
|
|
|
+ if($topdestinationinType == "consignee_uncode"){
|
|
|
+ $public_ports_sql = "select uncity as city from public.ports where uncode = '".$agent['consignee_uncode']."' order by id limit 1";
|
|
|
+ $city = common::excuteObjectSql($public_ports_sql);
|
|
|
+ if(empty($city)){
|
|
|
+ $sfs_ports_sql = "select uncity as city from sfs.ports where uncode = '".$agent['consignee_uncode']."' order by id limit 1";
|
|
|
+ $city = common::excuteObjectSql($sfs_ports_sql);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $topdestination[] = array("name"=>$agent['consignee_uncode'],"city_name"=>$city['city'],"value"=>$agent['num'],"color"=>common::getItemStyle("top",$i));
|
|
|
$agentiNunMax = $agentiNunMax < $agent['num'] ? $agent['num'] : $agentiNunMax;
|
|
|
}
|
|
|
|