public function handle_request_internal()
 {
     if (Bll_City::isNewCommunityApplyCity(static::$intBrokerCityID)) {
         $this->redirect('/ajkbroker/broker/applygardener2/?from=old_request');
     }
     $params = $this->getParameters();
     $page = isset($params['p']) ? max(1, $params['p']) : 1;
     $houseCommunityInfo = Bll_Community_CommunityGardener::getBrokerOnlineHouseCommunityInfo(static::$intBrokerID, static::$intBrokerCityID, array('commId', 'commName', 'showDay', 'showDate'));
     $communityIds = $this->getCommunityIdFromHouseInfo($houseCommunityInfo);
     $communityInfoList = array();
     foreach ($communityIds as $communityId) {
         $communityInfo = Bll_Community_CommunityGardener::getCommunityDetail($communityId);
         /** 过滤掉隐藏小区 */
         if ($communityInfo['baseInfo']['typeFlag'] == 0) {
             continue;
         }
         $communityInfoList[] = $communityInfo;
     }
     /** 移除完善小区 */
     $canApplyCommunityList = $this->removeCompleteCommunity($communityInfoList);
     if (!empty($canApplyCommunityList)) {
         $communityCount = count($canApplyCommunityList);
         /** 如果当前页大于最大页数,则跳转至第一页 */
         if ($page > ceil($communityCount / self::PAGE_SIZE)) {
             $this->redirect(BASE_URI . '/broker/applygardener/');
         }
         $communityList = array_slice($canApplyCommunityList, ($page - 1) * self::PAGE_SIZE, self::PAGE_SIZE);
         $communityIds = $this->getCommunityIdFromCommunityInfo($communityList);
         /** 获取小区的小区园丁状态 */
         $communityStateInfoList = Bll_Community_CommunityGardener::getMultiCommunityApplyInfo($communityIds);
         /** 转换小区园丁的列表为以小区ID为key */
         $communityStateInfoList = $this->changeCommunityStateInfoList2CommunityId($communityStateInfoList);
         /** TODO 拼接小区申请额外信息 */
         $canApplyCommunityStateList = $this->initCommunityGardenerStateInfo($communityList, $communityStateInfoList, static::$intBrokerID);
         if (!empty($canApplyCommunityStateList['gardenerIds'])) {
             $gardenerInfoList = Bll_Community_CommunityGardener::getMultiBrokerInfo($canApplyCommunityStateList['gardenerIds'], array('brokerId', 'trueName'));
             $this->setAttribute("gardenerInfos", $gardenerInfoList);
         }
         /** 分页信息 */
         $multiPageShow = false;
         if ($communityCount > self::PAGE_SIZE) {
             $multiPage = $this->getMultiPage(array('p' => $page), $communityCount, self::PAGE_COUNT, self::PAGE_SIZE);
             $multiPageShow = true;
             $this->setAttribute("multipage", $multiPage);
         }
         $this->setAttribute("commCount", $communityCount);
         $this->setAttribute("BrokerId", static::$intBrokerID);
         $this->setAttribute("multipageShow", $multiPageShow);
         $this->setAttribute("onlineCommInfos", $canApplyCommunityStateList['communityList']);
     }
     return 'Broker_CommunityApplyGardeners';
 }