Exemplo n.º 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';
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 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);
     }
     //        echo "<pre>";print_r($brokerInfo);exit;
     //
     //        $bnsCardFile = 'b';
     //        $setBizCard = Bll_BrokerBaseBll::setBizCard($brokerId, $brokerInfo->cityId, $brokerInfo->areaCode, $brokerInfo->userMobile,
     //            '', $bnsCardFile, $brokerInfo->companyId, $brokerInfo->cstBrokerCompanyId);
     //
     //        $res = $this->verifyBizCard($brokerId, 1, '123');
     $bnsCardState = $brokerInfo->bnsCardState;
     $bnsCardFile = $brokerInfo->bnsCardFile;
     $bnsCardStatus = 0;
     $bigImageUrl = '';
     $smallImageUrl = '';
     $failedReason = '';
     //获得最后提交资料
     $lastupdata = Bll_BrokerBaseBll::get_instance()->getLastPostBnsCardFile($brokerId);
     //使用model
     $isPass = $lastupdata['IsPass'];
     $FileName = $lastupdata['FileName'];
     if (empty($lastupdata)) {
         //没认证
         $bnsCardStatus = 0;
         $bigImageUrl = '';
         $smallImageUrl = '';
     } else {
         if ($brokerInfo->checkState == 0) {
             switch ($bnsCardState) {
                 case 1:
                     //认证中 $bnsCardFile
                     $bnsCardStatus = 2;
                     break;
                 case 2:
                     //已认证 $bnsCardFile
                     $bnsCardStatus = 1;
                     break;
                 case 3:
                     //认证失败 $bnsCardFile
                     $bnsCardStatus = 3;
                     break;
             }
             $bigImageUrl = Util_DisplayImages::get_img_url($bnsCardFile, -1, '1200x750');
             $smallImageUrl = Util_DisplayImages::get_img_url($bnsCardFile, -1, '1000x625');
         } elseif ($brokerInfo->checkState == 1) {
             if ($isPass == 0) {
                 //认证中 FileName
                 $bnsCardStatus = 2;
             } elseif ($isPass == 1) {
                 //已认证 FileNam
                 $bnsCardStatus = 1;
             } elseif ($isPass == 2) {
                 //认证失败 FileName
                 $bnsCardStatus = 3;
                 $brokerCheckInfoBll = new Bll_Broker_BrokerCheckInfo();
                 $brokerTheLastCheckInfo = $brokerCheckInfoBll->getBrokerTheLastCheckInfo($brokerId, 2);
                 $failedReason = $brokerTheLastCheckInfo['content'];
             }
             $bigImageUrl = Util_DisplayImages::get_img_url($FileName, -1, '1200x750');
             $smallImageUrl = Util_DisplayImages::get_img_url($FileName, -1, '1000x625');
         }
     }
     return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('status' => $bnsCardStatus, 'bigImageUrl' => $bigImageUrl, 'smallImageUrl' => $smallImageUrl, 'failedReason' => $failedReason));
 }