Not Found

The requested URL /api1.0/run_x_check.php was not found on this server.

$v) { $tmpk = $v['run_id'] . '-' . $v['bus_order_id'] . '-' . $v['seq_id'] . '-' . $v['order_id']; $tmp["$tmpk"] = $v; $tmp["$tmpk"]['id'] = $k; } return $tmp; } //合并数组 function multi_merge($a, $b) //$a 实际订单数据,$b记录的数值 { $arr = array(); foreach ($a as $k => $r) { if (isset($b[$k])) { $arr[$k] = array_merge($r, $b[$k]); } else { $arr[$k] = $r; $arr[$k]['num2'] = 0; $arr[$k]['run_seat_seq_id'] = 0; } } foreach ($b as $k => $r) { if (!isset($arr[$k])) { $arr[$k] = $r; $arr[$k]['num1'] = 0; $arr[$k]['order_seat_seq_id'] = 0; //$arr[$k]['parent_order_id'] = 0; } } return $arr; } //从订单角度得到run_x表的数据 $sql1 = "SELECT m.order_id, m.parent_order_id, l.line_id, m.run_id, m.run_bus_order_id as bus_order_id, m.prod_start_station_seq_id as seq_id, m.prod_start_station_seq_id as start_seq_id, m.prod_end_station_seq_id as end_seq_id, m.run_bus_seat_seq_id as order_seat_seq_id, m.run_date, 1 as num1 FROM order_main m LEFT JOIN opera_line l ON m.PARENT_PROD_ID = l.line_id LEFT JOIN opera_tickets t on m.prod_id=t.TICKET_ID LEFT JOIN opera_line w on t.line_id=w.line_id WHERE m.PARENT_ORDER_ID <> 0 AND m.run_date >= '$today' AND m.run_date <= '$nextWeek' AND m.ORDER_VALID_STATUS = 1 AND m.CANCEL_FLAG = 0 AND m.PROD_ID <> 380001 AND w.line_type in (255,256,368) AND m.ORDER_PROD_TYPE = 82 order by m.run_date,m.run_id,m.run_bus_order_id,m.prod_start_station_seq_id;"; $res1 = $pdo->query($sql1); $res1->setFetchMode(PDO::FETCH_ASSOC); $order_ori = $res1->fetchAll(); //print_r($order_ori); #处理订单数组,得到订单run_x维度的数据 $order_x = array(); $len = count($order_x); foreach ($order_ori as $k => $v) { $num = $v['end_seq_id'] - $v['start_seq_id']; if ($num >= 1) { for ($i = 1; $i <= $num; $i++) { $order_x[] = $v; $v['start_seq_id'] = $v['start_seq_id'] + 1; $v['seq_id'] = $v['seq_id'] + 1; } } } //print_r($order_x); //run_x表本身的数据 $sql2 = "SELECT a.order_main_id as order_id, (select parent_order_id from order_main where order_id=a.order_main_id and order_prod_type=82 limit 1) as parent_order_id, b.prod_id as line_id, a.run_id, a.bus_order_id, a.order_id as seq_id, a.seat_seq_id as run_seat_seq_id, b.run_date, 1 as num2 FROM run_$today_x a LEFT JOIN run_main b ON a.run_id = b.run_id WHERE b.run_date >= '$today' and b.run_date<='$nextWeek' and a.cancel_flag=0 and a.seat_type=72 and b.prod_id <> 0 and a.seat_status=2 UNION SELECT a.order_main_id as order_id, (select parent_order_id from order_main where order_id=a.order_main_id and order_prod_type=82 limit 1) as parent_order_id, b.prod_id as line_id, a.run_id, a.bus_order_id, a.order_id as seq_id, a.seat_seq_id as run_seat_seq_id, b.run_date, 1 as num2 FROM run_$nextWeek_x a LEFT JOIN run_main b ON a.run_id = b.run_id WHERE b.run_date >= '$today' and b.run_date<='$nextWeek' and a.cancel_flag=0 and a.seat_type=72 and b.prod_id <> 0 and a.seat_status=2 order by run_date,run_id,bus_order_id,seq_id,run_seat_seq_id;"; $res2 = $pdo->query($sql2); $res2->setFetchMode(PDO::FETCH_ASSOC); $arr2 = $res2->fetchAll(); //print_r($arr2); //切换key值 $order_x = change_key($order_x); //print_r($order_x); $run_x = change_key($arr2); //print_r($run_x); $arr = multi_merge($order_x, $run_x);//合并二维数组 //print_r($arr); $diffarr_x = array(); $diff_order =array(); $content_x = '[' . date('Y-m-d H:i:s') . ']run_x表数据不一致提醒:'; foreach ($arr as $k => $v) { if (($v['num1'] != $v['num2']) || ($v['order_seat_seq_id'] != $v['run_seat_seq_id'])) { $diffarr_x[] = $v; $unKey=$v['run_id'].'-'.$v['bus_order_id'].'-'.$v['parent_order_id']; $diff_order[$unKey]=$v; } } //print_r($diffarr_x); //print_r($diff_order); //exit; ?> run_x数据检测

run_x数据检测

$v) { ?>
ID 订单号 父订单号 出发日期run_date 班次run_id 车号bus_order_id 排序(分段)seq_id 订单座位号 run_X座位号 实际 记录 颜色