调整设备数量统计

dev
vine_liutk 2022-11-14 15:26:58 +08:00
parent f7129ed0dc
commit 06a0407d11
1 changed files with 2 additions and 0 deletions

View File

@ -89,6 +89,8 @@ class DeviceController extends Controller
$baseIds = AgriculturalBase::where('parent_id', $parent)->pluck('id')->toArray();
if(count($baseIds) > 0){
$query->whereIn('agricultural_base_id', $baseIds);
}else{
$query->where('agricultural_base_id', 0);
}
}
//如果查了镇街就不查指定基地了