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


PHP OmAvailableModel類代碼示例

本文整理匯總了PHP中OmAvailableModel的典型用法代碼示例。如果您正苦於以下問題:PHP OmAvailableModel類的具體用法?PHP OmAvailableModel怎麽用?PHP OmAvailableModel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: orderLog

 public static function orderLog($orderid, $ss, $note, $orderType = "")
 {
     !self::$dbConn ? self::initDB() : null;
     $where = "where id={$orderid}";
     $orderinfo = OmAvailableModel::getTNameList("om_unshipped_order", "*", $where);
     $sql = array();
     $sql['operatorId'] = $_SESSION['sysUserId'];
     $sql['omOrderId'] = $orderid;
     //$sql['note'] = "編輯訂單";
     $sql['note'] = $note;
     $sql['sql'] = mysql_real_escape_string($ss);
     $sql['createdTime'] = time();
     if (!empty($orderType) && $orderinfo[0]['orderType'] != $orderType) {
         $sql['oldStatus'] = $orderinfo[0]['orderType'];
         $sql['newStatus'] = $orderType;
         $sql['note'] .= "修改訂單狀態";
     }
     $strmctime = date('Y_m', time());
     $sql = "INSERT INTO om_order_log_" . $strmctime . " set " . array2sql($sql);
     $sql = self::$dbConn->query($sql);
     if ($sql) {
         return true;
     } else {
         return false;
         //echo $sql;
     }
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:27,代碼來源:orderLog.model.php

示例2: act_accountList

 public function act_accountList()
 {
     $select = " id ,account ";
     $where = " where is_delete = 0 and token <> '' order by account ";
     $accountList = OmAvailableModel::getTNameList("fb_account", $select, $where);
     return $accountList;
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:7,代碼來源:accountManage.action.php

示例3: act_getProducts2pc

 function act_getProducts2pc($select, $where)
 {
     $listArr = UserCacheModel::getOpenSysApi('pc.getEbayProducts2PcProducts', array('all' => 'all'), 'gw88');
     if ($listArr) {
         foreach ($listArr as $value) {
             $tName = 'pc_products';
             $where = "WHERE is_delete=0 and productsStatus=1 and sku='{$value['sku']}'";
             $skuCount = OmAvailableModel::getTNameCount($tName, $where);
             if (!$skuCount) {
                 $pc_pro = array();
                 $pc_pro['id'] = $value['id'];
                 if (!empty($value['sku'])) {
                     $tmpArr = explode('_', $value['sku']);
                     $pc_pro['spu'] = $tmpArr[0];
                 }
                 $pc_pro['sku'] = $value['sku'];
                 $pc_pro['productsStatus'] = 1;
                 $pc_pro['productsComfirmerId'] = getPersonIdByName($value['comfirmuser']);
                 $pc_pro['productsComfirmTime'] = $value['comfirmtime'];
                 OmAvailableModel::addTNameRow2arr($tName, $pc_pro);
             }
         }
         self::$errCode = 200;
         self::$errMsg = 'success';
         return true;
     } else {
         self::$errCode = 404;
         self::$errMsg = 'error';
         return false;
     }
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:31,代碼來源:syncCache.action.php

示例4: act_postsku

 public function act_postsku()
 {
     $sku = isset($_POST['sku']) ? trim($_POST['sku']) : "";
     $sku = get_goodsSn($sku);
     $position = isset($_POST['position']) ? trim($_POST['position']) : "";
     $num = isset($_POST['num']) ? trim($_POST['num']) : "";
     $num = intval($num);
     if (empty($position)) {
         self::$errCode = 502;
         self::$errMsg = "倉位不能為空";
         return false;
     }
     if ($num < 1) {
         self::$errCode = 502;
         self::$errMsg = "{$sku}出庫數量{$num}有誤!";
         return false;
     }
     $checkonhandle = wrapperSkuOutModel::selectstock($sku);
     if (empty($checkonhandle)) {
         self::$errCode = 502;
         self::$errMsg = "{$sku}材料未導入庫存信息表!";
         return false;
     }
     $skuinfo = whShelfModel::selectSku(" where sku = '{$sku}'");
     if (empty($skuinfo)) {
         self::$errCode = 502;
         self::$errMsg = "{$sku}材料沒信息!";
         return false;
     } else {
         $skuId = $skuinfo['id'];
         $purchaseId = $skuinfo['purchaseId'];
     }
     $positon_info = OmAvailableModel::getTNameList("wh_position_distribution", "id", "where pName='{$position}' and storeId in(1,2)");
     if (empty($positon_info)) {
         self::$errCode = 502;
         self::$errMsg = "無倉位號信息";
         return false;
     } else {
         $positionId = $positon_info[0]['id'];
     }
     $relation_info = OmAvailableModel::getTNameList("wh_product_position_relation", "id", "where pId='{$skuId}' and positionId='{$positionId}' and storeId in(1,2)");
     if (empty($relation_info)) {
         self::$errCode = 502;
         self::$errMsg = "包材和倉位不對應";
         return false;
     }
     $paraArr = array('ordersn' => date('YmdHis', time()), 'sku' => $sku, 'amount' => $num, 'purchaseId' => $purchaseId, 'ioType' => 1, 'ioTypeId' => 26, 'userId' => $_SESSION['userId'], 'reason' => '包材出庫', 'positionId' => $positionId);
     $WhIoRecordsAct = new WhIoRecordsAct();
     $tt = $WhIoRecordsAct->act_addIoRecoresForWh($paraArr);
     //出庫記錄
     self::$errCode = 200;
     self::$errMsg = "{$sku}出庫{$num}個成功!";
     return true;
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:54,代碼來源:wrapperSkuOut.action.php

示例5: act_deleteTmpProsById

 function act_deleteTmpProsById()
 {
     $id = intval($_POST['id']);
     if ($id <= 0) {
         self::$errCode = '101';
         self::$errMsg = '��Ч��¼��ɾ��ʧ��';
         return false;
     }
     $tName = 'pc_tmp_products_return';
     $where = "WHERE id={$id}";
     OmAvailableModel::deleteTNameRow($tName, $where);
     self::$errCode = '200';
     self::$errMsg = "ɾ���ɹ�";
     return true;
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:15,代碼來源:tmpReturnPros.action.php

示例6: view_skuInfo

 public function view_skuInfo()
 {
     $sku = isset($_GET['sku']) ? trim($_GET['sku']) : "";
     //$spu = ExportsToXlsModel::getGoods($sku);
     $spu = GoodsModel::getSkuList($sku);
     $spu = $spu['spu'];
     $where = "where spu = '{$spu}'";
     $skuinfo = OmAvailableModel::getTNameList("pc_goods", "*", $where);
     $skuStock = array();
     foreach ($skuinfo as $key => $value) {
         $sku = $value['sku'];
         //獲取庫存
         $skuStock = WarehouseAPIModel::getSkuStock($sku);
         //獲取料號信息
         //$skumsg = ExportsToXlsModel::getGoods($sku);
         $skumsg = GoodsModel::getSkuList($sku);
         //獲取緩存表信息
         $where = "where sku='{$sku}'";
         $skuStatics = OmAvailableModel::getTNameList("om_sku_daily_status", "*", $where);
         $skuStockList = array();
         $skuStockList['nums'] = $skuStock;
         $skuStockList['sku'] = $skumsg['sku'];
         $skuStockList['spu'] = $skumsg['spu'];
         $skuStockList['goodsName'] = $skumsg['goodsName'];
         $skuStockList['goodsCost'] = $skumsg['goodsCost'];
         $skuStockList['goodsWeight'] = $skumsg['goodsWeight'];
         $skuStockList['AverageDailyCount'] = $skuStatics['AverageDailyCount'];
         $skuStockList['waitingSendCount'] = $skuStatics['waitingSendCount'];
         $skuStockList['xuniCount'] = $skuStatics['waitingSendCount'];
         $skuStockList['goodsStatus'] = $skumsg['goodsStatus'];
         $path = $skumsg['goodsCategory'];
         $cateName = GoodsModel::getCategoryInfoByPath($path);
         $skuStockList['cateName'] = $cateName['name'];
         $skuStockList['isNew'] = $skumsg['isNew'];
         $skuStockList['pmId'] = $skumsg['pmId'];
         $pmName = GoodsModel::getMaterInfoById($skumsg['pmId']);
         $skuStockList['pmName'] = $pmName['pmName'];
         //print_r($pmName);
         $pName = $skumsg['purchaseId'];
         $skuStockList['pName'] = UserModel::getUsernameById($pName);
         $skuStockList['isPacking'] = $skumsg['isPacking'];
         $skuStockList['whName'] = "深圳A倉";
         $skuStock_arr[] = $skuStockList;
     }
     $this->smarty->assign("skuStockList", $skuStock_arr);
     //print_r($skuStockList);
     $this->smarty->display("skuInfo.htm");
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:48,代碼來源:skuInfo.view.php

示例7: applyTheLineEUBTrackNumber

 public static function applyTheLineEUBTrackNumber($recordnumber, $tracknumber)
 {
     !self::$dbConn ? self::initDB() : null;
     $SYSTEM_ACCOUNTS = OmAvailableModel::getPlatformAccount();
     $accountIds = array();
     foreach ($SYSTEM_ACCOUNTS['Amazon'] as $id => $account) {
         $accountIds[] = $id;
     }
     //print_r($SYSTEM_ACCOUNTS['Amazon']);
     $tableName = 'om_unshipped_order';
     $where = " WHERE recordNumber='{$recordnumber}' AND accountId in ('" . join("','", $accountIds) . "') AND is_delete =0 AND storeId=1 ";
     $tinfo = OrderindexModel::showOnlyOrderList($tableName, $where);
     self::$errMsg = '';
     if ($tinfo) {
         $omOrderId = $tinfo[0]['id'];
         $trackinfo = OrderindexModel::selectOrderTracknumber(" WHERE tracknumber = '" . $tracknumber . "' AND is_delete = 0 ");
         //var_dump($trackinfo);
         if ($trackinfo) {
             self::$errCode = "001";
             self::$errMsg = "  第" . $row . "行已經存在跟蹤" . $tinfo['ebay_tracknumber'] . " 新跟蹤號[{$tracknumber}]更新失敗<br>";
             return false;
         } else {
             $data['omOrderId'] = $omOrderId;
             $data['tracknumber'] = $tracknumber;
             $data['addUser'] = $_SESSION['sysUserId'];
             $data['createdTime'] = time();
             $msg = OrderRecordModel::insertOrderTrackRow($data);
             //echo $msg;
             if (!$msg) {
                 self::$errCode = "001";
                 self::$errMsg = "   第" . $row . "行訂單號[{$recordnumber}]添加跟蹤號[{$tracknumber}]失敗<br>";
                 return false;
             }
         }
         self::$errCode = "200";
         self::$errMsg = "獲取數據成功";
         return true;
         //失敗則設置錯誤碼和錯誤信息, 返回false
     } else {
         self::$errCode = "001";
         self::$errMsg = "   第" . $row . "行訂單號[{$recordnumber}]不是亞馬孫訂單或者不存在係統<br>";
         return false;
     }
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:44,代碼來源:omEUBTrackNumber.model.php

示例8: act_insertBlackList

 function act_insertBlackList($data, $table)
 {
     //表名,SET,WHERE
     $key = array();
     $value = array();
     foreach ($data as $k => $v) {
         $key[] = $k;
         $value[] = $v;
     }
     $set = " (" . implode(',', $key) . ") VALUE ('" . implode("','", $value) . "')";
     $ret = OmAvailableModel::addTNameRow($table, $set);
     if ($ret) {
         return true;
     } else {
         self::$errCode = OmAvailableModel::$errCode;
         self::$errMsg = OmAvailableModel::$errMsg;
         return false;
     }
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:19,代碼來源:omBlackList.action.php

示例9: act_pda_ExpressId

 /**
  * pda_ExpressWeighingAct::act_pda_ExpressId()
  * @author cxy
  * @return
  */
 public function act_pda_ExpressId()
 {
     $userId = $_SESSION['userId'];
     $ebay_id = trim($_POST['ebay_id']);
     if (empty($userId)) {
         self::$errCode = '0';
         self::$errMsg = '係統登錄超時,請先關閉瀏覽器 然後登錄掃描!!';
         return false;
     }
     if (empty($ebay_id)) {
         self::$errCode = 0;
         self::$errMsg = '請填寫單號!';
         return;
     }
     $where = "where id={$ebay_id}";
     $order = orderPartionModel::selectOrder($where);
     if (!$order) {
         self::$errCode = 0;
         self::$errMsg = $ebay_id . '發貨單不存在!';
         return false;
     }
     if ($order[0]['isExpressDelivery'] != 1) {
         self::$errCode = 0;
         self::$errMsg = $ebay_id . '此發貨單不是快遞發貨單!';
         return false;
     }
     if ($order[0]['orderStatus'] != PKS_WWEIGHING) {
         self::$errCode = 0;
         self::$errMsg = $ebay_id . '此發貨單狀態不是在待稱重狀態!';
         return false;
     }
     $result = OmAvailableModel::getTNameList("wh_shipping_order_note_record ", "content", "where shipOrderId='{$ebay_id}'  and is_delete =0 ");
     $note = $result[0]['content'];
     $res['content'] = $note;
     self::$errCode = 200;
     self::$errMsg = $ebay_id . "發貨單號正確,請填寫該發貨單的重量,注意填寫為的重量單位為KG!";
     return $res;
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:43,代碼來源:pda_ExpressWeighing.action.php

示例10: act_addAutoSpuForOld

 function act_addAutoSpuForOld()
 {
     $data = array();
     $data['spu'] = trim($_POST['spu']);
     $data['isSingSpu'] = trim($_POST['isSingSpu']);
     $data['createdTime'] = time();
     $data['purchaseId'] = $_SESSION['userId'];
     if (preg_match("/^[A-Z]{2}[0-9]{6}\$/", $data['spu'])) {
         $data['prefix'] = substr($data['spu'], 0, 2);
         $data['sort'] = intval(substr($data['spu'], 2));
     }
     //驗證spu是否已經存在
     if ($data['isSingSpu'] == 1) {
         $tName = 'pc_goods';
         $where = "WHERE spu='{$data['spu']}' and is_delete=0";
     } else {
         $tName = 'pc_goods_combine';
         $where = "WHERE combineSpu='{$data['spu']}' and is_delete=0";
     }
     $res = OmAvailableModel::getTNameCount($tName, $where);
     if (empty($res)) {
         self::$errCode = 03;
         self::$errMsg = "{$data['spu']} 不在係統中存在,請重新添加";
         return false;
     } else {
         $tName = 'pc_auto_create_spu';
         $where = "WHERE spu='{$data['spu']}'";
         $countSpu = OmAvailableModel::getTNameCount($tName, $where);
         if ($countSpu) {
             self::$errCode = 04;
             self::$errMsg = "{$data['spu']} 已經添加到自動生成SPU列表中";
             return false;
         }
         if (SpuModel::insertSkuRow($data)) {
             return true;
         } else {
             self::$errCode = 05;
             self::$errMsg = '添加失敗';
             return false;
         }
     }
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:42,代碼來源:spu.action.php

示例11: act_updateTNameRow

 function act_updateTNameRow()
 {
     $jsonArr = isset($_GET['jsonArr']) ? $_GET['jsonArr'] : '';
     //傳過來的base64編碼的json字符串
     if (empty($jsonArr)) {
         self::$errCode = 101;
         self::$errMsg = '參數數組為空';
         return false;
     }
     $jsonArr = json_decode(base64_decode($jsonArr), true);
     //對base64及json解碼
     if (!is_array($jsonArr)) {
         self::$errCode = 103;
         self::$errMsg = '參數數組不是數組格式';
         return false;
     }
     $tName = $jsonArr['tName'];
     //表名
     $set = $jsonArr['set'];
     //set,用關鍵字SET
     $where = $jsonArr['where'];
     //where,要帶上關鍵字WHERE
     if (empty($tName) || empty($set) || empty($where)) {
         self::$errCode = '300';
         self::$errMsg = '必要參數不完整';
         return false;
     }
     $affectRows = OmAvailableModel::updateTNameRow($tName, $set, $where);
     if ($affectRows !== FALSE) {
         self::$errCode = '200';
         self::$errMsg = '成功';
         return $affectRows;
     } else {
         self::$errCode = '404';
         self::$errMsg = '數據庫操作錯誤';
         return false;
     }
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:38,代碼來源:omAvailableApi.action.php

示例12: foreach

    $tName = 'pc_goods_combine';
    $select = 'combineSpu,combineUserId,addTime';
    $where = "WHERE is_delete=0 limit {$start},{$per}";
    $combineSpuList = OmAvailableModel::getTNameList($tName, $select, $where);
    foreach ($combineSpuList as $value) {
        $combineSpu = $value['combineSpu'];
        $combineUserId = $value['combineUserId'];
        $addTime = $value['addTime'];
        if (empty($combineSpu)) {
            continue;
        }
        $tName = 'pc_auto_create_spu';
        $where = "WHERE spu='{$combineSpu}'";
        $count1 = OmAvailableModel::getTNameCount($tName, $where);
        if (!$count1) {
            $dataAuto = array();
            $dataAuto['spu'] = $combineSpu;
            $dataAuto['purchaseId'] = $combineUserId;
            $dataAuto['createdTime'] = $addTime;
            $dataAuto['status'] = 2;
            $dataAuto['isSingSpu'] = 2;
            if (strpos($combineSpu, 'CB') === 0) {
                $dataAuto['prefix'] = 'CB';
            }
            OmAvailableModel::addTNameRow2arr($tName, $dataAuto);
            echo "{$combineSpu} insert autoCreateSpu success\n";
        } else {
            echo "{$combineSpu} has exist autoCreateSpu\n";
        }
    }
}
開發者ID:ohjack,項目名稱:newErp,代碼行數:31,代碼來源:addAutoCreateSpuForCombineSpu.php

示例13: act_getSkuId

 function act_getSkuId($sku)
 {
     $field = ' id ';
     $where = " where sku = '{$sku}' limit 0,1 ";
     $result = OmAvailableModel::getTNameList('ph_goods', $field, $where);
     return $result[0]['id'];
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:7,代碼來源:goods.action.php

示例14: act_pcForMQByZqt

 /**
  *功能:我自己運行的接口,自由發送mq隊列
  * */
 public function act_pcForMQByZqt()
 {
     $tName = 'pc_goods';
     $where = "WHERE is_delete=0 and id in(87276,87277,87278,87279)";
     OmAvailableModel::deleteTNameRow($tName, $where);
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:9,代碼來源:omAvailableApi.action.php

示例15: session_start

session_start();
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set("Asia/Shanghai");
session_cache_expire(30);
//session有效時間為30分鍾
$tName = 'purchase_sku_conversion';
$select = '*';
$where = "WHERE 1=1";
$purchaseSkuConvertionList = OmAvailableModel::getTNameList($tName, $select, $where);
if (!empty($purchaseSkuConvertionList)) {
    $tName = 'pc_sku_conversion';
    $where = "WHERE 1=1";
    OmAvailableModel::deleteTNameRow($tName, $where);
}
foreach ($purchaseSkuConvertionList as $value) {
    $id = $value['id'];
    $old_sku = $value['old_sku'];
    $new_sku = $value['new_sku'];
    $user = $value['user'];
    $createdtime = $value['createdtime'];
    $modifiedtime = $value['modifiedtime'];
    $dataConvertion = array();
    $dataConvertion['id'] = $id;
    $dataConvertion['old_sku'] = $old_sku;
    $dataConvertion['new_sku'] = $new_sku;
    $dataConvertion['addUserId'] = getPersonIdByName($user);
    $dataConvertion['createdTime'] = strtotime($createdtime);
    $dataConvertion['modifiedUserId'] = getPersonIdByName($user);
    $dataConvertion['modifiedTime'] = strtotime($modifiedtime);
    OmAvailableModel::addTNameRow2arr($tName, $dataConvertion);
}
開發者ID:ohjack,項目名稱:newErp,代碼行數:31,代碼來源:getLocationSkuConvertionToPcSkuConvertion.php


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