示例#1
0
 public function handle_request_internal()
 {
     $request = APF::get_instance()->get_request();
     $broker = self::$BrokerInfo;
     $brokerIdentity = Bll_BrokerBaseBll::get_instance()->get_broker_identity_info_v2($broker['BaseInfo']['brokerId']);
     if (empty($broker['BaseInfo']) || empty($brokerIdentity)) {
         apf_require_class("Uri_Http");
         //Uri_Http::redirect_header("/user/broker/new/brokerinfo/");
         Uri_Http::redirect_header("/ajkbroker/broker/modify/brokerinfo/");
     }
     $broker['UsrCardState'] = $brokerIdentity['IdentityInfo']['usrCardState'];
     $broker['UsrPhotoTmpState'] = $brokerIdentity['IdentityInfo']['userPhotoTmpState'];
     $broker['UsrPhotoState'] = $brokerIdentity['IdentityInfo']['userPhotoState'];
     $broker['BnsCardState'] = $brokerIdentity['IdentityInfo']['bnsCardState'];
     $broker['CheckState'] = $brokerIdentity['IdentityInfo']['checkState'];
     //        $area = $this->getBlockName(substr($broker['BaseInfo']['areaCode'], 4, 4));
     //        $block = $this->getBlockName(substr($broker['BaseInfo']['areaCode'], 8, 4));
     $area = Bll_Commtype_Api::getInfoByTypeCodeV2(substr($broker['BaseInfo']['areaCode'], 0, 8));
     $block = Bll_Commtype_Api::getInfoByTypeCodeV2($broker['BaseInfo']['areaCode']);
     $broker['CityName'] = $this->getCityName($broker['BaseInfo']['cityId']);
     $broker['AreaName'] = $area['typeName'];
     $broker['BlockName'] = $block['typeName'];
     //获得最后提交资料
     $lastupdata = Bll_BrokerBaseBll::get_instance()->getLastPostFile($broker['BaseInfo']['brokerId']);
     $brokerCheckInfoBll = new Bll_Broker_BrokerCheckInfo();
     //获取经纪人最近一次头像或名片审核不通过的原因记录
     if ($broker['UsrPhotoState'] == 2) {
         $brokerTheLastCheck = $brokerCheckInfoBll->getBrokerTheLastCheckInfo($broker['BaseInfo']['brokerId'], 1);
         $faceLastCheckInfo = $brokerTheLastCheck['content'];
     } else {
         $faceLastCheckInfo = $brokerCheckInfoBll->getNoPassExp($broker['BaseInfo']['brokerId'], 1);
         //1图像
     }
     $brokerTheLastCheckInfo = $brokerCheckInfoBll->getBrokerTheLastCheckInfo($broker['BaseInfo']['brokerId'], 2);
     //名片
     $mingpianLastCheckInfo = $brokerCheckInfoBll->getNoPassExp($broker['BaseInfo']['brokerId'], 3);
     //名片
     $idCardLastCheckInfo = $brokerCheckInfoBll->getNoPassExp($broker['BrokerId'], 2);
     //电话锁定状态
     $phoneLockInfo = $brokerCheckInfoBll->getLockStatus($broker['BaseInfo']['brokerId']);
     if ($phoneLockInfo['company_id'] == $broker['BaseInfo']['companyId'] && $phoneLockInfo['status'] == 1) {
         $phoneLockStatus = 1;
     } else {
         $phoneLockStatus = 0;
     }
     $request->set_attribute('broker', $broker);
     $request->set_attribute('lastupdata', $lastupdata);
     $request->set_attribute('faceLastCheckInfo', $faceLastCheckInfo);
     $request->set_attribute('mingpianLastCheckInfo', $mingpianLastCheckInfo);
     $request->set_attribute('phoneLockStatus', $phoneLockStatus);
     $request->set_attribute('idCardLastCheckInfo', $idCardLastCheckInfo);
     $request->set_attribute('brokerTheLastCheckInfo', $brokerTheLastCheckInfo);
     return 'Broker_BrokerInfo';
 }
 public function handle_request_internal()
 {
     $brokerId = $this->_params['brokerId'];
     $brokerInfo = Model_Broker_AjkBrokerExtend::findWithBrokerId($brokerId);
     if (!$brokerInfo) {
         throw new Exception_BrokerNotFoundException('经纪人不存在', Const_APIStatus::E_BROKER_NOT_EXISTS);
     }
     $usrPhotoState = $brokerInfo->usrPhotoState;
     $usrPhotoTmpState = $brokerInfo->usrPhotoTmpState;
     $userPhotoTmp = $brokerInfo->userPhotoTmp;
     $userPhoto = $brokerInfo->userPhoto;
     $photoStaus = 0;
     $smallImageUrl = '';
     $bigImageUrl = '';
     $failedReason = '';
     if ($usrPhotoState == 2 || $usrPhotoTmpState == 1) {
         $photoStaus = 1;
         //已认证
         $smallImageUrl = Util_DisplayImages::get_img_url($userPhoto, -1, '600x798');
         $bigImageUrl = Util_DisplayImages::get_img_url($userPhoto, -1, '1200x1596');
     } elseif ($usrPhotoState == 0 && empty($userPhoto) && empty($userPhotoTmp)) {
         $photoStaus = 0;
         //未认证
         $smallImageUrl = '';
         $bigImageUrl = '';
     } elseif ($usrPhotoState == 1 || $usrPhotoTmpState == 0 && !empty($userPhotoTmp)) {
         $photoStaus = 2;
         //认证中
         $smallImageUrl = $usrPhotoState == 1 ? Util_DisplayImages::get_img_url($userPhoto, -1, '600x798') : Util_DisplayImages::get_img_url($userPhotoTmp, -1, '600x798');
         $bigImageUrl = $usrPhotoState == 1 ? Util_DisplayImages::get_img_url($userPhoto, -1, '1200x1596') : Util_DisplayImages::get_img_url($userPhotoTmp, -1, '1200x1596');
     } elseif ($usrPhotoState == 3 || $usrPhotoTmpState == 2) {
         $photoStaus = 3;
         //认证失败
         $smallImageUrl = $usrPhotoTmpState == 2 ? Util_DisplayImages::get_img_url($userPhotoTmp, -1, '600x798') : Util_DisplayImages::get_img_url($userPhoto, -1, '600x798');
         $bigImageUrl = $usrPhotoTmpState == 2 ? Util_DisplayImages::get_img_url($userPhotoTmp, -1, '1200x1596') : Util_DisplayImages::get_img_url($userPhoto, -1, '1200x1596');
         $brokerCheckInfoBll = new Bll_Broker_BrokerCheckInfo();
         if ($usrPhotoState == 2) {
             $brokerTheLastCheck = $brokerCheckInfoBll->getBrokerTheLastCheckInfo($brokerId, 1);
             $failedReason = $brokerTheLastCheck['content'];
         } else {
             $failedReason = $brokerCheckInfoBll->getNoPassExp($brokerId, 1);
             //1图像
         }
     }
     return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('status' => $photoStaus, 'bigImageUrl' => $bigImageUrl, 'smallImageUrl' => $smallImageUrl, 'failedReason' => $failedReason));
 }
 public function handle_request_internal()
 {
     $brokerId = $this->_params['brokerId'];
     $brokerInfo = Model_Broker_AjkBrokerExtend::findWithBrokerId($brokerId);
     if (!$brokerInfo) {
         throw new Exception_BrokerNotFoundException('经纪人不存在', Const_APIStatus::E_BROKER_NOT_EXISTS);
     }
     $usrCardState = $brokerInfo->usrCardState;
     $userCardFile = $brokerInfo->userCardFile;
     $userCard = $brokerInfo->userCard;
     $userCardStatus = 0;
     $bigImageUrl = '';
     $smallImageUrl = '';
     $failedReason = '';
     if ($usrCardState == 0 && empty($userCardFile)) {
         $userCardStatus = 0;
         //未认证
         $bigImageUrl = '';
         $smallImageUrl = '';
     } elseif ($usrCardState == 1) {
         $userCardStatus = 2;
         //认证中
         $bigImageUrl = Util_DisplayImages::get_img_url($userCardFile, -1, '1200x750');
         $smallImageUrl = Util_DisplayImages::get_img_url($userCardFile, -1, '1000x625');
     } elseif ($usrCardState == 2) {
         $userCardStatus = 1;
         //已认证
         $bigImageUrl = Util_DisplayImages::get_img_url($userCardFile, -1, '1200x750');
         $smallImageUrl = Util_DisplayImages::get_img_url($userCardFile, -1, '1000x625');
     } elseif ($usrCardState == 3) {
         $userCardStatus = 3;
         //认证失败
         $bigImageUrl = Util_DisplayImages::get_img_url($userCardFile, -1, '1200x750');
         $smallImageUrl = Util_DisplayImages::get_img_url($userCardFile, -1, '1000x625');
         $brokerCheckInfoBll = new Bll_Broker_BrokerCheckInfo();
         $failedReason = $brokerCheckInfoBll->getNoPassExp($brokerId, 2);
     }
     return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('status' => $userCardStatus, 'userCard' => $userCard, 'bigImageUrl' => $bigImageUrl, 'smallImageUrl' => $smallImageUrl, 'failedReason' => $failedReason));
 }