Penambahan FrontEnd All-New-Manufacture
This commit is contained in:
35
app/Jobs/UpdateParkingTransaction.php
Normal file
35
app/Jobs/UpdateParkingTransaction.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class UpdateParkingTransaction implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
64
app/Jobs/VerificationSkiper.php
Normal file
64
app/Jobs/VerificationSkiper.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Models\TransaksiParkir;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class VerificationSkiper implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$dateNow = Carbon::now();
|
||||
|
||||
$RealtimeTrans = TransaksiParkir::select('no_pol')
|
||||
->where('status', 1)
|
||||
->where('veri_check','1')
|
||||
->where('status_transaksi', '3')
|
||||
->whereDate('veri_date', $dateNow)
|
||||
->first();
|
||||
|
||||
Log::channel('apps')->info('Verification member check : ' . json_encode($RealtimeTrans));
|
||||
|
||||
if ($RealtimeTrans) {
|
||||
DB::table('transaksi_parkir')
|
||||
->where('no_pol', $RealtimeTrans->no_pol )
|
||||
->update(['veri_check' => 2,
|
||||
'veri_date' => $dateNow,
|
||||
'veri_adm' => 'SYSTEM'
|
||||
]);
|
||||
|
||||
// $response = true;
|
||||
$message = [
|
||||
'no_pol' => $RealtimeTrans->no_pol,
|
||||
'message' => 'member skipped'
|
||||
];
|
||||
Log::info('Skip verification ' . $RealtimeTrans->no_pol . ' Succesfully...');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user