本文整理匯總了PHP中CommonModel::getCountryNameCn方法的典型用法代碼示例。如果您正苦於以下問題:PHP CommonModel::getCountryNameCn方法的具體用法?PHP CommonModel::getCountryNameCn怎麽用?PHP CommonModel::getCountryNameCn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CommonModel
的用法示例。
在下文中一共展示了CommonModel::getCountryNameCn方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getOrderInfoByIdList
public function getOrderInfoByIdList($idlist, $where = '')
{
$str = implode(',', $idlist);
$sql = "\n select so.id, so.platformUsername,so.accountId, so.zipCode, so.username, so.countryName, so.countrySn, so.state, so.city, so.street, so.address2, so.address3, so.landline, so.phone\n ,so.createdTime, sor.recordNumber,sor.originOrderId from wh_shipping_order as so join wh_shipping_order_relation as sor on so.id=sor.shipOrderId where 1 and so.id in ({$str}) \n group by so.id {$where}\n ";
$orderlist = array();
$q_order = $this->dbconn->query($sql);
$orderlist = $this->dbconn->fetch_array_all($q_order);
$total = 0;
foreach ($orderlist as &$list) {
$list['countryZh'] = CommonModel::getCountryNameCn($list['countryName']);
$remarks = CommonModel::getExpressRemark($list['id']);
//得到快遞備注
$accountId = CommonModel::getAccountNameById($list['accountId']);
//店鋪賬號
$list['appname'] = $accountId['account'];
//賬號昵稱
if (!empty($remarks)) {
foreach ($remarks as $remark) {
$total += $remark['amount'] * $remark['price'];
}
}
$list['remarkTotal'] = $total;
$list['remark'] = $remarks;
}
return $orderlist;
}
示例2: view_printGroupOrder2
public function view_printGroupOrder2()
{
$groupsn = isset($_GET['groupsn']) ? trim($_GET['groupsn']) : 0;
if (empty($groupsn)) {
echo "請指定配貨清單!";
exit;
}
$group_list = OmAvailableModel::getTNameList("wh_shipping_order_group", "*", "where shipOrderGroup='{$groupsn}' order by id asc");
if (!$group_list) {
echo "該配貨清單不存在!";
exit;
}
$time = time();
$userName = $_SESSION['userName'];
//更新今日清單打印表
OmAvailableModel::updateTNameRow("wh_shipping_order_group_print", "set status='1',orderPrintUser='{$userName}',orderPrintTime='{$time}'", "where shipOrderGroup='{$groupsn}'");
//獲取訂單對應的車號
$orderids = array();
foreach ($group_list as $group) {
if (!isset($orderids[$group['shipOrderId']])) {
$orderids[$group['shipOrderId']] = $group['carNumber'];
}
}
$o_arr = array();
foreach ($orderids as $order => $car_number) {
$o_arr[] = $order;
}
$oids = implode(',', $o_arr);
$po_obj = new PackingOrderModel();
$ordersinfo = $po_obj->getaSetOfOrderInfo($oids);
if (empty($ordersinfo)) {
$data = array('data' => array('沒有可打印內容!'), 'link' => 'index.php?mod=orderWaitforPrint&act=printList');
goErrMsgPage($data);
exit;
}
$sod_obj = new ShipingOrderDetailModel();
$acc_id_arr = array();
foreach ($ordersinfo as &$orinfval) {
$locationinfo = array();
$totalnum = 0;
$package_type = '';
$iscard = '';
$skulisttemp = $sod_obj->getAllSkuListByOrderId($orinfval['id'], "order by pName,combineSku");
$totalnum = $skulisttemp['totalnum'];
$locationinfo = $skulisttemp['skuinfo'];
if (isset($locationinfo['notcombine']) && count($locationinfo['notcombine']['info']) == 1) {
$package_type = $skulisttemp['packagetype'];
}
$iscard = printLabelModel::checkprintcard($orinfval['id']);
$pmNameStr = CommonModel::getMaterInfoById($orinfval['pmId']);
$orinfval['finalposition'] = $locationinfo;
$totalStr = $totalnum . " " . $pmNameStr . " " . $orinfval['calcWeight'] . "KG";
if (!empty($package_type)) {
$totalStr = $totalStr . " " . $package_type;
}
if (!empty($iscard)) {
$totalStr = $totalStr . " " . $iscard;
}
$totalStr = $totalStr . " " . $orinfval['platformUsername'];
$carrier = CommonModel::getShipingNameById($orinfval['transportId']);
$orinfval['abbrshipname'] = CommonModel::getShipingAbbrNameById($orinfval['transportId']);
$orinfval['totalStr'] = $totalStr;
$orinfval['notes'] = $po_obj->getOrderNotesInfo($orinfval['id']);
$orinfval['countryZh'] = CommonModel::getCountryNameCn($orinfval['countryName']);
$orinfval['partionFromAddress'] = printLabelModel::getPartionFromAddress($orinfval['id'], $carrier, $orinfval['countryName']);
if (!in_array($orinfval['accountId'], $acc_id_arr)) {
array_push($acc_id_arr, $orinfval['accountId']);
}
}
$salesaccountinfo = CommonModel::getAccountInfo($acc_id_arr);
$this->smarty->assign('salesaccountinfo', $salesaccountinfo);
$totalCount = count($ordersinfo);
$this->smarty->assign('totalCount', $totalCount);
$this->smarty->assign('orderids', $orderids);
$this->smarty->assign('ordersinfo', $ordersinfo);
$this->smarty->display('label50x100_22.htm');
}
示例3: get_countryNameCn
/**
* OrderPrintAct::get_countryNameCn()
* 根據國家英文名獲取國家中文名
* @param string $countryNameEn
* @return void
*/
public function get_countryNameCn($countryNameEn)
{
$key = 'countryEn' . $countryNameEn;
$data = WhBaseModel::cache($key);
if (!$data) {
$data = CommonModel::getCountryNameCn($countryNameEn);
WhBaseModel::cache($key, $data, 24 * 3600);
}
return $data;
}
示例4: printDispatchOrder
//.........這裏部分代碼省略.........
if ($totalweight < 0.5) {
$weightmark = 'G';
$ordershipfee = rand(501, 1000) / 100;
} else {
if ($totalweight < 2) {
$weightmark = 'E';
$ordershipfee = rand(1001, 2000) / 100;
} else {
$weightmark = '超重';
}
}
}
$orinfval['ordershipfee'] = number_format($ordershipfee / $detailcount, 2);
$orinfval['titleinfo'] = implode('<br />', $goods_title);
$orinfval['totalweight'] = $totalweight;
$orinfval['weightmark'] = $weightmark;
$salesaccountinfo = CommonModel::getAccountNameById($orinfval['accountId']);
$orinfval['appname'] = $salesaccountinfo['appname'];
} else {
$locationinfo[] = array('location' => $tmval['pName'], 'sku' => $tmval['sku'], 'amount' => $tmval['amount']);
$goods_title[] = $tmval['itemTitle'];
$orinfval['goods_title'] = $goods_title;
}
}
$totalnum += $tmval['amount'];
}
} elseif ($carrier == '新加坡郵政') {
$skulisttemp = $sod_obj->getAllSkuListByOrderId($orinfval['id'], "order by pName,combineSku", 0);
$totalnum = $skulisttemp['totalnum'];
$locationinfo = $skulisttemp['skuinfo'];
if (isset($locationinfo['notcombine']) && count($locationinfo['notcombine']['info']) == 1) {
$package_type = $skulisttemp['packagetype'];
}
$orinfval['countryZh'] = CommonModel::getCountryNameCn($orinfval['countryName']);
//跟蹤號
$orinfval['tracknumber'] = printLabelModel::getTracknumber($orinfval['id']);
}
} else {
$goods_title = array();
$skulisttemp = $sod_obj->getSkuListByOrderId($orinfval['id'], "order by pName");
$eubtotal = 0;
$totalweight = 0;
$detailcount = count($skulisttemp);
$height = $detailcount > 1 ? intval(123 / $detailcount) : 123;
foreach ($skulisttemp as &$tmval) {
if ($type == 3) {
//EUB熱敏打印處理
$sku_info = printLabelModel::getSkuInfo($tmval['sku']);
if (!empty($sku_info)) {
$materName = CommonModel::getMaterInfoById($sku_info['pmId']);
//包材
list($goodsName) = strpos($sku_info['goodsName'], '--') !== false ? explode('--', $sku_info['goodsName']) : array($sku_info['goodsName']);
$price = rand(300, 600) / 100;
$eubtotal += $price;
$weight = $sku_info['goodsWeight'] * $tmval['amount'];
$totalweight += $weight;
$locationinfo['skuinfo'][] = array('sku' => $tmval['sku'], 'itemTitle' => $tmval['itemTitle'], 'goodsName' => $goodsName, 'isPacking' => $sku_info['isPacking'], 'materName' => $materName, 'pName' => $tmval['pName'], 'amount' => $tmval['amount'], 'price' => $price, 'weight' => $weight, 'height' => $height);
$locationinfo['eubtotal'] = $eubtotal;
$locationinfo['eubweight'] = $totalweight;
}
} else {
if ($type == 4 || $type == 5) {
//Global Mail-100*100打印
$title_nums = 0;
$title_nums = count($goods_title);
if ($detailcount > 3 && $title_nums < 2) {