當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CommonModel::get_orderInfoFromOrderSys方法代碼示例

本文整理匯總了PHP中CommonModel::get_orderInfoFromOrderSys方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonModel::get_orderInfoFromOrderSys方法的具體用法?PHP CommonModel::get_orderInfoFromOrderSys怎麽用?PHP CommonModel::get_orderInfoFromOrderSys使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CommonModel的用法示例。


在下文中一共展示了CommonModel::get_orderInfoFromOrderSys方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: soapclient

$soapclient = new soapclient($wsdl);
//ebay賬戶的eub線上申請跟蹤號,1為ebay平台,14為海外倉發貨
$where = ' AND a.platformId in(1,14) AND a.transportId = 6';
$shipOrders = WhWaveOrderTransportModel::getOrderTransportRecords($limit, 1, $where);
if (!$shipOrders) {
    echo "沒有待申請的信息記錄\n";
    exit;
}
//批量獲取訂單詳細信息
$orderids = array();
foreach ($shipOrders as $orderinfo) {
    $orderids[] = WhShippingOrderRelationModel::get_orderId($orderinfo['id']);
}
$orderisStr = implode("','", $orderids);
//調用訂單係統接口批量獲取訂單信息
$orders = CommonModel::get_orderInfoFromOrderSys($orderisStr);
$orders = $orders['data'];
if (empty($orders)) {
    exit('未獲取申請跟蹤號的訂單詳細信息');
}
foreach ($shipOrders as $orderinfo) {
    $shipOrderId = $orderinfo['id'];
    $ebay_platformId = $orderinfo['platformId'];
    //平台名稱
    $orderId = WhShippingOrderRelationModel::get_orderId($shipOrderId);
    if (!in_array($ebay_platformId, array(1, 14))) {
        echo $ebay_account . "非EBAY賬號!\n";
        continue;
    }
    $ebay_username = $orderinfo['username'];
    $ebay_usermail = $orderinfo['email'];
開發者ID:ohjack,項目名稱:newErp,代碼行數:31,代碼來源:wh_eub_tracknumber_ebay.php

示例2: printTaobao

 public function printTaobao($orderInfo, $type)
 {
     //	if($type==15){
     foreach ($orderInfo as &$info) {
         //抓取地址中的區/縣/縣級市
         $countryStr = '';
         $countyArr = explode(' ', $info['street']);
         //根據' '來截取街道地址,抓取其中下標為2的數組中包含區或縣的字符串
         $countyTmpStr = $countyArr[2];
         if (empty($countyTmpStr)) {
             //如果截取的第三個數組的字符串為空,則就是空
             $countryStr = '';
         } else {
             $quIndex = strpos($countyTmpStr, '區');
             //區關鍵字的索引
             if (!empty($quIndex)) {
                 //如果索引不為空,即在字符串含有區關鍵字,且該字的索引不是0
                 $countryStr = strstr($countyTmpStr, '區', true) . '區';
             } else {
                 //如果索引為空,則繼續找關鍵字 縣
                 $xianIndex = strpos($countyTmpStr, '縣');
                 //區關鍵字的索引
                 if (!empty($xianIndex)) {
                     //如果索引不為空,
                     $countryStr = strstr($countyTmpStr, '縣', true) . '縣';
                 } else {
                     $shiIndex = strpos($countyTmpStr, '市');
                     //縣級市關鍵字的索引
                     if (!empty($shiIndex)) {
                         //如果索引不為空,
                         $countryStr = strstr($countyTmpStr, '市', true) . '市';
                     }
                 }
             }
         }
         $info['cityInfo'] = $countryStr;
     }
     //	}
     //得到訂單編號
     if ($type == '22') {
         $originOrderId = '';
         foreach ($orderInfo as $k => $values) {
             $originOrderId .= $values['originOrderId'] . ',';
         }
         $originOrderId = trim($originOrderId, ',');
         $orderList = array();
         $result = CommonModel::get_orderInfoFromOrderSys($originOrderId);
         $i = 0;
         if ($result['data']) {
             foreach ($result['data'] as $keys => $val) {
                 foreach ($val['orderDetail'] as $ks => $skuList) {
                     if (!isset($skuList['orderDetailExtension']['oppositeSku']) || !isset($skuList['orderDetailExtension']['oppositeBarCode'])) {
                         echo '<script>alert("請確認是否是蘭亭的訂單");</script>';
                         exit;
                     }
                     $i++;
                     //  echo "<pre>";
                     //  print_r($ks);
                     // echo "</pre>";
                     $orderList[$keys][$ks]['recordNumber'] = $val['order']['recordNumber'];
                     $orderList[$keys][$ks]['oppositeSku'] = $skuList['orderDetailExtension']['oppositeSku'];
                     $orderList[$keys][$ks]['oppositeBarCode'] = $skuList['orderDetailExtension']['oppositeBarCode'];
                 }
             }
         } else {
             $data = array('data' => array('不能得到訂單信息'), 'link' => 'index.php?mod=dispatchBillQuery&act=showForm&page=1');
             goErrMsgPage($data);
             exit;
         }
         $this->smarty->assign('totalCount', $i);
         //得到SKU條碼的個數
         $this->smarty->assign('orderList', $orderList);
     } else {
         $this->smarty->assign('orderInfo', $orderInfo);
     }
     //      	echo "<pre>";
     //   print_r($result);
     //   print_r($orderList);
     //  	echo "</pre>";
     // exit;
     if ($_SESSION['userId'] == 253) {
         echo "<pre>";
         print_r($orderInfo);
     }
     switch ($type) {
         case 11:
             //芬哲圓通打印 已改
             $this->smarty->display('printlabelytoForFZ.htm');
             break;
         case 12:
             //芬哲申通打印 已改
             $this->smarty->display('printlabelstoForFZ.htm');
             break;
         case 13:
             //芬哲韻達打印 yigai
             $this->smarty->display('printlabelyunForFZ.htm');
             break;
         case 131:
             //芬哲天天打印 已改
             $this->smarty->display('printlabelttForFZ.htm');
//.........這裏部分代碼省略.........
開發者ID:ohjack,項目名稱:newErp,代碼行數:101,代碼來源:orderWaitforPrint.view.php


注:本文中的CommonModel::get_orderInfoFromOrderSys方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。