Merge pull request #22 from witelgroup/feature/HarimPayment

remove ignore files
This commit is contained in:
Amir Ghasempoor
2025-09-08 13:48:25 +03:30
committed by GitHub
7 changed files with 29 additions and 21 deletions

View File

@@ -572,7 +572,7 @@ class RoadObservationController extends Controller
// $url = "https://riws.rmto.ir/WebServices/NRPTrafficStatus.asmx?wsdl";
try {
// $result = $nikarayanService->updateRoadObservedInfoByNikarayan($request->only(['rms-status', 'rms-description']), $roadObserved, $files_path);
$result = UpdateRoadObservedInfoByNikarayanJob::dispatch($request->only(['rms-status', 'rms-description']), $roadObserved, $files_path)->onQueue('nikarayan');
$result = UpdateRoadObservedInfoByNikarayanJob::dispatch($roadObserved, $files_path)->onQueue('nikarayan');
} catch (SoapFault $e) {
$msg = "error in send to nikarayan at" . date("Y-m-d H:i:s") . "\n" . 'rms: error in get road observation webservice babe!!!!' . "\n";

View File

@@ -105,13 +105,13 @@ class OperatorController
$roadObservedHistoryData['new_files'] = json_encode($files_path);
}
DB::transaction(function () use ($roadObserved, $roadObservedHistoryData, $roadObservedData, $request, $nikarayanService, $files_path) {
DB::transaction(function () use ($roadObserved, $roadObservedHistoryData, $roadObservedData, $nikarayanService, $files_path) {
$roadObserved->problemHistories()->create($roadObservedHistoryData);
$roadObserved->update($roadObservedData);
auth()->user()->addActivityComplete(1142);
$nikarayanService->updateRoadObservedInfoByNikarayan($request, $roadObserved, $files_path);
$nikarayanService->updateRoadObservedInfoByNikarayan($roadObserved, $files_path);
});
return $this->successResponse();
@@ -170,13 +170,13 @@ class OperatorController
$roadObservedHistoryData['new_files'] = $files;
}
DB::transaction(function () use ($roadObserved, $roadObservedHistoryData, $roadObservedData, $request, $nikarayanService) {
DB::transaction(function () use ($roadObserved, $roadObservedHistoryData, $roadObservedData, $files_path, $nikarayanService) {
$roadObserved->problemHistories()->create($roadObservedHistoryData);
$roadObserved->update($roadObservedData);
auth()->user()->addActivityComplete(1142);
$nikarayanService->updateRoadObservedInfoByNikarayan($request, $roadObserved, json_encode($roadObservedHistoryData['new_files']));
$nikarayanService->updateRoadObservedInfoByNikarayan($roadObserved, $files_path);
});
return $this->successResponse();

View File

@@ -21,7 +21,7 @@ class UpdateRoadObservedInfoByNikarayanJob implements ShouldQueue
/**
* Create a new job instance.
*/
public function __construct(public array $request, public RoadObserved $roadObserved, public $files) {}
public function __construct(public RoadObserved $roadObserved, public $files) {}
/**
* Execute the job.
@@ -29,7 +29,7 @@ class UpdateRoadObservedInfoByNikarayanJob implements ShouldQueue
*/
public function handle(NikarayanService $nikarayanService)
{
return $nikarayanService->updateRoadObservedInfoByNikarayan($this->request, $this->roadObserved, $this->files);
return $nikarayanService->updateRoadObservedInfoByNikarayan($this->roadObserved, $this->files);
}
/**

View File

@@ -14,7 +14,7 @@ class NikarayanService
/**
* @throws SoapFault
*/
public function updateRoadObservedInfoByNikarayan($request, RoadObserved $roadObserved, $files)
public function updateRoadObservedInfoByNikarayan(RoadObserved $roadObserved, $files)
{
if (App::isProduction())
{
@@ -24,8 +24,8 @@ class NikarayanService
$array = array('strUserName' => 'vaytelrop',
'strPassword' => 'VaYtelROP*2024',
'strAutoID' => $roadObserved->fk_RegisteredEventMessage,
'strStateID' => ($request['rms-status'] == 1) ? '2' : '3',
'strDescription' => $request['rms-description'] ?? $roadObserved->rms_description,
'strStateID' => ($roadObserved->rms_status == 1) ? '2' : '3',
'strDescription' => $roadObserved->rms_description,
'strPreviousImageLink' => !empty($files) && isset($files[0]['path']) ? "https://rms.rmto.ir/" . $files[0]['path'] : "",
'strNextImageLink' => !empty($files) && isset($files[1]['path']) ? "https://rms.rmto.ir/" . $files[1]['path'] : "",
'strRMSDateAndTime' => $roadObserved->updated_at