生产城市
This commit is contained in:
@@ -272,22 +272,22 @@ class VehicleController
|
||||
|
||||
switch ($lang) {
|
||||
case 'zh':
|
||||
$vehicles = Vehicle::with('location')->with('finalLocation')->where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$vehicles = Vehicle::where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$hz = new Location();
|
||||
break;
|
||||
|
||||
case 'en':
|
||||
$vehicles = VehicleEn::with('location')->with('finalLocation')->where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$vehicles = VehicleEn::where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$hz = new LocationEn();
|
||||
break;
|
||||
|
||||
case 'ru':
|
||||
$vehicles = VehicleRu::with('location')->with('finalLocation')->where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$vehicles = VehicleRu::where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$hz = new LocationRu();
|
||||
break;
|
||||
|
||||
case 'ar':
|
||||
$vehicles = VehicleAr::with('location')->with('finalLocation')->where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$vehicles = VehicleAr::where(['locations_id' => $id])->offset(($page-1)*$pageSize) ->limit($pageSize)->get();
|
||||
$hz = new LocationAr();
|
||||
break;
|
||||
}
|
||||
@@ -316,17 +316,12 @@ class VehicleController
|
||||
}else{
|
||||
$vehicle['img_url'] = '';
|
||||
}
|
||||
if(!empty($vehicle['ship_id'])){
|
||||
$vehicle['ship'] = LogisticsShip::find($vehicle['ship_id'])->toArray();
|
||||
}
|
||||
}
|
||||
unset($vehicle);
|
||||
|
||||
$logisticsShip = LogisticsShip::where(['id' => $id])->first();
|
||||
$logisticsShipHis = LogisticsShipHis::where(['ship_id'=> $id])->get();
|
||||
|
||||
$count = Vehicle::where(['ship_id' => $id])->count();
|
||||
$result = ['list' => $vehicles,'ship' => $logisticsShip,'ship_his' => $logisticsShipHis,'count'=>$count];
|
||||
$location = $hz::where(['id' => $id])->first();
|
||||
$count = Vehicle::where(['locations_id' => $id])->count();
|
||||
$result = ['list' => $vehicles,'location' => $location,'count'=>$count];
|
||||
return Util::success($result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user