本文整理匯總了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
//.........這裏部分代碼省略.........