Merge pull request from witelgroup/develop to witelgroup/main
Develop
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
||||
|
||||
use App\Models\City;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -27,8 +28,9 @@ class ExtractGeometryForCities extends Command
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
public function handle()
|
||||
public function handle(): int
|
||||
{
|
||||
$jsonPath = $this->argument('jsonPath');
|
||||
|
||||
@@ -103,8 +105,6 @@ class ExtractGeometryForCities extends Command
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$query = City::query()
|
||||
->find($cityId);
|
||||
|
||||
@@ -122,8 +122,6 @@ class ExtractGeometryForCities extends Command
|
||||
{
|
||||
$this->error("Something went wrong: $th");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return parent::SUCCESS;
|
||||
|
||||
@@ -4,16 +4,18 @@ namespace App\Enums;
|
||||
|
||||
enum MissionTypes: int
|
||||
{
|
||||
case SAATY= 1;
|
||||
case ROZANE = 2;
|
||||
case NO_PROCESS = 3;
|
||||
case PROCESS_SAATY= 1;
|
||||
case PROCESS_ROZANE = 2;
|
||||
case NO_PROCESS_SAATY = 3;
|
||||
case NO_PROCESS_ROZANE = 4;
|
||||
|
||||
public static function name(int $state): string
|
||||
{
|
||||
$mapArray = [
|
||||
1 => 'ساعتی',
|
||||
2 => 'روزانه',
|
||||
3 => 'بدون فرآیند',
|
||||
1 => ' با فرایند (ساعتی)',
|
||||
2 => 'با فرایند(روزانه)',
|
||||
3 => 'بدون فرآیند(ساعتی)',
|
||||
4 => 'بدون فرایند (روزانه)'
|
||||
];
|
||||
|
||||
return $mapArray[$state];
|
||||
|
||||
@@ -26,7 +26,8 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
||||
$country = array_search(-1, array_column($data['data'], 'province_id'));
|
||||
|
||||
$activities[] = [
|
||||
'name' => 'کل کشور',
|
||||
'province_id' => -1,
|
||||
'province_fa' => 'کل کشور',
|
||||
'tedade' => $data['data'][$country]->tedade,
|
||||
'police_rah' => $data['data'][$country]->police_rah,
|
||||
'gozaresh_gasht' => $data['data'][$country]->gozaresh_gasht,
|
||||
@@ -35,6 +36,9 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
||||
'vasel_shode_bimeh' => $data['data'][$country]->vasel_shode_bimeh ?? 0,
|
||||
'vasel_shode_daghi' => $data['data'][$country]->vasel_shode_daghi ?? 0,
|
||||
'vasel_shode_final' => $data['data'][$country]->vasel_shode_final ?? 0,
|
||||
'egdam' => $data['data'][$country]->egdam ?? 0,
|
||||
'khatm' => $data['data'][$country]->khatm ?? 0,
|
||||
'pardakht' => $data['data'][$country]->pardakht ?? 0,
|
||||
];
|
||||
|
||||
foreach (Province::all() as $province) {
|
||||
@@ -43,7 +47,8 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
||||
|
||||
if ($existingProvince) {
|
||||
$activities[] = [
|
||||
'name' => $province->name_fa,
|
||||
'province_id' => $province->id,
|
||||
'province_fa' => $province->name_fa,
|
||||
'tedade' => $data['data'][$existingProvince]->tedade,
|
||||
'police_rah' => $data['data'][$existingProvince]->police_rah,
|
||||
'gozaresh_gasht' => $data['data'][$existingProvince]->gozaresh_gasht,
|
||||
@@ -52,10 +57,14 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
||||
'vasel_shode_bimeh' => $data['data'][$existingProvince]->vasel_shode_bimeh ?? 0,
|
||||
'vasel_shode_daghi' => $data['data'][$existingProvince]->vasel_shode_daghi ?? 0,
|
||||
'vasel_shode_final' => $data['data'][$existingProvince]->vasel_shode_final ?? 0,
|
||||
'egdam' => $data['data'][$country]->egdam ?? 0,
|
||||
'khatm' => $data['data'][$country]->khatm ?? 0,
|
||||
'pardakht' => $data['data'][$country]->pardakht ?? 0,
|
||||
];
|
||||
} else {
|
||||
$activities[] = [
|
||||
'name' => $province->name_fa,
|
||||
'province_id' => $province->id,
|
||||
'province_fa' => $province->name_fa,
|
||||
'tedade' => "",
|
||||
'police_rah' => "",
|
||||
'gozaresh_gasht' => "",
|
||||
@@ -64,6 +73,9 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
||||
'vasel_shode_bimeh' => "",
|
||||
'vasel_shode_daghi' => "",
|
||||
'vasel_shode_final' => "",
|
||||
'egdam' => "",
|
||||
'khatm' => "",
|
||||
'pardakht' => "",
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
|
||||
$province = array_search(-1, array_column($reportData, 'province_id'));
|
||||
|
||||
$activities[] = [
|
||||
'name' => 'کل استان',
|
||||
'city_id' => -1,
|
||||
'city_fa' => 'کل استان',
|
||||
'tedade' => $reportData['data'][$province]->tedade,
|
||||
'police_rah' => $reportData['data'][$province]->police_rah,
|
||||
'gozaresh_gasht' => $reportData['data'][$province]->gozaresh_gasht,
|
||||
@@ -35,6 +36,9 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
|
||||
'vasel_shode_bimeh' => $reportData['data'][$province]->vasel_shode_bimeh ?? 0,
|
||||
'vasel_shode_daghi' => $reportData['data'][$province]->vasel_shode_daghi ?? 0,
|
||||
'vasel_shode_final' => $reportData['data'][$province]->vasel_shode_final ?? 0,
|
||||
'egdam' => $reportData['data'][$province]->egdam ?? 0,
|
||||
'khatm' => $reportData['data'][$province]->khatm ?? 0,
|
||||
'pardakht' => $reportData['data'][$province]->pardakht ?? 0,
|
||||
];
|
||||
|
||||
foreach ($inputData['cities'] as $city) {
|
||||
@@ -43,7 +47,8 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
|
||||
|
||||
if ($existingCity) {
|
||||
$activities[] = [
|
||||
'name' => $city->name_fa,
|
||||
'city_id' => $city->id,
|
||||
'city_fa' => $city->name_fa,
|
||||
'tedade' => $reportData['data'][$existingCity]->tedade,
|
||||
'police_rah' => $reportData['data'][$existingCity]->police_rah,
|
||||
'gozaresh_gasht' => $reportData['data'][$existingCity]->gozaresh_gasht,
|
||||
@@ -52,10 +57,13 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
|
||||
'vasel_shode_bimeh' => $reportData['data'][$existingCity]->vasel_shode_bimeh ?? 0,
|
||||
'vasel_shode_daghi' => $reportData['data'][$existingCity]->vasel_shode_daghi ?? 0,
|
||||
'vasel_shode_final' => $reportData['data'][$existingCity]->vasel_shode_final ?? 0,
|
||||
'egdam' => $reportData['data'][$province]->egdam ?? 0,
|
||||
'khatm' => $reportData['data'][$province]->khatm ?? 0,
|
||||
'pardakht' => $reportData['data'][$province]->pardakht ?? 0,
|
||||
];
|
||||
} else {
|
||||
$activities[] = [
|
||||
'name' => $city->name_fa,
|
||||
'city_fa' => $city->name_fa,
|
||||
'tedade' => "",
|
||||
'police_rah' => "",
|
||||
'gozaresh_gasht' => "",
|
||||
@@ -64,6 +72,9 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
|
||||
'vasel_shode_bimeh' => "",
|
||||
'vasel_shode_daghi' => "",
|
||||
'vasel_shode_final' => "",
|
||||
'egdam' => "",
|
||||
'khatm' => "",
|
||||
'pardakht' => "",
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,30 +21,50 @@ class AccessRoadReport implements FromView, WithEvents, ShouldAutoSize, WithDraw
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = $this->data;
|
||||
$existedProvinces = array_keys($data);
|
||||
$axis = [
|
||||
1 => 'آزادراه',
|
||||
2 => 'بزرگراه',
|
||||
3 => 'اصلی',
|
||||
4 => 'فرعی',
|
||||
5 => 'روستایی'
|
||||
];
|
||||
$grid = [];
|
||||
$national = null;
|
||||
|
||||
foreach (Province::all() as $value) {
|
||||
$provinceId = $value->id;
|
||||
foreach ($this->data as $r) {
|
||||
$pid = $r->province_id;
|
||||
$name = $r->province_name;
|
||||
$axisKey = $axis[$r->axis_type_id] ?? "axis_{$r->axis_type_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],
|
||||
],
|
||||
];
|
||||
if ($pid === -1) {
|
||||
$national ??= ['province_name' => $name, 'total' => 0];
|
||||
$national["{$axisKey}_1"] = $r->s1;
|
||||
$national["{$axisKey}_2"] = $r->s2;
|
||||
$national["{$axisKey}_3"] = $r->s3;
|
||||
$national['total'] = $r->total_sum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($grid[$pid])) {
|
||||
$grid[$pid] = ['province_name' => $name, 'total' => 0];
|
||||
}
|
||||
$grid[$pid]["{$axisKey}_1"] = $r->s1;
|
||||
$grid[$pid]["{$axisKey}_2"] = $r->s2;
|
||||
$grid[$pid]["{$axisKey}_3"] = $r->s3;
|
||||
$grid[$pid]['total'] = $r->total_sum;
|
||||
}
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Country.AccessRoadReport', [
|
||||
'data' => $data,
|
||||
$exportRows = [];
|
||||
if ($national) $exportRows[] = $national;
|
||||
foreach ($grid as $row) {
|
||||
$exportRows[] = $row;
|
||||
}
|
||||
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Country.AccessRoadActivityReport', [
|
||||
'rows' => $exportRows,
|
||||
'axis' => $axis,
|
||||
'axisOrder' => array_keys($axis),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,18 +2,13 @@
|
||||
|
||||
namespace App\Exports\V3\SafetyAndPrivacy\Country;
|
||||
|
||||
use App\Models\EdarateShahri;
|
||||
use App\Models\Province;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithDrawings;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use Maatwebsite\Excel\Events\AfterSheet;
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
|
||||
class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
|
||||
{
|
||||
@@ -22,30 +17,50 @@ class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDr
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = $this->data;
|
||||
$existedProvinces = array_keys($data);
|
||||
$axis = [
|
||||
1 => 'آزادراه',
|
||||
2 => 'بزرگراه',
|
||||
3 => 'اصلی',
|
||||
4 => 'فرعی',
|
||||
5 => 'روستایی'
|
||||
];
|
||||
$grid = [];
|
||||
$national = null;
|
||||
|
||||
foreach (Province::all() as $value) {
|
||||
$provinceId = $value->id;
|
||||
foreach ($this->data as $r) {
|
||||
$pid = $r->province_id;
|
||||
$name = $r->province_name;
|
||||
$axisKey = $axis[$r->axis_type_id] ?? "axis_{$r->axis_type_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],
|
||||
],
|
||||
];
|
||||
if ($pid === -1) {
|
||||
$national ??= ['province_name' => $name, 'total' => 0];
|
||||
$national["{$axisKey}_1"] = $r->s1;
|
||||
$national["{$axisKey}_2"] = $r->s2;
|
||||
$national["{$axisKey}_3"] = $r->s3;
|
||||
$national['total'] = $r->total_sum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($grid[$pid])) {
|
||||
$grid[$pid] = ['province_name' => $name, 'total' => 0];
|
||||
}
|
||||
$grid[$pid]["{$axisKey}_1"] = $r->s1;
|
||||
$grid[$pid]["{$axisKey}_2"] = $r->s2;
|
||||
$grid[$pid]["{$axisKey}_3"] = $r->s3;
|
||||
$grid[$pid]['total'] = $r->total_sum;
|
||||
}
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Country.ConstructionReport', [
|
||||
'data' => $data,
|
||||
$exportRows = [];
|
||||
if ($national) $exportRows[] = $national;
|
||||
foreach ($grid as $row) {
|
||||
$exportRows[] = $row;
|
||||
}
|
||||
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Country.ConstructionActivityReport', [
|
||||
'rows' => $exportRows,
|
||||
'axis' => $axis,
|
||||
'axisOrder' => array_keys($axis),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,30 +22,50 @@ class UtilityPassingReport implements FromView, WithEvents, ShouldAutoSize, With
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = $this->data;
|
||||
$existedProvinces = array_keys($data);
|
||||
$axis = [
|
||||
1 => 'آزادراه',
|
||||
2 => 'بزرگراه',
|
||||
3 => 'اصلی',
|
||||
4 => 'فرعی',
|
||||
5 => 'روستایی'
|
||||
];
|
||||
$grid = [];
|
||||
$national = null;
|
||||
|
||||
foreach (Province::all() as $value) {
|
||||
$provinceId = $value->id;
|
||||
foreach ($this->data as $r) {
|
||||
$pid = $r->province_id;
|
||||
$name = $r->province_name;
|
||||
$axisKey = $axis[$r->axis_type_id] ?? "axis_{$r->axis_type_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],
|
||||
],
|
||||
];
|
||||
if ($pid === -1) {
|
||||
$national ??= ['province_name' => $name, 'total' => 0];
|
||||
$national["{$axisKey}_1"] = $r->s1;
|
||||
$national["{$axisKey}_2"] = $r->s2;
|
||||
$national["{$axisKey}_3"] = $r->s3;
|
||||
$national['total'] = $r->total_sum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($grid[$pid])) {
|
||||
$grid[$pid] = ['province_name' => $name, 'total' => 0];
|
||||
}
|
||||
$grid[$pid]["{$axisKey}_1"] = $r->s1;
|
||||
$grid[$pid]["{$axisKey}_2"] = $r->s2;
|
||||
$grid[$pid]["{$axisKey}_3"] = $r->s3;
|
||||
$grid[$pid]['total'] = $r->total_sum;
|
||||
}
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Country.UtilityPassingReport', [
|
||||
'data' => $data,
|
||||
$exportRows = [];
|
||||
if ($national) $exportRows[] = $national;
|
||||
foreach ($grid as $row) {
|
||||
$exportRows[] = $row;
|
||||
}
|
||||
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Country.UtilityPassingActivityReport', [
|
||||
'rows' => $exportRows,
|
||||
'axis' => $axis,
|
||||
'axisOrder' => array_keys($axis),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,35 +16,51 @@ use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
|
||||
class AccessRoadReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
|
||||
{
|
||||
public function __construct(private array $data, public Request $request){}
|
||||
public function __construct(private array $data){}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = $this->data;
|
||||
$existedCities = array_keys($data);
|
||||
$edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
|
||||
$axis = [
|
||||
1 => 'آزادراه',
|
||||
2 => 'بزرگراه',
|
||||
3 => 'اصلی',
|
||||
4 => 'فرعی',
|
||||
5 => 'روستایی'
|
||||
];
|
||||
$grid = [];
|
||||
$summary = null; // کل استان
|
||||
|
||||
foreach ($edarat as $value) {
|
||||
$edareId = $value->id;
|
||||
foreach ($this->data as $r) {
|
||||
$eid = $r->edare_id;
|
||||
$name = $r->edare_name;
|
||||
$axisKey = $axis[$r->axis_type_id] ?? "axis_{$r->axis_type_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],
|
||||
],
|
||||
];
|
||||
if ($eid === -1) {
|
||||
$summary ??= ['edare_name' => $name, 'total' => 0];
|
||||
$summary["{$axisKey}_1"] = $r->s1;
|
||||
$summary["{$axisKey}_2"] = $r->s2;
|
||||
$summary["{$axisKey}_3"] = $r->s3;
|
||||
$summary['total'] = $r->total_sum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($grid[$eid])) {
|
||||
$grid[$eid] = ['edare_name' => $name, 'total' => 0];
|
||||
}
|
||||
$grid[$eid]["{$axisKey}_1"] = $r->s1;
|
||||
$grid[$eid]["{$axisKey}_2"] = $r->s2;
|
||||
$grid[$eid]["{$axisKey}_3"] = $r->s3;
|
||||
$grid[$eid]['total'] = $r->total_sum;
|
||||
}
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Province.AccessRoadReport', [
|
||||
'data' => $data,
|
||||
$exportRows = [];
|
||||
if ($summary) $exportRows[] = $summary;
|
||||
foreach ($grid as $row) $exportRows[] = $row;
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Province.AccessRoadActivityReport', [
|
||||
'rows' => $exportRows,
|
||||
'axis' => $axis,
|
||||
'axisOrder' => array_keys($axis),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace App\Exports\V3\SafetyAndPrivacy\Province;
|
||||
|
||||
use App\Models\EdarateShahri;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
@@ -12,39 +11,54 @@ use Maatwebsite\Excel\Concerns\WithDrawings;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use Maatwebsite\Excel\Events\AfterSheet;
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
|
||||
class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
|
||||
{
|
||||
public function __construct(private array $data, public Request $request){}
|
||||
public function __construct(private array $data){}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = $this->data;
|
||||
$existedCities = array_keys($data);
|
||||
$edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
|
||||
$axis = [
|
||||
1 => 'آزادراه',
|
||||
2 => 'بزرگراه',
|
||||
3 => 'اصلی',
|
||||
4 => 'فرعی',
|
||||
5 => 'روستایی'
|
||||
];
|
||||
$grid = [];
|
||||
$summary = null; // کل استان
|
||||
|
||||
foreach ($edarat as $value) {
|
||||
$edareId = $value->id;
|
||||
foreach ($this->data as $r) {
|
||||
$eid = $r->edare_id;
|
||||
$name = $r->edare_name;
|
||||
$axisKey = $axis[$r->axis_type_id] ?? "axis_{$r->axis_type_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],
|
||||
],
|
||||
];
|
||||
if ($eid === -1) {
|
||||
$summary ??= ['edare_name' => $name, 'total' => 0];
|
||||
$summary["{$axisKey}_1"] = $r->s1;
|
||||
$summary["{$axisKey}_2"] = $r->s2;
|
||||
$summary["{$axisKey}_3"] = $r->s3;
|
||||
$summary['total'] = $r->total_sum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($grid[$eid])) {
|
||||
$grid[$eid] = ['edare_name' => $name, 'total' => 0];
|
||||
}
|
||||
$grid[$eid]["{$axisKey}_1"] = $r->s1;
|
||||
$grid[$eid]["{$axisKey}_2"] = $r->s2;
|
||||
$grid[$eid]["{$axisKey}_3"] = $r->s3;
|
||||
$grid[$eid]['total'] = $r->total_sum;
|
||||
}
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Province.ConstructionReport', [
|
||||
'data' => $data,
|
||||
$exportRows = [];
|
||||
if ($summary) $exportRows[] = $summary;
|
||||
foreach ($grid as $row) $exportRows[] = $row;
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Province.ConstructionActivityReport', [
|
||||
'rows' => $exportRows,
|
||||
'axis' => $axis,
|
||||
'axisOrder' => array_keys($axis),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,35 +16,51 @@ use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
|
||||
class UtilityPassingReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
|
||||
{
|
||||
public function __construct(private array $data, public Request $request){}
|
||||
public function __construct(private array $data){}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$data = $this->data;
|
||||
$existedCities = array_keys($data);
|
||||
$edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
|
||||
$axis = [
|
||||
1 => 'آزادراه',
|
||||
2 => 'بزرگراه',
|
||||
3 => 'اصلی',
|
||||
4 => 'فرعی',
|
||||
5 => 'روستایی'
|
||||
];
|
||||
$grid = [];
|
||||
$summary = null; // کل استان
|
||||
|
||||
foreach ($edarat as $value) {
|
||||
$edareId = $value->id;
|
||||
foreach ($this->data as $r) {
|
||||
$eid = $r->edare_id;
|
||||
$name = $r->edare_name;
|
||||
$axisKey = $axis[$r->axis_type_id] ?? "axis_{$r->axis_type_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],
|
||||
],
|
||||
];
|
||||
if ($eid === -1) {
|
||||
$summary ??= ['edare_name' => $name, 'total' => 0];
|
||||
$summary["{$axisKey}_1"] = $r->s1;
|
||||
$summary["{$axisKey}_2"] = $r->s2;
|
||||
$summary["{$axisKey}_3"] = $r->s3;
|
||||
$summary['total'] = $r->total_sum;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($grid[$eid])) {
|
||||
$grid[$eid] = ['edare_name' => $name, 'total' => 0];
|
||||
}
|
||||
$grid[$eid]["{$axisKey}_1"] = $r->s1;
|
||||
$grid[$eid]["{$axisKey}_2"] = $r->s2;
|
||||
$grid[$eid]["{$axisKey}_3"] = $r->s3;
|
||||
$grid[$eid]['total'] = $r->total_sum;
|
||||
}
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Province.UtilityPassingReport', [
|
||||
'data' => $data,
|
||||
$exportRows = [];
|
||||
if ($summary) $exportRows[] = $summary;
|
||||
foreach ($grid as $row) $exportRows[] = $row;
|
||||
|
||||
return view('v3.Reports.SafetyAndPrivacy.Province.UtilityPassingActivityReport', [
|
||||
'rows' => $exportRows,
|
||||
'axis' => $axis,
|
||||
'axisOrder' => array_keys($axis),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,10 @@ class HomeContentController extends Controller
|
||||
|
||||
public function getAllCitiesByProvince($id)
|
||||
{
|
||||
$cities = \App\Models\City::where('province_id', $id)->where('type_id', 1)->get();
|
||||
$cities = \App\Models\City::query()
|
||||
->where('province_id', $id)
|
||||
->where('type_id', 1)
|
||||
->get(['id', 'name_fa', 'province_id','center_lat','center_long']);
|
||||
// $cities = \App\Models\City::where('province_id', $id)->get();
|
||||
|
||||
return response()->json([
|
||||
|
||||
@@ -22,13 +22,13 @@ class CMMSMachinesController extends Controller
|
||||
$request,
|
||||
allowedFilters: ['*'],
|
||||
allowedSortings: ['*'],
|
||||
allowedSelects: ['machine_code', 'id', 'plak_number', 'car_name']
|
||||
allowedSelects: ['machine_code', 'id', 'plak_number', 'car_name', 'car_type']
|
||||
));
|
||||
}
|
||||
|
||||
public function list(): JsonResponse
|
||||
{
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code', 'id', 'plak_number', 'car_name']);
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code', 'id', 'plak_number', 'car_name', 'car_type']);
|
||||
|
||||
return $this->successResponse($machinesList);
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ class AccidentReceiptController extends Controller
|
||||
'police_file_date' => $request->police_file_date ?? null,
|
||||
'status' => AccidentStates::BEDON_EGHDAM->value,
|
||||
'status_fa' => AccidentStates::name(AccidentStates::BEDON_EGHDAM->value),
|
||||
'driver_rate' => $request->driver_rate,
|
||||
];
|
||||
|
||||
$sum = 0;
|
||||
@@ -104,6 +105,7 @@ class AccidentReceiptController extends Controller
|
||||
|
||||
$accidentData['ojrate_nasb'] = $ojrate_nasb;
|
||||
$accidentData['sum'] = $sum;
|
||||
$accidentData['driver_share_amount'] = ($request->sum * $request->driver_rate)/100;
|
||||
|
||||
$accident = Accident::query()->create($accidentData);
|
||||
$accident->damage_picture1 = FileFacade::save($request->file('damage_picture1'), "receipts_files/{$accident->id}");
|
||||
@@ -153,6 +155,7 @@ class AccidentReceiptController extends Controller
|
||||
'report_base' => $request->report_base,
|
||||
'police_serial' => $request->police_serial ?? null,
|
||||
'police_file_date' => $request->police_file_date ?? null,
|
||||
'driver_rate' => $request->driver_rate,
|
||||
];
|
||||
|
||||
if ($request->report_base && $accident->police_file) {
|
||||
@@ -192,6 +195,8 @@ class AccidentReceiptController extends Controller
|
||||
|
||||
$accidentData['ojrate_nasb'] = $ojrate_nasb;
|
||||
$accidentData['sum'] = $sum;
|
||||
$accidentData['driver_share_amount'] = ($request->sum * $request->driver_rate)/100;
|
||||
|
||||
|
||||
$accident->update($accidentData);
|
||||
|
||||
@@ -247,13 +252,24 @@ class AccidentReceiptController extends Controller
|
||||
{
|
||||
DB::transaction(function () use ($request, $accident) {
|
||||
|
||||
$final_amount = $accident->driver_share_amount - ($accident->deposit_insurance_amount + $accident->deposit_daghi_amount);
|
||||
|
||||
if ($final_amount > 0) {
|
||||
$status = AccidentStates::SABT_FISH->value;
|
||||
$status_fa = AccidentStates::name($status);
|
||||
}
|
||||
elseif ($final_amount == 0) {
|
||||
$status = AccidentStates::PARDAKHT_FACTOR->value;
|
||||
$status_fa = AccidentStates::name($status);
|
||||
}
|
||||
|
||||
$accident->update([
|
||||
'deposit_insurance_image' => $request->has('deposit_insurance_image') ? FileFacade::save($request->deposit_insurance_image, "receipts_files/{$accident->id}/deposit_insurance") : null,
|
||||
'deposit_insurance_amount' => $request->deposit_insurance_amount ?? 0,
|
||||
'deposit_daghi_image' => $request->has('deposit_daghi_image') ? FileFacade::save($request->deposit_daghi_image, "receipts_files/{$accident->id}/deposit_daghi") : null,
|
||||
'deposit_daghi_amount' => $request->deposit_daghi_amount ?? 0,
|
||||
'status' => AccidentStates::SABT_FISH->value,
|
||||
'status_fa' => AccidentStates::name(AccidentStates::SABT_FISH->value),
|
||||
'status' => $status,
|
||||
'status_fa' => $status_fa,
|
||||
]);
|
||||
|
||||
auth()->user()->addActivityComplete(1132);
|
||||
@@ -267,7 +283,7 @@ class AccidentReceiptController extends Controller
|
||||
*/
|
||||
public function submitInvoice(Accident $accident, PaymentService $paymentService): JsonResponse
|
||||
{
|
||||
$final_amount = $accident->sum - ($accident->deposit_insurance_amount + $accident->deposit_daghi_amount);
|
||||
$final_amount = $accident->driver_share_amount - ($accident->deposit_insurance_amount + $accident->deposit_daghi_amount);
|
||||
|
||||
throw_if($final_amount < 0, new ProhibitedAction('مبالغ داغی و بیمه از مبلغ کل بیشتر می باشد.'));
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ use App\Services\Cartables\AccidentReceiptTableService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use PhpOffice\PhpSpreadsheet\Exception;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
class AccidentReceiptReportController extends Controller
|
||||
@@ -38,6 +39,10 @@ class AccidentReceiptReportController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function countryExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
|
||||
{
|
||||
$data = $accidentReceiptTableService->countryReport($request);
|
||||
@@ -45,6 +50,10 @@ class AccidentReceiptReportController extends Controller
|
||||
return Excel::download(new CountryReport($data), $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function provinceExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
|
||||
{
|
||||
$data = $accidentReceiptTableService->provinceReport($request);
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\V3\Dashboard\Harim;
|
||||
use App\Enums\HarimStates;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\V3\Dashboard\Harim\PanjareVahed\GetAccessRoadRequest;
|
||||
use App\Http\Requests\V3\Dashboard\Harim\PanjareVahed\ReceiveNewRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\City;
|
||||
use App\Models\Harim;
|
||||
@@ -15,7 +16,7 @@ class PanjareVahedController extends Controller
|
||||
{
|
||||
use ApiResponse;
|
||||
|
||||
public function receiveNewRequests(Request $request)
|
||||
public function receiveNewRequest(ReceiveNewRequest $request)
|
||||
{
|
||||
try {
|
||||
$city = City::query()
|
||||
@@ -63,12 +64,19 @@ class PanjareVahedController extends Controller
|
||||
'province' => $city->province()->first()->name_fa,
|
||||
]);
|
||||
}
|
||||
public function getAccessRoad(GetAccessRoadRequest $request, Harim $harim)
|
||||
|
||||
public function getAccessRoad(GetAccessRoadRequest $request)
|
||||
{
|
||||
Harim::update([
|
||||
'panjarevahed_id' => $request->panjarevahed_id,
|
||||
'polygon' => $request->polygon,
|
||||
$state = HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value;
|
||||
|
||||
Harim::query()
|
||||
->firstWhere('panjare_vahed_id', '=', $request->panjare_vahed_id)
|
||||
->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
'access_road' => $request->access_road,
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
|
||||
namespace App\Http\Controllers\V3\Dashboard\Mission;
|
||||
|
||||
use App\Enums\MissionCategory;
|
||||
use App\Enums\MissionStates;
|
||||
use App\Enums\MissionTypes;
|
||||
use App\Enums\MissionZones;
|
||||
use App\Events\V3\Dashboard\Mission\SendDataToFMSEvent;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\V3\Dashboard\RoadPatrol\OperatorController;
|
||||
use App\Http\Requests\V3\Mission\ControlUnit\FinishRequest;
|
||||
use App\Http\Requests\V3\Mission\ControlUnit\NoProcessRequest;
|
||||
use App\Http\Requests\V3\Mission\ControlUnit\StartRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\Mission;
|
||||
@@ -64,48 +61,13 @@ class ControlUnitController extends Controller
|
||||
]);
|
||||
});
|
||||
|
||||
if ($mission->category_id == 2) {
|
||||
$rpc = new OperatorController();
|
||||
$rpc->store($mission);
|
||||
}
|
||||
|
||||
SendDataToFMSEvent::dispatch($mission);
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
|
||||
public function noProcess(NoProcessRequest $request): JsonResponse
|
||||
{
|
||||
DB::transaction(function () use ($request) {
|
||||
$user = auth()->user();
|
||||
$zone= $request->zone;
|
||||
$type= MissionTypes::NO_PROCESS->value;
|
||||
$state = MissionStates::CREATED_NO_PROCESS->value;
|
||||
|
||||
$mission = Mission::query()->create([
|
||||
'user_id' => $user->id,
|
||||
'username' => $user->username,
|
||||
'province_id' => $user->province_id,
|
||||
'province_name' => $user->province_fa,
|
||||
'edare_shahri_id' => $user->edarate_shahri_id ?? null,
|
||||
'edare_shahri_name' => $user->edarate_shahri_name ?? null,
|
||||
'zone' => $zone,
|
||||
'zone_fa' => MissionZones::name($zone),
|
||||
'type' => $type,
|
||||
'type_fa' => MissionTypes::name($type),
|
||||
'start_date' => $request->start_date,
|
||||
'end_date' => $request->end_date,
|
||||
'end_point' => $request->end_point,
|
||||
'area' => json_encode($request->area),
|
||||
'category_id' => $request->category_id,
|
||||
'category_name' => MissionCategory::name($request->category_id),
|
||||
'start_time' => $request->start_date,
|
||||
'finish_time' => $request->end_date,
|
||||
'state_id' => $state,
|
||||
'state_name' => MissionStates::name($state),
|
||||
]);
|
||||
|
||||
$mission->rahdaran()->sync($request->rahdaran);
|
||||
$mission->machines()->attach($request->machines);
|
||||
$mission->rahdaran()->attach($request->driver, ['is_driver' => true]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,14 @@ use App\Enums\MissionTypes;
|
||||
use App\Enums\MissionZones;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\V3\Dashboard\RoadPatrol\OperatorController;
|
||||
use App\Http\Requests\V3\Mission\RequestPortal\NoProcessRequest;
|
||||
use App\Http\Requests\V3\Mission\RequestPortal\StoreRequest;
|
||||
use App\Http\Requests\V3\Mission\RequestPortal\UpdateRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\Mission;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Services\Cartables\Mission\RequestPortalService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -32,6 +34,7 @@ class RequestPortalController extends Controller
|
||||
DB::transaction(function () use ($request) {
|
||||
$user = auth()->user();
|
||||
$state = MissionStates::REQUEST_CREATED->value;
|
||||
$category = $request->category_id;
|
||||
|
||||
$mission = Mission::query()->create([
|
||||
'user_id' => $user->id,
|
||||
@@ -53,20 +56,15 @@ class RequestPortalController extends Controller
|
||||
'description' => $request->description,
|
||||
'end_point' => $request->end_point,
|
||||
'area' => json_encode($request->area),
|
||||
'category_id' => $request->category_id,
|
||||
'category_name' => MissionCategory::name($request->category_id),
|
||||
'category_id' => $category,
|
||||
'category_name' => MissionCategory::name($category),
|
||||
'explanation' => $request->explanation,
|
||||
'code' => rand(100000, 999999),
|
||||
]);
|
||||
|
||||
$mission->rahdaran()->sync($request->rahdaran);
|
||||
|
||||
if ($request->category_id == 2) {
|
||||
$rpc = new OperatorController();
|
||||
$rpc->store($mission);
|
||||
}
|
||||
|
||||
if ($request->category_id == 3){
|
||||
if ($category == 3){
|
||||
RoadObserved::query()
|
||||
->find($request->road_observed_id)
|
||||
->missions()
|
||||
@@ -123,4 +121,47 @@ class RequestPortalController extends Controller
|
||||
});
|
||||
return $this->successResponse();
|
||||
}
|
||||
public function noProcess(NoProcessRequest $request): JsonResponse
|
||||
{
|
||||
DB::transaction(function () use ($request) {
|
||||
|
||||
$start = Carbon::parse($request->start_date);
|
||||
$end = Carbon::parse($request->end_date);
|
||||
$type = $start->diffInMinutes($end) > 480 ? MissionTypes::NO_PROCESS_ROZANE->value : MissionTypes::NO_PROCESS_SAATY->value;
|
||||
$user = auth()->user();
|
||||
$zone= $request->zone;
|
||||
$state = MissionStates::END_MISSION->value;
|
||||
|
||||
$mission = Mission::query()->create([
|
||||
'user_id' => $user->id,
|
||||
'username' => $user->username,
|
||||
'province_id' => $user->province_id,
|
||||
'province_name' => $user->province_fa,
|
||||
'edare_shahri_id' => $user->edarate_shahri_id ?? null,
|
||||
'edare_shahri_name' => $user->edarate_shahri_name ?? null,
|
||||
'zone' => $zone,
|
||||
'zone_fa' => MissionZones::name($zone),
|
||||
'type' => $type,
|
||||
'type_fa' => MissionTypes::name($type),
|
||||
'start_date' => $request->start_date,
|
||||
'end_date' => $request->end_date,
|
||||
'end_point' => $request->end_point,
|
||||
'area' => json_encode($request->area),
|
||||
'category_id' => $request->category_id,
|
||||
'category_name' => MissionCategory::name($request->category_id),
|
||||
'start_time' => $request->start_date,
|
||||
'finish_time' => $request->end_date,
|
||||
'state_id' => $state,
|
||||
'state_name' => MissionStates::name($state),
|
||||
'explanation' => $request->explanation,
|
||||
'request_date' => now(),
|
||||
]);
|
||||
|
||||
$mission->rahdaran()->sync($request->rahdaran);
|
||||
$mission->machines()->attach($request->machines);
|
||||
$mission->rahdaran()->attach($request->driver, ['is_driver' => true]);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,8 +123,6 @@ class OperatorController extends Controller
|
||||
new ProhibitedAction('اقدام مربوطه قبلا رسیدگی شده است.')
|
||||
);
|
||||
|
||||
$road_item->rahdaran()->attach($request->rahdaran_id);
|
||||
$road_item->cmmsMachines()->attach($request->machines_id);
|
||||
$road_item->missions()->attach($request->mission_id);
|
||||
|
||||
$user->addActivityComplete(1154);
|
||||
|
||||
@@ -24,10 +24,7 @@ class RoadMaintenanceStationController extends Controller
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$user = auth()->user();
|
||||
auth()->user()->addActivityComplete(1019);
|
||||
|
||||
$allowedFilters = ['*'];
|
||||
$allowedSortings = ['*'];
|
||||
$user->addActivityComplete(1019);
|
||||
|
||||
$province = $request->province;
|
||||
$status = $request->status;
|
||||
@@ -38,15 +35,15 @@ class RoadMaintenanceStationController extends Controller
|
||||
->when($type, fn ($query, $type) => $query->where('type', $type))
|
||||
->when($province, fn($query, $province) => $query->where('province_id', $province));
|
||||
|
||||
if ($user->hasPermissionTo('show-tollhouse-province')) {
|
||||
if ($user->hasPermissionTo('show-tollhouse-province') && !$user->hasPermissionTo('show-tollhouse')) {
|
||||
$query->where('province_id', $user->province_id);
|
||||
}
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
$query,
|
||||
$request,
|
||||
allowedFilters: $allowedFilters,
|
||||
allowedSortings: $allowedSortings
|
||||
allowedFilters: ['*'],
|
||||
allowedSortings: ['*']
|
||||
);
|
||||
|
||||
|
||||
@@ -107,6 +104,7 @@ class RoadMaintenanceStationController extends Controller
|
||||
'lat' => $request->lat,
|
||||
'lng' => $request->lng,
|
||||
'updated_at_fa' => verta()->now()->format('Y/m/d H:i:s'),
|
||||
'area' => json_encode($request->area),
|
||||
]);
|
||||
|
||||
$uploadPaths = [
|
||||
@@ -168,6 +166,7 @@ class RoadMaintenanceStationController extends Controller
|
||||
'previous_lat' => $rahdariPoint->lat,
|
||||
'previous_lng' => $rahdariPoint->lng,
|
||||
'new_files' => json_encode($rahdariPoint->files),
|
||||
'area' => json_encode($rahdariPoint->area),
|
||||
]);
|
||||
|
||||
$rahdariPoint->update([
|
||||
@@ -198,6 +197,7 @@ class RoadMaintenanceStationController extends Controller
|
||||
'lng_to' => $request->lng_to,
|
||||
'color' => $request->color,
|
||||
'updated_at_fa' => verta()->now()->format('Y/m/d H:i:s'),
|
||||
'area' => json_encode($request->area),
|
||||
]);
|
||||
|
||||
$uploadFields = [
|
||||
|
||||
@@ -37,14 +37,25 @@ class OperatorController extends Controller
|
||||
|
||||
public function store(Mission $mission): JsonResponse
|
||||
{
|
||||
$road_patrol = RoadPatrol::query()->create([
|
||||
'status' => 0,
|
||||
'status_fa' => 'در حال بررسی',
|
||||
]);
|
||||
DB::transaction(function () use ($mission) {
|
||||
$user = auth()->user();
|
||||
|
||||
$road_patrol->missions()->attach($mission->id);
|
||||
$road_patrol = RoadPatrol::query()->create([
|
||||
'operator_id' => $user->id,
|
||||
'status' => 0,
|
||||
'status_fa' => 'در حال بررسی',
|
||||
'province_id' => $mission->province_id,
|
||||
'province_fa' => $mission->province_name,
|
||||
'edare_id' => $mission->edare_shahri_id,
|
||||
'edare_name' => $mission->edare_shahri_name,
|
||||
'start_time' => $mission->start_time,
|
||||
'end_time' => $mission->finish_time,
|
||||
]);
|
||||
|
||||
auth()->user()->addActivityComplete(1147);
|
||||
$road_patrol->missions()->attach($mission->id);
|
||||
|
||||
auth()->user()->addActivityComplete(1147);
|
||||
});
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ use App\Services\Cartables\SafetyAndPrivacy\OperatorService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use PhpOffice\PhpSpreadsheet\Exception;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
class ConstructionActivityController extends Controller
|
||||
@@ -38,6 +39,11 @@ class ConstructionActivityController extends Controller
|
||||
'edarateShahri' => EdarateShahri::where('province_id', $request->province_id)->get(['id', 'name_fa']),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function countryExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||
{
|
||||
$data = $operatorService->countryActivity(89);
|
||||
@@ -46,6 +52,10 @@ class ConstructionActivityController extends Controller
|
||||
return Excel::download(new ExcelReport($data), $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function provinceExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||
{
|
||||
$data = $operatorService->provinceActivity(
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Http\Requests\V3\Rahdaran\StoreRequest;
|
||||
use App\Http\Requests\V3\Rahdaran\UpdateRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\Rahdaran;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -30,6 +31,7 @@ class RahdaranController extends Controller
|
||||
Rahdaran::query()->create([
|
||||
'name' =>$request->name,
|
||||
'code' =>$request->code,
|
||||
'mobile' =>$request->mobile,
|
||||
]);
|
||||
return $this->successResponse();
|
||||
}
|
||||
@@ -44,14 +46,20 @@ class RahdaranController extends Controller
|
||||
$rahdaran->update([
|
||||
'name' =>$request->name,
|
||||
'code' =>$request->code,
|
||||
'mobile' =>$request->mobile,
|
||||
]);
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
public function destroy(Rahdaran $rahdaran): JsonResponse
|
||||
{
|
||||
$rahdaran->delete();
|
||||
return $this->successResponse();
|
||||
try {
|
||||
$rahdaran->delete();
|
||||
return $this->successResponse();
|
||||
}
|
||||
catch (QueryException $exception) {
|
||||
return $this->errorResponse('امکان حذف وجود ندارد');
|
||||
}
|
||||
}
|
||||
|
||||
public function list(): JsonResponse
|
||||
|
||||
@@ -46,6 +46,7 @@ class StoreRequest extends FormRequest
|
||||
'damage_items' => 'required|array',
|
||||
'damage_items.*.value' => 'required',
|
||||
'damage_items.*.amount' => 'required',
|
||||
'driver_rate' => 'required|numeric',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ class UpdateRequest extends FormRequest
|
||||
'damage_items' => 'required|array',
|
||||
'damage_items.*.value' => 'required',
|
||||
'damage_items.*.amount' => 'required',
|
||||
'driver_rate' => 'required|numeric',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ class GetAccessRoadRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'panjarevahed_id'=> 'required|string',
|
||||
'polygon' => 'required|string',
|
||||
'panjare_vahed_id' => 'required|string',
|
||||
'access_road' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\Dashboard\Harim\PanjareVahed;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ReceiveNewRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'panjare_vahed_id' => 'required|integer',
|
||||
'national_id' => 'required',
|
||||
'phone_number' => 'required',
|
||||
'request_date' => 'required',
|
||||
'requested_organization' => 'required',
|
||||
'plan_group' => 'required',
|
||||
'plan_title' => 'required',
|
||||
'worksheet_id' => 'required',
|
||||
'response_options' => 'required',
|
||||
'isic' => 'required',
|
||||
'primary_area' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\Mission\ControlUnit;
|
||||
namespace App\Http\Requests\V3\Mission\RequestPortal;
|
||||
|
||||
use App\Enums\MissionStates;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
class NoProcessRequest extends FormRequest
|
||||
{
|
||||
@@ -39,14 +36,15 @@ class NoProcessRequest extends FormRequest
|
||||
'area.type' => 'required|string',
|
||||
'area.coordinates' => 'required|array',
|
||||
'category_id' => 'required|in:1,2,3',
|
||||
'explanation' => 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'end_date.before' => 'تاریخ پایان باید قبل از زمان فعلی باشد.',
|
||||
'end_date.after' => 'تاریخ پایان نباید قبل از تاریخ شروع باشد.',
|
||||
'end_date.before' => 'تاریخ پایان باید قبل از زمان فعلی باشد.',
|
||||
'end_date.after' => 'تاریخ پایان نباید قبل از تاریخ شروع باشد.',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,8 @@ class StoreRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string|max:255',
|
||||
'code' => 'required|string|max:255',
|
||||
'code' => 'required|string|max:255|unique:rahdaran,code',
|
||||
'mobile' => 'required|digits:11|regex:/^09\d{9}$/',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Http\Requests\V3\Rahdaran;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateRequest extends FormRequest
|
||||
{
|
||||
@@ -24,7 +25,8 @@ class UpdateRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string|max:255',
|
||||
'code' => 'required|string|max:255',
|
||||
'code' => ['required', 'string', Rule::unique('rahdaran', 'code')->ignore($this->rahdaran->id)],
|
||||
'mobile' => 'required|digits:11|regex:/^09\d{9}$/',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ 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
|
||||
@@ -38,10 +36,6 @@ class StoreRequest extends FormRequest
|
||||
'activity_time' => 'required|date_format:H:i',
|
||||
'before_image' => 'image|max:4096',
|
||||
'after_image' => 'image|max:4096',
|
||||
'machines_id' => 'required|array',
|
||||
'machines_id.*' => 'required|exists:cmms_machines,id',
|
||||
'rahdaran_id' => 'required|array',
|
||||
'rahdaran_id.*' => 'required|exists:rahdaran,id',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -52,18 +46,22 @@ class StoreRequest extends FormRequest
|
||||
'activity_time' => 'ساعت فعالیت',
|
||||
];
|
||||
}
|
||||
|
||||
public function after(): array
|
||||
{
|
||||
return [
|
||||
function (Validator $validator) {
|
||||
|
||||
$mission = Mission::query()->find($this->mission_id);
|
||||
|
||||
$startTime = Carbon::parse($mission->start_time);
|
||||
$finishTime = Carbon::parse($mission->finish_time);
|
||||
$activityTime = Carbon::parse("{$this->activity_date} {$this->activity_time}");
|
||||
|
||||
if ($activityTime->lt($this->mission->start_date) || $activityTime->gt($this->mission->end_date)) {
|
||||
if (! $activityTime->between($startTime, $finishTime, true)) {
|
||||
$validator->errors()->add('activity_time', 'زمان گزارش باید بین بازه مأموریت باشد.');
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
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\Validator;
|
||||
|
||||
class UpdateRequest extends FormRequest
|
||||
{
|
||||
@@ -48,4 +50,22 @@ class UpdateRequest extends FormRequest
|
||||
'activity_time' => 'ساعت فعالیت',
|
||||
];
|
||||
}
|
||||
|
||||
public function after(): array
|
||||
{
|
||||
return [
|
||||
function (Validator $validator) {
|
||||
|
||||
$mission = Mission::query()->find($this->mission_id);
|
||||
|
||||
$startTime = Carbon::parse($mission->start_time);
|
||||
$finishTime = Carbon::parse($mission->finish_time);
|
||||
$activityTime = Carbon::parse("{$this->activity_date} {$this->activity_time}");
|
||||
|
||||
if (! $activityTime->between($startTime, $finishTime, true)) {
|
||||
$validator->errors()->add('activity_time', 'زمان گزارش باید بین بازه مأموریت باشد.');
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ class StoreRequest extends FormRequest
|
||||
'overview_files_3' => 'file|mimes:jpg,jpeg,png,pdf|max:51200',
|
||||
'overview_files_4' => 'file|mimes:jpg,jpeg,png,pdf|max:51200',
|
||||
'overview_files_5' => 'file|mimes:jpg,jpeg,png,pdf|max:51200',
|
||||
'area' => 'required|array',
|
||||
'area.type' => 'required|string',
|
||||
'area.coordinates' => 'required|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,9 @@ class UpdateRequest extends FormRequest
|
||||
'overview_files_3' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
|
||||
'overview_files_4' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
|
||||
'overview_files_5' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
|
||||
'area' => 'required|array',
|
||||
'area.type' => 'required|string',
|
||||
'area.coordinates' => 'required|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
@@ -69,6 +70,7 @@ class RahdariPoint extends Model
|
||||
'lat_to',
|
||||
'lng_to',
|
||||
'updated_at_fa',
|
||||
'area'
|
||||
];
|
||||
|
||||
public function files(): MorphMany
|
||||
@@ -80,4 +82,11 @@ class RahdariPoint extends Model
|
||||
{
|
||||
return $this->hasMany('App\Models\RahdariPointHistory', 'point_id');
|
||||
}
|
||||
|
||||
protected function area(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => json_decode($value)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RahdariPointHistory extends Model
|
||||
@@ -33,11 +34,19 @@ class RahdariPointHistory extends Model
|
||||
'previous_lat',
|
||||
'previous_lng',
|
||||
'new_files',
|
||||
'point_id'
|
||||
'point_id',
|
||||
'area'
|
||||
];
|
||||
|
||||
public function rahdariPoint()
|
||||
{
|
||||
return $this->belongsTo('App\Models\RahdariPoint');
|
||||
}
|
||||
|
||||
protected function area(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn($value) => json_decode($value)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ class OperatorService
|
||||
WITH base AS (
|
||||
SELECT
|
||||
p.id AS province_id,
|
||||
p.name_fa AS province_name,
|
||||
a.id AS axis_type_id,
|
||||
COALESCE(SUM(t.step = 1), 0) AS s1,
|
||||
COALESCE(SUM(t.step = 2), 0) AS s2,
|
||||
@@ -54,6 +55,7 @@ class OperatorService
|
||||
)
|
||||
SELECT
|
||||
province_id,
|
||||
province_name,
|
||||
axis_type_id,
|
||||
s1,
|
||||
s2,
|
||||
@@ -68,6 +70,7 @@ class OperatorService
|
||||
|
||||
SELECT
|
||||
-1 AS province_id,
|
||||
'کل کشور' AS province_name,
|
||||
axis_type_id,
|
||||
COALESCE(SUM(s1), 0) AS s1,
|
||||
COALESCE(SUM(s2), 0) AS s2,
|
||||
@@ -90,7 +93,8 @@ class OperatorService
|
||||
return DB::select("
|
||||
WITH edareh_data AS (
|
||||
SELECT
|
||||
e.id AS edareh_id,
|
||||
e.id AS edare_id,
|
||||
e.name_fa AS edare_name,
|
||||
a.id AS axis_type_id,
|
||||
COALESCE(SUM(t.step = 1), 0) AS s1,
|
||||
COALESCE(SUM(t.step = 2), 0) AS s2,
|
||||
@@ -105,21 +109,23 @@ class OperatorService
|
||||
GROUP BY e.id, a.id
|
||||
)
|
||||
SELECT
|
||||
edareh_id,
|
||||
edare_id,
|
||||
edare_name,
|
||||
axis_type_id,
|
||||
s1,
|
||||
s2,
|
||||
s3,
|
||||
COALESCE(
|
||||
SUM(s1 + s2 + s3)
|
||||
OVER (PARTITION BY edareh_id), 0
|
||||
OVER (PARTITION BY edare_id), 0
|
||||
) AS total_sum
|
||||
FROM edareh_data
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
-1 AS edareh_id,
|
||||
-1 AS edare_id,
|
||||
'کل استان' AS edare_name,
|
||||
axis_type_id,
|
||||
COALESCE(SUM(s1), 0) AS s1,
|
||||
COALESCE(SUM(s2), 0) AS s2,
|
||||
@@ -130,7 +136,7 @@ class OperatorService
|
||||
FROM edareh_data
|
||||
GROUP BY axis_type_id
|
||||
|
||||
ORDER BY edareh_id , axis_type_id
|
||||
ORDER BY edare_id , axis_type_id
|
||||
", [
|
||||
'provinceId' => $province_id,
|
||||
'infoId' => $info_id,
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
"laravel/ui": "^4.4",
|
||||
"maatwebsite/excel": "^3.1",
|
||||
"morilog/jalali": "3.*",
|
||||
"spatie/laravel-permission": "^5.10"
|
||||
"spatie/laravel-permission": "^5.10",
|
||||
"usmanhalalit/laracsv": "^2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.9",
|
||||
|
||||
153
composer.lock
generated
153
composer.lock
generated
@@ -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": "379d6ba4ded00ca7079f26aa5b12e04e",
|
||||
"content-hash": "67bcaf1ce932d76ea3acb0bd4e2abf10",
|
||||
"packages": [
|
||||
{
|
||||
"name": "beberlei/assert",
|
||||
@@ -2685,6 +2685,97 @@
|
||||
],
|
||||
"time": "2022-12-11T20:36:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/csv",
|
||||
"version": "9.24.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/csv.git",
|
||||
"reference": "e0221a3f16aa2a823047d59fab5809d552e29bc8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/csv/zipball/e0221a3f16aa2a823047d59fab5809d552e29bc8",
|
||||
"reference": "e0221a3f16aa2a823047d59fab5809d552e29bc8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-filter": "*",
|
||||
"php": "^8.1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-dom": "*",
|
||||
"ext-xdebug": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3.75.0",
|
||||
"phpbench/phpbench": "^1.4.1",
|
||||
"phpstan/phpstan": "^1.12.27",
|
||||
"phpstan/phpstan-deprecation-rules": "^1.2.1",
|
||||
"phpstan/phpstan-phpunit": "^1.4.2",
|
||||
"phpstan/phpstan-strict-rules": "^1.6.2",
|
||||
"phpunit/phpunit": "^10.5.16 || ^11.5.22",
|
||||
"symfony/var-dumper": "^6.4.8 || ^7.3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-dom": "Required to use the XMLConverter and the HTMLConverter classes",
|
||||
"ext-iconv": "Needed to ease transcoding CSV using iconv stream filters",
|
||||
"ext-mbstring": "Needed to ease transcoding CSV using mb stream filters",
|
||||
"ext-mysqli": "Requiered to use the package with the MySQLi extension",
|
||||
"ext-pdo": "Required to use the package with the PDO extension",
|
||||
"ext-pgsql": "Requiered to use the package with the PgSQL extension",
|
||||
"ext-sqlite3": "Required to use the package with the SQLite3 extension"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "9.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"League\\Csv\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ignace Nyamagana Butera",
|
||||
"email": "nyamsprod@gmail.com",
|
||||
"homepage": "https://github.com/nyamsprod/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "CSV data manipulation made easy in PHP",
|
||||
"homepage": "https://csv.thephpleague.com",
|
||||
"keywords": [
|
||||
"convert",
|
||||
"csv",
|
||||
"export",
|
||||
"filter",
|
||||
"import",
|
||||
"read",
|
||||
"transform",
|
||||
"write"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://csv.thephpleague.com",
|
||||
"issues": "https://github.com/thephpleague/csv/issues",
|
||||
"rss": "https://github.com/thephpleague/csv/releases.atom",
|
||||
"source": "https://github.com/thephpleague/csv"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/sponsors/nyamsprod",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-06-25T14:53:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "3.23.1",
|
||||
@@ -7138,6 +7229,66 @@
|
||||
},
|
||||
"time": "2023-12-08T13:03:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "usmanhalalit/laracsv",
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/usmanhalalit/laracsv.git",
|
||||
"reference": "98016abe4c55e7ed3c97a3e0b930cbac58374f57"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/usmanhalalit/laracsv/zipball/98016abe4c55e7ed3c97a3e0b930cbac58374f57",
|
||||
"reference": "98016abe4c55e7ed3c97a3e0b930cbac58374f57",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/database": ">=5.2",
|
||||
"league/csv": "^9.0",
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"fzaninotto/faker": "^1.8",
|
||||
"phpunit/phpunit": "^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laracsv\\": "src/Laracsv/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Muhammad Usman",
|
||||
"email": "hi@usman.it",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "A Laravel package to easily generate CSV files from Eloquent model.",
|
||||
"homepage": "https://github.com/usmanhalalit/laracsv",
|
||||
"keywords": [
|
||||
"csv",
|
||||
"eloquent",
|
||||
"export",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/usmanhalalit/laracsv/issues",
|
||||
"source": "https://github.com/usmanhalalit/laracsv/tree/master"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/usmanhalalit",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-06-19T09:31:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v5.6.0",
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('accidents', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('driver_share_amount')->nullable();
|
||||
$table->unsignedBigInteger('driver_rate')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('accidents', function (Blueprint $table) {
|
||||
$table->dropColumn(['driver_share_amount', 'driver_rate']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('rahdaran', function (Blueprint $table) {
|
||||
$table->string('mobile', 11)->nullable();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('rahdaran', function (Blueprint $table) {
|
||||
$table->dropColumn('mobile');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('rahdari_points', function (Blueprint $table) {
|
||||
$table->json('area')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('rahdari_points', function (Blueprint $table) {
|
||||
$table->dropColumn('area');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('rahdari_point_histories', function (Blueprint $table) {
|
||||
$table->json('area')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('rahdari_point_histories', function (Blueprint $table) {
|
||||
$table->dropColumn('area');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -96,7 +96,7 @@
|
||||
@foreach ($data as $road)
|
||||
<tr>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $road['name'] }}</td>
|
||||
{{ $road['province_fa'] }}</td>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $road['tedade'] }}</td>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
|
||||
@@ -97,11 +97,11 @@
|
||||
@foreach ($data as $road)
|
||||
<tr>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $road['name'] }}</td>
|
||||
{{ $road['city_fa'] }}</td>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $road['tedade'] }}</td>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
<<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $road['egdam'] }}</td>
|
||||
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||
{{ $road['pardakht'] }}</td>
|
||||
|
||||
@@ -1,132 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<html lang="fa">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>کشوری</title>
|
||||
|
||||
</head>
|
||||
<body dir="rtl" style="text-align:center;">
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
// show a dot if key missing or value is 0/empty
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="11"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;font-size:13px;">
|
||||
گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="headercolortable">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#C4D79B;">
|
||||
اداره کل
|
||||
</th>
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
تعداد کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
آزاد راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
بزرگ راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
اصلی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
فرعی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
روستایی
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
{{ $axis[$aid] }}
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام دوم (مستندات قضایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($data as $item)
|
||||
@foreach ($rows as $r)
|
||||
<tr>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{$item->axis_data['آزادراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['province_name'] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</td>
|
||||
|
||||
@foreach ($axisOrder as $aid)
|
||||
@php $group = $axis[$aid]; @endphp
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_1") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_2") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_3") }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,132 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<html lang="fa">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>کشوری</title>
|
||||
|
||||
</head>
|
||||
<body dir="rtl" style="text-align:center;">
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
// show a dot if key missing or value is 0/empty
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="11"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;font-size:13px;">
|
||||
گزارش نگهداری حریم راه برای ساخت و ساز غیر مجاز
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="headercolortable">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#C4D79B;">
|
||||
اداره کل
|
||||
</th>
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
تعداد کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
آزاد راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
بزرگ راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
اصلی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
فرعی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
روستایی
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
{{ $axis[$aid] }}
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام دوم (مستندات قضایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($data as $item)
|
||||
@foreach ($rows as $r)
|
||||
<tr>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{$item->axis_data['آزادراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['province_name'] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</td>
|
||||
|
||||
@foreach ($axisOrder as $aid)
|
||||
@php $group = $axis[$aid]; @endphp
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_1") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_2") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_3") }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,132 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<html lang="fa">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>کشوری</title>
|
||||
|
||||
</head>
|
||||
<body dir="rtl" style="text-align:center;">
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
// show a dot if key missing or value is 0/empty
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="11"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;font-size:13px;">
|
||||
گزارش نگهداری حریم راه برای عبور تاسیسات زیربنایی غیر مجاز
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="headercolortable">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#C4D79B;">
|
||||
اداره کل
|
||||
</th>
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
تعداد کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
آزاد راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
بزرگ راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
اصلی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
فرعی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
روستایی
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
{{ $axis[$aid] }}
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام دوم (مستندات قضایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($data as $item)
|
||||
@foreach ($rows as $r)
|
||||
<tr>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{$item->axis_data['آزادراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['province_name'] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</td>
|
||||
|
||||
@foreach ($axisOrder as $aid)
|
||||
@php $group = $axis[$aid]; @endphp
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_1") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_2") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_3") }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,131 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<html lang="fa">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>استانی</title>
|
||||
|
||||
<title>گزارش ادارات شهرستانی</title>
|
||||
</head>
|
||||
<body dir="rtl" style="text-align:center;">
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="11"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;font-size:13px;">
|
||||
گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr class="headercolortable">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
اداره کل
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#C4D79B;">
|
||||
اداره
|
||||
</th>
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
تعداد کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
آزاد راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
بزرگ راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
اصلی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
فرعی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
روستایی
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
{{ $axis[$aid] }}
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام دوم (مستندات قضایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($data as $item)
|
||||
@foreach ($rows as $r)
|
||||
<tr>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{$item->axis_data['آزادراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['edare_name'] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</td>
|
||||
|
||||
@foreach ($axisOrder as $aid)
|
||||
@php $g = $axis[$aid]; @endphp
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_1") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_2") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_3") }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,131 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<html lang="fa">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>استانی</title>
|
||||
|
||||
<title>گزارش ادارات شهرستانی</title>
|
||||
</head>
|
||||
<body dir="rtl" style="text-align:center;">
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="11"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش نگهداری حریم راه برای ساخت و ساز غیر مجاز
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;font-size:13px;">
|
||||
گزارش نگهداری حریم راه برای عبور تاسیسات زیربنایی غیر مجاز
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr class="headercolortable">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
اداره کل
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#C4D79B;">
|
||||
اداره
|
||||
</th>
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
تعداد کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
آزاد راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
بزرگ راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
اصلی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
فرعی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
روستایی
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
{{ $axis[$aid] }}
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام دوم (مستندات قضایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($data as $item)
|
||||
@foreach ($rows as $r)
|
||||
<tr>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{$item->axis_data['آزادراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['edare_name'] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</td>
|
||||
|
||||
@foreach ($axisOrder as $aid)
|
||||
@php $g = $axis[$aid]; @endphp
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_1") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_2") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_3") }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,131 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<html lang="fa">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>استانی</title>
|
||||
|
||||
<title>گزارش ادارات شهرستانی</title>
|
||||
</head>
|
||||
<body dir="rtl" style="text-align:center;">
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="11"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="17"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;font-size:13px;">
|
||||
گزارش نگهداری حریم راه برای عبور تاسیسات زیربنایی غیر مجاز
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr class="headercolortable">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #C4D79B;">
|
||||
اداره کل
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#C4D79B;">
|
||||
اداره
|
||||
</th>
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
<th rowspan="2" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
تعداد کل
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
آزاد راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
بزرگ راه
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
اصلی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
فرعی
|
||||
</th>
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
روستایی
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||
{{ $axis[$aid] }}
|
||||
</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام اول (شناسایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام دوم (مستندات قضایی)
|
||||
</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
||||
گام سوم (برخورد)
|
||||
</th>
|
||||
@foreach($axisOrder as $aid)
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام دوم (مستندات قضایی)</th>
|
||||
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($data as $item)
|
||||
@foreach ($rows as $r)
|
||||
<tr>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{$item->axis_data['آزادراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['فرعی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][1] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][2] }}</td>
|
||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['روستایی'][3] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['edare_name'] }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</td>
|
||||
|
||||
@foreach ($axisOrder as $aid)
|
||||
@php $g = $axis[$aid]; @endphp
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_1") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_2") }}</td>
|
||||
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_3") }}</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -481,6 +481,7 @@ Route::prefix('missions')
|
||||
->group(function () {
|
||||
Route::get('/', 'index')->name('index');
|
||||
Route::post('/', 'store')->name('store');
|
||||
Route::post('/no_process','noProcess')->name('noProcess');
|
||||
Route::get('/{mission}', 'show')->name('show');
|
||||
Route::post('/{mission}', 'update')->name('update');
|
||||
Route::delete('/{mission}', 'destroy')->name('destroy');
|
||||
@@ -501,7 +502,6 @@ Route::prefix('missions')
|
||||
->controller(ControlUnitController::class)
|
||||
->group(function () {
|
||||
Route::get('/', 'index')->name('index');
|
||||
Route::post('/no_process','noProcess')->name('noProcess');
|
||||
Route::post('/start/{mission}', 'start')->name('start');
|
||||
Route::post('/finish/{mission}', 'finish')->name('finish');
|
||||
});
|
||||
@@ -561,11 +561,12 @@ Route::prefix('harim')
|
||||
Route::post('/confirm_guarantee_letter_need/{harim}', 'confirmGuaranteeLetterNeed')->name('confirmGuaranteeLetterNeed');
|
||||
Route::get('/{harim}', 'show')->name('show');
|
||||
});
|
||||
Route::prefix('panjarevahed')
|
||||
Route::prefix('panjare_vahed')
|
||||
->name('panjarevahed.')
|
||||
->controller(PanjarevahedController::class)
|
||||
->group(function () {
|
||||
Route::post('/get_access_road','getAccessRoad')->name('getAccessRoad');
|
||||
Route::post('/receive_new_request', 'receiveNewRequest')->name('receiveNewRequest');
|
||||
Route::post('/receive_access_road','getAccessRoad')->name('getAccessRoad');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -595,3 +596,8 @@ Route::prefix('user_management')
|
||||
Route::post('/change_password/{user}', 'changePassword')->name('changePassword');
|
||||
Route::post('delete-role/{id}', 'deleteRole')->name('deleteRole');
|
||||
});
|
||||
|
||||
Route::get('/test', function () {
|
||||
$csvExporter = new \Laracsv\Export();
|
||||
$csvExporter->build(\App\Models\User::all(), ['id' => 'کد یکتا', 'username' => 'نام کاربری'])->download();
|
||||
});
|
||||
Reference in New Issue
Block a user