diff --git a/app/Exports/V3/SafetyAndPrivacy/Country/AccessRoadReport.php b/app/Exports/V3/SafetyAndPrivacy/Country/AccessRoadReport.php
new file mode 100644
index 00000000..37517385
--- /dev/null
+++ b/app/Exports/V3/SafetyAndPrivacy/Country/AccessRoadReport.php
@@ -0,0 +1,83 @@
+data;
+ $existedProvinces = array_keys($data);
+
+ foreach (Province::all() as $value) {
+ $provinceId = $value->id;
+
+ if (!array_key_exists($provinceId, $existedProvinces)) {
+ $data[] = (object) [
+ 'province_id' => $provinceId,
+ 'name_fa' => $value->name_fa,
+ 'sum' => 0,
+ 'axis_data' => [
+ 'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'بزرگراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'اصلی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'فرعی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'روستایی' => ['1' => 0, '2' => 0, '3' => 0],
+ ],
+ ];
+ }
+ }
+
+ return view('v3.Reports.SafetyAndPrivacy.Country.AccessRoadReport', [
+ 'data' => $data,
+ ]);
+ }
+
+ public function registerEvents(): array
+ {
+ return [
+ AfterSheet::class => function (AfterSheet $event) {
+ $event->sheet->getDelegate()->setRightToLeft(true);
+ },
+ ];
+ }
+
+ public function drawings(): array
+ {
+ $drawing = new Drawing();
+ $drawing->setName('Logo');
+ $drawing->setDescription('This is my logo');
+ $drawing->setPath(public_path('/dist/logo.png'));
+ $drawing->setWidth(50);
+ $drawing->setHeight(50);
+ $drawing->setOffsetX(5);
+ $drawing->setOffsetY(5);
+ $drawing->setCoordinates('A1');
+
+ $drawing2 = new Drawing();
+ $drawing2->setName('Logo');
+ $drawing2->setDescription('This is my logo');
+ $drawing2->setPath(public_path('/dist/141icon.png'));
+ $drawing2->setWidth(50);
+ $drawing2->setHeight(50);
+ $drawing2->setOffsetX(5);
+ $drawing2->setOffsetY(5);
+ $drawing2->setCoordinates('Q1');
+ return [$drawing, $drawing2];
+ }
+}
\ No newline at end of file
diff --git a/app/Exports/V3/SafetyAndPrivacy/Country/ConstructionReport.php b/app/Exports/V3/SafetyAndPrivacy/Country/ConstructionReport.php
new file mode 100644
index 00000000..3e64d0c8
--- /dev/null
+++ b/app/Exports/V3/SafetyAndPrivacy/Country/ConstructionReport.php
@@ -0,0 +1,84 @@
+data;
+ $existedProvinces = array_keys($data);
+
+ foreach (Province::all() as $value) {
+ $provinceId = $value->id;
+
+ if (!array_key_exists($provinceId, $existedProvinces)) {
+ $data[] = (object) [
+ 'province_id' => $provinceId,
+ 'name_fa' => $value->name_fa,
+ 'sum' => 0,
+ 'axis_data' => [
+ 'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'بزرگراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'اصلی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'فرعی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'روستایی' => ['1' => 0, '2' => 0, '3' => 0],
+ ],
+ ];
+ }
+ }
+
+ return view('v3.Reports.SafetyAndPrivacy.Country.ConstructionReport', [
+ 'data' => $data,
+ ]);
+ }
+
+ public function registerEvents(): array
+ {
+ return [
+ AfterSheet::class => function (AfterSheet $event) {
+ $event->sheet->getDelegate()->setRightToLeft(true);
+ },
+ ];
+ }
+
+ public function drawings(): array
+ {
+ $drawing = new Drawing();
+ $drawing->setName('Logo');
+ $drawing->setDescription('This is my logo');
+ $drawing->setPath(public_path('/dist/logo.png'));
+ $drawing->setWidth(50);
+ $drawing->setHeight(50);
+ $drawing->setOffsetX(5);
+ $drawing->setOffsetY(5);
+ $drawing->setCoordinates('A1');
+
+ $drawing2 = new Drawing();
+ $drawing2->setName('Logo');
+ $drawing2->setDescription('This is my logo');
+ $drawing2->setPath(public_path('/dist/141icon.png'));
+ $drawing2->setWidth(50);
+ $drawing2->setHeight(50);
+ $drawing2->setOffsetX(5);
+ $drawing2->setOffsetY(5);
+ $drawing2->setCoordinates('Q1');
+ return [$drawing, $drawing2];
+ }
+}
\ No newline at end of file
diff --git a/app/Exports/V3/SafetyAndPrivacy/Country/UtilityPassingReport.php b/app/Exports/V3/SafetyAndPrivacy/Country/UtilityPassingReport.php
new file mode 100644
index 00000000..e44b14ac
--- /dev/null
+++ b/app/Exports/V3/SafetyAndPrivacy/Country/UtilityPassingReport.php
@@ -0,0 +1,84 @@
+data;
+ $existedProvinces = array_keys($data);
+
+ foreach (Province::all() as $value) {
+ $provinceId = $value->id;
+
+ if (!array_key_exists($provinceId, $existedProvinces)) {
+ $data[] = (object) [
+ 'province_id' => $provinceId,
+ 'name_fa' => $value->name_fa,
+ 'sum' => 0,
+ 'axis_data' => [
+ 'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'بزرگراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'اصلی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'فرعی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'روستایی' => ['1' => 0, '2' => 0, '3' => 0],
+ ],
+ ];
+ }
+ }
+
+ return view('v3.Reports.SafetyAndPrivacy.Country.UtilityPassingReport', [
+ 'data' => $data,
+ ]);
+ }
+
+ public function registerEvents(): array
+ {
+ return [
+ AfterSheet::class => function (AfterSheet $event) {
+ $event->sheet->getDelegate()->setRightToLeft(true);
+ },
+ ];
+ }
+
+ public function drawings(): array
+ {
+ $drawing = new Drawing();
+ $drawing->setName('Logo');
+ $drawing->setDescription('This is my logo');
+ $drawing->setPath(public_path('/dist/logo.png'));
+ $drawing->setWidth(50);
+ $drawing->setHeight(50);
+ $drawing->setOffsetX(5);
+ $drawing->setOffsetY(5);
+ $drawing->setCoordinates('A1');
+
+ $drawing2 = new Drawing();
+ $drawing2->setName('Logo');
+ $drawing2->setDescription('This is my logo');
+ $drawing2->setPath(public_path('/dist/141icon.png'));
+ $drawing2->setWidth(50);
+ $drawing2->setHeight(50);
+ $drawing2->setOffsetX(5);
+ $drawing2->setOffsetY(5);
+ $drawing2->setCoordinates('Q1');
+ return [$drawing, $drawing2];
+ }
+}
\ No newline at end of file
diff --git a/app/Exports/V3/SafetyAndPrivacy/Province/AccessRoadReport.php b/app/Exports/V3/SafetyAndPrivacy/Province/AccessRoadReport.php
new file mode 100644
index 00000000..bc80b3a4
--- /dev/null
+++ b/app/Exports/V3/SafetyAndPrivacy/Province/AccessRoadReport.php
@@ -0,0 +1,83 @@
+data;
+ $existedCities = array_keys($data);
+ $edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
+
+ foreach ($edarat as $value) {
+ $edareId = $value->id;
+
+ if (!array_key_exists($edareId, $existedCities)) {
+ $data[] = (object) [
+ 'edare_shahri_id' => $edareId,
+ 'name_fa' => $value->name_fa,
+ 'sum' => 0,
+ 'axis_data' => [
+ 'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'بزرگراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'اصلی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'فرعی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'روستایی' => ['1' => 0, '2' => 0, '3' => 0],
+ ],
+ ];
+ }
+ }
+
+ return view('v3.Reports.SafetyAndPrivacy.Province.AccessRoadReport', [
+ 'data' => $data,
+ ]);
+ }
+
+ public function registerEvents(): array
+ {
+ return [
+ AfterSheet::class => function (AfterSheet $event) {
+ $event->sheet->getDelegate()->setRightToLeft(true);
+ },
+ ];
+ }
+
+ public function drawings(): array
+ {
+ $drawing = new Drawing();
+ $drawing->setName('Logo');
+ $drawing->setDescription('This is my logo');
+ $drawing->setPath(public_path('/dist/logo.png'));
+ $drawing->setWidth(50);
+ $drawing->setHeight(50);
+ $drawing->setOffsetX(5);
+ $drawing->setOffsetY(5);
+ $drawing->setCoordinates('A1');
+
+ $drawing2 = new Drawing();
+ $drawing2->setName('Logo');
+ $drawing2->setDescription('This is my logo');
+ $drawing2->setPath(public_path('/dist/141icon.png'));
+ $drawing2->setWidth(50);
+ $drawing2->setHeight(50);
+ $drawing2->setOffsetX(5);
+ $drawing2->setOffsetY(5);
+ $drawing2->setCoordinates('Q1');
+ return [$drawing, $drawing2];
+ }
+}
\ No newline at end of file
diff --git a/app/Exports/V3/SafetyAndPrivacy/Province/ConstructionReport.php b/app/Exports/V3/SafetyAndPrivacy/Province/ConstructionReport.php
new file mode 100644
index 00000000..e6492019
--- /dev/null
+++ b/app/Exports/V3/SafetyAndPrivacy/Province/ConstructionReport.php
@@ -0,0 +1,83 @@
+data;
+ $existedCities = array_keys($data);
+ $edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
+
+ foreach ($edarat as $value) {
+ $edareId = $value->id;
+
+ if (!array_key_exists($edareId, $existedCities)) {
+ $data[] = (object) [
+ 'edare_shahri_id' => $edareId,
+ 'name_fa' => $value->name_fa,
+ 'sum' => 0,
+ 'axis_data' => [
+ 'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'بزرگراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'اصلی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'فرعی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'روستایی' => ['1' => 0, '2' => 0, '3' => 0],
+ ],
+ ];
+ }
+ }
+
+ return view('v3.Reports.SafetyAndPrivacy.Province.ConstructionReport', [
+ 'data' => $data,
+ ]);
+ }
+
+ public function registerEvents(): array
+ {
+ return [
+ AfterSheet::class => function (AfterSheet $event) {
+ $event->sheet->getDelegate()->setRightToLeft(true);
+ },
+ ];
+ }
+
+ public function drawings(): array
+ {
+ $drawing = new Drawing();
+ $drawing->setName('Logo');
+ $drawing->setDescription('This is my logo');
+ $drawing->setPath(public_path('/dist/logo.png'));
+ $drawing->setWidth(50);
+ $drawing->setHeight(50);
+ $drawing->setOffsetX(5);
+ $drawing->setOffsetY(5);
+ $drawing->setCoordinates('A1');
+
+ $drawing2 = new Drawing();
+ $drawing2->setName('Logo');
+ $drawing2->setDescription('This is my logo');
+ $drawing2->setPath(public_path('/dist/141icon.png'));
+ $drawing2->setWidth(50);
+ $drawing2->setHeight(50);
+ $drawing2->setOffsetX(5);
+ $drawing2->setOffsetY(5);
+ $drawing2->setCoordinates('Q1');
+ return [$drawing, $drawing2];
+ }
+}
\ No newline at end of file
diff --git a/app/Exports/V3/SafetyAndPrivacy/Province/UtilityPassingReport.php b/app/Exports/V3/SafetyAndPrivacy/Province/UtilityPassingReport.php
new file mode 100644
index 00000000..d0f5f6a4
--- /dev/null
+++ b/app/Exports/V3/SafetyAndPrivacy/Province/UtilityPassingReport.php
@@ -0,0 +1,83 @@
+data;
+ $existedCities = array_keys($data);
+ $edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
+
+ foreach ($edarat as $value) {
+ $edareId = $value->id;
+
+ if (!array_key_exists($edareId, $existedCities)) {
+ $data[] = (object) [
+ 'edare_shahri_id' => $edareId,
+ 'name_fa' => $value->name_fa,
+ 'sum' => 0,
+ 'axis_data' => [
+ 'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'بزرگراه' => ['1' => 0, '2' => 0, '3' => 0],
+ 'اصلی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'فرعی' => ['1' => 0, '2' => 0, '3' => 0],
+ 'روستایی' => ['1' => 0, '2' => 0, '3' => 0],
+ ],
+ ];
+ }
+ }
+
+ return view('v3.Reports.SafetyAndPrivacy.Province.UtilityPassingReport', [
+ 'data' => $data,
+ ]);
+ }
+
+ public function registerEvents(): array
+ {
+ return [
+ AfterSheet::class => function (AfterSheet $event) {
+ $event->sheet->getDelegate()->setRightToLeft(true);
+ },
+ ];
+ }
+
+ public function drawings(): array
+ {
+ $drawing = new Drawing();
+ $drawing->setName('Logo');
+ $drawing->setDescription('This is my logo');
+ $drawing->setPath(public_path('/dist/logo.png'));
+ $drawing->setWidth(50);
+ $drawing->setHeight(50);
+ $drawing->setOffsetX(5);
+ $drawing->setOffsetY(5);
+ $drawing->setCoordinates('A1');
+
+ $drawing2 = new Drawing();
+ $drawing2->setName('Logo');
+ $drawing2->setDescription('This is my logo');
+ $drawing2->setPath(public_path('/dist/141icon.png'));
+ $drawing2->setWidth(50);
+ $drawing2->setHeight(50);
+ $drawing2->setOffsetX(5);
+ $drawing2->setOffsetY(5);
+ $drawing2->setCoordinates('Q1');
+ return [$drawing, $drawing2];
+ }
+}
\ No newline at end of file
diff --git a/app/Http/Controllers/V3/Dashboard/Mission/DetailController.php b/app/Http/Controllers/V3/Dashboard/Mission/DetailController.php
index 55ba3c14..2c5a5946 100644
--- a/app/Http/Controllers/V3/Dashboard/Mission/DetailController.php
+++ b/app/Http/Controllers/V3/Dashboard/Mission/DetailController.php
@@ -19,6 +19,17 @@ class DetailController extends Controller
public function rahdaran(Mission $mission): JsonResponse
{
- return $this->successResponse($mission->rahdaran()->get(['rahdaran.id', 'rahdaran.name', 'rahdaran.code']));
+ $rahdaran = $mission->rahdaran()
+ ->get(['rahdaran.id', 'rahdaran.name', 'rahdaran.code'])
+ ->map(function ($rahdar) {
+ return [
+ 'id' => $rahdar->id,
+ 'name' => $rahdar->name,
+ 'code' => $rahdar->code,
+ 'is_driver' => (bool) $rahdar->pivot->is_driver,
+ ];
+ });
+
+ return $this->successResponse($rahdaran);
}
}
diff --git a/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php b/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php
index 9f6cb7ef..8e5385da 100644
--- a/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php
+++ b/app/Http/Controllers/V3/Dashboard/Mission/RequestPortalController.php
@@ -59,7 +59,7 @@ class RequestPortalController extends Controller
'code' => rand(100000, 999999),
]);
- $mission->rahdaran()->attach($request->rahdaran);
+ $mission->rahdaran()->sync($request->rahdaran);
if ($request->category_id == 2) {
$rpc = new OperatorController();
diff --git a/app/Http/Controllers/V3/Dashboard/ObservedItemController.php b/app/Http/Controllers/V3/Dashboard/ObservedItemController.php
index 78c099b1..b261a049 100644
--- a/app/Http/Controllers/V3/Dashboard/ObservedItemController.php
+++ b/app/Http/Controllers/V3/Dashboard/ObservedItemController.php
@@ -65,7 +65,6 @@ class ObservedItemController extends Controller
'item_name' => $info_item->item_str,
'sub_item_id' => $info_item->sub_item,
'sub_item_name' => $info_item->sub_item_str,
- 'local_name' => $item['local_name'],
'description' => $item['description'] ?? null,
'start_lat' => $start[0],
'start_lon' => $start[1],
diff --git a/app/Http/Controllers/V3/Dashboard/RoadItem/OperatorController.php b/app/Http/Controllers/V3/Dashboard/RoadItem/OperatorController.php
index bafd0f88..c422e120 100644
--- a/app/Http/Controllers/V3/Dashboard/RoadItem/OperatorController.php
+++ b/app/Http/Controllers/V3/Dashboard/RoadItem/OperatorController.php
@@ -11,10 +11,12 @@ use App\Http\Requests\V3\RoadItem\Operator\UpdateRequest;
use App\Http\Traits\ApiResponse;
use App\Models\EdarateShahri;
use App\Models\InfoItem;
+use App\Models\Mission;
use App\Models\ObservedItem;
use App\Models\RoadItemsProject;
use App\Services\Cartables\RoadItem\OperatorService;
use App\Services\NominatimService;
+use Carbon\Carbon;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
@@ -49,6 +51,7 @@ class OperatorController extends Controller
*/
public function store(StoreRequest $request, NominatimService $nominatimService): JsonResponse
{
+
$info_item = InfoItem::query()->where('item', $request->item_id)
->where('sub_item', $request->sub_item_id)
->firstOrFail();
diff --git a/app/Http/Controllers/V3/Dashboard/RoadPatrol/OperatorController.php b/app/Http/Controllers/V3/Dashboard/RoadPatrol/OperatorController.php
index e57e4c0d..4b6e3ee2 100644
--- a/app/Http/Controllers/V3/Dashboard/RoadPatrol/OperatorController.php
+++ b/app/Http/Controllers/V3/Dashboard/RoadPatrol/OperatorController.php
@@ -42,7 +42,7 @@ class OperatorController extends Controller
'status_fa' => 'در حال بررسی',
]);
- $road_patrol->mission()->attach($mission->id);
+ $road_patrol->missions()->attach($mission->id);
auth()->user()->addActivityComplete(1147);
diff --git a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReportController.php b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/AccessRoadActivityController.php
similarity index 56%
rename from app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReportController.php
rename to app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/AccessRoadActivityController.php
index 0e3c5e78..f3e4a9cc 100644
--- a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReportController.php
+++ b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/AccessRoadActivityController.php
@@ -1,53 +1,57 @@
merge(['info_id' => 90]);
+
$data = $operatorService->countryActivity($request);
+
return $this->successResponse([
'activities' => $data,
- 'provinces' => Province::all(['id', 'name_fa'])
+ 'provinces' => Province::all(['id', 'name_fa']),
]);
}
public function provinceActivity(Request $request, OperatorService $operatorService): JsonResponse
{
+ $request->merge(['info_id' => 90]);
+
$data = $operatorService->provinceActivity($request);
+
return $this->successResponse([
'activities' => $data,
- 'edarateShahri' => EdarateShahri::query()->where('province_id', '=', $request->province_id)->get(['id', 'name_fa']),
+ 'edarateShahri' => EdarateShahri::where('province_id', $request->province_id)->get(['id', 'name_fa']),
]);
}
-
public function countryExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
{
$data = $operatorService->countryActivity($request);
- $name = 'گزارش از نگهداری حریم راه ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
- return Excel::download(new CountryActivityReport($data), $name);
+ $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);
- $name = 'گزارش از نگهداری حریم راه ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
- return Excel::download(new ProvinceActivityReport($data, $request), $name);
+ $name = 'گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
+ return Excel::download(new AccessRoadReport($data, $request), $name);
}
+
}
diff --git a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/ConstructionActivityController.php b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/ConstructionActivityController.php
new file mode 100644
index 00000000..54dbad4b
--- /dev/null
+++ b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/ConstructionActivityController.php
@@ -0,0 +1,57 @@
+merge(['info_id' => 89]);
+
+ $data = $operatorService->countryActivity($request);
+
+ return $this->successResponse([
+ 'activities' => $data,
+ 'provinces' => Province::all(['id', 'name_fa']),
+ ]);
+ }
+ public function provinceActivity(Request $request, OperatorService $operatorService): JsonResponse
+ {
+ $request->merge(['info_id' => 89]);
+
+ $data = $operatorService->provinceActivity($request);
+
+ 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($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);
+ $name = ' گزارش نگهداری حریم راه برای ساخت و ساز غیر مجاز' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
+ return Excel::download(new ConstructionReport($data, $request), $name);
+ }
+
+
+}
diff --git a/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/UtilityPassingActivityController.php b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/UtilityPassingActivityController.php
new file mode 100644
index 00000000..dd61ed53
--- /dev/null
+++ b/app/Http/Controllers/V3/Dashboard/SafetyAndPrivacy/OperatorReport/UtilityPassingActivityController.php
@@ -0,0 +1,54 @@
+merge(['info_id' => 91]);
+
+ $data = $operatorService->countryActivity($request);
+
+ return $this->successResponse([
+ 'activities' => $data,
+ 'provinces' => Province::all(['id', 'name_fa']),
+ ]);
+ }
+ public function provinceActivity(Request $request, OperatorService $operatorService): JsonResponse
+ {
+ $request->merge(['info_id' => 91]);
+
+ $data = $operatorService->provinceActivity($request);
+
+ 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($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);
+ $name = 'گزارش نگهداری حریم راه برای عبور تاسیسات زیربنایی غیر مجاز ' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
+ return Excel::download(new UtilityPassingReport($data, $request), $name);
+ }
+
+}
diff --git a/app/Http/Requests/V3/Mission/RequestPortal/StoreRequest.php b/app/Http/Requests/V3/Mission/RequestPortal/StoreRequest.php
index 430e18b1..740cd2e9 100644
--- a/app/Http/Requests/V3/Mission/RequestPortal/StoreRequest.php
+++ b/app/Http/Requests/V3/Mission/RequestPortal/StoreRequest.php
@@ -25,7 +25,7 @@ class StoreRequest extends FormRequest
public function rules(): array
{
return [
- 'rahdaran' => 'required|array',
+ 'rahdaran' => 'array',
'rahdaran.*' => 'exists:rahdaran,id',
'requested_machines' => 'required|array',
'type' => 'required|in:1,2',
diff --git a/app/Http/Requests/V3/ObservedItem/StoreRequest.php b/app/Http/Requests/V3/ObservedItem/StoreRequest.php
index 9d5e2593..081d4b40 100644
--- a/app/Http/Requests/V3/ObservedItem/StoreRequest.php
+++ b/app/Http/Requests/V3/ObservedItem/StoreRequest.php
@@ -24,14 +24,10 @@ class StoreRequest extends FormRequest
return [
'road_patrol_id' => 'required|integer|exists:road_patrols,id',
'observed_items' => 'required|array|min:1',
-
'observed_items.*.item_id' => 'required|integer|exists:info_items,item',
'observed_items.*.sub_item_id' => 'required|integer',
'observed_items.*.start_point' => 'required|string',
-
- 'observed_items.*.local_name' => 'nullable|string',
'observed_items.*.description' => 'nullable|string',
-
'observed_items.*.instant_action' => 'required|in:0,1',
'observed_items.*.priority' => 'required_if:observed_items.*.instant_action,0|in:1,2,3',
'observed_items.*.end_point' => 'required_if:observed_items.*.instant_action,1|string',
diff --git a/app/Http/Requests/V3/RoadItem/Operator/StoreRequest.php b/app/Http/Requests/V3/RoadItem/Operator/StoreRequest.php
index 67a6c4ec..66f045b3 100644
--- a/app/Http/Requests/V3/RoadItem/Operator/StoreRequest.php
+++ b/app/Http/Requests/V3/RoadItem/Operator/StoreRequest.php
@@ -2,9 +2,13 @@
namespace App\Http\Requests\V3\RoadItem\Operator;
+use App\Models\Mission;
+use Carbon\Carbon;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
+use Illuminate\Validation\ValidationException;
+use Illuminate\Validation\Validator;
class StoreRequest extends FormRequest
{
@@ -48,4 +52,18 @@ class StoreRequest extends FormRequest
'activity_time' => 'ساعت فعالیت',
];
}
+ public function after(): array
+ {
+ return [
+ function (Validator $validator) {
+ $activityTime = Carbon::parse("{$this->activity_date} {$this->activity_time}");
+
+ if ($activityTime->lt($this->mission->start_date) || $activityTime->gt($this->mission->end_date)) {
+ $validator->errors()->add('activity_time', 'زمان گزارش باید بین بازه مأموریت باشد.');
+ }
+ }
+ ];
+ }
+
+
}
diff --git a/app/Models/Mission.php b/app/Models/Mission.php
index 95d92d4c..aaa7ca40 100644
--- a/app/Models/Mission.php
+++ b/app/Models/Mission.php
@@ -66,7 +66,7 @@ class Mission extends Model
'rahdarables',
'rahdarable_id',
'rahdar_id',
- );
+ )->withPivot('is_driver');
}
public function roadObserved(): MorphToMany
diff --git a/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php b/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php
index f41270fd..c653bc3b 100644
--- a/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php
+++ b/app/Services/Cartables/SafetyAndPrivacy/OperatorService.php
@@ -6,6 +6,7 @@ use App\Exceptions\ProhibitedAction;
use App\Facades\DataTable\DataTableFacade;
use App\Models\SafetyAndPrivacy;
use Illuminate\Http\Request;
+use Illuminate\Support\Facades\DB;
class OperatorService
{
@@ -32,118 +33,95 @@ class OperatorService
);
}
- public function countryActivity(Request $request): array
+ public function countryActivity(int $info_id): array
{
- $activities = [];
- $countryQuery = SafetyAndPrivacy::query()->selectRaw('COUNT(*) as qty,info_id, step');
-
- $country = DataTableFacade::run(
- $countryQuery,
- $request,
- allowedFilters: ['*'],
- allowedSortings: ['*'],
- allowedGroupBy: ['info_id', 'step']
- );
-
- $countryTotalSum = 0;
- $countryData = [
- 'name_fa' => 'کشوری',
- 'province_id' => -1,
- 'sum' => 0,
- '89' => ['1' => 0, '2' => 0, '3' => 0,],
- '90' => ['1' => 0, '2' => 0, '3' => 0,],
- '91' => ['1' => 0, '2' => 0, '3' => 0,],
- ];
- foreach ($country['data'] as $key => $value) {
- $countryTotalSum += $value->qty;
- $countryData[$value->info_id][$value->step] = $value->qty;
- $countryData["sum"] = $countryTotalSum;
- }
-
- $activities[] = (object) $countryData;
- $provinceQuery = SafetyAndPrivacy::query()->selectRaw('province_id, province_fa, COUNT(*) as qty,info_id, step');
- $provinces = DataTableFacade::run(
- $provinceQuery,
- $request,
- allowedFilters: ['*'],
- allowedSortings: ['*'],
- allowedGroupBy: ['info_id', 'step', 'province_id', 'province_fa']
- );
-
- foreach ($provinces['data'] as $value)
- {
- $provinceId = $value->province_id;
- if (!isset($activities[$provinceId])) {
- $activities[$provinceId] = (object) [
- 'province_id' => $provinceId,
- 'name_fa' => $value->province_fa,
- 'sum' => 0,
- '89' => ['1' => 0, '2' => 0, '3' => 0],
- '90' => ['1' => 0, '2' => 0, '3' => 0],
- '91' => ['1' => 0, '2' => 0, '3' => 0],
- ];
- }
- $activities[$provinceId]->{$value->info_id}[$value->step] = $value->qty;
- $activities[$provinceId]->sum += $value->qty;
- }
-
- return array_values($activities);
+ return DB::select("
+ WITH combinations AS (
+ SELECT
+ axis_type_id,
+ step
+ FROM (
+ SELECT 1 AS axis_type_id UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5
+ ) a
+ CROSS JOIN (
+ SELECT 1 AS step UNION ALL SELECT 2 UNION ALL SELECT 3
+ ) s
+ ),
+ provinces AS (
+ SELECT DISTINCT province_fa FROM safety_and_privacy WHERE info_id = ?
+ ),
+ data AS (
+ SELECT
+ p.province_fa,
+ c.axis_type_id,
+ c.step,
+ COUNT(sp.id) AS total
+ FROM combinations c
+ CROSS JOIN provinces p
+ LEFT JOIN safety_and_privacy sp
+ ON sp.axis_type_id = c.axis_type_id
+ AND sp.step = c.step
+ AND sp.province_fa = p.province_fa
+ AND sp.info_id = ?
+ GROUP BY p.province_fa, c.axis_type_id, c.step
+ )
+ SELECT
+ province_fa,
+ axis_type_id,
+ step,
+ total,
+ SUM(total) OVER (PARTITION BY province_fa) AS total_sum
+ FROM data
+ ORDER BY province_fa, axis_type_id, step
+ ", [$info_id, $info_id]);
}
- public function provinceActivity(Request $request): array
+ public function provinceActivity(int $info_id, int $province_id): array
{
- $activities = [];
- $provinceQuery = SafetyAndPrivacy::query()->selectRaw('COUNT(*) as qty,info_id, step');
- $province = DataTableFacade::run(
- $provinceQuery,
- $request,
- allowedFilters: ['*'],
- allowedSortings: ['*'],
- allowedGroupBy: ['info_id', 'step']
- );
-
- $provinceTotalSum = 0;
- $provinceData = [
- 'name_fa' => 'استانی',
- 'edare_shahri_id' => -1,
- 'sum' => 0,
- '89' => ['1' => 0, '2' => 0, '3' => 0,],
- '90' => ['1' => 0, '2' => 0, '3' => 0,],
- '91' => ['1' => 0, '2' => 0, '3' => 0,],
- ];
- foreach ($province['data'] as $key => $value) {
- $provinceTotalSum += $value->qty;
- $provinceData["sum"] = $provinceTotalSum;
- $provinceData[$value->info_id][$value->step] = $value->qty;
- }
- $activities[] = (object) $provinceData;
-
- $citiesQuery = SafetyAndPrivacy::query()->selectRaw('edare_shahri_id, COUNT(*) as qty,info_id, step');
- $cities = DataTableFacade::run(
- $citiesQuery,
- $request,
- allowedFilters: ['*'],
- allowedSortings: ['*'],
- allowedGroupBy: ['info_id', 'step', 'edare_shahri_id']
- );
-
- foreach ($cities['data'] as $value)
- {
- $cityId = $value->edare_shahri_id;
- if (!isset($activities[$cityId])) {
- $activities[$cityId] = (object) [
- 'edare_shahri_id' => $cityId,
- 'name_fa' => \App\Models\EdarateShahri::query()->find($cityId)->name_fa,
- 'sum' => 0,
- '89' => ['1' => 0, '2' => 0, '3' => 0],
- '90' => ['1' => 0, '2' => 0, '3' => 0],
- '91' => ['1' => 0, '2' => 0, '3' => 0],
- ];
- }
- $activities[$cityId]->{$value->info_id}[$value->step] = $value->qty;
- $activities[$cityId]->sum += $value->qty;
- }
-
- return array_values($activities);
+ return DB::select("
+ WITH combinations AS (
+ SELECT axis_type_id, step
+ FROM (
+ SELECT 1 AS axis_type_id UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5
+ ) a
+ CROSS JOIN (
+ SELECT 1 AS step UNION ALL SELECT 2 UNION ALL SELECT 3
+ ) s
+ ),
+ edarat AS (
+ SELECT id AS edare_id, name_fa
+ FROM edarate_shahri
+ WHERE province_id = :provinceId
+ ),
+ data AS (
+ SELECT
+ e.edare_id,
+ c.axis_type_id,
+ c.step,
+ COUNT(sp.id) AS total
+ FROM combinations c
+ CROSS JOIN edarat e
+ LEFT JOIN safety_and_privacy sp
+ ON sp.axis_type_id = c.axis_type_id
+ AND sp.step = c.step
+ AND sp.city_id = e.edare_id
+ AND sp.info_id = :infoId
+ GROUP BY e.edare_id, c.axis_type_id, c.step
+ )
+ SELECT
+ e.edare_id,
+ e.name_fa AS edare_name,
+ d.axis_type_id,
+ d.step,
+ d.total,
+ SUM(d.total) OVER (PARTITION BY e.edare_id) AS total_sum
+ FROM data d
+ JOIN edarat e ON e.edare_id = d.edare_id
+ ORDER BY e.edare_id, d.axis_type_id, d.step
+ ",[
+ 'provinceId' => $province_id,
+ 'infoId' => $info_id,
+ ]);
}
+
}
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 825d349e..8d9ff456 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,7 @@
"require": {
"php": "^8.1",
"ext-zip": "*",
- "doctrine/dbal": "^3.7",
+ "doctrine/dbal": "^3.10",
"guzzlehttp/guzzle": "^7.2",
"hekmatinasser/verta": "^8.3",
"laravel/framework": "^10.10",
diff --git a/composer.lock b/composer.lock
index 406835fc..0388dc70 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "fb6adbe1f5e02aaf3de31c514710f0b6",
+ "content-hash": "bf9b86b55591e7c7df84cb1be8ea9db3",
"packages": [
{
"name": "beberlei/assert",
@@ -353,135 +353,43 @@
},
"time": "2022-10-27T11:44:00+00:00"
},
- {
- "name": "doctrine/cache",
- "version": "2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/cache.git",
- "reference": "1ca8f21980e770095a31456042471a57bc4c68fb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb",
- "reference": "1ca8f21980e770095a31456042471a57bc4c68fb",
- "shasum": ""
- },
- "require": {
- "php": "~7.1 || ^8.0"
- },
- "conflict": {
- "doctrine/common": ">2.2,<2.4"
- },
- "require-dev": {
- "cache/integration-tests": "dev-master",
- "doctrine/coding-standard": "^9",
- "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
- "psr/cache": "^1.0 || ^2.0 || ^3.0",
- "symfony/cache": "^4.4 || ^5.4 || ^6",
- "symfony/var-exporter": "^4.4 || ^5.4 || ^6"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Guilherme Blanco",
- "email": "guilhermeblanco@gmail.com"
- },
- {
- "name": "Roman Borschel",
- "email": "roman@code-factory.org"
- },
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de"
- },
- {
- "name": "Jonathan Wage",
- "email": "jonwage@gmail.com"
- },
- {
- "name": "Johannes Schmitt",
- "email": "schmittjoh@gmail.com"
- }
- ],
- "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.",
- "homepage": "https://www.doctrine-project.org/projects/cache.html",
- "keywords": [
- "abstraction",
- "apcu",
- "cache",
- "caching",
- "couchdb",
- "memcached",
- "php",
- "redis",
- "xcache"
- ],
- "support": {
- "issues": "https://github.com/doctrine/cache/issues",
- "source": "https://github.com/doctrine/cache/tree/2.2.0"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache",
- "type": "tidelift"
- }
- ],
- "time": "2022-05-20T20:07:39+00:00"
- },
{
"name": "doctrine/dbal",
- "version": "3.8.0",
+ "version": "3.10.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "d244f2e6e6bf32bff5174e6729b57214923ecec9"
+ "reference": "1cf840d696373ea0d58ad0a8875c0fadcfc67214"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/d244f2e6e6bf32bff5174e6729b57214923ecec9",
- "reference": "d244f2e6e6bf32bff5174e6729b57214923ecec9",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/1cf840d696373ea0d58ad0a8875c0fadcfc67214",
+ "reference": "1cf840d696373ea0d58ad0a8875c0fadcfc67214",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2",
- "doctrine/cache": "^1.11|^2.0",
"doctrine/deprecations": "^0.5.3|^1",
"doctrine/event-manager": "^1|^2",
"php": "^7.4 || ^8.0",
"psr/cache": "^1|^2|^3",
"psr/log": "^1|^2|^3"
},
+ "conflict": {
+ "doctrine/cache": "< 1.11"
+ },
"require-dev": {
- "doctrine/coding-standard": "12.0.0",
+ "doctrine/cache": "^1.11|^2.0",
+ "doctrine/coding-standard": "13.0.0",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2023.1",
- "phpstan/phpstan": "1.10.56",
- "phpstan/phpstan-strict-rules": "^1.5",
- "phpunit/phpunit": "9.6.15",
- "psalm/plugin-phpunit": "0.18.4",
- "slevomat/coding-standard": "8.13.1",
- "squizlabs/php_codesniffer": "3.8.1",
+ "phpstan/phpstan": "2.1.17",
+ "phpstan/phpstan-strict-rules": "^2",
+ "phpunit/phpunit": "9.6.23",
+ "slevomat/coding-standard": "8.16.2",
+ "squizlabs/php_codesniffer": "3.13.1",
"symfony/cache": "^5.4|^6.0|^7.0",
- "symfony/console": "^4.4|^5.4|^6.0|^7.0",
- "vimeo/psalm": "4.30.0"
+ "symfony/console": "^4.4|^5.4|^6.0|^7.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -541,7 +449,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
- "source": "https://github.com/doctrine/dbal/tree/3.8.0"
+ "source": "https://github.com/doctrine/dbal/tree/3.10.0"
},
"funding": [
{
@@ -557,7 +465,7 @@
"type": "tidelift"
}
],
- "time": "2024-01-25T21:44:02+00:00"
+ "time": "2025-07-10T21:11:04+00:00"
},
{
"name": "doctrine/deprecations",
diff --git a/resources/views/v3/Reports/SafetyAndPrivacy/CountryActivityReport.blade.php b/resources/views/v3/Reports/SafetyAndPrivacy/Country/AccessRoadActivityReport.blade.php
similarity index 60%
rename from resources/views/v3/Reports/SafetyAndPrivacy/CountryActivityReport.blade.php
rename to resources/views/v3/Reports/SafetyAndPrivacy/Country/AccessRoadActivityReport.blade.php
index ee8c6c6a..673063c3 100644
--- a/resources/views/v3/Reports/SafetyAndPrivacy/CountryActivityReport.blade.php
+++ b/resources/views/v3/Reports/SafetyAndPrivacy/Country/AccessRoadActivityReport.blade.php
@@ -21,14 +21,14 @@
- |
|
- |
- گزارش نگهداری حریم راه
+ گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز
|
@@ -41,13 +41,19 @@
تعداد کل
- ساخت و ساز غیر مجاز
+ آزاد راه
|
- راه دسترسی غیر مجاز
+بزرگ راه
|
- عبور تاسیسات زیربنایی غیر مجاز
+ اصلی
+ |
+
+ فرعی
+ |
+
+ روستایی
|
@@ -78,6 +84,24 @@
|
گام سوم (برخورد)
|
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
@@ -85,15 +109,21 @@
| {{ $item->name_fa }} |
{{ $item->sum }} |
- {{ $item->{'89'}[1] }} |
- {{ $item->{'89'}[2] }} |
- {{ $item->{'89'}[3] }} |
- {{ $item->{'90'}[1] }} |
- {{ $item->{'90'}[2] }} |
- {{ $item->{'90'}[3] }} |
- {{ $item->{'91'}[1] }} |
- {{ $item->{'91'}[2] }} |
- {{ $item->{'91'}[3] }} |
+ {{ $item->axis_data['آزادراه'][1] }} |
+ {{$item->axis_data['آزادراه'][2] }} |
+ {{ $item->axis_data['آزادراه'][3] }} |
+ {{ $item->axis_data['بزرگراه'][1] }} |
+ {{ $item->axis_data['بزرگراه'][2] }} |
+ {{ $item->axis_data['بزرگراه'][3] }} |
+ {{ $item->axis_data['اصلی'][1] }} |
+ {{ $item->axis_data['اصلی'][2] }} |
+ {{ $item->axis_data['اصلی'][3] }} |
+ {{ $item->axis_data['فرعی'][1] }} |
+ {{ $item->axis_data['فرعی'][2] }} |
+ {{ $item->axis_data['فرعی'][3] }} |
+ {{ $item->axis_data['روستایی'][1] }} |
+ {{ $item->axis_data['روستایی'][2] }} |
+ {{ $item->axis_data['روستایی'][3] }} |
@endforeach
diff --git a/resources/views/v3/Reports/SafetyAndPrivacy/Country/ConstructionActivityReport.blade.php b/resources/views/v3/Reports/SafetyAndPrivacy/Country/ConstructionActivityReport.blade.php
new file mode 100644
index 00000000..1854ba63
--- /dev/null
+++ b/resources/views/v3/Reports/SafetyAndPrivacy/Country/ConstructionActivityReport.blade.php
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+ کشوری
+
+
+
+
+
+
+
+
+ |
+ تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
+ |
+
+
+
+ |
+ |
+
+
+ |
+ گزارش نگهداری حریم راه برای ساخت و ساز غیر مجاز
+ |
+
+
+
+
+
+ |
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+
+
+ @foreach ($data as $item)
+
+ | {{ $item->name_fa }} |
+ {{ $item->sum }} |
+ {{ $item->axis_data['آزادراه'][1] }} |
+ {{$item->axis_data['آزادراه'][2] }} |
+ {{ $item->axis_data['آزادراه'][3] }} |
+ {{ $item->axis_data['بزرگراه'][1] }} |
+ {{ $item->axis_data['بزرگراه'][2] }} |
+ {{ $item->axis_data['بزرگراه'][3] }} |
+ {{ $item->axis_data['اصلی'][1] }} |
+ {{ $item->axis_data['اصلی'][2] }} |
+ {{ $item->axis_data['اصلی'][3] }} |
+ {{ $item->axis_data['فرعی'][1] }} |
+ {{ $item->axis_data['فرعی'][2] }} |
+ {{ $item->axis_data['فرعی'][3] }} |
+ {{ $item->axis_data['روستایی'][1] }} |
+ {{ $item->axis_data['روستایی'][2] }} |
+ {{ $item->axis_data['روستایی'][3] }} |
+
+ @endforeach
+
+
+
+
diff --git a/resources/views/v3/Reports/SafetyAndPrivacy/Country/UtilityPassingActivityReport.blade.php b/resources/views/v3/Reports/SafetyAndPrivacy/Country/UtilityPassingActivityReport.blade.php
new file mode 100644
index 00000000..092683d7
--- /dev/null
+++ b/resources/views/v3/Reports/SafetyAndPrivacy/Country/UtilityPassingActivityReport.blade.php
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+ کشوری
+
+
+
+
+
+
+
+
+ |
+ تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
+ |
+
+
+
+ |
+ |
+
+
+ |
+ گزارش نگهداری حریم راه برای عبور تاسیسات زیربنایی غیر مجاز
+ |
+
+
+
+
+
+ |
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+
+
+ @foreach ($data as $item)
+
+ | {{ $item->name_fa }} |
+ {{ $item->sum }} |
+ {{ $item->axis_data['آزادراه'][1] }} |
+ {{$item->axis_data['آزادراه'][2] }} |
+ {{ $item->axis_data['آزادراه'][3] }} |
+ {{ $item->axis_data['بزرگراه'][1] }} |
+ {{ $item->axis_data['بزرگراه'][2] }} |
+ {{ $item->axis_data['بزرگراه'][3] }} |
+ {{ $item->axis_data['اصلی'][1] }} |
+ {{ $item->axis_data['اصلی'][2] }} |
+ {{ $item->axis_data['اصلی'][3] }} |
+ {{ $item->axis_data['فرعی'][1] }} |
+ {{ $item->axis_data['فرعی'][2] }} |
+ {{ $item->axis_data['فرعی'][3] }} |
+ {{ $item->axis_data['روستایی'][1] }} |
+ {{ $item->axis_data['روستایی'][2] }} |
+ {{ $item->axis_data['روستایی'][3] }} |
+
+ @endforeach
+
+
+
+
diff --git a/resources/views/v3/Reports/SafetyAndPrivacy/Province/AccessRoadActivityReport.blade.php b/resources/views/v3/Reports/SafetyAndPrivacy/Province/AccessRoadActivityReport.blade.php
new file mode 100644
index 00000000..e54e7ddc
--- /dev/null
+++ b/resources/views/v3/Reports/SafetyAndPrivacy/Province/AccessRoadActivityReport.blade.php
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+ استانی
+
+
+
+
+
+
+
+
+ |
+ تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
+ |
+
+
+
+ |
+ |
+
+
+ |
+ گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز
+ |
+
+
+
+
+ |
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+
+
+ @foreach ($data as $item)
+
+ | {{ $item->name_fa }} |
+ {{ $item->sum }} |
+ {{ $item->axis_data['آزادراه'][1] }} |
+ {{$item->axis_data['آزادراه'][2] }} |
+ {{ $item->axis_data['آزادراه'][3] }} |
+ {{ $item->axis_data['بزرگراه'][1] }} |
+ {{ $item->axis_data['بزرگراه'][2] }} |
+ {{ $item->axis_data['بزرگراه'][3] }} |
+ {{ $item->axis_data['اصلی'][1] }} |
+ {{ $item->axis_data['اصلی'][2] }} |
+ {{ $item->axis_data['اصلی'][3] }} |
+ {{ $item->axis_data['فرعی'][1] }} |
+ {{ $item->axis_data['فرعی'][2] }} |
+ {{ $item->axis_data['فرعی'][3] }} |
+ {{ $item->axis_data['روستایی'][1] }} |
+ {{ $item->axis_data['روستایی'][2] }} |
+ {{ $item->axis_data['روستایی'][3] }} |
+
+ @endforeach
+
+
+
+
diff --git a/resources/views/v3/Reports/SafetyAndPrivacy/ProvinceActivityReport.blade.php b/resources/views/v3/Reports/SafetyAndPrivacy/Province/ConstructionActivityReport.blade.php
similarity index 60%
rename from resources/views/v3/Reports/SafetyAndPrivacy/ProvinceActivityReport.blade.php
rename to resources/views/v3/Reports/SafetyAndPrivacy/Province/ConstructionActivityReport.blade.php
index df2f7638..509e3b0c 100644
--- a/resources/views/v3/Reports/SafetyAndPrivacy/ProvinceActivityReport.blade.php
+++ b/resources/views/v3/Reports/SafetyAndPrivacy/Province/ConstructionActivityReport.blade.php
@@ -21,14 +21,14 @@
- |
|
- |
- گزارش نگهداری حریم راه
+ گزارش نگهداری حریم راه برای ساخت و ساز غیر مجاز
|
@@ -40,13 +40,19 @@
تعداد کل
- ساخت و ساز غیر مجاز
+ آزاد راه
|
- راه دسترسی غیر مجاز
+ بزرگ راه
|
- عبور تاسیسات زیربنایی غیر مجاز
+ اصلی
+ |
+
+ فرعی
+ |
+
+ روستایی
|
@@ -77,6 +83,24 @@
|
گام سوم (برخورد)
|
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
@@ -84,15 +108,21 @@
| {{ $item->name_fa }} |
{{ $item->sum }} |
- {{ $item->{'89'}[1] }} |
- {{ $item->{'89'}[2] }} |
- {{ $item->{'89'}[3] }} |
- {{ $item->{'90'}[1] }} |
- {{ $item->{'90'}[2] }} |
- {{ $item->{'90'}[3] }} |
- {{ $item->{'91'}[1] }} |
- {{ $item->{'91'}[2] }} |
- {{ $item->{'91'}[3] }} |
+ {{ $item->axis_data['آزادراه'][1] }} |
+ {{$item->axis_data['آزادراه'][2] }} |
+ {{ $item->axis_data['آزادراه'][3] }} |
+ {{ $item->axis_data['بزرگراه'][1] }} |
+ {{ $item->axis_data['بزرگراه'][2] }} |
+ {{ $item->axis_data['بزرگراه'][3] }} |
+ {{ $item->axis_data['اصلی'][1] }} |
+ {{ $item->axis_data['اصلی'][2] }} |
+ {{ $item->axis_data['اصلی'][3] }} |
+ {{ $item->axis_data['فرعی'][1] }} |
+ {{ $item->axis_data['فرعی'][2] }} |
+ {{ $item->axis_data['فرعی'][3] }} |
+ {{ $item->axis_data['روستایی'][1] }} |
+ {{ $item->axis_data['روستایی'][2] }} |
+ {{ $item->axis_data['روستایی'][3] }} |
@endforeach
diff --git a/resources/views/v3/Reports/SafetyAndPrivacy/Province/UtilityPassingActivityReport.blade.php b/resources/views/v3/Reports/SafetyAndPrivacy/Province/UtilityPassingActivityReport.blade.php
new file mode 100644
index 00000000..407ca02a
--- /dev/null
+++ b/resources/views/v3/Reports/SafetyAndPrivacy/Province/UtilityPassingActivityReport.blade.php
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+ استانی
+
+
+
+
+
+
+
+
+ |
+ تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
+ |
+
+
+
+ |
+ |
+
+
+ |
+ گزارش نگهداری حریم راه برای عبور تاسیسات زیربنایی غیر مجاز
+ |
+
+
+
+
+ |
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+ گام اول (شناسایی)
+ |
+
+ گام دوم (مستندات قضایی)
+ |
+
+ گام سوم (برخورد)
+ |
+
+
+
+ @foreach ($data as $item)
+
+ | {{ $item->name_fa }} |
+ {{ $item->sum }} |
+ {{ $item->axis_data['آزادراه'][1] }} |
+ {{$item->axis_data['آزادراه'][2] }} |
+ {{ $item->axis_data['آزادراه'][3] }} |
+ {{ $item->axis_data['بزرگراه'][1] }} |
+ {{ $item->axis_data['بزرگراه'][2] }} |
+ {{ $item->axis_data['بزرگراه'][3] }} |
+ {{ $item->axis_data['اصلی'][1] }} |
+ {{ $item->axis_data['اصلی'][2] }} |
+ {{ $item->axis_data['اصلی'][3] }} |
+ {{ $item->axis_data['فرعی'][1] }} |
+ {{ $item->axis_data['فرعی'][2] }} |
+ {{ $item->axis_data['فرعی'][3] }} |
+ {{ $item->axis_data['روستایی'][1] }} |
+ {{ $item->axis_data['روستایی'][2] }} |
+ {{ $item->axis_data['روستایی'][3] }} |
+
+ @endforeach
+
+
+
+
diff --git a/routes/v3.php b/routes/v3.php
index 294a407f..03efd856 100644
--- a/routes/v3.php
+++ b/routes/v3.php
@@ -18,6 +18,9 @@ use App\Http\Controllers\V3\Dashboard\OtpManagementController;
use App\Http\Controllers\V3\Dashboard\RoadMaintenanceStationController;
use App\Http\Controllers\V3\Dashboard\RoadPatrol\ReportController;
use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorController;
+use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorReport\AccessRoadActivityController;
+use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorReport\ConstructionActivityController;
+use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorReport\UtilityPassingActivityController;
use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\OperatorReportController;
use App\Http\Controllers\V3\Dashboard\SafetyAndPrivacy\SupervisorController;
use App\Http\Controllers\V3\FMSVehicleManagementController;
@@ -389,20 +392,36 @@ Route::prefix('safety_and_privacy')
Route::post('/confirm/{safetyAndPrivacy}', 'confirm')->name('confirm');
Route::post('/reject/{safetyAndPrivacy}', 'reject')->name('reject');
});
- });
+ Route::prefix('operator_report')
+ ->name('operatorReport.');
+ Route::prefix('access_road')
+ ->name('accessRoad.')
+ ->controller(AccessRoadActivityController::class)
+ ->group(function () {
+ Route::get('/country_activity', 'countryActivity')->name('countryActivity');
+ Route::get('/province_activity', 'provinceActivity')->name('provinceActivity');
+ Route::get('/country_excel_activity', 'countryExcelActivity')->name('countryExcelActivity');
+ Route::get('/province_excel_activity', 'provinceExcelActivity')->name('provinceExcelActivity');
+ });
+ Route::prefix('construction_activity')
+ ->name('constructionActivity.')
+ ->controller(ConstructionActivityController::class)
+ ->group(function () {
+ Route::get('/country_activity', 'countryActivity')->name('countryActivity');
+ Route::get('/province_activity', 'provinceActivity')->name('provinceActivity');
+ Route::get('/country_excel_activity', 'countryExcelActivity')->name('countryExcelActivity');
+ Route::get('/province_excel_activity', 'provinceExcelActivity')->name('provinceExcelActivity');
+ });
+ Route::prefix('utility_passing_activity')
+ ->name('utilityPassingActivity.')
+ ->controller(UtilityPassingActivityController::class)
+ ->group(function () {
+ Route::get('/country_activity', 'countryActivity')->name('countryActivity');
+ Route::get('/province_activity', 'provinceActivity')->name('provinceActivity');
+ Route::get('/country_excel_activity', 'countryExcelActivity')->name('countryExcelActivity');
+ Route::get('/province_excel_activity', 'provinceExcelActivity')->name('provinceExcelActivity');
+ });
-Route::prefix('safety_and_privacy_report')
- ->name('SafetyAndPrivacyReport.')
- ->group(function () {
- Route::prefix('operator')
- ->name('operator.')
- ->controller(OperatorReportController::class)
- ->group(function () {
- Route::get('/country_activity', 'countryActivity')->name('countryActivity');
- Route::get('/province_activity', 'provinceActivity')->name('provinceActivity');
- Route::get('/country_excel_activity', 'countryExcelActivity')->name('countryExcelActivity');
- Route::get('/province_excel_activity', 'provinceExcelActivity')->name('provinceExcelActivity');
- });
});
Route::prefix('otp')