From e29be06b95e5ec93a04c24c7fd66e40dbeab00f3 Mon Sep 17 00:00:00 2001 From: "yangsai@163.com" <2624183217@qq.com> Date: Fri, 17 May 2024 13:11:05 +0800 Subject: [PATCH] =?UTF-8?q?YS:=E6=96=B0=E5=A2=9E=E5=B9=BC=E5=B4=BD?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/models/NewSquirrel.php | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 application/models/NewSquirrel.php diff --git a/application/models/NewSquirrel.php b/application/models/NewSquirrel.php new file mode 100644 index 0000000..460dc95 --- /dev/null +++ b/application/models/NewSquirrel.php @@ -0,0 +1,39 @@ + array('type' => "int(11)",'comment' => ''), + 'count' => array('type' => "varchar(45)",'comment' => '笼位编号'), + 'birthday' => array('type' => "int(11)",'comment' => '小鼠生日'), + 'father' => array('type' => "varchar(255)",'comment' => '小鼠父亲'), + 'mother' => array('type' => "varchar(255)",'comment' => '小鼠母亲'), + 'strains_' => array('type' => "varchar(255)",'comment' => '小鼠品系'), + 'gene' => array('type' => "varchar(255)",'comment' => '小鼠基因'), + 'remark' => array('type' => "int(11)",'comment' => '备注'), + 'is_fen' => array('type' => "varchar(255)",'comment' => '是否杀死'), + 'fen_num' => array('type' => "varchar(255)",'comment' => '是否删除'), + 'cage' => array('type' => "varchar(255)",'comment' => '笼位id'), + 'created' => array('type' => "varchar(255)",'comment' => '是否为新生小鼠'), + 'c_user_id' => array('type' => "varchar(255)",'comment' => '操作人信息'), + 'weaning_time' => array('type' => "varchar(255)",'comment' => '断奶时间'), + 'nursing_time' => array('type' => "varchar(255)",'comment' => '护理时间'), + 'grow_time' => array('type' => "varchar(255)",'comment' => '成长时间'), + 'infertility_time' => array('type' => "varchar(255)",'comment' => '是否为新生小鼠'), + 'dose_time' => array('type' => "varchar(255)",'comment' => '是否为新生小鼠'), + + ); + public $pk = 'id'; + public function getModelList($params){ + $SquirrelModel = new SquirrelModel; + //获取幼崽信息 + $data=$this->field('count,birthday,father,mother,strains,gene,remark')->where("id>0 {$params['where']}")->fList(); + foreach($data as $key => &$val){ + $father = $SquirrelModel->getOneInfo($val['father']); + $mother = $SquirrelModel->getOneInfo($val['mother']); + $val['father'] = empty($father)?'无':$father['number']; + $val['mother'] = empty($mother)?'无':$mother['number']; + } + return $data; + } +} +