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 App\Models\City;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
|
use Illuminate\Contracts\Filesystem\FileNotFoundException;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\File;
|
use Illuminate\Support\Facades\File;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
@@ -27,8 +28,9 @@ class ExtractGeometryForCities extends Command
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
|
* @throws FileNotFoundException
|
||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle(): int
|
||||||
{
|
{
|
||||||
$jsonPath = $this->argument('jsonPath');
|
$jsonPath = $this->argument('jsonPath');
|
||||||
|
|
||||||
@@ -103,8 +105,6 @@ class ExtractGeometryForCities extends Command
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$query = City::query()
|
$query = City::query()
|
||||||
->find($cityId);
|
->find($cityId);
|
||||||
|
|
||||||
@@ -122,8 +122,6 @@ class ExtractGeometryForCities extends Command
|
|||||||
{
|
{
|
||||||
$this->error("Something went wrong: $th");
|
$this->error("Something went wrong: $th");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::SUCCESS;
|
return parent::SUCCESS;
|
||||||
|
|||||||
@@ -4,16 +4,18 @@ namespace App\Enums;
|
|||||||
|
|
||||||
enum MissionTypes: int
|
enum MissionTypes: int
|
||||||
{
|
{
|
||||||
case SAATY= 1;
|
case PROCESS_SAATY= 1;
|
||||||
case ROZANE = 2;
|
case PROCESS_ROZANE = 2;
|
||||||
case NO_PROCESS = 3;
|
case NO_PROCESS_SAATY = 3;
|
||||||
|
case NO_PROCESS_ROZANE = 4;
|
||||||
|
|
||||||
public static function name(int $state): string
|
public static function name(int $state): string
|
||||||
{
|
{
|
||||||
$mapArray = [
|
$mapArray = [
|
||||||
1 => 'ساعتی',
|
1 => ' با فرایند (ساعتی)',
|
||||||
2 => 'روزانه',
|
2 => 'با فرایند(روزانه)',
|
||||||
3 => 'بدون فرآیند',
|
3 => 'بدون فرآیند(ساعتی)',
|
||||||
|
4 => 'بدون فرایند (روزانه)'
|
||||||
];
|
];
|
||||||
|
|
||||||
return $mapArray[$state];
|
return $mapArray[$state];
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
|||||||
$country = array_search(-1, array_column($data['data'], 'province_id'));
|
$country = array_search(-1, array_column($data['data'], 'province_id'));
|
||||||
|
|
||||||
$activities[] = [
|
$activities[] = [
|
||||||
'name' => 'کل کشور',
|
'province_id' => -1,
|
||||||
|
'province_fa' => 'کل کشور',
|
||||||
'tedade' => $data['data'][$country]->tedade,
|
'tedade' => $data['data'][$country]->tedade,
|
||||||
'police_rah' => $data['data'][$country]->police_rah,
|
'police_rah' => $data['data'][$country]->police_rah,
|
||||||
'gozaresh_gasht' => $data['data'][$country]->gozaresh_gasht,
|
'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_bimeh' => $data['data'][$country]->vasel_shode_bimeh ?? 0,
|
||||||
'vasel_shode_daghi' => $data['data'][$country]->vasel_shode_daghi ?? 0,
|
'vasel_shode_daghi' => $data['data'][$country]->vasel_shode_daghi ?? 0,
|
||||||
'vasel_shode_final' => $data['data'][$country]->vasel_shode_final ?? 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) {
|
foreach (Province::all() as $province) {
|
||||||
@@ -43,7 +47,8 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
|||||||
|
|
||||||
if ($existingProvince) {
|
if ($existingProvince) {
|
||||||
$activities[] = [
|
$activities[] = [
|
||||||
'name' => $province->name_fa,
|
'province_id' => $province->id,
|
||||||
|
'province_fa' => $province->name_fa,
|
||||||
'tedade' => $data['data'][$existingProvince]->tedade,
|
'tedade' => $data['data'][$existingProvince]->tedade,
|
||||||
'police_rah' => $data['data'][$existingProvince]->police_rah,
|
'police_rah' => $data['data'][$existingProvince]->police_rah,
|
||||||
'gozaresh_gasht' => $data['data'][$existingProvince]->gozaresh_gasht,
|
'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_bimeh' => $data['data'][$existingProvince]->vasel_shode_bimeh ?? 0,
|
||||||
'vasel_shode_daghi' => $data['data'][$existingProvince]->vasel_shode_daghi ?? 0,
|
'vasel_shode_daghi' => $data['data'][$existingProvince]->vasel_shode_daghi ?? 0,
|
||||||
'vasel_shode_final' => $data['data'][$existingProvince]->vasel_shode_final ?? 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 {
|
} else {
|
||||||
$activities[] = [
|
$activities[] = [
|
||||||
'name' => $province->name_fa,
|
'province_id' => $province->id,
|
||||||
|
'province_fa' => $province->name_fa,
|
||||||
'tedade' => "",
|
'tedade' => "",
|
||||||
'police_rah' => "",
|
'police_rah' => "",
|
||||||
'gozaresh_gasht' => "",
|
'gozaresh_gasht' => "",
|
||||||
@@ -64,6 +73,9 @@ class CountryReport implements FromView, ShouldAutoSize, WithEvents, WithDrawing
|
|||||||
'vasel_shode_bimeh' => "",
|
'vasel_shode_bimeh' => "",
|
||||||
'vasel_shode_daghi' => "",
|
'vasel_shode_daghi' => "",
|
||||||
'vasel_shode_final' => "",
|
'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'));
|
$province = array_search(-1, array_column($reportData, 'province_id'));
|
||||||
|
|
||||||
$activities[] = [
|
$activities[] = [
|
||||||
'name' => 'کل استان',
|
'city_id' => -1,
|
||||||
|
'city_fa' => 'کل استان',
|
||||||
'tedade' => $reportData['data'][$province]->tedade,
|
'tedade' => $reportData['data'][$province]->tedade,
|
||||||
'police_rah' => $reportData['data'][$province]->police_rah,
|
'police_rah' => $reportData['data'][$province]->police_rah,
|
||||||
'gozaresh_gasht' => $reportData['data'][$province]->gozaresh_gasht,
|
'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_bimeh' => $reportData['data'][$province]->vasel_shode_bimeh ?? 0,
|
||||||
'vasel_shode_daghi' => $reportData['data'][$province]->vasel_shode_daghi ?? 0,
|
'vasel_shode_daghi' => $reportData['data'][$province]->vasel_shode_daghi ?? 0,
|
||||||
'vasel_shode_final' => $reportData['data'][$province]->vasel_shode_final ?? 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) {
|
foreach ($inputData['cities'] as $city) {
|
||||||
@@ -43,7 +47,8 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
|
|||||||
|
|
||||||
if ($existingCity) {
|
if ($existingCity) {
|
||||||
$activities[] = [
|
$activities[] = [
|
||||||
'name' => $city->name_fa,
|
'city_id' => $city->id,
|
||||||
|
'city_fa' => $city->name_fa,
|
||||||
'tedade' => $reportData['data'][$existingCity]->tedade,
|
'tedade' => $reportData['data'][$existingCity]->tedade,
|
||||||
'police_rah' => $reportData['data'][$existingCity]->police_rah,
|
'police_rah' => $reportData['data'][$existingCity]->police_rah,
|
||||||
'gozaresh_gasht' => $reportData['data'][$existingCity]->gozaresh_gasht,
|
'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_bimeh' => $reportData['data'][$existingCity]->vasel_shode_bimeh ?? 0,
|
||||||
'vasel_shode_daghi' => $reportData['data'][$existingCity]->vasel_shode_daghi ?? 0,
|
'vasel_shode_daghi' => $reportData['data'][$existingCity]->vasel_shode_daghi ?? 0,
|
||||||
'vasel_shode_final' => $reportData['data'][$existingCity]->vasel_shode_final ?? 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 {
|
} else {
|
||||||
$activities[] = [
|
$activities[] = [
|
||||||
'name' => $city->name_fa,
|
'city_fa' => $city->name_fa,
|
||||||
'tedade' => "",
|
'tedade' => "",
|
||||||
'police_rah' => "",
|
'police_rah' => "",
|
||||||
'gozaresh_gasht' => "",
|
'gozaresh_gasht' => "",
|
||||||
@@ -64,6 +72,9 @@ class ProvinceReport implements FromView, ShouldAutoSize, WithEvents, WithDrawin
|
|||||||
'vasel_shode_bimeh' => "",
|
'vasel_shode_bimeh' => "",
|
||||||
'vasel_shode_daghi' => "",
|
'vasel_shode_daghi' => "",
|
||||||
'vasel_shode_final' => "",
|
'vasel_shode_final' => "",
|
||||||
|
'egdam' => "",
|
||||||
|
'khatm' => "",
|
||||||
|
'pardakht' => "",
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,30 +21,50 @@ class AccessRoadReport implements FromView, WithEvents, ShouldAutoSize, WithDraw
|
|||||||
|
|
||||||
public function view(): View
|
public function view(): View
|
||||||
{
|
{
|
||||||
$data = $this->data;
|
$axis = [
|
||||||
$existedProvinces = array_keys($data);
|
1 => 'آزادراه',
|
||||||
|
2 => 'بزرگراه',
|
||||||
|
3 => 'اصلی',
|
||||||
|
4 => 'فرعی',
|
||||||
|
5 => 'روستایی'
|
||||||
|
];
|
||||||
|
$grid = [];
|
||||||
|
$national = null;
|
||||||
|
|
||||||
foreach (Province::all() as $value) {
|
foreach ($this->data as $r) {
|
||||||
$provinceId = $value->id;
|
$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)) {
|
if ($pid === -1) {
|
||||||
$data[] = (object) [
|
$national ??= ['province_name' => $name, 'total' => 0];
|
||||||
'province_id' => $provinceId,
|
$national["{$axisKey}_1"] = $r->s1;
|
||||||
'name_fa' => $value->name_fa,
|
$national["{$axisKey}_2"] = $r->s2;
|
||||||
'sum' => 0,
|
$national["{$axisKey}_3"] = $r->s3;
|
||||||
'axis_data' => [
|
$national['total'] = $r->total_sum;
|
||||||
'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
|
continue;
|
||||||
'بزرگراه' => ['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 (!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', [
|
$exportRows = [];
|
||||||
'data' => $data,
|
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;
|
namespace App\Exports\V3\SafetyAndPrivacy\Country;
|
||||||
|
|
||||||
use App\Models\EdarateShahri;
|
|
||||||
use App\Models\Province;
|
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Maatwebsite\Excel\Concerns\FromView;
|
use Maatwebsite\Excel\Concerns\FromView;
|
||||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
use Maatwebsite\Excel\Concerns\WithDrawings;
|
use Maatwebsite\Excel\Concerns\WithDrawings;
|
||||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||||
use Maatwebsite\Excel\Events\AfterSheet;
|
use Maatwebsite\Excel\Events\AfterSheet;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
|
||||||
|
|
||||||
class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
|
class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
|
||||||
{
|
{
|
||||||
@@ -22,30 +17,50 @@ class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDr
|
|||||||
|
|
||||||
public function view(): View
|
public function view(): View
|
||||||
{
|
{
|
||||||
$data = $this->data;
|
$axis = [
|
||||||
$existedProvinces = array_keys($data);
|
1 => 'آزادراه',
|
||||||
|
2 => 'بزرگراه',
|
||||||
|
3 => 'اصلی',
|
||||||
|
4 => 'فرعی',
|
||||||
|
5 => 'روستایی'
|
||||||
|
];
|
||||||
|
$grid = [];
|
||||||
|
$national = null;
|
||||||
|
|
||||||
foreach (Province::all() as $value) {
|
foreach ($this->data as $r) {
|
||||||
$provinceId = $value->id;
|
$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)) {
|
if ($pid === -1) {
|
||||||
$data[] = (object) [
|
$national ??= ['province_name' => $name, 'total' => 0];
|
||||||
'province_id' => $provinceId,
|
$national["{$axisKey}_1"] = $r->s1;
|
||||||
'name_fa' => $value->name_fa,
|
$national["{$axisKey}_2"] = $r->s2;
|
||||||
'sum' => 0,
|
$national["{$axisKey}_3"] = $r->s3;
|
||||||
'axis_data' => [
|
$national['total'] = $r->total_sum;
|
||||||
'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
|
continue;
|
||||||
'بزرگراه' => ['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 (!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', [
|
$exportRows = [];
|
||||||
'data' => $data,
|
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
|
public function view(): View
|
||||||
{
|
{
|
||||||
$data = $this->data;
|
$axis = [
|
||||||
$existedProvinces = array_keys($data);
|
1 => 'آزادراه',
|
||||||
|
2 => 'بزرگراه',
|
||||||
|
3 => 'اصلی',
|
||||||
|
4 => 'فرعی',
|
||||||
|
5 => 'روستایی'
|
||||||
|
];
|
||||||
|
$grid = [];
|
||||||
|
$national = null;
|
||||||
|
|
||||||
foreach (Province::all() as $value) {
|
foreach ($this->data as $r) {
|
||||||
$provinceId = $value->id;
|
$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)) {
|
if ($pid === -1) {
|
||||||
$data[] = (object) [
|
$national ??= ['province_name' => $name, 'total' => 0];
|
||||||
'province_id' => $provinceId,
|
$national["{$axisKey}_1"] = $r->s1;
|
||||||
'name_fa' => $value->name_fa,
|
$national["{$axisKey}_2"] = $r->s2;
|
||||||
'sum' => 0,
|
$national["{$axisKey}_3"] = $r->s3;
|
||||||
'axis_data' => [
|
$national['total'] = $r->total_sum;
|
||||||
'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
|
continue;
|
||||||
'بزرگراه' => ['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 (!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', [
|
$exportRows = [];
|
||||||
'data' => $data,
|
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
|
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
|
public function view(): View
|
||||||
{
|
{
|
||||||
$data = $this->data;
|
$axis = [
|
||||||
$existedCities = array_keys($data);
|
1 => 'آزادراه',
|
||||||
$edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
|
2 => 'بزرگراه',
|
||||||
|
3 => 'اصلی',
|
||||||
|
4 => 'فرعی',
|
||||||
|
5 => 'روستایی'
|
||||||
|
];
|
||||||
|
$grid = [];
|
||||||
|
$summary = null; // کل استان
|
||||||
|
|
||||||
foreach ($edarat as $value) {
|
foreach ($this->data as $r) {
|
||||||
$edareId = $value->id;
|
$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)) {
|
if ($eid === -1) {
|
||||||
$data[] = (object) [
|
$summary ??= ['edare_name' => $name, 'total' => 0];
|
||||||
'edare_shahri_id' => $edareId,
|
$summary["{$axisKey}_1"] = $r->s1;
|
||||||
'name_fa' => $value->name_fa,
|
$summary["{$axisKey}_2"] = $r->s2;
|
||||||
'sum' => 0,
|
$summary["{$axisKey}_3"] = $r->s3;
|
||||||
'axis_data' => [
|
$summary['total'] = $r->total_sum;
|
||||||
'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
|
continue;
|
||||||
'بزرگراه' => ['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 (!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', [
|
$exportRows = [];
|
||||||
'data' => $data,
|
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 App\Models\EdarateShahri;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Maatwebsite\Excel\Concerns\FromView;
|
use Maatwebsite\Excel\Concerns\FromView;
|
||||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||||
@@ -12,39 +11,54 @@ use Maatwebsite\Excel\Concerns\WithDrawings;
|
|||||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||||
use Maatwebsite\Excel\Events\AfterSheet;
|
use Maatwebsite\Excel\Events\AfterSheet;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
|
||||||
|
|
||||||
class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
|
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
|
public function view(): View
|
||||||
{
|
{
|
||||||
$data = $this->data;
|
$axis = [
|
||||||
$existedCities = array_keys($data);
|
1 => 'آزادراه',
|
||||||
$edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
|
2 => 'بزرگراه',
|
||||||
|
3 => 'اصلی',
|
||||||
|
4 => 'فرعی',
|
||||||
|
5 => 'روستایی'
|
||||||
|
];
|
||||||
|
$grid = [];
|
||||||
|
$summary = null; // کل استان
|
||||||
|
|
||||||
foreach ($edarat as $value) {
|
foreach ($this->data as $r) {
|
||||||
$edareId = $value->id;
|
$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)) {
|
if ($eid === -1) {
|
||||||
$data[] = (object) [
|
$summary ??= ['edare_name' => $name, 'total' => 0];
|
||||||
'edare_shahri_id' => $edareId,
|
$summary["{$axisKey}_1"] = $r->s1;
|
||||||
'name_fa' => $value->name_fa,
|
$summary["{$axisKey}_2"] = $r->s2;
|
||||||
'sum' => 0,
|
$summary["{$axisKey}_3"] = $r->s3;
|
||||||
'axis_data' => [
|
$summary['total'] = $r->total_sum;
|
||||||
'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
|
continue;
|
||||||
'بزرگراه' => ['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 (!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', [
|
$exportRows = [];
|
||||||
'data' => $data,
|
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
|
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
|
public function view(): View
|
||||||
{
|
{
|
||||||
$data = $this->data;
|
$axis = [
|
||||||
$existedCities = array_keys($data);
|
1 => 'آزادراه',
|
||||||
$edarat = EdarateShahri::query()->where('province_id', '=', $this->request->province_id)->get(['id', 'name_fa']);
|
2 => 'بزرگراه',
|
||||||
|
3 => 'اصلی',
|
||||||
|
4 => 'فرعی',
|
||||||
|
5 => 'روستایی'
|
||||||
|
];
|
||||||
|
$grid = [];
|
||||||
|
$summary = null; // کل استان
|
||||||
|
|
||||||
foreach ($edarat as $value) {
|
foreach ($this->data as $r) {
|
||||||
$edareId = $value->id;
|
$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)) {
|
if ($eid === -1) {
|
||||||
$data[] = (object) [
|
$summary ??= ['edare_name' => $name, 'total' => 0];
|
||||||
'edare_shahri_id' => $edareId,
|
$summary["{$axisKey}_1"] = $r->s1;
|
||||||
'name_fa' => $value->name_fa,
|
$summary["{$axisKey}_2"] = $r->s2;
|
||||||
'sum' => 0,
|
$summary["{$axisKey}_3"] = $r->s3;
|
||||||
'axis_data' => [
|
$summary['total'] = $r->total_sum;
|
||||||
'آزادراه' => ['1' => 0, '2' => 0, '3' => 0],
|
continue;
|
||||||
'بزرگراه' => ['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 (!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', [
|
$exportRows = [];
|
||||||
'data' => $data,
|
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)
|
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();
|
// $cities = \App\Models\City::where('province_id', $id)->get();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ class CMMSMachinesController extends Controller
|
|||||||
$request,
|
$request,
|
||||||
allowedFilters: ['*'],
|
allowedFilters: ['*'],
|
||||||
allowedSortings: ['*'],
|
allowedSortings: ['*'],
|
||||||
allowedSelects: ['machine_code', 'id', 'plak_number', 'car_name']
|
allowedSelects: ['machine_code', 'id', 'plak_number', 'car_name', 'car_type']
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function list(): JsonResponse
|
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);
|
return $this->successResponse($machinesList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ class AccidentReceiptController extends Controller
|
|||||||
'police_file_date' => $request->police_file_date ?? null,
|
'police_file_date' => $request->police_file_date ?? null,
|
||||||
'status' => AccidentStates::BEDON_EGHDAM->value,
|
'status' => AccidentStates::BEDON_EGHDAM->value,
|
||||||
'status_fa' => AccidentStates::name(AccidentStates::BEDON_EGHDAM->value),
|
'status_fa' => AccidentStates::name(AccidentStates::BEDON_EGHDAM->value),
|
||||||
|
'driver_rate' => $request->driver_rate,
|
||||||
];
|
];
|
||||||
|
|
||||||
$sum = 0;
|
$sum = 0;
|
||||||
@@ -104,6 +105,7 @@ class AccidentReceiptController extends Controller
|
|||||||
|
|
||||||
$accidentData['ojrate_nasb'] = $ojrate_nasb;
|
$accidentData['ojrate_nasb'] = $ojrate_nasb;
|
||||||
$accidentData['sum'] = $sum;
|
$accidentData['sum'] = $sum;
|
||||||
|
$accidentData['driver_share_amount'] = ($request->sum * $request->driver_rate)/100;
|
||||||
|
|
||||||
$accident = Accident::query()->create($accidentData);
|
$accident = Accident::query()->create($accidentData);
|
||||||
$accident->damage_picture1 = FileFacade::save($request->file('damage_picture1'), "receipts_files/{$accident->id}");
|
$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,
|
'report_base' => $request->report_base,
|
||||||
'police_serial' => $request->police_serial ?? null,
|
'police_serial' => $request->police_serial ?? null,
|
||||||
'police_file_date' => $request->police_file_date ?? null,
|
'police_file_date' => $request->police_file_date ?? null,
|
||||||
|
'driver_rate' => $request->driver_rate,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($request->report_base && $accident->police_file) {
|
if ($request->report_base && $accident->police_file) {
|
||||||
@@ -192,6 +195,8 @@ class AccidentReceiptController extends Controller
|
|||||||
|
|
||||||
$accidentData['ojrate_nasb'] = $ojrate_nasb;
|
$accidentData['ojrate_nasb'] = $ojrate_nasb;
|
||||||
$accidentData['sum'] = $sum;
|
$accidentData['sum'] = $sum;
|
||||||
|
$accidentData['driver_share_amount'] = ($request->sum * $request->driver_rate)/100;
|
||||||
|
|
||||||
|
|
||||||
$accident->update($accidentData);
|
$accident->update($accidentData);
|
||||||
|
|
||||||
@@ -247,13 +252,24 @@ class AccidentReceiptController extends Controller
|
|||||||
{
|
{
|
||||||
DB::transaction(function () use ($request, $accident) {
|
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([
|
$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_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_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_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,
|
'deposit_daghi_amount' => $request->deposit_daghi_amount ?? 0,
|
||||||
'status' => AccidentStates::SABT_FISH->value,
|
'status' => $status,
|
||||||
'status_fa' => AccidentStates::name(AccidentStates::SABT_FISH->value),
|
'status_fa' => $status_fa,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
auth()->user()->addActivityComplete(1132);
|
auth()->user()->addActivityComplete(1132);
|
||||||
@@ -267,7 +283,7 @@ class AccidentReceiptController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function submitInvoice(Accident $accident, PaymentService $paymentService): JsonResponse
|
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('مبالغ داغی و بیمه از مبلغ کل بیشتر می باشد.'));
|
throw_if($final_amount < 0, new ProhibitedAction('مبالغ داغی و بیمه از مبلغ کل بیشتر می باشد.'));
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ use App\Services\Cartables\AccidentReceiptTableService;
|
|||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Exception;
|
||||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||||
|
|
||||||
class AccidentReceiptReportController extends Controller
|
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
|
public function countryExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
|
||||||
{
|
{
|
||||||
$data = $accidentReceiptTableService->countryReport($request);
|
$data = $accidentReceiptTableService->countryReport($request);
|
||||||
@@ -45,6 +50,10 @@ class AccidentReceiptReportController extends Controller
|
|||||||
return Excel::download(new CountryReport($data), $name);
|
return Excel::download(new CountryReport($data), $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception
|
||||||
|
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||||
|
*/
|
||||||
public function provinceExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
|
public function provinceExcelReport(Request $request, AccidentReceiptTableService $accidentReceiptTableService): BinaryFileResponse
|
||||||
{
|
{
|
||||||
$data = $accidentReceiptTableService->provinceReport($request);
|
$data = $accidentReceiptTableService->provinceReport($request);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace App\Http\Controllers\V3\Dashboard\Harim;
|
|||||||
use App\Enums\HarimStates;
|
use App\Enums\HarimStates;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\V3\Dashboard\Harim\PanjareVahed\GetAccessRoadRequest;
|
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\Http\Traits\ApiResponse;
|
||||||
use App\Models\City;
|
use App\Models\City;
|
||||||
use App\Models\Harim;
|
use App\Models\Harim;
|
||||||
@@ -15,7 +16,7 @@ class PanjareVahedController extends Controller
|
|||||||
{
|
{
|
||||||
use ApiResponse;
|
use ApiResponse;
|
||||||
|
|
||||||
public function receiveNewRequests(Request $request)
|
public function receiveNewRequest(ReceiveNewRequest $request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$city = City::query()
|
$city = City::query()
|
||||||
@@ -63,12 +64,19 @@ class PanjareVahedController extends Controller
|
|||||||
'province' => $city->province()->first()->name_fa,
|
'province' => $city->province()->first()->name_fa,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
public function getAccessRoad(GetAccessRoadRequest $request, Harim $harim)
|
|
||||||
|
public function getAccessRoad(GetAccessRoadRequest $request)
|
||||||
{
|
{
|
||||||
Harim::update([
|
$state = HarimStates::BARESI_FILE_APLODE_SHODE_TAVASOTE_DAFTAR_HARIM->value;
|
||||||
'panjarevahed_id' => $request->panjarevahed_id,
|
|
||||||
'polygon' => $request->polygon,
|
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();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,11 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers\V3\Dashboard\Mission;
|
namespace App\Http\Controllers\V3\Dashboard\Mission;
|
||||||
|
|
||||||
use App\Enums\MissionCategory;
|
|
||||||
use App\Enums\MissionStates;
|
use App\Enums\MissionStates;
|
||||||
use App\Enums\MissionTypes;
|
|
||||||
use App\Enums\MissionZones;
|
|
||||||
use App\Events\V3\Dashboard\Mission\SendDataToFMSEvent;
|
use App\Events\V3\Dashboard\Mission\SendDataToFMSEvent;
|
||||||
use App\Http\Controllers\Controller;
|
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\FinishRequest;
|
||||||
use App\Http\Requests\V3\Mission\ControlUnit\NoProcessRequest;
|
|
||||||
use App\Http\Requests\V3\Mission\ControlUnit\StartRequest;
|
use App\Http\Requests\V3\Mission\ControlUnit\StartRequest;
|
||||||
use App\Http\Traits\ApiResponse;
|
use App\Http\Traits\ApiResponse;
|
||||||
use App\Models\Mission;
|
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);
|
SendDataToFMSEvent::dispatch($mission);
|
||||||
|
|
||||||
return $this->successResponse();
|
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\Enums\MissionZones;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Controllers\V3\Dashboard\RoadPatrol\OperatorController;
|
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\StoreRequest;
|
||||||
use App\Http\Requests\V3\Mission\RequestPortal\UpdateRequest;
|
use App\Http\Requests\V3\Mission\RequestPortal\UpdateRequest;
|
||||||
use App\Http\Traits\ApiResponse;
|
use App\Http\Traits\ApiResponse;
|
||||||
use App\Models\Mission;
|
use App\Models\Mission;
|
||||||
use App\Models\RoadObserved;
|
use App\Models\RoadObserved;
|
||||||
use App\Services\Cartables\Mission\RequestPortalService;
|
use App\Services\Cartables\Mission\RequestPortalService;
|
||||||
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
@@ -32,6 +34,7 @@ class RequestPortalController extends Controller
|
|||||||
DB::transaction(function () use ($request) {
|
DB::transaction(function () use ($request) {
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$state = MissionStates::REQUEST_CREATED->value;
|
$state = MissionStates::REQUEST_CREATED->value;
|
||||||
|
$category = $request->category_id;
|
||||||
|
|
||||||
$mission = Mission::query()->create([
|
$mission = Mission::query()->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
@@ -53,20 +56,15 @@ class RequestPortalController extends Controller
|
|||||||
'description' => $request->description,
|
'description' => $request->description,
|
||||||
'end_point' => $request->end_point,
|
'end_point' => $request->end_point,
|
||||||
'area' => json_encode($request->area),
|
'area' => json_encode($request->area),
|
||||||
'category_id' => $request->category_id,
|
'category_id' => $category,
|
||||||
'category_name' => MissionCategory::name($request->category_id),
|
'category_name' => MissionCategory::name($category),
|
||||||
'explanation' => $request->explanation,
|
'explanation' => $request->explanation,
|
||||||
'code' => rand(100000, 999999),
|
'code' => rand(100000, 999999),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$mission->rahdaran()->sync($request->rahdaran);
|
$mission->rahdaran()->sync($request->rahdaran);
|
||||||
|
|
||||||
if ($request->category_id == 2) {
|
if ($category == 3){
|
||||||
$rpc = new OperatorController();
|
|
||||||
$rpc->store($mission);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->category_id == 3){
|
|
||||||
RoadObserved::query()
|
RoadObserved::query()
|
||||||
->find($request->road_observed_id)
|
->find($request->road_observed_id)
|
||||||
->missions()
|
->missions()
|
||||||
@@ -123,4 +121,47 @@ class RequestPortalController extends Controller
|
|||||||
});
|
});
|
||||||
return $this->successResponse();
|
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('اقدام مربوطه قبلا رسیدگی شده است.')
|
new ProhibitedAction('اقدام مربوطه قبلا رسیدگی شده است.')
|
||||||
);
|
);
|
||||||
|
|
||||||
$road_item->rahdaran()->attach($request->rahdaran_id);
|
|
||||||
$road_item->cmmsMachines()->attach($request->machines_id);
|
|
||||||
$road_item->missions()->attach($request->mission_id);
|
$road_item->missions()->attach($request->mission_id);
|
||||||
|
|
||||||
$user->addActivityComplete(1154);
|
$user->addActivityComplete(1154);
|
||||||
|
|||||||
@@ -24,10 +24,7 @@ class RoadMaintenanceStationController extends Controller
|
|||||||
public function index(Request $request): JsonResponse
|
public function index(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
auth()->user()->addActivityComplete(1019);
|
$user->addActivityComplete(1019);
|
||||||
|
|
||||||
$allowedFilters = ['*'];
|
|
||||||
$allowedSortings = ['*'];
|
|
||||||
|
|
||||||
$province = $request->province;
|
$province = $request->province;
|
||||||
$status = $request->status;
|
$status = $request->status;
|
||||||
@@ -38,15 +35,15 @@ class RoadMaintenanceStationController extends Controller
|
|||||||
->when($type, fn ($query, $type) => $query->where('type', $type))
|
->when($type, fn ($query, $type) => $query->where('type', $type))
|
||||||
->when($province, fn($query, $province) => $query->where('province_id', $province));
|
->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);
|
$query->where('province_id', $user->province_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = DataTableFacade::run(
|
$data = DataTableFacade::run(
|
||||||
$query,
|
$query,
|
||||||
$request,
|
$request,
|
||||||
allowedFilters: $allowedFilters,
|
allowedFilters: ['*'],
|
||||||
allowedSortings: $allowedSortings
|
allowedSortings: ['*']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@@ -107,6 +104,7 @@ class RoadMaintenanceStationController extends Controller
|
|||||||
'lat' => $request->lat,
|
'lat' => $request->lat,
|
||||||
'lng' => $request->lng,
|
'lng' => $request->lng,
|
||||||
'updated_at_fa' => verta()->now()->format('Y/m/d H:i:s'),
|
'updated_at_fa' => verta()->now()->format('Y/m/d H:i:s'),
|
||||||
|
'area' => json_encode($request->area),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$uploadPaths = [
|
$uploadPaths = [
|
||||||
@@ -168,6 +166,7 @@ class RoadMaintenanceStationController extends Controller
|
|||||||
'previous_lat' => $rahdariPoint->lat,
|
'previous_lat' => $rahdariPoint->lat,
|
||||||
'previous_lng' => $rahdariPoint->lng,
|
'previous_lng' => $rahdariPoint->lng,
|
||||||
'new_files' => json_encode($rahdariPoint->files),
|
'new_files' => json_encode($rahdariPoint->files),
|
||||||
|
'area' => json_encode($rahdariPoint->area),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$rahdariPoint->update([
|
$rahdariPoint->update([
|
||||||
@@ -198,6 +197,7 @@ class RoadMaintenanceStationController extends Controller
|
|||||||
'lng_to' => $request->lng_to,
|
'lng_to' => $request->lng_to,
|
||||||
'color' => $request->color,
|
'color' => $request->color,
|
||||||
'updated_at_fa' => verta()->now()->format('Y/m/d H:i:s'),
|
'updated_at_fa' => verta()->now()->format('Y/m/d H:i:s'),
|
||||||
|
'area' => json_encode($request->area),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$uploadFields = [
|
$uploadFields = [
|
||||||
|
|||||||
@@ -37,14 +37,25 @@ class OperatorController extends Controller
|
|||||||
|
|
||||||
public function store(Mission $mission): JsonResponse
|
public function store(Mission $mission): JsonResponse
|
||||||
{
|
{
|
||||||
$road_patrol = RoadPatrol::query()->create([
|
DB::transaction(function () use ($mission) {
|
||||||
'status' => 0,
|
$user = auth()->user();
|
||||||
'status_fa' => 'در حال بررسی',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$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();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ use App\Services\Cartables\SafetyAndPrivacy\OperatorService;
|
|||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Maatwebsite\Excel\Facades\Excel;
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use PhpOffice\PhpSpreadsheet\Exception;
|
||||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||||
|
|
||||||
class ConstructionActivityController extends Controller
|
class ConstructionActivityController extends Controller
|
||||||
@@ -38,6 +39,11 @@ class ConstructionActivityController extends Controller
|
|||||||
'edarateShahri' => EdarateShahri::where('province_id', $request->province_id)->get(['id', 'name_fa']),
|
'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
|
public function countryExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||||
{
|
{
|
||||||
$data = $operatorService->countryActivity(89);
|
$data = $operatorService->countryActivity(89);
|
||||||
@@ -46,6 +52,10 @@ class ConstructionActivityController extends Controller
|
|||||||
return Excel::download(new ExcelReport($data), $name);
|
return Excel::download(new ExcelReport($data), $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception
|
||||||
|
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||||
|
*/
|
||||||
public function provinceExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
public function provinceExcelActivity(Request $request, OperatorService $operatorService): BinaryFileResponse
|
||||||
{
|
{
|
||||||
$data = $operatorService->provinceActivity(
|
$data = $operatorService->provinceActivity(
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use App\Http\Requests\V3\Rahdaran\StoreRequest;
|
|||||||
use App\Http\Requests\V3\Rahdaran\UpdateRequest;
|
use App\Http\Requests\V3\Rahdaran\UpdateRequest;
|
||||||
use App\Http\Traits\ApiResponse;
|
use App\Http\Traits\ApiResponse;
|
||||||
use App\Models\Rahdaran;
|
use App\Models\Rahdaran;
|
||||||
|
use Illuminate\Database\QueryException;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
@@ -30,6 +31,7 @@ class RahdaranController extends Controller
|
|||||||
Rahdaran::query()->create([
|
Rahdaran::query()->create([
|
||||||
'name' =>$request->name,
|
'name' =>$request->name,
|
||||||
'code' =>$request->code,
|
'code' =>$request->code,
|
||||||
|
'mobile' =>$request->mobile,
|
||||||
]);
|
]);
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
@@ -44,14 +46,20 @@ class RahdaranController extends Controller
|
|||||||
$rahdaran->update([
|
$rahdaran->update([
|
||||||
'name' =>$request->name,
|
'name' =>$request->name,
|
||||||
'code' =>$request->code,
|
'code' =>$request->code,
|
||||||
|
'mobile' =>$request->mobile,
|
||||||
]);
|
]);
|
||||||
return $this->successResponse();
|
return $this->successResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function destroy(Rahdaran $rahdaran): JsonResponse
|
public function destroy(Rahdaran $rahdaran): JsonResponse
|
||||||
{
|
{
|
||||||
$rahdaran->delete();
|
try {
|
||||||
return $this->successResponse();
|
$rahdaran->delete();
|
||||||
|
return $this->successResponse();
|
||||||
|
}
|
||||||
|
catch (QueryException $exception) {
|
||||||
|
return $this->errorResponse('امکان حذف وجود ندارد');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function list(): JsonResponse
|
public function list(): JsonResponse
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class StoreRequest extends FormRequest
|
|||||||
'damage_items' => 'required|array',
|
'damage_items' => 'required|array',
|
||||||
'damage_items.*.value' => 'required',
|
'damage_items.*.value' => 'required',
|
||||||
'damage_items.*.amount' => 'required',
|
'damage_items.*.amount' => 'required',
|
||||||
|
'driver_rate' => 'required|numeric',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ class UpdateRequest extends FormRequest
|
|||||||
'damage_items' => 'required|array',
|
'damage_items' => 'required|array',
|
||||||
'damage_items.*.value' => 'required',
|
'damage_items.*.value' => 'required',
|
||||||
'damage_items.*.amount' => 'required',
|
'damage_items.*.amount' => 'required',
|
||||||
|
'driver_rate' => 'required|numeric',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ class GetAccessRoadRequest extends FormRequest
|
|||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'panjarevahed_id'=> 'required|string',
|
'panjare_vahed_id' => 'required|string',
|
||||||
'polygon' => '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
|
<?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\Contracts\Validation\ValidationRule;
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
use Illuminate\Validation\Validator;
|
|
||||||
|
|
||||||
class NoProcessRequest extends FormRequest
|
class NoProcessRequest extends FormRequest
|
||||||
{
|
{
|
||||||
@@ -39,14 +36,15 @@ class NoProcessRequest extends FormRequest
|
|||||||
'area.type' => 'required|string',
|
'area.type' => 'required|string',
|
||||||
'area.coordinates' => 'required|array',
|
'area.coordinates' => 'required|array',
|
||||||
'category_id' => 'required|in:1,2,3',
|
'category_id' => 'required|in:1,2,3',
|
||||||
|
'explanation' => 'required|string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function messages(): array
|
public function messages(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'end_date.before' => 'تاریخ پایان باید قبل از زمان فعلی باشد.',
|
'end_date.before' => 'تاریخ پایان باید قبل از زمان فعلی باشد.',
|
||||||
'end_date.after' => 'تاریخ پایان نباید قبل از تاریخ شروع باشد.',
|
'end_date.after' => 'تاریخ پایان نباید قبل از تاریخ شروع باشد.',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,8 @@ class StoreRequest extends FormRequest
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => 'required|string|max:255',
|
'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\Contracts\Validation\ValidationRule;
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
class UpdateRequest extends FormRequest
|
class UpdateRequest extends FormRequest
|
||||||
{
|
{
|
||||||
@@ -24,7 +25,8 @@ class UpdateRequest extends FormRequest
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => 'required|string|max:255',
|
'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 Carbon\Carbon;
|
||||||
use Illuminate\Contracts\Validation\ValidationRule;
|
use Illuminate\Contracts\Validation\ValidationRule;
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
use Illuminate\Validation\Rule;
|
|
||||||
use Illuminate\Validation\ValidationException;
|
|
||||||
use Illuminate\Validation\Validator;
|
use Illuminate\Validation\Validator;
|
||||||
|
|
||||||
class StoreRequest extends FormRequest
|
class StoreRequest extends FormRequest
|
||||||
@@ -38,10 +36,6 @@ class StoreRequest extends FormRequest
|
|||||||
'activity_time' => 'required|date_format:H:i',
|
'activity_time' => 'required|date_format:H:i',
|
||||||
'before_image' => 'image|max:4096',
|
'before_image' => 'image|max:4096',
|
||||||
'after_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' => 'ساعت فعالیت',
|
'activity_time' => 'ساعت فعالیت',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function after(): array
|
public function after(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
function (Validator $validator) {
|
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}");
|
$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', 'زمان گزارش باید بین بازه مأموریت باشد.');
|
$validator->errors()->add('activity_time', 'زمان گزارش باید بین بازه مأموریت باشد.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
namespace App\Http\Requests\V3\RoadItem\Operator;
|
namespace App\Http\Requests\V3\RoadItem\Operator;
|
||||||
|
|
||||||
|
use App\Models\Mission;
|
||||||
|
use Carbon\Carbon;
|
||||||
use Illuminate\Contracts\Validation\ValidationRule;
|
use Illuminate\Contracts\Validation\ValidationRule;
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Validator;
|
||||||
|
|
||||||
class UpdateRequest extends FormRequest
|
class UpdateRequest extends FormRequest
|
||||||
{
|
{
|
||||||
@@ -48,4 +50,22 @@ class UpdateRequest extends FormRequest
|
|||||||
'activity_time' => 'ساعت فعالیت',
|
'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_3' => 'file|mimes:jpg,jpeg,png,pdf|max:51200',
|
||||||
'overview_files_4' => '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',
|
'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_3' => 'file|mimes:jpg,jpeg,png,pdf|max:5120',
|
||||||
'overview_files_4' => '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',
|
'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;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||||
@@ -69,6 +70,7 @@ class RahdariPoint extends Model
|
|||||||
'lat_to',
|
'lat_to',
|
||||||
'lng_to',
|
'lng_to',
|
||||||
'updated_at_fa',
|
'updated_at_fa',
|
||||||
|
'area'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function files(): MorphMany
|
public function files(): MorphMany
|
||||||
@@ -80,4 +82,11 @@ class RahdariPoint extends Model
|
|||||||
{
|
{
|
||||||
return $this->hasMany('App\Models\RahdariPointHistory', 'point_id');
|
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;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
class RahdariPointHistory extends Model
|
class RahdariPointHistory extends Model
|
||||||
@@ -33,11 +34,19 @@ class RahdariPointHistory extends Model
|
|||||||
'previous_lat',
|
'previous_lat',
|
||||||
'previous_lng',
|
'previous_lng',
|
||||||
'new_files',
|
'new_files',
|
||||||
'point_id'
|
'point_id',
|
||||||
|
'area'
|
||||||
];
|
];
|
||||||
|
|
||||||
public function rahdariPoint()
|
public function rahdariPoint()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\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 (
|
WITH base AS (
|
||||||
SELECT
|
SELECT
|
||||||
p.id AS province_id,
|
p.id AS province_id,
|
||||||
|
p.name_fa AS province_name,
|
||||||
a.id AS axis_type_id,
|
a.id AS axis_type_id,
|
||||||
COALESCE(SUM(t.step = 1), 0) AS s1,
|
COALESCE(SUM(t.step = 1), 0) AS s1,
|
||||||
COALESCE(SUM(t.step = 2), 0) AS s2,
|
COALESCE(SUM(t.step = 2), 0) AS s2,
|
||||||
@@ -54,6 +55,7 @@ class OperatorService
|
|||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
province_id,
|
province_id,
|
||||||
|
province_name,
|
||||||
axis_type_id,
|
axis_type_id,
|
||||||
s1,
|
s1,
|
||||||
s2,
|
s2,
|
||||||
@@ -68,6 +70,7 @@ class OperatorService
|
|||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
-1 AS province_id,
|
-1 AS province_id,
|
||||||
|
'کل کشور' AS province_name,
|
||||||
axis_type_id,
|
axis_type_id,
|
||||||
COALESCE(SUM(s1), 0) AS s1,
|
COALESCE(SUM(s1), 0) AS s1,
|
||||||
COALESCE(SUM(s2), 0) AS s2,
|
COALESCE(SUM(s2), 0) AS s2,
|
||||||
@@ -90,7 +93,8 @@ class OperatorService
|
|||||||
return DB::select("
|
return DB::select("
|
||||||
WITH edareh_data AS (
|
WITH edareh_data AS (
|
||||||
SELECT
|
SELECT
|
||||||
e.id AS edareh_id,
|
e.id AS edare_id,
|
||||||
|
e.name_fa AS edare_name,
|
||||||
a.id AS axis_type_id,
|
a.id AS axis_type_id,
|
||||||
COALESCE(SUM(t.step = 1), 0) AS s1,
|
COALESCE(SUM(t.step = 1), 0) AS s1,
|
||||||
COALESCE(SUM(t.step = 2), 0) AS s2,
|
COALESCE(SUM(t.step = 2), 0) AS s2,
|
||||||
@@ -105,21 +109,23 @@ class OperatorService
|
|||||||
GROUP BY e.id, a.id
|
GROUP BY e.id, a.id
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
edareh_id,
|
edare_id,
|
||||||
|
edare_name,
|
||||||
axis_type_id,
|
axis_type_id,
|
||||||
s1,
|
s1,
|
||||||
s2,
|
s2,
|
||||||
s3,
|
s3,
|
||||||
COALESCE(
|
COALESCE(
|
||||||
SUM(s1 + s2 + s3)
|
SUM(s1 + s2 + s3)
|
||||||
OVER (PARTITION BY edareh_id), 0
|
OVER (PARTITION BY edare_id), 0
|
||||||
) AS total_sum
|
) AS total_sum
|
||||||
FROM edareh_data
|
FROM edareh_data
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
-1 AS edareh_id,
|
-1 AS edare_id,
|
||||||
|
'کل استان' AS edare_name,
|
||||||
axis_type_id,
|
axis_type_id,
|
||||||
COALESCE(SUM(s1), 0) AS s1,
|
COALESCE(SUM(s1), 0) AS s1,
|
||||||
COALESCE(SUM(s2), 0) AS s2,
|
COALESCE(SUM(s2), 0) AS s2,
|
||||||
@@ -130,7 +136,7 @@ class OperatorService
|
|||||||
FROM edareh_data
|
FROM edareh_data
|
||||||
GROUP BY axis_type_id
|
GROUP BY axis_type_id
|
||||||
|
|
||||||
ORDER BY edareh_id , axis_type_id
|
ORDER BY edare_id , axis_type_id
|
||||||
", [
|
", [
|
||||||
'provinceId' => $province_id,
|
'provinceId' => $province_id,
|
||||||
'infoId' => $info_id,
|
'infoId' => $info_id,
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
"laravel/ui": "^4.4",
|
"laravel/ui": "^4.4",
|
||||||
"maatwebsite/excel": "^3.1",
|
"maatwebsite/excel": "^3.1",
|
||||||
"morilog/jalali": "3.*",
|
"morilog/jalali": "3.*",
|
||||||
"spatie/laravel-permission": "^5.10"
|
"spatie/laravel-permission": "^5.10",
|
||||||
|
"usmanhalalit/laracsv": "^2.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-debugbar": "^3.9",
|
"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",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "379d6ba4ded00ca7079f26aa5b12e04e",
|
"content-hash": "67bcaf1ce932d76ea3acb0bd4e2abf10",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "beberlei/assert",
|
"name": "beberlei/assert",
|
||||||
@@ -2685,6 +2685,97 @@
|
|||||||
],
|
],
|
||||||
"time": "2022-12-11T20:36:23+00:00"
|
"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",
|
"name": "league/flysystem",
|
||||||
"version": "3.23.1",
|
"version": "3.23.1",
|
||||||
@@ -7138,6 +7229,66 @@
|
|||||||
},
|
},
|
||||||
"time": "2023-12-08T13:03:43+00:00"
|
"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",
|
"name": "vlucas/phpdotenv",
|
||||||
"version": "v5.6.0",
|
"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)
|
@foreach ($data as $road)
|
||||||
<tr>
|
<tr>
|
||||||
<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['name'] }}</td>
|
{{ $road['province_fa'] }}</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;">
|
||||||
{{ $road['tedade'] }}</td>
|
{{ $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;">
|
||||||
|
|||||||
@@ -97,11 +97,11 @@
|
|||||||
@foreach ($data as $road)
|
@foreach ($data as $road)
|
||||||
<tr>
|
<tr>
|
||||||
<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['name'] }}</td>
|
{{ $road['city_fa'] }}</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;">
|
||||||
{{ $road['tedade'] }}</td>
|
{{ $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;">
|
<td style="text-align: center;border:1px solid black;background-color: #DAEEF3;">
|
||||||
{{ $road['egdam'] }}</td>
|
{{ $road['egdam'] }}</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;">
|
||||||
{{ $road['pardakht'] }}</td>
|
{{ $road['pardakht'] }}</td>
|
||||||
|
|||||||
@@ -1,132 +1,71 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="fa">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<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>
|
</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>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="17"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;font-size:13px;">
|
||||||
|
گزارش نگهداری حریم راه برای راه دسترسی غیر مجاز
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</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">
|
<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>
|
||||||
<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>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
آزاد راه
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||||
</th>
|
{{ $axis[$aid] }}
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
</th>
|
||||||
بزرگ راه
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
گام اول (شناسایی)
|
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||||
</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 style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||||
گام دوم (مستندات قضایی)
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($data as $item)
|
@foreach ($rows as $r)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['province_name'] }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</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>
|
@foreach ($axisOrder as $aid)
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
@php $group = $axis[$aid]; @endphp
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_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;">{{ cell($r, "{$group}_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;">{{ cell($r, "{$group}_3") }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
@endforeach
|
||||||
<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>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,132 +1,71 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="fa">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<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>
|
</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>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="17"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
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>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr class="headercolortable">
|
<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>
|
||||||
<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>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
آزاد راه
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||||
</th>
|
{{ $axis[$aid] }}
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
</th>
|
||||||
بزرگ راه
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
گام اول (شناسایی)
|
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||||
</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 style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||||
گام دوم (مستندات قضایی)
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($data as $item)
|
@foreach ($rows as $r)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['province_name'] }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</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>
|
@foreach ($axisOrder as $aid)
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
@php $group = $axis[$aid]; @endphp
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_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;">{{ cell($r, "{$group}_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;">{{ cell($r, "{$group}_3") }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
@endforeach
|
||||||
<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>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,132 +1,71 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="fa">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<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>
|
</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>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="17"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
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>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr class="headercolortable">
|
<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>
|
||||||
<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>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
آزاد راه
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||||
</th>
|
{{ $axis[$aid] }}
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
</th>
|
||||||
بزرگ راه
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
گام اول (شناسایی)
|
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||||
</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 style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||||
گام دوم (مستندات قضایی)
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($data as $item)
|
@foreach ($rows as $r)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['province_name'] }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</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>
|
@foreach ($axisOrder as $aid)
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
@php $group = $axis[$aid]; @endphp
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$group}_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;">{{ cell($r, "{$group}_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;">{{ cell($r, "{$group}_3") }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
@endforeach
|
||||||
<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>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,131 +1,70 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="fa">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<title>گزارش ادارات شهرستانی</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>استانی</title>
|
|
||||||
|
|
||||||
</head>
|
</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>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="17"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
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>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="headercolortable">
|
<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>
|
||||||
<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>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
آزاد راه
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||||
</th>
|
{{ $axis[$aid] }}
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
</th>
|
||||||
بزرگ راه
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
گام اول (شناسایی)
|
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||||
</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 style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||||
گام دوم (مستندات قضایی)
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($data as $item)
|
@foreach ($rows as $r)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['edare_name'] }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</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>
|
@foreach ($axisOrder as $aid)
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
@php $g = $axis[$aid]; @endphp
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_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;">{{ cell($r, "{$g}_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;">{{ cell($r, "{$g}_3") }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
@endforeach
|
||||||
<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>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,131 +1,70 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="fa">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<title>گزارش ادارات شهرستانی</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>استانی</title>
|
|
||||||
|
|
||||||
</head>
|
</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>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="17"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
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>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="headercolortable">
|
<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>
|
||||||
<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>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
آزاد راه
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||||
</th>
|
{{ $axis[$aid] }}
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
</th>
|
||||||
بزرگ راه
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
گام اول (شناسایی)
|
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||||
</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 style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||||
گام دوم (مستندات قضایی)
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($data as $item)
|
@foreach ($rows as $r)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['edare_name'] }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</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>
|
@foreach ($axisOrder as $aid)
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
@php $g = $axis[$aid]; @endphp
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_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;">{{ cell($r, "{$g}_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;">{{ cell($r, "{$g}_3") }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
@endforeach
|
||||||
<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>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,131 +1,70 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="fa">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<title>گزارش ادارات شهرستانی</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>استانی</title>
|
|
||||||
|
|
||||||
</head>
|
</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>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="11"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
style="background-color:#DAEEF3;text-align:center;border-right:1px solid black;font-weight:bolder;">
|
||||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="17"
|
<th colspan="{{ 2 + (count($axisOrder) * 3) }}"
|
||||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
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>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr class="headercolortable">
|
<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>
|
||||||
<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>
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
آزاد راه
|
<th colspan="3" style="border:1px solid black;text-align:center;background-color:#EBF1DE;">
|
||||||
</th>
|
{{ $axis[$aid] }}
|
||||||
<th colspan="3" style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
</th>
|
||||||
بزرگ راه
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border:1px solid black;text-align:center;background-color: #EBF1DE;">
|
@foreach($axisOrder as $aid)
|
||||||
گام اول (شناسایی)
|
<th style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام اول (شناسایی)</th>
|
||||||
</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 style="border:1px solid black;text-align:center;background-color:#EBF1DE;">گام سوم (برخورد)</th>
|
||||||
گام دوم (مستندات قضایی)
|
@endforeach
|
||||||
</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>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($data as $item)
|
@foreach ($rows as $r)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->name_fa }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['edare_name'] }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->sum }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ $r['total'] ?: '0' }}</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>
|
@foreach ($axisOrder as $aid)
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['آزادراه'][3] }}</td>
|
@php $g = $axis[$aid]; @endphp
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['بزرگراه'][1] }}</td>
|
<td style="border:1px solid black;text-align:center;">{{ cell($r, "{$g}_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;">{{ cell($r, "{$g}_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;">{{ cell($r, "{$g}_3") }}</td>
|
||||||
<td style="border:1px solid black;text-align: center;">{{ $item->axis_data['اصلی'][1] }}</td>
|
@endforeach
|
||||||
<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>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -481,6 +481,7 @@ Route::prefix('missions')
|
|||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/', 'index')->name('index');
|
Route::get('/', 'index')->name('index');
|
||||||
Route::post('/', 'store')->name('store');
|
Route::post('/', 'store')->name('store');
|
||||||
|
Route::post('/no_process','noProcess')->name('noProcess');
|
||||||
Route::get('/{mission}', 'show')->name('show');
|
Route::get('/{mission}', 'show')->name('show');
|
||||||
Route::post('/{mission}', 'update')->name('update');
|
Route::post('/{mission}', 'update')->name('update');
|
||||||
Route::delete('/{mission}', 'destroy')->name('destroy');
|
Route::delete('/{mission}', 'destroy')->name('destroy');
|
||||||
@@ -501,7 +502,6 @@ Route::prefix('missions')
|
|||||||
->controller(ControlUnitController::class)
|
->controller(ControlUnitController::class)
|
||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/', 'index')->name('index');
|
Route::get('/', 'index')->name('index');
|
||||||
Route::post('/no_process','noProcess')->name('noProcess');
|
|
||||||
Route::post('/start/{mission}', 'start')->name('start');
|
Route::post('/start/{mission}', 'start')->name('start');
|
||||||
Route::post('/finish/{mission}', 'finish')->name('finish');
|
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::post('/confirm_guarantee_letter_need/{harim}', 'confirmGuaranteeLetterNeed')->name('confirmGuaranteeLetterNeed');
|
||||||
Route::get('/{harim}', 'show')->name('show');
|
Route::get('/{harim}', 'show')->name('show');
|
||||||
});
|
});
|
||||||
Route::prefix('panjarevahed')
|
Route::prefix('panjare_vahed')
|
||||||
->name('panjarevahed.')
|
->name('panjarevahed.')
|
||||||
->controller(PanjarevahedController::class)
|
->controller(PanjarevahedController::class)
|
||||||
->group(function () {
|
->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('/change_password/{user}', 'changePassword')->name('changePassword');
|
||||||
Route::post('delete-role/{id}', 'deleteRole')->name('deleteRole');
|
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