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


PHP OmAvailableModel::getAllPersonIdByDeptId方法代码示例

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


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

示例1: view_getSpuArchiveList

 public function view_getSpuArchiveList()
 {
     $omAvailableAct = new OmAvailableAct();
     $status = isset($_GET['status']) ? post_check($_GET['status']) : '';
     $spu = isset($_GET['spu']) ? post_check($_GET['spu']) : '';
     $auditStatus = isset($_GET['auditStatus']) ? $_GET['auditStatus'] : '';
     $spuStatus = isset($_GET['spuStatus']) ? $_GET['spuStatus'] : '';
     $purchaseId = isset($_GET['purchaseId']) ? $_GET['purchaseId'] : '';
     $isPPVRecord = isset($_GET['isPPVRecord']) ? $_GET['isPPVRecord'] : '';
     //有无属性记录搜索
     $haveSizePPV = isset($_GET['haveSizePPV']) ? $_GET['haveSizePPV'] : '';
     //是否有尺码属性值记录
     $isMeasureRecord = isset($_GET['isMeasureRecord']) ? $_GET['isMeasureRecord'] : '';
     //有无尺寸测量记录搜索
     $pid = isset($_GET['pid']) ? $_GET['pid'] : '';
     $dept = isset($_GET['dept']) ? $_GET['dept'] : '';
     $startdate = isset($_GET['startdate']) ? $_GET['startdate'] : '';
     $enddate = isset($_GET['enddate']) ? $_GET['enddate'] : '';
     $tName = 'pc_spu_archive';
     $select = '*';
     $where = 'WHERE is_delete=0 ';
     if (!empty($spu)) {
         $where .= "AND spu='{$spu}' ";
     }
     if (!empty($auditStatus)) {
         $where .= "AND auditStatus='{$auditStatus}' ";
     }
     if (!empty($spuStatus)) {
         if (isAccessAll('autoCreateSpu', 'auditSpuArchive')) {
             //如果有审核权限的人,则可以看到所有状态的人员的记录
             $where .= "AND spuStatus='{$spuStatus}' ";
         } else {
             //如果没有审核权限的人,只能看到自己对应所在状态的记录
             $where .= "AND spuStatus='{$spuStatus}' AND purchaseId='{$_SESSION['userId']}' ";
         }
     }
     if (!empty($pid)) {
         $where .= "AND categoryPath REGEXP '^{$pid}(-[0-9]+)*\$' ";
     }
     if (intval($purchaseId) != 0) {
         $where .= "AND purchaseId='{$purchaseId}' ";
     }
     if (intval($isPPVRecord) != 0) {
         $spuList = getSpuPPV();
         if (!empty($spuList)) {
             $tmpArr = array();
             foreach ($spuList as $value) {
                 $tmpArr[] = "'" . $value['spu'] . "'";
             }
             $tmpStr = implode(',', $tmpArr);
             if ($isPPVRecord == 1) {
                 //无记录
                 $where .= "AND spu not in({$tmpStr}) ";
             } elseif ($isPPVRecord == 2) {
                 //有记录
                 $where .= "AND spu in({$tmpStr}) ";
             }
         }
     }
     if (intval($haveSizePPV) != 0) {
         $spuList = getSpuListByPropertyName('尺码');
         //获取具有尺码属性关联的spuList
         if (!empty($spuList)) {
             $tmpArr = array();
             foreach ($spuList as $value) {
                 $tmpArr[] = "'" . $value['spu'] . "'";
             }
             $tmpStr = implode(',', $tmpArr);
             if ($haveSizePPV == 1) {
                 //无记录
                 $where .= "AND spu not in({$tmpStr}) ";
             } elseif ($haveSizePPV == 2) {
                 //有记录
                 $where .= "AND spu in({$tmpStr}) ";
             }
         }
     }
     if (intval($isMeasureRecord) != 0) {
         $spuList = OmAvailableModel::getTNameList('pc_archive_spu_input_size_measure', 'spu', 'group by spu');
         if (!empty($spuList)) {
             $tmpArr = array();
             foreach ($spuList as $value) {
                 $tmpArr[] = "'" . $value['spu'] . "'";
             }
             $tmpStr = implode(',', $tmpArr);
             if ($isMeasureRecord == 1) {
                 //无记录
                 $where .= "AND spu not in({$tmpStr}) ";
             } elseif ($isMeasureRecord == 2) {
                 //有记录
                 $where .= "AND spu in({$tmpStr}) ";
             }
         }
     }
     $dept = intval($dept);
     $spuArchiveDepArr = getSpuArchiveDetArr();
     if (array_key_exists($dept, $spuArchiveDepArr)) {
         //检查要所搜的部门是否包含在定义内
         $personIdArr = OmAvailableModel::getAllPersonIdByDeptId($dept);
         //每个销售部下面的人员id的arr
//.........这里部分代码省略.........
开发者ID:ohjack,项目名称:newErp,代码行数:101,代码来源:autoCreateSpu.view.php


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