Beispiel #1
0
 function getList($args = array())
 {
     !isset($args['type']) && ($args['type'] = 'client');
     if (array_key_exists('staff', $args)) {
         $this->db->where('people.staff', $args['staff']);
     }
     return parent::getList($args);
 }
Beispiel #2
0
    /**
     * 
     * @param array $args
     *	in_class bool 只显示属于某个班级的学生
     * @return type
     */
    function getList($args = array())
    {
        !isset($args['type']) && ($args['type'] = 'student');
        $this->db->select('
			people.*,
			people_team.id AS class,people_team.name AS class_name
		', false)->join('people_relationship class_student', "class_student.relative = people.id AND class_student.is_on = TRUE", isset($args['in_class']) && $args['in_class'] ? 'inner' : 'left')->join('people people_team', "people_team.id = class_student.people", isset($args['in_class']) && $args['in_class'] ? 'inner' : 'left')->where('people_team.type', 'classes');
        if (isset($args['team'])) {
            $this->db->where_in('class_student.people', $args['team']);
            unset($args['team']);
        }
        $args['orderby'] = 'num';
        return parent::getList($args);
    }
Beispiel #3
0
 /**
  * @param array $args
  *	project 查找某个事务关联的组
  *	leaded_by 根据组长查找组
  *	open 开放报名 
  */
 function getList($args = array())
 {
     $this->db->join('team', 'team.id = people.id', 'inner')->select('team.*');
     if (isset($args['project'])) {
         $project = intval($args['project']);
         $this->db->join('project_team', "project_team.team = team.id AND project_team.project = {$project}", 'inner');
     }
     if (isset($args['leaded_by'])) {
         $this->db->where("team.leader{$this->db->escape_int_array($args['leaded_by'])}");
     }
     if (isset($args['get_leader'])) {
         $this->db->join('people leader', 'leader.id = team.leader', 'left')->select('leader.name leader_name, leader.type leader_type');
     }
     if (isset($args['open'])) {
         if ($args['open']) {
             $this->db->where('team.open', true);
         } else {
             $this->db->where('team.open', false);
         }
     }
     return parent::getList($args);
 }
Beispiel #4
0
 function getList(array $args = array())
 {
     $this->db->select('people.*')->join('people', 'user.id = people.id', 'inner')->where('people.company', $this->company->id)->where('people.display', true);
     $args += array('display' => false, 'company' => false);
     return parent::getList($args);
 }
Beispiel #5
0
 function getList(array $args = array())
 {
     $args['is_staff'] = true;
     return parent::getList($args);
 }
Beispiel #6
0
 function getList($args = array())
 {
     !isset($args['type']) && ($args['type'] = 'client');
     return parent::getList($args);
 }
Beispiel #7
0
 /**
  * 返回相关人列表
  */
 function relativeList()
 {
     $people = new People_model();
     $list = $this->table->setFields($this->relative_list_args)->setRowAttributes(array('hash' => '{type}/{id}'))->setData($people->getList(array('is_relative_of' => $this->people->id)))->generate();
     return $list;
 }
Beispiel #8
0
 function getList(array $args = array())
 {
     $args['is_staff'] = true;
     $this->db->select('staff.title');
     return parent::getList($args);
 }