yangsai@163.com 5 months ago
parent 28c252d709
commit 819ee8a5c3
  1. 2
      application/models/NewSquirrel.php

@ -41,7 +41,7 @@ class NewSquirrelModel extends Orm_Base{
$val['cage'] = $CageModel->field('number')->where("id={$val['cage']}")->fRow()['number']; $val['cage'] = $CageModel->field('number')->where("id={$val['cage']}")->fRow()['number'];
$val['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png"; $val['icon'] = Yaf_Registry::get("config")->web->url->img."/public/icon/small.png";
} }
$data['j'] = $SquirrelModel->field('id,number,birthday,father,mother,strains_id as strains,gene,remark,cage,sex')->where("type=2 {$params['where']}")->fList(); $data['j'] = $SquirrelModel->field('id,number,birthday,father,mother,strains_id as strains,gene,remark,cage,sex')->where("type=2 and is_delete=0 {$params['where']}")->fList();
foreach($data['j'] as $key => &$va){ foreach($data['j'] as $key => &$va){
$va['sex'] = $sex[$va['sex']]; $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'];

Loading…
Cancel
Save