Add import tasks and new parsers to XL Vask module
- Introduced `runImportTasks` method for vehicle, user, and usage log imports. - Added new product parsers: `ht_b_rstel_s`, `ht_turbo`, and `ikke_b_rster_p_kabinen`. - Implemented simulation and duplicate detection for usage logs via order objects. - Updated usage log handling to include default customer checks and user association. - Enhanced request handling with fast-link functionality for usage orders.
This commit is contained in:
@@ -144,4 +144,35 @@ class groups_o extends db
|
||||
(new groups_permissions_o())->add($this->id, $permission_id);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDepartmentsScannerNames(): array
|
||||
{
|
||||
self::requireSelected();
|
||||
$departments = $this->getDepartments();
|
||||
$plate_scanners_o = new plate_scanners_o();
|
||||
$tmp = $plate_scanners_o->getFieldsWhere(['department_id' => $departments], ['id', 'name']);
|
||||
return array_map(
|
||||
function ($scanner) {
|
||||
return $scanner['name'];
|
||||
},
|
||||
$tmp
|
||||
);
|
||||
}
|
||||
|
||||
public function getDepartmentsScannersHallIds(): array
|
||||
{
|
||||
self::requireSelected();
|
||||
$departments = $this->getDepartments();
|
||||
$plate_scanners_o = new plate_scanners_o();
|
||||
$tmp = $plate_scanners_o->getFieldsWhere([
|
||||
'department_id' => $departments,
|
||||
'HallId' => '!null'
|
||||
], ['id', 'HallId']);
|
||||
return array_map(
|
||||
function ($scanner) {
|
||||
return (string)$scanner['HallId'];
|
||||
},
|
||||
$tmp
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user