crate new project
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user