crate new project

This commit is contained in:
2025-11-19 09:25:17 +03:30
parent d441ebd0b4
commit 5672c6eb0d
11 changed files with 161 additions and 45 deletions

View File

@@ -35,9 +35,9 @@ class GetMachinesInfoListCommand extends Command
$updatedRows = 0;
if (isset($response['vw_MachBankFull'])) {
if (isset($response['vw_MachBankFull2'])) {
foreach ($response['vw_MachBankFull'] as $entry) {
foreach ($response['vw_MachBankFull2'] as $entry) {
// Insert data into the database
CMMSMachine::query()->updateOrCreate(
[
@@ -54,8 +54,12 @@ class GetMachinesInfoListCommand extends Command
'car_id' => $entry['Id'],
'unit_group' => $entry['UnitGroup'] == [] ? null : $entry['UnitGroup'],
'plak_number' => $entry['PlakNumber'] ?? null,
'province_id' => $entry['UnitGroupCode'] ?? null,
'city_id' => $entry['UnitCode'] ?? null,
'station_id' => $entry['Layer3Code'] ?? null,
]);
$updatedRows += 1;
++$updatedRows;
}
}