add web service
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Services\FMS;
|
||||
|
||||
use App\Models\Mission;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -18,9 +19,17 @@ class GetErrorRateService
|
||||
$this->channelName = 'fms_error_rate';
|
||||
}
|
||||
|
||||
public function setInputParameters(array $inputs): void
|
||||
public function setInputParameters(Mission $mission): void
|
||||
{
|
||||
$this->inputParameters = $inputs;
|
||||
$this->inputParameters = [
|
||||
'username' => config('fms_web_services.Error_Rate.username'),
|
||||
'password' => config('fms_web_services.Error_Rate.password'),
|
||||
'missionArea' => $mission->getMissionAreaForFms(),
|
||||
'missionStartDT' => $mission->start_time->format('Y-m-d\TH:i:s'),
|
||||
'missionEndDT' => $mission->finish_time->format('Y-m-d\TH:i:s'),
|
||||
'machineCode' => $mission->machine_code,
|
||||
'areaType' => $mission->area['type'] === 'polygon' ? 1 : 2,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user