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


PHP CommonModel::check_sku方法代碼示例

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


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

示例1: auto_contrast_intercept


//.........這裏部分代碼省略.........
         				} else {
         					 usCalcShipCost($ebay_id);
         				}
         			}*/
         //$calcWeight = recalcorderweight($order_sn, $ebay_packingmaterial); //modified by Herman.Xi 2012-10-17
         $log_data .= "[" . date("Y-m-d H:i:s") . "]\t包含海外倉料號---自動跳轉---的狀態為---{$final_status}!\n\n";
         CommonModel::write_scripts_log('auto_contrast_intercept', $GLOBAL_EBAY_ACCOUNT[$accountId], $log_data);
         return $orderData;
         //continue;
     }
     $interceptrtn = self::intercept_exception_orders($orderData);
     //var_dump($interceptrtn);
     if ($interceptrtn) {
         $orderData['orderData']['orderStatus'] = $interceptrtn['orderStatus'];
         $orderData['orderData']['orderType'] = $interceptrtn['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);
         return $orderData;
     }
     $record_details = array();
     $is_640 = false;
     //var_dump($orderdetaillist); exit;
     foreach ($orderdetaillist as $orderdetail) {
         //var_dump($orderdetail['sku']);
         $sku = $orderdetail['orderDetailData']['sku'];
         //$itemPrice = $orderdetail['orderDetailData']['itemPrice'];
         $amount = $orderdetail['orderDetailData']['amount'];
         //$shippingFee = $orderdetail['orderDetailData']['shippingFee'];
         $sku_arr = GoodsModel::get_realskuinfo($sku);
         //var_dump($sku_arr); exit;
         $hava_goodscount = true;
         foreach ($sku_arr as $or_sku => $or_nums) {
             $allnums = $or_nums * $amount;
             if (!CommonModel::check_sku($or_sku, $allnums)) {
                 //超大訂單狀態
                 $orderStatus = C('STATEOVERSIZEDORDERS');
                 if (in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['aliexpress']) || in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['DHgate']) || in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['出口通']) || in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['線下結算客戶'])) {
                     $orderType = C('STATEOVERSIZEDORDERS_CONFIRM');
                 } else {
                     $orderType = C('STATEOVERSIZEDORDERS_PEND');
                 }
                 //self::insert_mark_shipping($ebay_id);
                 $is_640 = true;
                 break;
             } else {
                 $skuinfo = CommonModel::get_sku_info($or_sku);
                 $salensend = CommonModel::getpartsaleandnosendall($or_sku);
                 //$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 - $allnums < 0) {
                     $hava_goodscount = false;
                     break;
                 }
             }
         }
         if ($hava_goodscount) {
             $record_details[] = $orderdetail;
         }
     }
     if ($is_640) {
         $orderData['orderData']['orderStatus'] = $orderStatus;
         $orderData['orderData']['orderType'] = $orderType;
         //$returnStatus = 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);
         return $orderData;
開發者ID:ohjack,項目名稱:newErp,代碼行數:67,代碼來源:cndl.model.php

示例2: auto_contrast_intercept


//.........這裏部分代碼省略.........
             $orderData['orderData']['orderStatus'] = 911;
             $orderData['orderData']['orderType'] = 115;
         }
         $orderStatus = empty($orderData['orderData']['orderStatus']) ? C('STATEPENDING') : $orderData['orderData']['orderStatus'];
         $orderType = empty($orderData['orderData']['orderType']) ? C('STATEPENDING_CONV') : $orderData['orderData']['orderType'];
         $log_data .= "[" . date("Y-m-d H:i:s") . "]\t包含海外倉料號---自動跳轉---的狀態為---{$final_status}!\n\n";
         CommonModel::write_scripts_log('auto_contrast_intercept', $GLOBAL_EBAY_ACCOUNT[$accountId], $log_data);
         return $orderData;
         //continue;
     }
     $interceptrtn = self::intercept_exception_orders($orderData);
     //var_dump($interceptrtn);
     if ($interceptrtn) {
         $orderData['orderData']['orderStatus'] = $interceptrtn['orderStatus'];
         $orderData['orderData']['orderType'] = $interceptrtn['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);
         return $orderData;
     }
     $record_details = array();
     $is_640 = false;
     //var_dump($orderdetaillist); exit;
     foreach ($orderdetaillist as $orderdetail) {
         //var_dump($orderdetail['sku']);
         $sku = $orderdetail['orderDetailData']['sku'];
         //$itemPrice = $orderdetail['orderDetailData']['itemPrice'];
         $amount = $orderdetail['orderDetailData']['amount'];
         //$shippingFee = $orderdetail['orderDetailData']['shippingFee'];
         $sku_arr = GoodsModel::get_realskuinfo($sku);
         //var_dump($sku_arr); exit;
         $hava_goodscount = true;
         foreach ($sku_arr as $or_sku => $or_nums) {
             $allnums = $or_nums * $amount;
             if (!CommonModel::check_sku($or_sku, $allnums)) {
                 //超大訂單狀態
                 $orderStatus = C('STATEOVERSIZEDORDERS');
                 if (in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['aliexpress']) || in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['DHgate']) || in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['出口通']) || in_array($GLOBAL_EBAY_ACCOUNT[$accountId], $SYSTEM_ACCOUNTS['線下結算客戶'])) {
                     $orderType = C('STATEOVERSIZEDORDERS_CONFIRM');
                 } else {
                     $orderType = C('STATEOVERSIZEDORDERS_PEND');
                 }
                 //self::insert_mark_shipping($ebay_id);
                 $is_640 = true;
                 break;
             } else {
                 $skuinfo = CommonModel::get_sku_info($or_sku);
                 $salensend = CommonModel::getpartsaleandnosendall($or_sku);
                 //$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 - $allnums < 0) {
                     $hava_goodscount = false;
                     break;
                 }
             }
         }
         if ($hava_goodscount) {
             $record_details[] = $orderdetail;
         }
     }
     if ($is_640) {
         $orderData['orderData']['orderStatus'] = $orderStatus;
         $orderData['orderData']['orderType'] = $orderType;
         //$returnStatus = 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);
         return $orderData;
開發者ID:ohjack,項目名稱:newErp,代碼行數:67,代碼來源:auto.model.php


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