|
|
@ -32,6 +32,7 @@ class NewSquirrelModel extends Orm_Base{ |
|
|
|
); |
|
|
|
); |
|
|
|
public $pk = 'id'; |
|
|
|
public $pk = 'id'; |
|
|
|
public function getModelList($params){ |
|
|
|
public function getModelList($params){ |
|
|
|
|
|
|
|
$sex = array("1"=>"雄","2"=>"雌","0"=>"其他"); |
|
|
|
$CageModel = new CageModel(); |
|
|
|
$CageModel = new CageModel(); |
|
|
|
$SquirrelModel = new SquirrelModel(); |
|
|
|
$SquirrelModel = new SquirrelModel(); |
|
|
|
//获取幼崽信息 |
|
|
|
//获取幼崽信息 |
|
|
@ -42,6 +43,7 @@ class NewSquirrelModel extends Orm_Base{ |
|
|
|
} |
|
|
|
} |
|
|
|
$data['j'] = $SquirrelModel->field('id,number,birthday,father,mother,strains_id as strains,gene,remark,cage')->where("type=2 {$params['where']}")->fList(); |
|
|
|
$data['j'] = $SquirrelModel->field('id,number,birthday,father,mother,strains_id as strains,gene,remark,cage')->where("type=2 {$params['where']}")->fList(); |
|
|
|
foreach($data['j'] as $key => &$va){ |
|
|
|
foreach($data['j'] as $key => &$va){ |
|
|
|
|
|
|
|
$va['sex'] = $sex[$va['sex']]; |
|
|
|
$va['cage'] = $CageModel->field('number')->where("id={$va['cage']}")->fRow()['number']; |
|
|
|
$va['cage'] = $CageModel->field('number')->where("id={$va['cage']}")->fRow()['number']; |
|
|
|
$va['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png"; |
|
|
|
$va['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png"; |
|
|
|
} |
|
|
|
} |
|
|
|