/** * 判断小区是否是完善小区 * * @param array $communityList * @return array */ public function removeCompleteCommunity($communityList) { if (!is_array($communityList) || empty($communityList)) { return array(); } $canApplyCommunity = array(); foreach ($communityList as $communityInfo) { if (!Bll_Community_CommunityGardener::checkCommunityIsComplete($communityInfo)) { $canApplyCommunity[] = $communityInfo; } } return $canApplyCommunity; }
public function handle_request_internal() { $this->communityId = $this->getCommunityId(); $this->setAttribute('show_searchbar', false); /** 判断小区地图是都已经锁定 */ $this->isLockMap = Bll_Community_CommunityGardener::checkCommunityMapIsLock($this->communityId); $this->setAttribute('isLockMap', $this->isLockMap); /** 获取小区当前的图片数量 */ $this->communityImageCount = self::COMMUNITY_PHOTO_COUNT - intval(Model_Community_Attachment::getCommunityPictureCount($this->communityId)); $this->setAttribute('brokerShouldUploadPhotoCount', $this->communityImageCount); /** 获取小区详细信息 */ $this->communityInfo = Bll_Community_CommunityGardener::getCommunityDetail($this->communityId); /** 如果是隐藏小区,那么就直接跳转到小区详情页 */ $this->isHiddenCommunity($this->communityInfo); $communityWikiInfo = Bll_Community_CommunityGardener::getCommunityWikiInfo($this->communityId); if (!empty($communityWikiInfo)) { $this->baseInfoIsLocked = true; for ($fieldIndex = 2; $fieldIndex < 15; $fieldIndex++) { if (!isset($communityWikiInfo[$fieldIndex]) || $communityWikiInfo[$fieldIndex] == 1) { $this->baseInfoIsLocked = false; break; } } } $this->setAttribute('baseInfoIsLocked', $this->baseInfoIsLocked); /** TODO 判断是否是完善小区 */ if (Bll_Community_CommunityGardener::checkCommunityIsComplete($this->communityInfo)) { $this->setAttribute('isOk', 3); return 'Community_Gardener_PhotoCommitOk'; } /** 验证码 */ $this->verifyCode = Bll_Community_CommunityGardener::getVerifyCode($this->communityId, static::$intBrokerID); $this->setAttribute('verify', $this->verifyCode); /** TODO 判断小区园丁申请是否有效 */ if (!$this->checkApplyIsValid($this->communityId, static::$intBrokerID, $this->getParameter('verify'))) { $this->setAttribute('isOk', 2); return 'Community_Gardener_PhotoCommitOk'; } /** TODO 过滤小区信息 */ /** TODO 初始化小区信息 */ $this->setAttributes($this->communityInfo); $this->setAttribute('commId', $this->communityId); return $this->handle_request_abs(); }