getOne ( array ( 'where' => 'mold="' . $mold . '"', 'asArray' => TRUE ) ); if(empty($detail ['staff'])) $detail ['staffList'] = array(); else $detail ['staffList'] = json_decode ( $detail ['staff'], true ); } return $detail; } public function getInvoiceByStaff($sid = 0) { $lsit=array(); if (! empty ( $sid )) $lsit = $this->find ( array ( 'select'=>'mold', 'where' => 'staff like "%[\"' . $sid . '\",%"', 'asArray' => TRUE ) ); return $lsit; } /** * 获取所有管理组数据 * @return array|array() 该管理组相关数据,人员数据数组化 */ public function getInvoiceByAll() { $lsit = $this->find ( array ( 'asArray' => TRUE ) ); foreach ( $lsit as $key => $value ) { $lsit [$key] ['staffList'] = json_decode ( $value ['staff'], true ); } return $lsit; } } // ?>