|
|
@@ -763,6 +763,31 @@ class destination_delivery {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if ($operate == "search_calendar"){
|
|
|
+
|
|
|
+ $month = common::check_input($_POST ['month']); //current_page
|
|
|
+ $sqlWhere = ' where ' . common::searchExtendHand_KLN("ocean", $_SESSION["ONLINE_USER"]);
|
|
|
+ //兜底规则
|
|
|
+ $sqlWhere .= " and eta >= now() - INTERVAL '6 months' and eta <= now() + INTERVAL '6 months'";
|
|
|
+
|
|
|
+ $search_calendar_sql = common::excuteOneSql("select item_value from public.config where item = 'Destination_Bookings_Calendar_Sql'");
|
|
|
+
|
|
|
+ //日期计算
|
|
|
+ $month = common::excuteObjectSql("SELECT CURRENT_DATE AS access_date,
|
|
|
+ (to_date('".$month."', 'MM/YYYY'))::date AS month_start,
|
|
|
+ (date_trunc('month', to_date('".$month."', 'MM/YYYY')) + interval '1 month - 1 day')::date AS month_end");
|
|
|
+
|
|
|
+ $search_calendar_sql = str_replace('<{access_date}>', $month['access_date'], $search_calendar_sql);
|
|
|
+ $search_calendar_sql = str_replace('<{month_start}>', $month['month_start'], $search_calendar_sql);
|
|
|
+ $search_calendar_sql = str_replace('<{month_end}>', $month['month_end'], $search_calendar_sql);
|
|
|
+ $search_calendar_sql = str_replace('<{sqlWhere}>', $sqlWhere, $search_calendar_sql);
|
|
|
+
|
|
|
+ $result = common::excuteOneSql($search_calendar_sql);
|
|
|
+ $result = json_decode($result,true);
|
|
|
+ common::echo_json_encode(200,$result);
|
|
|
+ exit();
|
|
|
+ }
|
|
|
+
|
|
|
if ($operate == "search_shipment"){
|
|
|
$data = $this->search_shipment();
|
|
|
if(!empty($data['msg'])){
|