private function setIntentionTitle() {/*{{{*/ $bindBingLiDtos = AskSessionInfo::getBindDtos(); if (empty($bindBingLiDtos)) { return false; } $diseases = array(); foreach($bindBingLiDtos as $dto) { if($dto instanceof BingLiDto::$bingLiDtoClasses[BingLiDto::NODE_DEFINE_DISEASE]) { $diseases[] = $dto->diseaseName; } } if (empty($diseases)) { return false; } $title = XString::truncate(implode('_', $diseases), '25'); AskSessionInfo::addThreadTitle($title, false); return true; }/*}}}*/
/** * askPost * * @param mixed $request * @param mixed $response * @access public * @return void */ public function askPost($request, $response) {/*{{{*/ AskSessionInfo::checkBindDtos(); $askSpace = AskSessionInfo::getBindSpace(); $patient = AskSessionInfo::getBindPatient(); if($patient->isNull()) { $response->setRedirect($response->router->urlfor('newcase/askindex')); return false; } $bindBingLiDtos = AskSessionInfo::getBindDtos(); if (empty($bindBingLiDtos)) { $response->setRedirect($response->router->urlfor('newcase/askindex')); return false; } if(false == $askSpace->isNull()) { $product = ProductClient::getInstance()->getFirstFlowProduct($askSpace); } else { $product = FirstFlowPoolVirtualProduct::fetch(); // $product = new FirstFlowPoolVirtualProduct(); } $intention = IntentionClient::getInstance()->createWithProduct($patient, $product, Intention::SRC_WEB, $bindBingLiDtos); if(false == $intention->isNull()) { AskSessionInfo::session_destroy(); $response->setRedirect($response->router->urlfor('newcase/asksuccess', array('id'=>$intention->id))); } else { $this->message('提交医疗请求出错,请重试', $response); } }/*}}}*/