From 62a079427154b2dc947aaf872d860a81140ae2b4 Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Thu, 6 Jun 2024 17:48:05 +0800 Subject: [PATCH] YS --- application/models/NewSquirrel.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/application/models/NewSquirrel.php b/application/models/NewSquirrel.php index 510df68..5efeedb 100644 --- a/application/models/NewSquirrel.php +++ b/application/models/NewSquirrel.php @@ -35,14 +35,10 @@ class NewSquirrelModel extends Orm_Base{ $CageModel = new CageModel(); $SquirrelModel = new SquirrelModel(); //获取幼崽信息 - $data['wj']=$this->field('id,count,birthday,father,mother,strains,gene,remark,cage,is_fen')->where("id>0 {$params['where']}")->fList(); + $data['wj']=$this->field('id,count,birthday,father,mother,strains,gene,remark,cage,is_fen')->where("id>0 {$params['where']} and is_fen=0")->fList(); foreach($data['wj'] as $key => &$val){ - if($val['is_fen']==1){ - unset($data[$key]); - }else{ - $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['cage'] = $CageModel->field('number')->where("id={$val['cage']}")->fRow()['number']; + $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')->where("type=2 {$params['where']}")->fList(); foreach($data['j'] as $key => &$va){