$log_data .= $sql . "\n"; if ($dbcon->execute($sql)) { //$changes['ebay_status'] = 608; //$order_statistics->updateFieldData($ebay_id, $changes); $log_data .= "[" . date("Y-m-d H:i:s") . "]\t--订单{$ebay_id}审核前状态为{$ordercheck[0]['ebay_status']}--审核后状态为608--\n\n"; now_order_status_log($ebay_id); mark_shipping($ebay_id, 608); } } else { $sql = "update ebay_order set ebay_status=641 where ebay_id={$ebay_id} AND ebay_status IN (640,641,642,652,653)"; $log_data .= $sql . "\n"; if ($dbcon->execute($sql)) { //$changes['ebay_status'] = 641; //$order_statistics->updateFieldData($ebay_id, $changes); $log_data .= "[" . date("Y-m-d H:i:s") . "]\t--订单{$ebay_id}审核前状态为{$ordercheck[0]['ebay_status']}--审核后状态为641--\n\n"; now_order_status_log($ebay_id); mark_shipping($ebay_id, 641); } } } else { if (in_array(2, $status)) { $sql = "update ebay_order set ebay_status=642 where ebay_id={$ebay_id} AND ebay_status IN (640,641,642,652,653)"; $log_data .= $sql . "\n"; $dbcon->execute($sql); //$changes['ebay_status'] = 642; //$order_statistics->updateFieldData($ebay_id, $changes); } else { $log_data .= var_dump($status) . "\n"; } } }
function judge_ordermove654to667($order_sn) { //自动包货物完全之后自动跳转到部分发货快递 global $dbcon; $sql = "select count(*) from ebay_orderdetail where ebay_ordersn = '{$order_sn}' "; $result = $dbcon->execute($sql); $o_num = $dbcon->num_rows($result); $gg = $dbcon->getResultArray($result); $sql = "SELECT count(*)\n\t\t\tFROM ebay_packing_status\n\t\t\tWHERE order_sn = '{$order_sn}'\n\t\t\tAND realnum = totalnum "; $result = $dbcon->execute($sql); $p_num = $dbcon->num_rows($result); if ($o_num == $p_num) { now_order_status_log($order_sn); mark_shipping($order_sn, '624'); // } }