|
|
@@ -87,9 +87,60 @@ switch ($action) {
|
|
|
$sqlWhere = ' and ' . common::searchExtendHandNew("ocean", $_SESSION["ONLINE_USER"]);
|
|
|
$sqlWhere = common::check_input($sqlWhere);
|
|
|
$sqlWhere = " " . $sqlWhere;
|
|
|
+
|
|
|
+ $transportation = $_REQUEST["transportation"];
|
|
|
+ if(!is_array($transportation)){
|
|
|
+ $transportation = array($transportation);
|
|
|
+ }
|
|
|
+
|
|
|
+ $list = array();
|
|
|
+ if(count($transportation) == 1 && strtolower($transportation[0]) == 'all' ){
|
|
|
+ $transportation = array("Sea","Air","Road");
|
|
|
+ }
|
|
|
+ foreach($transportation as $mode){
|
|
|
+ if($mode == 'Sea'){
|
|
|
+ $Sealist = common::excuteListSql("select * from public.online_order_status_date('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text) "
|
|
|
+ . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $Sealist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $Sealist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($mode == 'Air'){
|
|
|
+ //暂时查询空数据
|
|
|
+ $sqlWhere .= " and 1<>1 ";
|
|
|
+ $Airlist = common::excuteListSql("select * from public.online_order_status_date('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text) "
|
|
|
+ . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $Airlist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $Airlist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($mode == 'Road'){
|
|
|
+ $sqlWhere .= " and 1<>1 ";
|
|
|
+ $roadlist = common::excuteListSql("select * from public.online_order_status_date('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text) "
|
|
|
+ . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $roadlist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $Airlist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//online_order_status_date_new 与本地的区分,发布上去这去掉new
|
|
|
- $list = common::excuteListSql("select * from public.online_order_status_date('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text) "
|
|
|
- . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ // $list = common::excuteListSql("select * from public.online_order_status_date('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text) "
|
|
|
+ // . "r (c bigint, e integer, b integer, d text)");
|
|
|
$key = "[";
|
|
|
$value = "[";
|
|
|
$totalValue = 0;
|
|
|
@@ -142,8 +193,57 @@ switch ($action) {
|
|
|
$sqlWhere = common::check_input($sqlWhere);
|
|
|
$sqlWhere = " " . $sqlWhere;
|
|
|
|
|
|
- $list = common::excuteListSql("select * from public.online_order_status_date_new_r1_r2('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text,'$date_type'::text) "
|
|
|
- . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ $transportation = $_REQUEST["transportation"];
|
|
|
+ if(!is_array($transportation)){
|
|
|
+ $transportation = array($transportation);
|
|
|
+ }
|
|
|
+ $list = array();
|
|
|
+ if(count($transportation) == 1 && strtolower($transportation[0]) == 'all' ){
|
|
|
+ $transportation = array("Sea","Air","Road");
|
|
|
+ }
|
|
|
+ foreach($transportation as $mode){
|
|
|
+ if($mode == 'Sea'){
|
|
|
+ $Sealist = common::excuteListSql("select * from public.online_order_status_date_new_r1_r2('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text,'$date_type'::text) "
|
|
|
+ . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $Sealist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $Sealist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($mode == 'Air'){
|
|
|
+ //暂时查询空数据
|
|
|
+ $sqlWhere .= " and 1<>1 ";
|
|
|
+ $Airlist = common::excuteListSql("select * from public.online_order_status_date_new_r1_r2('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text,'$date_type'::text) "
|
|
|
+ . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $Airlist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $Airlist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($mode == 'Road'){
|
|
|
+ $sqlWhere .= " and 1<>1 ";
|
|
|
+ $roadlist = common::excuteListSql("select * from public.online_order_status_date_new_r1_r2('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text,'$date_type'::text) "
|
|
|
+ . "r (c bigint, e integer, b integer, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $roadlist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $roadlist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // $list = common::excuteListSql("select * from public.online_order_status_date_new_r1_r2('$type'::text, 'eta'::text, 'etd'::text, $bdate, $edate, '$sqlWhere'::text, '$container_type'::text,'$date_type'::text) "
|
|
|
+ // . "r (c bigint, e integer, b integer, d text)");
|
|
|
$key = "[";
|
|
|
$value = "[";
|
|
|
$totalValue = 0;
|
|
|
@@ -190,14 +290,53 @@ switch ($action) {
|
|
|
if(!is_array($transportation)){
|
|
|
$transportation = array($transportation);
|
|
|
}
|
|
|
- if(count($transportation) == 1 && strtolower($transportation[0]) == 'all' ){
|
|
|
|
|
|
- }else{
|
|
|
- //这里不用处理,只有sea的数据
|
|
|
+ $list = array();
|
|
|
+ if(count($transportation) == 1 && strtolower($transportation[0]) == 'all' ){
|
|
|
+ $transportation = array("Sea","Air","Road");
|
|
|
}
|
|
|
-
|
|
|
- $list = common::excuteListSql("select * from public.online_order_status_date_kpi_new('$type'::text,'$sqlWhere'::text) "
|
|
|
- . "r (c bigint, d text)");
|
|
|
+ foreach($transportation as $mode){
|
|
|
+ if($mode == 'Sea'){
|
|
|
+ $Sealist = common::excuteListSql("select * from public.online_order_status_date_kpi_new('$type'::text,'$sqlWhere'::text) "
|
|
|
+ . "r (c bigint, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $Sealist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $Sealist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($mode == 'Air'){
|
|
|
+ //暂时查询空数据
|
|
|
+ $sqlWhere .= " and 1<>1 ";
|
|
|
+ $Airlist = common::excuteListSql("select * from public.online_order_status_date_kpi_new('$type'::text,'$sqlWhere'::text) "
|
|
|
+ . "r (c bigint, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $Airlist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $Airlist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($mode == 'Road'){
|
|
|
+ $sqlWhere .= " and 1<>1 ";
|
|
|
+ $roadlist = common::excuteListSql("select * from public.online_order_status_date_kpi_new('$type'::text,'$sqlWhere'::text) "
|
|
|
+ . "r (c bigint, d text)");
|
|
|
+ //拼接数据
|
|
|
+ if(empty($list)){
|
|
|
+ $list = $roadlist;
|
|
|
+ }else{
|
|
|
+ foreach($list as $lk =>$lv){
|
|
|
+ $list[$lk]['c'] = $list[$lk]['c'] + $roadlist[$lk]['c'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$key = "[";
|
|
|
$value = "[";
|
|
|
$totalValue = 0;
|