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


PHP CommonModel::getPlatformInfo方法代碼示例

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


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

示例1: view_showForm

 public function view_showForm()
 {
     global $memc_obj;
     $pagesize = 200;
     //頁麵大小
     $whereSql = $this->buildWhereSql();
     //echo $whereSql;exit;
     $packorder_obj = new PackingOrderModel();
     $rownumber = $packorder_obj->getRowAllNumber($whereSql . ' group by po.id ');
     //獲得所有的行數
     $pager = new Page($rownumber, $pagesize);
     $billlist = $packorder_obj->getBillList($whereSql . ' group by po.id order by pd.pName ' . $pager->limit);
     //更具條件獲得發貨單
     $packorder_obj->buildOrderinfo($billlist);
     /*
             //去除重複的
             $currentid = NULL;
             $prekey = 0;
             foreach ($billlist as $key=>$valbill){
                 if ($currentid == $valbill['id']) {
                 	$billlist[$prekey]['originOrderId'] .= ', '.$valbill['originOrderId'];
                 	unset($billlist[$key]);
                 }else {
                     $prekey = $key;
                     $currentid = $valbill['id'];
                 }
             }
     */
     $materInfo = CommonModel::getMaterInfoAll();
     //獲取包材信息
     $materInfo = reverse_array($materInfo, 'pmName', 'id');
     $shipingtyplist = CommonModel::getShipingTypeList();
     //運輸方式列表
     $shipingtyplist = reverse_array($shipingtyplist, 'carrierNameCn', 'id');
     $salesaccountlist = CommonModel::getSalesaccountList();
     //獲取銷售帳號
     $salesaccountlist = reverse_array($salesaccountlist, 'account', 'id');
     //print_r($salesaccountlist);exit;
     $platformList = CommonModel::getPlatformInfo();
     //獲取平台帳號
     $platformList = reverse_array($platformList, 'platform', 'id');
     $this->smarty->assign('shipingtypelist', $shipingtyplist);
     $this->smarty->assign('salesaccountlist', $salesaccountlist);
     $this->smarty->assign('platformList', $platformList);
     foreach ($billlist as $key => $valbil) {
         $tracknumber = '';
         $str_info = OmAvailableModel::getTNameList("wh_order_tracknumber", "tracknumber", "where shipOrderId='{$valbil['id']}' and is_delete=0");
         if (!empty($str_info)) {
             $tracknumber = $str_info[0]['tracknumber'];
         }
         $billlist[$key]['tracknumber'] = $tracknumber;
         $originOrder_arr = array();
         $originOrder_str = '';
         $originOrder_info = OmAvailableModel::getTNameList("wh_shipping_order_relation", "originOrderId", "where shipOrderId='{$valbil['id']}'");
         if (!empty($originOrder_info)) {
             foreach ($originOrder_info as $originOrder) {
                 $originOrder_arr[] = $originOrder['originOrderId'];
             }
             $originOrder_str = implode(',', $originOrder_arr);
         }
         $billlist[$key]['originOrder'] = $originOrder_str;
         //運輸方式
         $billlist[$key]['shipingname'] = $shipingtyplist[$valbil['transportId']];
         //包材
         $billlist[$key]['materName'] = $materInfo[$valbil['pmId']];
         //平台
         $billlist[$key]['platformName'] = $platformList[$valbil['platformId']];
         //銷售賬號
         $billlist[$key]['salesaccountinfo'] = $salesaccountlist[$valbil['accountId']];
     }
     if ($rownumber > $pagesize) {
         //分頁
         $pagestr = $pager->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $pagestr = $pager->fpage(array(0, 2, 3));
     }
     $this->smarty->assign('pagestr', $pagestr);
     $this->smarty->assign('billlist', $billlist);
     //發貨單列表
     $this->smarty->assign('secnev', 3);
     $libstu_obj = new LibraryStatusModel();
     //出庫狀態類型
     $libstatuslist = $libstu_obj->getAllLibStatusList(' and groupId in (4 ,5)');
     $this->smarty->assign('outstatuslist', $libstatuslist);
     $toptitle = '訂單查詢';
     //頭部title
     $this->smarty->assign('toptitle', $toptitle);
     $storeId = isset($_GET['storeId']) ? intval($_GET['storeId']) : 0;
     if ($storeId == 1) {
         $navlist = array(array('url' => '', 'title' => '出庫'), array('url' => '', 'title' => '發貨單查詢'), array('url' => '', 'title' => 'A倉發貨單'));
     } elseif ($storeId == 2) {
         $navlist = array(array('url' => '', 'title' => '出庫'), array('url' => '', 'title' => '發貨單查詢'), array('url' => '', 'title' => 'B倉發貨單'));
     } else {
         $navlist = array(array('url' => '', 'title' => '出庫'), array('url' => '', 'title' => '發貨單查詢'));
     }
     $this->smarty->assign('navlist', $navlist);
     $toplevel = 2;
     //一級菜單的序號  0 開始
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = isset($_GET['secondlevel']) ? trim($_GET['secondlevel']) : '';
//.........這裏部分代碼省略.........
開發者ID:ohjack,項目名稱:newErp,代碼行數:101,代碼來源:dispatchBillQuery.view.php

示例2: act_orderPartion

 public function act_orderPartion()
 {
     $orderid = isset($_POST['orderid']) ? trim($_POST['orderid']) : "";
     if (!is_numeric($orderid)) {
         $tracknumber = $orderid;
         $info = orderWeighingModel::selectOrderId($tracknumber);
         if (!$info) {
             self::$errCode = 501;
             self::$errMsg = "此跟蹤號不存在!";
             return false;
         }
         $orderid = $info[0]['shipOrderId'];
     }
     $where = "where id={$orderid}";
     $order = orderPartionModel::selectOrder($where);
     if (!$order) {
         self::$errCode = 601;
         self::$errMsg = "此發貨單不存在!";
         return false;
     }
     if (!is_numeric($orderid)) {
         $orderid = $order[0]['id'];
     }
     $msg = orderPartionModel::selectPartionRecord($orderid);
     if ($msg) {
         self::$errCode = 603;
         self::$errMsg = "此發貨單已掃描!";
         return false;
     }
     if ($order[0]['orderStatus'] != 406) {
         self::$errCode = 602;
         self::$errMsg = "此發貨單不在待分區!";
         return false;
     }
     $shipping = CommonModel::getShipingNameById($order[0]['transportId']);
     if (!in_array($shipping, array('中國郵政平郵', '中國郵政掛號', 'EUB', 'Global Mail', '香港小包平郵', '香港小包掛號', '德國郵政'))) {
         self::$errCode = 604;
         self::$errMsg = "此發貨單不是小包!";
         return false;
     }
     $partion = $shipping;
     $platformName = CommonModel::getPlatformInfo($order[0]['platformId']);
     if ($shipping == 'Global Mail') {
         if ($platformName == '亞馬遜') {
             $partion = "非德國Global Mail";
         } elseif ($platformName == '海外銷售平台') {
             if ($order[0]['countryName'] == 'Deutschland') {
                 $partion = "Global Mail";
             } else {
                 $partion = "非德國Global Mail";
             }
         }
     } elseif ($shipping == '中國郵政平郵') {
         $partion = printLabelModel::showPartionScan($orderid, $order[0]['accountId'], $shipping, $order[0]['countryName']);
     } elseif ($shipping == '中國郵政掛號') {
         $partion = printLabelModel::showPartionScan($orderid, $order[0]['accountId'], $shipping, $order[0]['countryName']);
     }
     /*
     		$lists = $memc_obj->get_extral('trans_system_carrierinfo');
     		//print_r($lists);
     		foreach($lists as $list){
     			foreach($list as $value){
     			    
     				if($record[0]['channelId']==$value['channelId']){
     					
     					$countries = $value['countries'];
     					$country_arr = explode("','",$countries);
     					$country_arr[0] = str_replace("'","",$country_arr[0]);
     					$country_arr[count($country_arr)-1] = str_replace("'","",$country_arr[count($country_arr)-1]);
     					if(in_array($record[0]['countryName'],$country_arr)){
     						
     						$partionId = $value['id'];
     					}
     				}
     			}
     		}*/
     TransactionBaseModel::begin();
     $weight = orderPartionModel::selectWeight($orderid);
     if (!$weight) {
         self::$errCode = 605;
         self::$errMsg = "此發貨單無重量!";
         return false;
     }
     $userId = $_SESSION['userId'];
     $result = orderPartionModel::insertRecord($orderid, $partion, $weight, $userId);
     if (!result) {
         self::$errCode = 606;
         self::$errMsg = "插入分區記錄失敗!";
         TransactionBaseModel::rollback();
         return false;
     }
     $ret = orderPartionModel::updateOrderRecords($orderid, $userId);
     if (!ret) {
         self::$errCode = 607;
         self::$errMsg = "更新操作記錄失敗!";
         TransactionBaseModel::rollback();
         return false;
     }
     $ostatus = orderPartionModel::updateOrderStatus($orderid);
     if (!ostatus) {
//.........這裏部分代碼省略.........
開發者ID:ohjack,項目名稱:newErp,代碼行數:101,代碼來源:orderPartion.action.php


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