v.2.27
Fixed reports
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace App\Commands;
|
||||
|
||||
use App\Component\Models\Settings;
|
||||
use App\Component\Commands\Methods\Cache;
|
||||
use App\Component\Models\Terminal;
|
||||
use App\Console\Commands\HRCCommand;
|
||||
use App\Console\Commands\HRCCommandInterface;
|
||||
|
||||
@@ -12,6 +14,34 @@ class GETSettings extends HRCCommand implements HRCCommandInterface
|
||||
|
||||
public function command($input, $output = null)
|
||||
{
|
||||
|
||||
if (isset($input['method'])) {
|
||||
$method = $input['method'];
|
||||
if ($method == 'terminals') {
|
||||
$out = [];
|
||||
$terminals = Terminal::get();
|
||||
foreach ($terminals as $terminal) {
|
||||
if ($terminal['is_active'] === 1) {
|
||||
$is_active = true;
|
||||
} else {
|
||||
$is_active = false;
|
||||
}
|
||||
|
||||
$out[] = array(
|
||||
'work_code' => $terminal['work_code'],
|
||||
'work_group' => $terminal['work_group'],
|
||||
'soft' => $terminal['soft'],
|
||||
'is_active' => $is_active,
|
||||
'key' => $terminal['key'],
|
||||
'last_activity' => $terminal['last_activity'],
|
||||
);
|
||||
}
|
||||
return [
|
||||
'status' => 'success',
|
||||
'terminals' => $out,
|
||||
];
|
||||
}
|
||||
}
|
||||
if (isset($input['code'])) {
|
||||
$setting = Settings::where('code', $input['code'])
|
||||
->first();
|
||||
|
||||
Reference in New Issue
Block a user