Merge pull request #107 from witelgroup/feature/CmmsStatuse
create new report
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\V3\Dashboard\Mission;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\Mission;
|
||||
use App\Models\Province;
|
||||
use App\Services\Cartables\Mission\ReportService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ReportController extends Controller
|
||||
{
|
||||
use ApiResponse;
|
||||
|
||||
public function countryActivity(Request $request, ReportService $reportrService): JsonResponse
|
||||
{
|
||||
|
||||
return $this->successResponse([
|
||||
'activities' => $reportrService->countryActivity($request),
|
||||
'provinces' => Province::all(['id', 'name_fa']),
|
||||
]);
|
||||
}
|
||||
|
||||
// public function provinceActivity(Request $request, OperatorService $operatorService): JsonResponse
|
||||
// {
|
||||
//
|
||||
// $data = $operatorService->provinceActivity(
|
||||
// $request,
|
||||
// 90,
|
||||
// );
|
||||
//
|
||||
// return $this->successResponse([
|
||||
// 'activities' => $data,
|
||||
// 'edarateShahri' => EdarateShahri::where('province_id', $request->province_id)->get(['id', 'name_fa']),
|
||||
// ]);
|
||||
// }
|
||||
//
|
||||
// public function countryExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||
// {
|
||||
// $data = $operatorService->countryActivity(90, $request);
|
||||
// $name = 'گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز '.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
//
|
||||
// return Excel::download(new ExcelReport($data), $name);
|
||||
// }
|
||||
//
|
||||
// public function provinceExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||
// {
|
||||
// $data = $operatorService->provinceActivity(
|
||||
// $request,
|
||||
// 90,
|
||||
// );
|
||||
// $name = 'گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز '.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
//
|
||||
// return Excel::download(new AccessRoadReport($data, $request), $name);
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user