|
|
|
@ -35,8 +35,8 @@ class NewSquirrelModel extends Orm_Base{ |
|
|
|
|
$CageModel = new CageModel(); |
|
|
|
|
$SquirrelModel = new SquirrelModel(); |
|
|
|
|
//获取幼崽信息 |
|
|
|
|
$data=$this->field('id,count,birthday,father,mother,strains,gene,remark,cage,is_fen')->where("id>0 {$params['where']}")->fList(); |
|
|
|
|
foreach($data as $key => &$val){ |
|
|
|
|
$data['wj']=$this->field('id,count,birthday,father,mother,strains,gene,remark,cage,is_fen')->where("id>0 {$params['where']}")->fList(); |
|
|
|
|
foreach($data['wj'] as $key => &$val){ |
|
|
|
|
if($val['is_fen']==1){ |
|
|
|
|
unset($data[$key]); |
|
|
|
|
}else{ |
|
|
|
@ -44,12 +44,11 @@ class NewSquirrelModel extends Orm_Base{ |
|
|
|
|
$val['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$jian = $SquirrelModel->field('id,number,birthday,father,mother,strains_id as strains,gene,remark,cage')->where("type=2 {$params['where']}")->fList(); |
|
|
|
|
foreach($jian as $key => &$va){ |
|
|
|
|
$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['cage'] = $CageModel->field('number')->where("id={$va['cage']}")->fRow()['number']; |
|
|
|
|
$va['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png"; |
|
|
|
|
} |
|
|
|
|
$data = array_merge($data,$jian); |
|
|
|
|
return $data; |
|
|
|
|
} |
|
|
|
|
public function getOneInfo($squirrel){ |
|
|
|
|