|
@@ -1820,8 +1820,8 @@ class common {
|
|
|
$Milestones_data = array();
|
|
$Milestones_data = array();
|
|
|
$Milestones_data_arr = common::excuteListSql("select sn.description,act_date||' '||COALESCE(act_time,'') as date_time,
|
|
$Milestones_data_arr = common::excuteListSql("select sn.description,act_date||' '||COALESCE(act_time,'') as date_time,
|
|
|
remark,timezone,a.code
|
|
remark,timezone,a.code
|
|
|
- from ocean_milestone a
|
|
|
|
|
- inner join customer_service_milestone_sno sn on sn.code=a.code
|
|
|
|
|
|
|
+ from public.ocean_milestone a
|
|
|
|
|
+ inner join public.customer_service_milestone_sno sn on sn.code=a.code
|
|
|
where a.serial_no='".$ocean["serial_no"]."' and act_date is not null order by sn.sno asc");
|
|
where a.serial_no='".$ocean["serial_no"]."' and act_date is not null order by sn.sno asc");
|
|
|
foreach($Milestones_data_arr as $mda){
|
|
foreach($Milestones_data_arr as $mda){
|
|
|
$timezone = "";
|
|
$timezone = "";
|
|
@@ -1916,6 +1916,9 @@ class common {
|
|
|
return $Milestones_NO_Mapping;
|
|
return $Milestones_NO_Mapping;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 这个详细查询已经带模式了
|
|
|
|
|
+ */
|
|
|
public static function getEDI315StatusForDetail($serial_no){
|
|
public static function getEDI315StatusForDetail($serial_no){
|
|
|
$data = array();
|
|
$data = array();
|
|
|
$ctnr_sql = "SELECT oc.ctnr, oc.serial_no,oc.size FROM oc_container oc LEFT JOIN ocean o ON oc.serial_no = o.serial_no
|
|
$ctnr_sql = "SELECT oc.ctnr, oc.serial_no,oc.size FROM oc_container oc LEFT JOIN ocean o ON oc.serial_no = o.serial_no
|
|
@@ -1951,7 +1954,7 @@ class common {
|
|
|
else '' ::text
|
|
else '' ::text
|
|
|
end as milestone_code
|
|
end as milestone_code
|
|
|
from public.ra_online_container_status_v s
|
|
from public.ra_online_container_status_v s
|
|
|
- left join ra_online_edi_event e on s.event_base = e.ra_name
|
|
|
|
|
|
|
+ left join public.ra_online_edi_event e on s.event_base = e.ra_name
|
|
|
where s.serial_no = '" . pg_escape_string($cd['serial_no']) . "'
|
|
where s.serial_no = '" . pg_escape_string($cd['serial_no']) . "'
|
|
|
and s.container_no = '" . pg_escape_string($cd['ctnr']) . "' and is_display = true
|
|
and s.container_no = '" . pg_escape_string($cd['ctnr']) . "' and is_display = true
|
|
|
order by to_timestamp(s.event_date, 'YYYYMMDD') asc,
|
|
order by to_timestamp(s.event_date, 'YYYYMMDD') asc,
|
|
@@ -2006,9 +2009,9 @@ class common {
|
|
|
return $data;
|
|
return $data;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static function getEDI315Time($serial_no){
|
|
|
|
|
|
|
+ public static function getEDI315Time($serial_no,$_schemas){
|
|
|
//Timezone From 来自于EDI315
|
|
//Timezone From 来自于EDI315
|
|
|
- $ctnr_sql = "SELECT oc.ctnr, oc.serial_no,oc.size FROM oc_container oc LEFT JOIN ocean o ON oc.serial_no = o.serial_no
|
|
|
|
|
|
|
+ $ctnr_sql = "SELECT oc.ctnr, oc.serial_no,oc.size FROM $_schemas.oc_container oc LEFT JOIN $_schemas.ocean o ON oc.serial_no = o.serial_no
|
|
|
WHERE o.serial_no='$serial_no'";
|
|
WHERE o.serial_no='$serial_no'";
|
|
|
$ctnr_data = common::excuteListSql($ctnr_sql);
|
|
$ctnr_data = common::excuteListSql($ctnr_sql);
|
|
|
$EDI315TimeAndLocation = array();
|
|
$EDI315TimeAndLocation = array();
|
|
@@ -2033,7 +2036,7 @@ class common {
|
|
|
else '' ::text
|
|
else '' ::text
|
|
|
end as milestone_code
|
|
end as milestone_code
|
|
|
from public.ra_online_container_status_v s
|
|
from public.ra_online_container_status_v s
|
|
|
- left join ra_online_edi_event e on s.event_base = e.ra_name
|
|
|
|
|
|
|
+ left join public.ra_online_edi_event e on s.event_base = e.ra_name
|
|
|
where s.serial_no = '" . pg_escape_string($cd['serial_no']) . "'
|
|
where s.serial_no = '" . pg_escape_string($cd['serial_no']) . "'
|
|
|
and s.container_no = '" . pg_escape_string($cd['ctnr']) . "' and is_display = true
|
|
and s.container_no = '" . pg_escape_string($cd['ctnr']) . "' and is_display = true
|
|
|
order by to_timestamp(s.event_date, 'YYYYMMDD') asc,
|
|
order by to_timestamp(s.event_date, 'YYYYMMDD') asc,
|