public function showTelList($request, $response)
    {/*{{{*/
        $status = $request->status;
        $patientId = $request->selectedPatientId?$request->selectedPatientId:$request->patientid;
        if ($patientId == 0)
        {
            $telDtos = TelDto::getList4User($this->user, $status);
            $unAppraiseDtos = TelDto::getList4User($this->user, TelDto::STATUS_UNAPPRAISE);
            $cntUnAppraistDtos = count($unAppraiseDtos); 
        }
        else
        {
            $patient = DAL::get()->find('patient', $patientId);
            $telDtos = TelDto::getList($patient, $status);
            $unAppraiseDtos = TelDto::getList($patient, TelDto::STATUS_UNAPPRAISE);
            $cntUnAppraistDtos = count($unAppraiseDtos); 
        }

        $response->telDtos = $telDtos;
        $response->selectedPatientId = $response->patientId = $patientId;
        $response->cntUnAppraistDtos = $cntUnAppraistDtos;
        $response->status = $status;
    }/*}}}*/
Пример #2
0
    public static function create(User $u, XPager $p)
    {/*{{{*/
        $dto = new self();
        $dto->pager = $p;

        $ids = DAL::get()->queryCtime2Ids('Proposal', $u, ServiceDef::TYPE_TELORDER, array(), array(Proposal::RESULT_FINISH));
        $ids = self::filterProposalIds($ids);
        $proposalDtos = TelDto::getList4User($u, TelDto::STATUS_UNAPPRAISE);
        $proposalIds = TelDto::getAllProposalIds($proposalDtos);
        $ids = $proposalIds+$ids;
        $dto->proposalCnt = count($ids);

        $ids = array_slice($ids, ($p->nowPage-1)*$p->pageSize, $p->pageSize, true);
        $dto->proposals = DAL::get()->find('Proposal', $ids);

        return $dto;
    }/*}}}*/