add start and finish time

This commit is contained in:
2026-01-25 16:16:37 +03:30
parent 44e7f6a321
commit 1775a8e75e
6 changed files with 50 additions and 6 deletions

View File

@@ -58,14 +58,20 @@ class DailyMovingMachineCommand extends Command
break;
}
$machine = CMMSMachine::query()->firstWhere('machine_code', '=', $code);
MissionViolation::query()->create([
'machine_code' => $code,
'machine_id' => CMMSMachine::query()->firstWhere('machine_code', '=', $code)->id,
'machine_id' => $machine->id,
'type' => MissionViolationType::KHOROJ_BEDONE_MOGAVEZ->value,
'request_date' => $date,
'mileage' => $cmm['mileageKM'],
// 'exit_time' => $cmm['exit_time'],
// 'enter_time' => $cmm['enter_time'],
'province_id' => $machine->province_id,
// 'province_name' => $machine->province_fa,
'city_id' => $machine->city_id,
// 'city_name' => $machine->city_fa,
]);
}