当前位置: 首页>>代码示例>>PHP>>正文


PHP CSaleOrder::PrepareGetListArray方法代码示例

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


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

示例1: GetList


//.........这里部分代码省略.........
         $val = $arFilter["DATE_PAY_BEFORE_TO"];
         unset($arFilter["DATE_PAY_BEFORE_TO"]);
         $arFilter["<=DATE_PAY_BEFORE"] = $val;
     }
     if (array_key_exists("DELIVERY_REQUEST_SENT", $arFilter)) {
         if ($arFilter["DELIVERY_REQUEST_SENT"] == "Y") {
             $arFilter["!DELIVERY_DATE_REQUEST"] = "";
         } else {
             $arFilter["+DELIVERY_DATE_REQUEST"] = "";
         }
         unset($arFilter["DELIVERY_REQUEST_SENT"]);
     }
     $callback = false;
     if (array_key_exists("CUSTOM_SUBQUERY", $arFilter)) {
         $callback = $arFilter["CUSTOM_SUBQUERY"];
         unset($arFilter["CUSTOM_SUBQUERY"]);
     }
     if (empty($arSelectFields)) {
         $arSelectFields = array("ID", "LID", "PERSON_TYPE_ID", "PAYED", "DATE_PAYED", "EMP_PAYED_ID", "CANCELED", "DATE_CANCELED", "EMP_CANCELED_ID", "REASON_CANCELED", "MARKED", "DATE_MARKED", "EMP_MARKED_ID", "REASON_MARKED", "STATUS_ID", "DATE ... //#注:代码行过长, 已省略后续字符...
     } elseif (in_array("*", $arSelectFields)) {
         $arSelectFields = array("ID", "LID", "PERSON_TYPE_ID", "PAYED", "DATE_PAYED", "EMP_PAYED_ID", "CANCELED", "DATE_CANCELED", "EMP_CANCELED_ID", "REASON_CANCELED", "MARKED", "DATE_MARKED", "EMP_MARKED_ID", "REASON_MARKED", "STATUS_ID", "DATE ... //#注:代码行过长, 已省略后续字符...
     }
     $maxLock = IntVal(COption::GetOptionString("sale", "MAX_LOCK_TIME", "60"));
     if (is_object($GLOBALS["USER"])) {
         $userID = IntVal($GLOBALS["USER"]->GetID());
     } else {
         $userID = 0;
     }
     // FIELDS -->
     $arFields = array("ID" => array("FIELD" => "O.ID", "TYPE" => "int"), "LID" => array("FIELD" => "O.LID", "TYPE" => "string"), "PERSON_TYPE_ID" => array("FIELD" => "O.PERSON_TYPE_ID", "TYPE" => "int"), "PAYED" => array("FIELD" => "O.PAYED", "TY ... //#注:代码行过长, 已省略后续字符...
     // <-- FIELDS
     $arPropIDsTmp = array();
     foreach ($arOrder as $key => $value) {
         CSaleOrder::PrepareGetListArray($key, $arFields, $arPropIDsTmp);
     }
     foreach ($arFilter as $key => $value) {
         $arKeyTmp = CSaleOrder::GetFilterOperation($key);
         $key = $arKeyTmp["FIELD"];
         CSaleOrder::PrepareGetListArray($key, $arFields, $arPropIDsTmp);
     }
     if (is_array($arGroupBy)) {
         foreach ($arGroupBy as $key => $value) {
             CSaleOrder::PrepareGetListArray($key, $arFields, $arPropIDsTmp);
         }
     }
     foreach ($arSelectFields as $key => $value) {
         CSaleOrder::PrepareGetListArray($key, $arFields, $arPropIDsTmp);
     }
     $arSqls = CSaleOrder::PrepareSql($arFields, $arOrder, $arFilter, $arGroupBy, $arSelectFields, $obUserFieldsSql, $callback, $arOptions);
     $arSqls["SELECT"] = str_replace("%%_DISTINCT_%%", "", $arSqls["SELECT"]);
     $r = $obUserFieldsSql->GetFilter();
     $strSqlUFFilter = '';
     if (strlen($r) > 0) {
         $strSqlUFFilter = " (" . $r . ") ";
     }
     if (is_array($arGroupBy) && count($arGroupBy) == 0) {
         $strSql = "SELECT " . $arSqls["SELECT"] . " " . $obUserFieldsSql->GetSelect() . " " . "FROM b_sale_order O " . "\t" . $arSqls["FROM"] . " " . $obUserFieldsSql->GetJoin("O.ID") . " ";
         if (strlen($arSqls["WHERE"]) > 0) {
             $strSql .= "WHERE " . $arSqls["WHERE"] . " ";
         }
         if (strlen($arSqls["WHERE"]) > 0 && strlen($strSqlUFFilter) > 0) {
             $strSql .= " AND " . $strSqlUFFilter . " ";
         } elseif (strlen($arSqls["WHERE"]) <= 0 && strlen($strSqlUFFilter) > 0) {
             $strSql .= " WHERE " . $strSqlUFFilter . " ";
         }
         if (strlen($arSqls["GROUPBY"]) > 0) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:67,代码来源:order.php


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