调整设备数量统计
parent
f7129ed0dc
commit
06a0407d11
|
|
@ -89,6 +89,8 @@ class DeviceController extends Controller
|
||||||
$baseIds = AgriculturalBase::where('parent_id', $parent)->pluck('id')->toArray();
|
$baseIds = AgriculturalBase::where('parent_id', $parent)->pluck('id')->toArray();
|
||||||
if(count($baseIds) > 0){
|
if(count($baseIds) > 0){
|
||||||
$query->whereIn('agricultural_base_id', $baseIds);
|
$query->whereIn('agricultural_base_id', $baseIds);
|
||||||
|
}else{
|
||||||
|
$query->where('agricultural_base_id', 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//如果查了镇街就不查指定基地了
|
//如果查了镇街就不查指定基地了
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue