本文整理汇总了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;
}
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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");
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
}
}
示例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;
}
}
示例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";
}
}
}
示例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'];
}
示例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);
}
示例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);
}