public function closeService($request, $response)
 {
     /*{{{*/
     $options = array('phoneOpened' => $request->isOpen);
     $telOwner = DAL::get()->find_by_relatedObject('telowner', $this->space->user);
     $contract = DAL::get()->find_valid_tel_contract('contract', $this->space);
     ContractClient::getInstance()->invalidContract($contract);
     TelOwnerClient::getInstance()->modifySpaceExtCloseTime4tel($telOwner->id, XDateTime::now());
     $response->telOwner = $telOwner;
 }
Ejemplo n.º 2
0
 public function showAnnounceList($request, $response)
 {
     /*{{{*/
     $this->_showAnnounceList($request, $response);
     $response->title = '医生自定义信息列表';
     $response->bookingContractsList = ContractClient::getInstance()->getListBySpaceIdsAndType(array_keys($response->spaceList), ServiceDef::TYPE_BOOKING);
 }
 public function showDoctorCancelList($request, $response)
 {
     $spaceName = mb_convert_encoding($request->spaceName, 'gbk', 'auto');
     $dateTime = $request->dateTime;
     $doctorCancelList = array();
     if (false == empty($dateTime)) {
         $doctorCancelList = ContractClient::getInstance()->searchInvalidLogByCtime($dateTime);
     } else {
         if (false == empty($spaceName)) {
             $spaceIds = DAL::get()->find_id_by_name('space', $spaceName);
             if (false == empty($spaceIds)) {
                 $doctorCancelList = ContractClient::getInstance()->searchInvalidLogByDoctor($spaceIds);
             }
         }
     }
     $response->spaceName = $spaceName;
     $response->dateTime = $dateTime;
     $response->doctorCancelList = $doctorCancelList;
 }
Ejemplo n.º 4
0
    public function invalidContract($request, $response)
    {/*{{{*/
        $id = $request->id;
        $contract = DAL::get()->find('contract', $id);
        $operatorUser = $this->curUser;
        $contract = ContractClient::getInstance()->invalidContract($contract);
        ContractClient::getInstance()->invalidContractLog($contract, $operatorUser);

        $response->setRedirect($response->router->urlfor('account/contractdetail?id='.$contract->id));
    }/*}}}*/