• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CommonModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CommonModel的典型用法代码示例。如果您正苦于以下问题:PHP CommonModel类的具体用法?PHP CommonModel怎么用?PHP CommonModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CommonModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: view_addOrder

 public function view_addOrder()
 {
     $OmAccountAct = new OmAccountAct();
     $state = isset($_GET['state']) ? post_check($_GET['state']) : '';
     $this->smarty->assign('state', $state);
     //平台
     //$platform_lsit = OmAvailableModel::getTNameList("om_platform","*","where is_delete=0");
     $platform_lsit = $OmAccountAct->act_getPlatformListByPower();
     $tmpPlatformList = array();
     foreach ($platform_lsit as $value) {
         if (in_array($value['id'], array(3))) {
             $tmpPlatformList[] = $value;
         }
     }
     $platform_lsit = $tmpPlatformList;
     $this->smarty->assign('platform_lsit', $platform_lsit);
     //账号
     //$account_lsit = OmAvailableModel::getTNameList("om_account","*","where is_delete=0 and platformId=3");
     $account_lsit = $OmAccountAct->act_getAccountListByPlatform();
     $account_lsit = array();
     $this->smarty->assign('account_lsit', $account_lsit);
     //物流
     $Shiping = CommonModel::getCarrierList();
     $this->smarty->assign('Shiping', $Shiping);
     $toplevel = 2;
     //一级菜单的序号
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = 21;
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('toptitle', '订单添加');
     $this->smarty->assign('curusername', $_SESSION['userName']);
     $this->smarty->display('orderAdd.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:34,代码来源:orderAdd.view.php


示例2: act_updateNewPostion

 public static function act_updateNewPostion()
 {
     $sku = isset($_GET['sku']) ? $_GET['sku'] : '';
     $location = isset($_GET['location']) ? $_GET['location'] : '';
     if (empty($sku)) {
         self::$errCode = 400;
         self::$errMsg = "sku参数有误!";
         return false;
     }
     if (empty($location)) {
         self::$errCode = 400;
         self::$errMsg = "sku参数有误!";
         return false;
     }
     $data = CommonModel::updateNewPostion($sku, $location);
     if ($data) {
         self::$errCode = 200;
         self::$errMsg = "更新成功!";
         return true;
     } else {
         self::$errCode = 400;
         self::$errMsg = "更新失败!";
         return false;
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:25,代码来源:common.action.php


示例3: view_orderWeighing

 public function view_orderWeighing()
 {
     $config_path = 'images/cz';
     $time = date("Y/m/d", time());
     $dirPath = $config_path . '/' . $time;
     if (!is_dir($dirPath)) {
         mkdirs($dirPath, 0777);
     }
     $this->smarty->assign('time', $time);
     $navlist = array(array('url' => '', 'title' => '出库'), array('url' => 'index.php?mod=waitWeighing&act=waitWeighingList', 'title' => '待称重'), array('url' => '', 'title' => '称重扫描<小包>'));
     $secnev = 3;
     $toplevel = 2;
     $secondlevel = 26;
     //$userName = $_SESSION['username'];
     //$this->smarty->assign('secnev','1');
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('secnev', $secnev);
     $this->smarty->assign('toplevel', $toplevel);
     $this->smarty->assign('secondlevel', $secondlevel);
     $partion_list = CommonModel::getChannelNameByIds('all');
     //$channel_list = CommonModel::getCarrierChannelByIds('all');
     $channel_list = C('MAILWAYCONFIG');
     $this->smarty->assign("partion_list", $partion_list);
     $this->smarty->assign("channel_list", $channel_list);
     //$this->smarty->assign('toptitle', '货品资料管理');
     $this->smarty->display('orderWeighing.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:27,代码来源:orderWeighing.view.php


示例4: act_judgeCombineSku

 function act_judgeCombineSku($sku)
 {
     $list = CommonModel::judgeCombineSku($sku);
     if ($list) {
         return $list;
     } else {
         self::$errCode = CommonModel::$errCode;
         self::$errMsg = CommonModel::$errMsg;
         return 0;
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:11,代码来源:common.action.php


示例5: act_getChannel

 /**
  * 通过运输方式id获取对应的渠道
  * @return array $channellist
  * @author czq
  */
 public function act_getChannel()
 {
     $transportId = isset($_POST['transportId']) ? intval($_POST['transportId']) : '';
     if (empty($transportId)) {
         $errCode = 101;
         $errMsg = '未获取运输方式id';
         return false;
     }
     $channellist = CommonModel::getCarrierChannelByIds($transportId);
     //获取国家渠道信息
     self::$errCode = 200;
     self::$errMsg = '获取运输渠道成功!';
     return $channellist;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:19,代码来源:whTransportPartition.action.php


示例6: view_waitWeighingList

 public function view_waitWeighingList()
 {
     $pagesize = 100;
     //页面大小
     $statusar = array(PKS_WWEIGHING, PKS_WWEIGHING_EX, PKS_INLANDWWEIGHING);
     $statusstr = implode(',', $statusar);
     $packing_obj = new PackingOrderModel();
     $count = $packing_obj->getRecordsNumByStatus($statusar);
     //获得当前状态为待包装的发货单总数量
     $pager = new Page($count, $pagesize);
     //分页对象
     $billlist = $packing_obj->getBillList(' and orderStatus in (' . $statusstr . ') order by po.id ' . $pager->limit);
     $this->smarty->assign('billlist', $billlist);
     $ShipingTypeList = CommonModel::getShipingTypeListKeyId();
     $count = count($billlist);
     for ($i = 0; $i < $count; $i++) {
         $billlist[$i]['shipingname'] = isset($ShipingTypeList[$billlist[$i]['transportId']]) ? $ShipingTypeList[$billlist[$i]['transportId']] : '';
     }
     $acc_id_arr = array();
     foreach ($billlist as $key => $valbil) {
         if (!in_array($valbil['accountId'], $acc_id_arr)) {
             array_push($acc_id_arr, $valbil['accountId']);
         }
     }
     $salesaccountinfo = CommonModel::getAccountInfo($acc_id_arr);
     $this->smarty->assign('salesaccountinfo', $salesaccountinfo);
     if ($count > $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);
     $navlist = array(array('url' => '', 'title' => '出库'), array('url' => '', 'title' => '待包装称重'));
     $this->smarty->assign('navlist', $navlist);
     $toptitle = '待包装称重';
     //顶部链接
     $this->smarty->assign('toptitle', $toptitle);
     $toplevel = 2;
     //顶层菜单
     $this->smarty->assign('toplevel', $toplevel);
     $secondlevel = '26';
     //当前的二级菜单
     $this->smarty->assign('secondlevel', $secondlevel);
     $this->smarty->assign('secnev', 3);
     //二级导航
     $this->smarty->display('waitweighinglist.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:48,代码来源:waitWeighing.view.php


示例7: act_getGroupInfo

 function act_getGroupInfo()
 {
     $userId = $_SESSION['userId'];
     $shipOrderGroup = $_POST['order_group'];
     $group_sql = WhGoodsAssignModel::getOrderGroup("*", array('assignNumber' => $shipOrderGroup));
     //var_dump($group_sql);exit;
     if (empty($group_sql)) {
         self::$errCode = "001";
         self::$errMsg = "该调拨单号不存在,请重新输入!";
         return false;
     }
     if ($group_sql[0]['status'] != 106) {
         self::$errCode = "002";
         self::$errMsg = "调拨单只有在接收复核后才可完结!";
         return false;
     }
     $orderIds = WhGoodsAssignModel::getAssignOrderIds($group_sql[0]['id']);
     if (!$orderIds) {
         self::$errCode = "003";
         self::$errMsg = "该调拨单下没有关联的B仓订单!";
         return false;
     }
     $ids = array();
     foreach ($orderIds as $id) {
         $ids[] = $id['orderId'];
     }
     TransactionBaseModel::begin();
     //更新调拨单状态
     $info = WhGoodsAssignModel::updateAssignListStatus(array('id' => $group_sql[0]['id']), array('status' => 107));
     if (!$info) {
         self::$errCode = "004";
         self::$errMsg = "更新调拨单状态失败!";
         TransactionBaseModel::rollback();
         return false;
     }
     $ids = implode(',', $ids);
     $info = CommonModel::updateOrderStatus($ids, 745);
     if ($info['errCode'] != 200) {
         self::$errCode = "004";
         self::$errMsg = "同步旧ERP订单状态失败!";
         TransactionBaseModel::rollback();
         return false;
     }
     self::$errCode = "0";
     self::$errMsg = "调拨单完结成功!";
     TransactionBaseModel::commit();
     return TRUE;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:48,代码来源:pda_whEndAssign.action.php


示例8: getAdvertise

 public static function getAdvertise($position, $modelName = null, $modelId = null)
 {
     // Header & Footer
     if ($modelName == null && $modelId == null) {
         if (Cache::has('ad' . $position)) {
             $ad = Cache::get('ad' . $position);
         } else {
             $ad = Advertise::where(array('position' => $position, 'status' => ENABLED))->first();
             Cache::put('ad' . $position, $ad, CACHETIME);
         }
         return $ad;
     } else {
         //check Common models
         if (Cache::has('common_model' . $modelName . $modelId)) {
             $common_model = Cache::get('common_model' . $modelName . $modelId);
         } else {
             $common_model = CommonModel::where(array('model_name' => $modelName, 'model_id' => $modelId))->first();
             Cache::put('common_model' . $modelName . $modelId, $common_model, CACHETIME);
         }
         if ($common_model) {
             $common_model_id = $common_model->id;
             if (Cache::has('advertisement_id' . $common_model_id)) {
                 $advertisement_id = Cache::get('advertisement_id' . $common_model_id);
             } else {
                 $advertisement_id = AdvertisePosition::where(array('common_model_id' => $common_model_id, 'status' => ENABLED))->first();
                 Cache::put('advertisement_id' . $common_model_id, $advertisement_id, CACHETIME);
             }
             if ($advertisement_id) {
                 if (Cache::has('ad' . $advertisement_id)) {
                     $ad = Cache::get('ad' . $advertisement_id);
                 } else {
                     $advertisement_id = AdvertisePosition::where(array('common_model_id' => $common_model_id, 'status' => ENABLED))->first()->advertisement_id;
                     $ad = Advertise::find($advertisement_id);
                     Cache::put('ad' . $advertisement_id, $advertisement_id, CACHETIME);
                 }
                 return $ad;
             }
             return null;
         } else {
             return null;
         }
     }
 }
开发者ID:trantung,项目名称:company,代码行数:43,代码来源:CommonSite.php


示例9: view_edit

 /**
  * 编辑一个分渠道
  * @author czq
  */
 public function view_edit()
 {
     if ($_POST['submit']) {
         $id = intval($_POST['id']);
         $data = array('title' => $_POST['title'], 'channelName' => $_POST['channelName'], 'transportId' => $_POST['transportId'], 'channelId' => $_POST['channelId'], 'partition' => $_POST['partition'], 'is_delete' => 0);
         WhChannelPartitionModel::update($data, $id);
         header("location:index.php?mod=whChannelPartition&act=index");
     } else {
         $id = intval($_GET['id']);
         $data = WhChannelPartitionModel::find($id);
         $transportlist = CommonModel::getShipingTypeList();
         //获取运输方式
         $channellist = CommonModel::getCarrierChannelByIds($data['transportId']);
         //获取国家渠道信息
         $this->smarty->assign('data', $data);
         $this->smarty->assign('transportlist', $transportlist);
         $this->smarty->assign('channellist', $channellist);
         $this->smarty->display('whChannelPartitionEdit.htm');
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:24,代码来源:whChannelPartition.view.php


示例10: view_showUserCompense

 public function view_showUserCompense()
 {
     $shipArr = array();
     $platformAccountList = CommonModel::getPlatformAccountList();
     //获取平台及对应账号
     $shipingtyplist = CommonModel::getShipingTypeList();
     //运输方式列表
     $uid = $_GET['uid'];
     $shipArr = UserCompetenceModel::showCompetenceVisibleShip($uid);
     $powerAccountList = UserCompetenceModel::showCompetenceVisibleAccount($uid);
     //获取权限对应账号
     $powerPlatformList = UserCompetenceModel::getCompetenceVisiblePlat($uid);
     //获取权限对应平台
     $this->smarty->assign('uid', $uid);
     $this->smarty->assign('shipArr', $shipArr);
     $this->smarty->assign('shipingtypelist', $shipingtyplist);
     $this->smarty->assign('platformAccountList', $platformAccountList);
     $this->smarty->assign('powerAccountList', $powerAccountList);
     $this->smarty->assign('powerPlatformList', $powerPlatformList);
     $this->smarty->display("showUserCompense.htm");
 }
开发者ID:ohjack,项目名称:newErp,代码行数:21,代码来源:omAccount.view.php


示例11: getpartsaleandnosendall

 public static function getpartsaleandnosendall($sku, $isCache = true)
 {
     require_once WEB_PATH . "api/include/functions.php";
     $url = 'http://gw.open.valsun.cn:88/router/rest?';
     $paramArr = array('method' => 'order.erp.getpartsaleandnosendall', 'format' => 'json', 'v' => '1.0', 'username' => 'purchase', 'sku' => $sku);
     $result = callOpenSystem($paramArr, $url);
     $data = json_decode($result, true);
     if (empty($data['data'])) {
         $data['data'] = CommonModel::getpartsaleandnosendall($sku);
         //添加新系统待发货数量
     }
     /*if(empty($data['data'])){
     			return false;
     		}*/
     if ($isCache) {
         //同步更新待发货缓存表
         $sendArr = array('salensend' => $data['data']);
         CommonModel::updateSkuStatistics($sku, $sendArr);
     }
     //var_dump($data['data']);
     return $data['data'];
 }
开发者ID:ohjack,项目名称:newErp,代码行数:22,代码来源:oldsystem.model.php


示例12: view_edit

 public function view_edit()
 {
     if ($_POST['submit']) {
         $id = intval($_POST['id']);
         $data = array('title' => $_POST['title'], 'shortTitle' => $_POST['shortTitle'], 'transportId' => $_POST['transportId'], 'channelId' => $_POST['channelId'], 'channelName' => isset($_POST['channelName']) ? $_POST['channelName'] : '', 'partition' => $_POST['partition'], 'priority' => $_POST['priority'], 'countryWhiteList' => json_encode($_POST['countryWhiteList']), 'backAddress' => $_POST['backAddress'], 'modifiedtime' => time(), 'editUserId' => $_SESSION['userId'], 'status' => intval($_POST['status']));
         WhTransportPartitionModel::update($data, $id);
         header("location:index.php?mod=whTransportPartition&act=index");
     } else {
         $id = intval($_GET['id']);
         $data = WhTransportPartitionModel::find($id);
         $data['countryWhiteList'] = json_decode($data['countryWhiteList'], true);
         $transportlist = CommonModel::getShipingTypeList();
         //获取运输方式
         $countrylist = CommonModel::getCountryList();
         //获取国建列表
         $channellist = CommonModel::getCarrierChannelByIds($data['transportId']);
         //获取国家渠道信息
         $this->smarty->assign('data', $data);
         $this->smarty->assign('countrylist', $countrylist);
         $this->smarty->assign('transportlist', $transportlist);
         $this->smarty->assign('channellist', $channellist);
         $this->smarty->display('whTransportPartition_edit.htm');
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:24,代码来源:whTransportPartition.view.php


示例13: C

		AND		ebay_tracknumber!=''
		AND		ebay_carrier!='' 
		AND 	ebay_account = '".$account."' 
		AND		ebay_site = '".$site."'";// limit 0,7";*/
/*$order_sql	= "	select 	a.omOrderId
				from 	om_unshipped_order_warehouse as a
				where	(a.weighTime BETWEEN $start AND $end)
				and 	a.storeId = 1 ";
$order_db	= $dbConn->query($order_sql);
$orders		= $dbConn->fetch_array_all($order_db);
//var_dump($orders); echo "\n"; exit;
$handle_cnt=count($orders);
if($handle_cnt<=0 ){
	exit("No order to handel\n");
}*/
$delivery_arr = CommonModel::getCarrierListById();
$order_sql = "select a.id,a.recordNumber,a.transportId,a.combinePackage,a.orderStatus \n\t\t\t\tfrom om_shipped_order as a \n\t\t\t\tleft join om_shipped_order_warehouse as b\n\t\t\t\ton a.id = b.omOrderId\n\t\t\t\tleft join om_shipped_order_extension_amazon as c\n\t\t\t\ton a.id = c.omOrderId\n\t\t\t\twhere a.accountId = '{$accountId}'\n\t\t\t\tand\tc.site = '{$site}'\n\t\t\t\tand a.orderStatus ='" . C("STATESHIPPED") . "'\n\t\t\t\tand a.orderType ='" . C("STATEHASSHIPPED_CONV") . "'\n\t\t\t\tand (b.weighTime BETWEEN {$start} AND {$end}) and (a.ShippedTime ='' or a.ShippedTime is null) \n\t\t\t\tORDER BY b.weighTime ";
$order_db = $dbConn->query($order_sql);
$orders = $dbConn->fetch_array_all($order_db);
/*$order_sql	=	" select ebay_orderid,ebay_account,ebay_ordersn,ebay_countryname,
						ebay_id,ebay_tracknumber,ebay_carrier,ebay_combine,recordnumber
				from 	ebay_order where recordnumber in(
'002-8137713-8318634',
'115-9924496-2629023',
'107-8620600-1710651',
'109-4445248-2697864',
'112-8959307-6029052',
'112-8141525-2093001')

";*/
//$order_db	= $dbcon->execute($order_sql);
开发者ID:ohjack,项目名称:newErp,代码行数:31,代码来源:update_order_shipingdetail_to_amazon_new.php


示例14: intercept_exception_orders


//.........这里部分代码省略.........
     if (in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['ebay']) && !empty($orderDataid)) {
         //非线下ebay账号订单
         //ebay 平台可以重新计算运输方式 @ 20130301
         if (empty($countryName)) {
             $orderStatus = C('STATESYNCINTERCEPT');
             $orderType = C('STATESYNCINTERCEPT_AB');
             return array('orderStatus' => $orderStatus, 'orderType' => $orderType);
         }
         if ($actualTotal != $actualTotal0) {
             $actualTotal0 = (string) $actualTotal0;
         }
         echo "[" . date("Y-m-d H:i:s") . "]\t总价记录---{$ebay_id}---系统总价{$actualTotal}---计算总价{$actualTotal0}\n";
         if (in_array($ebay_usermail, array("", "Invalid Request")) && $ebay_carrier == 'EUB') {
             $orderStatus = C('STATESYNCINTERCEPT');
             $orderType = C('STATESYNCINTERCEPT_AB');
             return array('orderStatus' => $orderStatus, 'orderType' => $orderType);
         } else {
             if ($actualTotal != $actualTotal0 && $orderStatus == 1) {
                 $orderStatus = C('STATESYNCINTERCEPT');
                 $orderType = C('STATESYNCINTERCEPT_AB');
                 return array('orderStatus' => $orderStatus, 'orderType' => $orderType);
             } else {
                 if (!empty($PayPalEmailAddress) && !in_array(strtolower($PayPalEmailAddress), PaypalEmailModel::get_account_paypalemails($accountId)) && $orderStatus == 1) {
                     $orderStatus = C('STATESYNCINTERCEPT');
                     $orderType = C('STATEPENDING_EXCPAY');
                     return array('orderStatus' => $orderStatus, 'orderType' => $orderType);
                 }
             }
         }
         //$log_data .= "[".date("Y-m-d H:i:s")."]\t自动跳转的状态为--".$orderStatus."--".$orderType."!\n\n";
         //CommonModel::write_scripts_log('auto_contrast_intercept', $GLOBAL_EBAY_ACCOUNT[$accountId], $log_data);
     }
     if ($orderStatus == C('STATEOUTOFSTOCK')) {
         //缺货和自动拦截判断
         //ebay 线上订单EUB大于5天,平邮和挂号大于7天不发货,不包括快递
         //海外销售十天
         $timeout = false;
         //$orderDataid = isset($orderData['ebay_orderid']) ? $orderData['ebay_orderid'] : '';
         //$ebay_paidtime = isset($orderData['ebay_paidtime']) ? $orderData['ebay_paidtime'] : '';
         if (!empty($paymentTime)) {
             //线上订单,付款时间不能为空
             $diff_time = ceil((time() - $paymentTime) / (3600 * 24));
             if (in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['ebay'])) {
                 if ($ebay_carrier == 'EUB' && $diff_time > 5) {
                     $timeout = true;
                 } else {
                     if ((strpos($ebay_carrier, '平邮') !== false || strpos($ebay_carrier, '挂号') !== false) && $diff_time > 7) {
                         $timeout = true;
                     }
                 }
             }
             /*else if(in_array($GLOBAL_EBAY_ACCOUNT[$accountId],$SYSTEM_ACCOUNTS['海外销售平台'])){
             			if((strpos($ebay_carrier, '中国邮政平邮')!==false && $diff_time > 5) || $diff_time > 10){
             				$timeout = true;
             			}
             		}*/
         }
         if ($timeout) {
             //$log_data .= "\n缺货订单={$ebay_id}======移动到缺货需退款中======\n";
             $orderStatus = C('STATEREFUND');
             $orderType = C('STATEREFUND_OUTSTOCK');
             //$log_data .= "[".date("Y-m-d H:i:s")."]\t自动跳转的状态为--".$orderStatus."--".$orderType."!\n\n";
             //CommonModel::write_scripts_log('auto_contrast_intercept', $GLOBAL_EBAY_ACCOUNT[$accountId], $log_data);
             return array('orderStatus' => $orderStatus, 'orderType' => $orderType);
             //continue;
         }
     }
     if (in_array($orderStatus, array(C('STATESTOCKEXCEPTION')))) {
         //缺货处理\合并包裹处理
         $have_goodscount = true;
         foreach ($orderdetaillist as $orderdetail) {
             $sku_arr = GoodsModel::get_realskuinfo($orderdetail['sku']);
             foreach ($sku_arr as $or_sku => $or_nums) {
                 $allnums = $or_nums * $orderdetail['ebay_amount'];
                 $skuinfo = CommonModel::get_sku_info($or_sku);
                 $salensend = CommonModel::getpartsaleandnosendall($or_sku);
                 //$sql = "UPDATE ebay_sku_statistics SET salensend = $salensend WHERE sku = '$or_sku' ";
                 //self::$dbConn->query($sql);
                 //$log_data .= "[".date("Y-m-d H:i:s")."]\t---{$sql}\n\n";
                 //$log_data .= "订单===$ebay_id===料号==$or_sku===实际库存为{$skuinfo['realnums']}===需求量为{$allnums}===待发货数量为{$salensend}===\n";
                 if (!isset($skuinfo['realnums']) || empty($skuinfo['realnums']) || $skuinfo['realnums'] - $salensend < 0) {
                     //缺货本身算待发货,不能重复扣除
                     $have_goodscount = false;
                     break;
                 }
             }
         }
         if ($have_goodscount) {
             /*$orderStatus = C('STATEPENDING');
             		$orderType = C('STATEPENDING_CONV');*/
             $log_data .= "\n缺货订单={$ebay_id}======有货至待打印======\n";
             //$final_status = 618;
             //$log_data .= "[".date("Y-m-d H:i:s")."]\t自动跳转的状态为--".$orderStatus."--".$orderType."!\n\n";
             //CommonModel::write_scripts_log('auto_contrast_intercept', $GLOBAL_EBAY_ACCOUNT[$accountId], $log_data);
             return array('orderStatus' => $orderStatus, 'orderType' => $orderType);
             //continue;
         }
     }
     return false;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:cndl.model.php


示例15: act_sureAddOrder

 function act_sureAddOrder()
 {
     $order_data = array();
     $detail_data = array();
     $exten_data = array();
     $userinfo_data = array();
     $buyer_data = array();
     $time = time();
     $platform_id = trim($_POST['platform']);
     $username = trim($_POST['fullname']);
     $account_id = trim($_POST['account']);
     $street1 = trim($_POST['street1']);
     $platformUsername = trim($_POST['userid']);
     $email = trim($_POST['ebay_usermail1']);
     $street2 = trim($_POST['street2']);
     $recordNumber = trim($_POST['orderid']);
     $city = trim($_POST['city']);
     $ordersTime = strtotime(trim($_POST['ebay_createdtime']));
     $state = trim($_POST['state']);
     $paymentTime = strtotime(trim($_POST['ebay_paidtime']));
     $countryname = trim($_POST['country']);
     $ebay_itemprice = trim($_POST['ebay_itemprice']);
     $zipCode = trim($_POST['zip']);
     $shippingFee = trim($_POST['ebay_shipfee']);
     $ebay_tel1 = trim($_POST['tel1']);
     $actualTotal = trim($_POST['ebay_total']);
     $ebay_tel2 = trim($_POST['tel2']);
     $ebay_tel3 = trim($_POST['tel3']);
     $currency = trim($_POST['ebay_currency']);
     $other_currency = trim($_POST['other_currency']);
     $isCheckOrder = self::act_checkOrder();
     $returnArr = array();
     //返回的数组信息
     if (!$isCheckOrder) {
         $returnArr['errCode'] = self::$errCode;
         $returnArr['errMsg'] = self::$errMsg;
         return $returnArr;
     }
     if ($currency == '其他') {
         $currency = $other_currency;
     }
     $phone = trim($_POST['tel1']);
     $transId = trim($_POST['ebay_ptid']);
     $other_ptid = trim($_POST['other_ptid']);
     if ($transId == 'paypal' || $transId == 'Escrow' || $transId == '其他') {
         $transId = $other_ptid;
     }
     $PayPalPaymentId = $transId;
     $orderweight = trim($_POST['orderweight']);
     $ebay_usermail2 = trim($_POST['ebay_usermail2']);
     $ebay_carrier = trim($_POST['ebay_carrier']);
     $ebay_usermail3 = trim($_POST['ebay_usermail3']);
     $ebay_tracknumber = trim($_POST['ebay_tracknumber']);
     $ebay_noteb = trim($_POST['ebay_noteb']);
     $orderStatus = 100;
     $orderType = 101;
     $tracknumber = trim($_POST['ebay_tracknumber']);
     //order信息
     $orderData[$recordNumber]['orderData']['recordNumber'] = $recordNumber;
     $orderData[$recordNumber]['orderData']['ordersTime'] = $ordersTime;
     $orderData[$recordNumber]['orderData']['paymentTime'] = $paymentTime;
     $orderData[$recordNumber]['orderData']['actualTotal'] = $actualTotal;
     $orderData[$recordNumber]['orderData']['onlineTotal'] = $actualTotal;
     //默认线上总价和实际总价一样
     $orderData[$recordNumber]['orderData']['orderAddTime'] = time();
     //$orderData[$recordNumber]['orderData']['calcWeight'] = $orderweight;//估算重量
     $orderData[$recordNumber]['orderData']['accountId'] = $account_id;
     $orderData[$recordNumber]['orderData']['platformId'] = $platform_id;
     //添加状态信息
     $orderData[$recordNumber]['orderData']['orderStatus'] = 100;
     $orderData[$recordNumber]['orderData']['orderType'] = 101;
     $SYS_ACCOUNTS = OmAvailableModel::getPlatformAccount();
     foreach ($SYS_ACCOUNTS as $platform => $accounts) {
         foreach ($accounts as $accountId => $accountname) {
             if ($account_id == $accountId) {
                 if ($platform == 'ebay') {
                     //为ebay平台
                     $orderData[$recordNumber]['orderData']['isFixed'] = 2;
                 } else {
                     $orderData[$recordNumber]['orderData']['isFixed'] = 1;
                 }
             }
         }
     }
     $transportation = CommonModel::getCarrierList();
     //所有的
     foreach ($transportation as $tranValue) {
         if ($tranValue['id'] == $ebay_carrier) {
             $orderData[$recordNumber]['orderData']['transportId'] = $tranValue['id'];
             break;
         }
     }
     //order扩展信息
     $orderData[$recordNumber]['orderExtenData']['currency'] = $currency;
     $orderData[$recordNumber]['orderExtenData']['paymentStatus'] = "PAY_SUCCESS";
     //$orderData[$recordNumber]['orderExtenData']['transId']			    =	$transId;
     $orderData[$recordNumber]['orderExtenData']['PayPalPaymentId'] = $PayPalPaymentId;
     $orderData[$recordNumber]['orderExtenData']['platformUsername'] = $platformUsername;
     //user信息
     $orderData[$recordNumber]['orderUserInfoData']['platformUsername'] = $platformUsername;
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:orderAdd.action.php


示例16: array

        $log .= "发货单{$order['shipOrderId']}没有可选择的运输方式\n";
        continue;
    }
    //获取真实订单ID
    $orderId = WhShippingOrderRelationModel::get_orderId($order['shipOrderId']);
    //传递给物流系统的数据
    $data[$orderId] = array('channelId' => $order['selectShipping'], 'country' => rawurlencode($order['countryName']), 'weight' => $order['orderWeight'] / 1000);
    //赛维美国专线传递转运中心和邮编前三位
    if (count(array_intersect(array(115, 119, 116), explode(',', $order['selectShipping']))) > 0) {
        $data[$orderId]['postCode'] = substr($order['zipCode'], 0, 3);
        //邮编前三位
        $data[$orderId]['transitId'] = 2;
        //转运中心
    }
}
$transportInfo = CommonModel::getTransportByApi($data);
//调用物流系统接口
if (empty($transportInfo['data'])) {
    echo '没有获取申请信息';
    exit;
}
foreach ($transportInfo['data'] as $orderId => $transports) {
    $transportId = 0;
    $channelId = 0;
    $shipFee = 999999999;
    //暂时取最大值处理
    $compareTrasprot = array();
    $lastTransport = array();
    //通过真实订单获取发货单ID
    $shipOrderId = WhShippingOrderRelationModel::get_shipOrderId($orderId);
    foreach ($transports['shipFee'] as $transport) {
开发者ID:ohjack,项目名称:newErp,代码行数:31,代码来源:wh_order_transport_assign.php


示例17: act_getInfo

 /**
  * Pda_inventorySearchAct::getInfo()
  * 获取盘点信息
  * GARY
  * @return
  */
 public function act_getInfo()
 {
     $sku = trim($_POST['sku']);
     $sku = get_goodsSn($sku);
     if (!$sku) {
         self::$errCode = 101;
         self::$errMsg = '请扫描料号!';
         return FALSE;
     }
     $info = CommonModel::getSkuInevntory($sku);
     if ($info['res_code'] != 200) {
         self::$errCode = 102;
         self::$errMsg = '获取sku盘点信息失败!';
         return FALSE;
     }
     self::$errCode = $info['res_code'];
     self::$errMsg = '拉取数据成功!';
     return $info['res_data'];
 }
开发者ID:ohjack,项目名称:newErp,代码行数:25,代码来源:inventory.action.php


示例18: view_getExpressRemark

 public function view_getExpressRemark()
 {
     $id = isset($_GET['id']) ? $_GET['id'] : '';
     if (empty($id)) {
         return false;
     }
     $data = CommonModel::getExpressRemark($id);
     if (empty($data)) {
         echo '查询不到数据!';
         exit;
     }
     $total = 0;
     foreach ($data as $k => $v) {
         $total += $v['price'] * $v['amount'];
         $type = $v['type'];
     }
     $this->smarty->assign('data', $data);
     $this->smarty->assign('total', $total);
     $this->smarty->assign('type', $type);
     $this->smarty->display('expressRemark.htm');
 }
开发者ID:ohjack,项目名称:newErp,代码行数:21,代码来源:dispatchBillQuery.view.php


示例19: act_packingTracknumber

 public function act_packingTracknumber()
 {
     $orderid = isset($_POST['orderid']) ? $_POST['orderid'] : "";
     $tracknumber = isset($_POST['tracknumber']) ? $_POST['tracknumber'] : "";
     $userId = $_SESSION['userId'];
     //先核对订单
     //兼容 EUB或者 包裹 扫描的是 trackno 而非ebayid
     $p_real_ebayid = '#^\\d+$#';
     $p_trackno_eub = '#^(LK|RA|RB|RC|RR|RF|LN)\\d+(CN|HK|DE200)$#';
     $is_eub_package_type = false;
     if (preg_match($p_real_ebayid, $orderid)) {
     } else {
         if (preg_match($p_trackno_eub, $orderid)) {
             $is_eub_package_type = true;
         } else {
             self::$errCode = "001";
             self::$errMsg = "订单号[" . $orderid . "]格式有误";
             return false;
         }
     }
     if ($is_eub_package_type === true) {
         $record = ShippingOrderModel::getShippingOrderInfo("b.*", "where a.tracknumber='{$orderid}' and a.is_delete=0");
     } else {
         $record = ShippingOrderModel::getShippingOrder("*", "where id='{$orderid}'");
     }
     //验证发货单号 以及所属状态
     if (!$record) {
         self::$errCode = 404;
         self::$errMsg = "发货单号不存在!";
         return false;
     }
     if ($record[0]['orderStatus'] != 404) {
         self::$errCode = 405;
         self::$errMsg = "此发货单不在待包装!";
         if ($record[0]['orderStatus'] == 900) {
             self::$errMsg = "此发货单已废弃!";
         }
         return false;
     }
     //挂号的单需要再输入挂号条码
     $carrier = CommonModel::getShipingNameById($record[0]['transportId']);
     $partion = CommonModel::getChannelNameByIds($record[0]['transportId'], $record[0]['countryName']);
     $total_num = 0;
     $skuinfos = get_realskunum($record[0]['id']);
     foreach ($skuinfos as $or_sku => $or_nums) {
         $total_num += $or_nums;
     }
     if (carrier == '中国邮政挂号' && !preg_match("/^(RA|RB|RC|RR)\\d+(CN)\$/", $tracknumber)) {
         self::$errCode = 111;
         self::$errMsg = "录入失败,中国邮政挂号跟踪码不符合规范";
         return false;
     }
     if ($carrier == '香港小包挂号' && !preg_match("/^(RA|RB|RC|RR)\\d+(HK)\$/", $tracknumber)) {
         self::$errCode = 111;
         self::$errMsg = "录入失败,香港小包挂号跟踪码不符合规范";
         return false;
     }
     $p_str = "挂号条码:" . "<font color='#FF0000'>" . $tracknumber . "</font> <br>";
     TransactionBaseModel::begin();
     //更新订单状态
     $msg = OmAvailableModel::updateTNameRow("wh_shipping_order", "set orderStatus=405", "where id={$record[0]['id']}");
     if (!$msg) {
         self::$errCode = 409;
         self::$errMsg = "更新发货单状态记录失败!";
         $arr['partion'] = $partion;
         $arr['carrier'] = $carrier;
         TransactionBaseModel::rollback();
         return json_encode($arr);
         exit;
     }
     //更新操作记录
     $msg = packingScanOrderModel::updateOrderRecord($record[0]['id'], $userId);
     if (!$msg) {
         self::$errCode = 406;
         self::$errMsg = "更新发货单操作记录失败!";
         TransactionBaseModel::rollback();
         return false;
     }
     //插入包装记录
     $msg = packingScanOrderModel::insertPackingRecord($record[0]['id'], $userId);
     if (!$msg) {
         self::$errCode = 407;
         self::$errMsg = "插入包装记录失败!";
         TransactionBaseModel::rollback();
         return false;
     }
     $msg = packingScanOrderModel::deleteTrackRecord($record[0]['id']);
     if (!$msg) {
         self::$errCode = 409;
         self::$errMsg = "删除跟踪记录失败!";
         TransactionBaseModel::rollback();
         return false;
     }
     //录入挂号条码
     $msg = packingScanOrderModel::insertTrackRecord($tracknumber, $record[0]['id']);
     if (!$msg) {
         self::$errCode = 408;
         self::$errMsg = "插入包装记录失败!";
         TransactionBaseModel::rollback();
         return false;
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:packingOrder.action.php


示例20: _before_write

 protected function _before_write(&$data)
 {
     parent::_before_write($data);
     if (!empty($data['user_pass']) && strlen($data['user_pass']) < 25) {
         $data['user_pass'] = sp_password($data['user_pass']);
     }
 }
开发者ID:it114,项目名称:public,代码行数:7,代码来源:UsersModel.class.php



注:本文中的CommonModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CommonUtil类代码示例发布时间:2022-05-20
下一篇:
PHP CommonGLPI类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap