Compare commits
12 Commits
92d806497d
...
feature/Ma
| Author | SHA1 | Date | |
|---|---|---|---|
| 80c4eeaefb | |||
| c9e779d726 | |||
| 72fa9d4ea3 | |||
|
|
d50749fd20 | ||
| ad01e4718d | |||
| 3dd49494f4 | |||
| 3045f60f1e | |||
| 2a6d44885c | |||
| 439f69af29 | |||
| 1be9315b73 | |||
|
|
39752fd5ba | ||
|
|
ab9838c1bc |
@@ -78,7 +78,7 @@ FMS_ERROR_RATE_URL=
|
||||
FMS_ERROR_RATE_PASSWORD=
|
||||
FMS_ERROR_RATE_USERNAME=
|
||||
|
||||
HARIM_NEED_ACCESS_URL='https://zamin.gov.ir/ow/api/ow/esb/response',
|
||||
HARIM_NEED_ACCESS_URL='https://zamin.gov.ir/ow/api/ow/esb/response'
|
||||
HARIM_NEED_ACCESS_PASSWORD=
|
||||
HARIM_NEED_ACCESS_USERNAME=
|
||||
|
||||
@@ -106,7 +106,7 @@ BACKUP_PASSWORD=1qaz
|
||||
HARIM_ENCRYPTION_KEY="TestKey"
|
||||
HARIM_ENCRYPTION_IV="1111000011110101"
|
||||
|
||||
CHECKE_LIST_MACHINES_ACTIVITY_URL='fms.141.ir:7030/api/RMS/GetMovingVehicles',
|
||||
CHECKE_LIST_MACHINES_ACTIVITY_URL='fms.141.ir:7030/api/RMS/GetMovingVehicles'
|
||||
CHECKE_LIST_MACHINES_ACTIVITY_PASSWORD=
|
||||
CHECKE_LIST_MACHINES_ACTIVITY_USERNAME=
|
||||
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -19,3 +19,10 @@ yarn-error.log
|
||||
/.idea
|
||||
/.vscode
|
||||
archive.tgz
|
||||
storage/avatar/
|
||||
storage/cities-geojson.json
|
||||
storage/compress.php
|
||||
storage/images/
|
||||
storage/provinces-cities-geojson copy.js
|
||||
storage/provinces-cities-geojson.js
|
||||
storage/provinces-geojson.json
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\V3\Mission\Report\Machine;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithDrawings;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use Maatwebsite\Excel\Events\AfterSheet;
|
||||
use PhpOffice\PhpSpreadsheet\Exception;
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
||||
|
||||
class machineDriverReport implements FromView, ShouldAutoSize, WithDrawings, WithEvents
|
||||
{
|
||||
public function __construct(private array $data)
|
||||
{
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$exportRows = [];
|
||||
|
||||
foreach ($this->data as $r) {
|
||||
$exportRows[] = [
|
||||
'driver_id' => $r->driver_id ?? '',
|
||||
'driver_name' => $r->driver_name ?? '',
|
||||
'missions' => $r->missions ?? 0,
|
||||
'func' => (int) ($r->func ?? 0),
|
||||
];
|
||||
}
|
||||
|
||||
return view('v3.Reports.Mission.Report.Machine.MachineDriverReport', [
|
||||
'rows' => $exportRows,
|
||||
]);
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
return [
|
||||
AfterSheet::class => function (AfterSheet $event) {
|
||||
$event->sheet->getDelegate()->setRightToLeft(true);
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function drawings(): array
|
||||
{
|
||||
$drawing = new Drawing();
|
||||
$drawing->setName('Logo');
|
||||
$drawing->setDescription('This is my logo');
|
||||
$drawing->setPath(public_path('/dist/logo.png'));
|
||||
$drawing->setWidth(50);
|
||||
$drawing->setHeight(50);
|
||||
$drawing->setOffsetX(5);
|
||||
$drawing->setOffsetY(5);
|
||||
$drawing->setCoordinates('A1');
|
||||
|
||||
$drawing2 = new Drawing();
|
||||
$drawing2->setName('Logo');
|
||||
$drawing2->setDescription('This is my logo');
|
||||
$drawing2->setPath(public_path('/dist/141icon.png'));
|
||||
$drawing2->setWidth(50);
|
||||
$drawing2->setHeight(50);
|
||||
$drawing2->setOffsetX(+90);
|
||||
$drawing2->setOffsetY(5);
|
||||
$drawing2->setCoordinates('D1');
|
||||
|
||||
return [$drawing, $drawing2];
|
||||
}
|
||||
}
|
||||
@@ -18,14 +18,16 @@ class machineReport implements FromView, ShouldAutoSize, WithDrawings, WithEvent
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{ $exportRows = [];
|
||||
{
|
||||
$exportRows = [];
|
||||
|
||||
foreach ($this->data as $r) {
|
||||
$exportRows[] = [
|
||||
'city_name' => $r->c_name ?? '',
|
||||
'province_name' => $r->p_name ?? '',
|
||||
'machine_id' => $r->machine_id ?? '',
|
||||
'machine_code' => $r->machine_code ?? '',
|
||||
'car_name' => $r->car_name ?? '',
|
||||
'missions' => $r->missions ?? 0,
|
||||
'distance' => (int) ($r->distance ?? 0),
|
||||
'func' => (int) ($r->func ?? 0),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -64,9 +66,9 @@ class machineReport implements FromView, ShouldAutoSize, WithDrawings, WithEvent
|
||||
$drawing2->setPath(public_path('/dist/141icon.png'));
|
||||
$drawing2->setWidth(50);
|
||||
$drawing2->setHeight(50);
|
||||
$drawing2->setOffsetX(5);
|
||||
$drawing2->setOffsetX(+90);
|
||||
$drawing2->setOffsetY(5);
|
||||
$drawing2->setCoordinates('D1');
|
||||
$drawing2->setCoordinates('E1');
|
||||
|
||||
return [$drawing, $drawing2];
|
||||
}
|
||||
|
||||
73
app/Exports/V3/Mission/Report/Machine/machineTypeReport.php
Normal file
73
app/Exports/V3/Mission/Report/Machine/machineTypeReport.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exports\V3\Mission\Report\Machine;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithDrawings;
|
||||
use Maatwebsite\Excel\Concerns\WithEvents;
|
||||
use Maatwebsite\Excel\Events\AfterSheet;
|
||||
use PhpOffice\PhpSpreadsheet\Exception;
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
|
||||
|
||||
class machineTypeReport implements FromView, ShouldAutoSize, WithDrawings, WithEvents
|
||||
{
|
||||
public function __construct(private array $data)
|
||||
{
|
||||
}
|
||||
|
||||
public function view(): View
|
||||
{
|
||||
$exportRows = [];
|
||||
|
||||
foreach ($this->data as $r) {
|
||||
$exportRows[] = [
|
||||
'car_type' => $r->car_type ?? '',
|
||||
'missions' => $r->missions ?? 0,
|
||||
'func' => (int) ($r->func ?? 0),
|
||||
];
|
||||
}
|
||||
|
||||
return view('v3.Reports.Mission.Report.Machine.MachineTypeReport', [
|
||||
'rows' => $exportRows,
|
||||
]);
|
||||
}
|
||||
|
||||
public function registerEvents(): array
|
||||
{
|
||||
return [
|
||||
AfterSheet::class => function (AfterSheet $event) {
|
||||
$event->sheet->getDelegate()->setRightToLeft(true);
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function drawings(): array
|
||||
{
|
||||
$drawing = new Drawing();
|
||||
$drawing->setName('Logo');
|
||||
$drawing->setDescription('This is my logo');
|
||||
$drawing->setPath(public_path('/dist/logo.png'));
|
||||
$drawing->setWidth(50);
|
||||
$drawing->setHeight(50);
|
||||
$drawing->setOffsetX(5);
|
||||
$drawing->setOffsetY(5);
|
||||
$drawing->setCoordinates('A1');
|
||||
|
||||
$drawing2 = new Drawing();
|
||||
$drawing2->setName('Logo');
|
||||
$drawing2->setDescription('This is my logo');
|
||||
$drawing2->setPath(public_path('/dist/141icon.png'));
|
||||
$drawing2->setWidth(50);
|
||||
$drawing2->setHeight(50);
|
||||
$drawing2->setOffsetX(+90);
|
||||
$drawing2->setOffsetY(5);
|
||||
$drawing2->setCoordinates('C1');
|
||||
|
||||
return [$drawing, $drawing2];
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
namespace App\Http\Controllers\V3\Dashboard\Mission\Report;
|
||||
|
||||
use App\Exports\V3\Mission\Report\Machine\machineDriverReport;
|
||||
use App\Exports\V3\Mission\Report\Machine\machineReport;
|
||||
use App\Exports\V3\Mission\Report\Machine\machineTypeReport;
|
||||
use App\Facades\DataTable\DataTableFacade;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
@@ -62,7 +64,7 @@ class ReportMachineController extends Controller
|
||||
*/
|
||||
public function provinceMachinesActivityExcel(Request $request, ReportMachineService $reportMachineService): BinaryFileResponse
|
||||
{
|
||||
$data = $reportMachineService->countryMachinesActivity($request);
|
||||
$data = $reportMachineService->provinceMachinesActivity($request);
|
||||
$name = 'گزارش ماشین آلات'.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
|
||||
return Excel::download(new machineReport($data), $name);
|
||||
@@ -83,9 +85,9 @@ class ReportMachineController extends Controller
|
||||
public function countryMachineTypesActivityExcel(Request $request, ReportMachineService $reportMachineService): BinaryFileResponse
|
||||
{
|
||||
$data = $reportMachineService->countryMachineTypesActivity($request);
|
||||
$name = 'گزارش ماشین آلات'.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
$name = 'گزارش انوع ماشین'.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
|
||||
return Excel::download(new machineReport($data), $name);
|
||||
return Excel::download(new machineTypeReport($data), $name);
|
||||
}
|
||||
|
||||
public function provinceMachineTypesActivity(Request $request, ReportMachineService $reportMachineService): JsonResponse
|
||||
@@ -123,9 +125,9 @@ class ReportMachineController extends Controller
|
||||
public function provinceMachineTypesActivityExcel(Request $request, ReportMachineService $reportMachineService): BinaryFileResponse
|
||||
{
|
||||
$data = $reportMachineService->provinceMachineTypesActivity($request);
|
||||
$name = 'گزارش ماشین آلات'.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
$name = 'گزارش انوع ماشین'.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
|
||||
return Excel::download(new machineReport($data), $name);
|
||||
return Excel::download(new machineTypeReport($data), $name);
|
||||
}
|
||||
|
||||
public function countryMachineDriversActivity(Request $request, ReportMachineService $reportMachineService)
|
||||
@@ -136,6 +138,18 @@ class ReportMachineController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function countryMachineDriversActivityExcel(Request $request, ReportMachineService $reportMachineService): BinaryFileResponse
|
||||
{
|
||||
$data = $reportMachineService->countryMachineDriversActivity($request);
|
||||
$name = 'گزارش نوع ماشین آلات'.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
|
||||
return Excel::download(new machineDriverReport($data), $name);
|
||||
}
|
||||
|
||||
public function provinceMachineDriversActivity(Request $request, ReportMachineService $reportMachineService)
|
||||
{
|
||||
return $this->successResponse([
|
||||
@@ -150,6 +164,18 @@ class ReportMachineController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
|
||||
*/
|
||||
public function provinceMachineDriversActivityExcel(Request $request, ReportMachineService $reportMachineService): BinaryFileResponse
|
||||
{
|
||||
$data = $reportMachineService->provinceMachineDriversActivity($request);
|
||||
$name = 'گزارش نوع ماشین آلات'.verta()->now()->format('Y-m-d H-i').'.xlsx';
|
||||
|
||||
return Excel::download(new machineDriverReport($data), $name);
|
||||
}
|
||||
|
||||
public function machineTypeDetailsReport(Request $request)
|
||||
{
|
||||
$machineIds = CMMSMachine::query()->where('car_type', '=', $request->query('car_type'))->pluck('machine_id');
|
||||
|
||||
@@ -126,6 +126,7 @@ class RequestPortalController extends Controller
|
||||
'finish_time' => now(),
|
||||
'state_id' => MissionStates::END_MISSION->value,
|
||||
'state_name' => MissionStates::name(MissionStates::END_MISSION->value),
|
||||
'end_km' => $request->end_km,
|
||||
]);
|
||||
|
||||
// if ($mission->category_id == 2) {
|
||||
@@ -133,7 +134,7 @@ class RequestPortalController extends Controller
|
||||
// $rpc->store($mission);
|
||||
// }
|
||||
|
||||
$machine = CMMSMachine::query()->find($request->machine_id);
|
||||
$machine = CMMSMachine::query()->find($request->machine_id, ['id', 'machine_code', 'car_type']);
|
||||
|
||||
$newMission = Mission::query()->create([
|
||||
'user_id' => $user->id,
|
||||
@@ -166,6 +167,8 @@ class RequestPortalController extends Controller
|
||||
'station_name' => RahdariPoint::query()->find( $user->station_id)->name,
|
||||
'driver_id' => $request->driver,
|
||||
'driver_name' => Rahdaran::query()->find($request->driver)->name,
|
||||
'km' => $request->end_km,
|
||||
'requested_machines' => json_encode($machine->car_type),
|
||||
]);
|
||||
|
||||
$newMission->rahdaran()->sync($request->rahdaran);
|
||||
@@ -241,7 +244,7 @@ class RequestPortalController extends Controller
|
||||
$type = $start->diffInMinutes($end) > 480 ? MissionTypes::NO_PROCESS_ROZANE->value : MissionTypes::NO_PROCESS_SAATY->value;
|
||||
$user = auth()->user();
|
||||
$zone = $request->zone;
|
||||
$machine = CMMSMachine::query()->where('machine_code', '=', $violation->machine_code)->first(['id', 'machine_code']);
|
||||
$machine = CMMSMachine::query()->where('machine_code', '=', $violation->machine_code)->first(['id', 'machine_code', 'car_type']);
|
||||
|
||||
$mission = Mission::query()->create([
|
||||
'user_id' => $user->id,
|
||||
@@ -271,17 +274,18 @@ class RequestPortalController extends Controller
|
||||
'request_date' => now(),
|
||||
'machine_id' => $machine->id,
|
||||
'machine_code' => $machine->machine_code,
|
||||
'requested_machines' => $machine->car_type,
|
||||
'requested_machines' => json_encode($machine->car_type),
|
||||
'station_id' => $user->station_id,
|
||||
'station_name' => RahdariPoint::query()->find($user->station_id)->name,
|
||||
'km' => $violation->km ?? null,
|
||||
'end_km' => $violation->end_km ?? null,
|
||||
'driver_id' => $request->driver,
|
||||
'driver_name' => Rahdaran::query()->find($request->driver)->name,
|
||||
]);
|
||||
|
||||
$mission->rahdaran()->sync($request->rahdaran);
|
||||
|
||||
$violation->update(['status' => 1]);
|
||||
$violation->update(['status' => 1, 'mission_id' => $mission->id]);
|
||||
|
||||
// if ($mission->category_id == 2) {
|
||||
// $rpc = new OperatorController;
|
||||
|
||||
@@ -47,7 +47,7 @@ class TransportationUnitController extends Controller
|
||||
'state_name' => MissionStates::name($state),
|
||||
'machine_id' => $machine->id,
|
||||
'machine_code' => $machine->machine_code,
|
||||
'driver_id' => $request->driver_id,
|
||||
'driver_id' => $request->driver,
|
||||
'driver_name' => Rahdaran::query()->find($request->driver)->name,
|
||||
]);
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ class ViolationManagementController extends Controller
|
||||
$violation->update([
|
||||
'enter_time' => $request->enter_time,
|
||||
'status' => MissionViolationStatus::BEDON_EGHDAM->value,
|
||||
'end_km' => $request->end_km,
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
|
||||
@@ -38,6 +38,7 @@ class ContinueMissionRequest extends FormRequest
|
||||
'encoded_route' => 'required|string',
|
||||
'explanation' => 'required|string',
|
||||
'category_id' => 'required|in:1,2,3',
|
||||
'end_km'=> 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -56,6 +57,18 @@ class ContinueMissionRequest extends FormRequest
|
||||
);
|
||||
}
|
||||
}
|
||||
if ($this->end_km < $this->mission->km) {
|
||||
$validator->errors()->add(
|
||||
'end_km',
|
||||
'کیلومتر پایان باید بزرگتر از کیلومتر شروع باشد.'
|
||||
);
|
||||
}
|
||||
if (strtotime($this->end_date) < strtotime($this->mission->start_time)) {
|
||||
$validator->errors()->add(
|
||||
'time',
|
||||
'زمان پایان ماموریت باید بعد از زمان شروع ماموریت باشد.'
|
||||
);
|
||||
}
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class UpdateRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'enter_time' => 'required|date',
|
||||
'end_km'=> 'required|string',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -40,6 +41,12 @@ class UpdateRequest extends FormRequest
|
||||
'زمان پایان ماموریت باید بعد از زمان شروع ماموریت باشد.'
|
||||
);
|
||||
}
|
||||
if ($this->end_km < $this->violation->km) {
|
||||
$validator->errors()->add(
|
||||
'end_km',
|
||||
'کیلومتر پایان باید بزرگتر از کیلومتر شروع باشد.'
|
||||
);
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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('mission_violations', function (Blueprint $table) {
|
||||
$table->string('end_km')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('mission_violations', function (Blueprint $table) {
|
||||
$table->dropColumn('end_km');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -27,18 +27,18 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4"
|
||||
<th colspan="5"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4"
|
||||
<th colspan="5"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4"
|
||||
<th colspan="5"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش ماشین های ماموریت رفته
|
||||
</th>
|
||||
@@ -46,19 +46,23 @@
|
||||
<tr>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
استان
|
||||
کدیکتا
|
||||
</th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
شهر
|
||||
مدل ماشین </th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
کد ماشین
|
||||
</th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
کارکرد
|
||||
</th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
تعداد ماموریت </th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
جمع کارکرد
|
||||
</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -66,10 +70,11 @@
|
||||
<tbody>
|
||||
@foreach ($rows as $item)
|
||||
<tr>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['province_name'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['city_name'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['machine_id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['car_name'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['machine_code'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['func'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['missions'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['distance'] ?? '-' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>گزارش کل تردد های راننده </title>
|
||||
|
||||
<style>
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
// show a dot if key missing or value is 0/empty
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش راندده ها در ماموریت
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
کد یکتا
|
||||
</th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
نام راننده
|
||||
</th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
کارکرد
|
||||
</th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
تعداد ماموریت </th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($rows as $item)
|
||||
<tr>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['driver_id'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['driver_name'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['func'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['missions'] ?? '-' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>گزارش ترددهای انواع ماشین ها</title>
|
||||
|
||||
<style>
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body dir="rtl" style="text-align: center;">
|
||||
@php
|
||||
// show a dot if key missing or value is 0/empty
|
||||
function cell($row, $key) {
|
||||
return array_key_exists($key, $row) ? ($row[$key] ?: '0') : '0';
|
||||
}
|
||||
@endphp
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
|
||||
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3"
|
||||
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
|
||||
گزارش نوع ماشین هادرماموریت
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
نوع ماشین </th>
|
||||
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
کارکرد
|
||||
</th>
|
||||
<th rowspan="1"
|
||||
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
|
||||
تعداد ماموریت </th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($rows as $item)
|
||||
<tr>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['car_type'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['func'] ?? '-' }}</td>
|
||||
<td style="border: 1px solid black;text-align: center;">{{ $item['missions'] ?? '-' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user