yangsai@163.com 6 months ago
parent 17f5ad643c
commit 4b66d580c4
  1. 2
      application/models/NewSquirrel.php

@ -32,6 +32,7 @@ class NewSquirrelModel extends Orm_Base{
);
public $pk = 'id';
public function getModelList($params){
$sex = array("1"=>"雄","2"=>"雌","0"=>"其他");
$CageModel = new CageModel();
$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();
foreach($data['j'] as $key => &$va){
$va['sex'] = $sex[$va['sex']];
$va['cage'] = $CageModel->field('number')->where("id={$va['cage']}")->fRow()['number'];
$va['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png";
}

Loading…
Cancel
Save