|
|
|
@ -94,10 +94,9 @@ class SquirrelModel extends Orm_Base{ |
|
|
|
|
$cageinfo = $CageModel->field("type")->where("id={$cage}")->fRow(); |
|
|
|
|
if($cageinfo['type']==2) { |
|
|
|
|
$data = []; |
|
|
|
|
$n = $this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}' and sex=1 and cage={$cage}")->fRow(); |
|
|
|
|
$n = $this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}' and sex=1 and cage={$cage}")->fList(); |
|
|
|
|
$m = $this->field('id,number,sex')->where("is_delete=0 and is_kill=0 and grow_time<'{$time}' and sex=2 and cage={$cage}")->fList(); |
|
|
|
|
$data[]=empty($n)?['id'=>0,'number'=>"未知",'sex'=>1]:$n; |
|
|
|
|
$data[]=empty($m)?['id'=>0,'number'=>"未知",'sex'=>2]:$m; |
|
|
|
|
$data=array_merge(empty($n)?['id'=>0,'number'=>"未知",'sex'=>1]:$n,empty($m)?['id'=>0,'number'=>"未知",'sex'=>2]:$m); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return $data; |
|
|
|
|