public function offline($request, $response)
 {
     /*{{{*/
     InspectorClient::getInstance()->offline($this->curInspector);
     $url = $response->router->urlfor('intention/selectgroup');
     $response->setRedirect($url);
 }
 public function showProposalMark($request, $response)
 {
     /*{{{*/
     //查询所有bu父组
     $buGroups = DAL::get()->find_all_by_parentid_and_deleted('BuInspectGroup', InspectGroup::DEFAULT_PARENTID, InspectGroup::DELETED_NO);
     $response->buGroups = $buGroups;
     $params = $request->vars;
     $checkParams = $params;
     //默认查询当天标注的数据
     if (false == isset($checkParams) || array_filter($checkParams) == array()) {
         $params['markBeginTime'] = XDateTime::now()->getDateTime();
         $params['markEndTime'] = XDateTime::now()->addDay(1)->getDateTime();
     }
     //获取方案生成人id
     if (false == empty($params['proposalInspector'])) {
         $params['proposalInspectorIds'] = array_keys(InspectorClient::getInstance()->searchActivedInspector($params['proposalInspector']));
     }
     //获取质量标注人id
     if (false == empty($params['markInspector'])) {
         $params['markInspectorIds'] = array_keys(InspectorClient::getInstance()->searchActivedInspector($params['markInspector']));
     }
     $params['nowPage'] = $request->getRequest('page', 1);
     $params['pageSize'] = 15;
     $res = FlowMarkClient::getInstance()->getFlowProposalMarkList4Search($params);
     $response->flowProposalMarks = $res['list'];
     $response->pagelink = '';
     if (false == empty($res['pageInfo'])) {
         $response->pagelink = PageNav::getNavLink(PageNav::getPageNavTemplate('/nfsaudit/showproposalmark?' . http_build_query(array('vars' => $params)) . '&page='), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
     }
     $response->params = $params;
 }
Exemplo n.º 3
0
 public function logout($request, $response)
 {
     /*{{{*/
     if (false == $this->auditor->isNull() && $this->auditor->isOnline()) {
         //  $this->auditorClient->offline($this->auditor);
         if (false == $this->curInspector->isNull() && $this->curInspector->isOnline()) {
             InspectorClient::getInstance()->offline($this->curInspector);
         }
     }
     setcookie('audid', '0', time() - 3600, '/');
     setcookie('inspector', '0', time() - 3600, '/');
     setcookie('userinfo[id]', '0', time() - 3600, '/', '.haodf.com');
     $url = $response->router->urlfor('index/index', array());
     $response->setRedirect($url);
 }
 public function deleteInspector($request, $response)
 {
     /*{{{*/
     $inspectorId = $request->id;
     $inspector = DAL::get()->find('inspector', $inspectorId);
     InspectorClient::getInstance()->deleteInspector($inspector, $this->curInspector);
     $response->showContent = true;
 }