|
|
@@ -2,6 +2,8 @@ |
|
|
|
|
|
|
|
namespace App\Jobs; |
|
|
|
|
|
|
|
use Carbon\Carbon; |
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable; |
|
|
|
use Illuminate\Queue\SerializesModels; |
|
|
|
use Illuminate\Queue\InteractsWithQueue; |
|
|
@@ -57,7 +59,9 @@ class StoreCompoundEPBT implements ShouldQueue |
|
|
|
$client = new \GuzzleHttp\Client(); |
|
|
|
$result = $client->request('GET', 'http://218.208.81.239:81/appsepbtkompaun_ws/getinfokompaun/infokompaun?infokompaun[]=352405067769401&infokompaun[]=ekpn_kesalahan'); |
|
|
|
$response = json_decode($result->getBody()->getContents()); |
|
|
|
dd($compound->created_at->toDateString()); |
|
|
|
$now = Carbon::now()->toDateTimeString(); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty($response)) |
|
|
|
{ |
|
|
|
$k = []; |
|
|
@@ -70,28 +74,28 @@ class StoreCompoundEPBT implements ShouldQueue |
|
|
|
if($compound->jenis == 'Parkir') |
|
|
|
{ |
|
|
|
array_push($k, |
|
|
|
$this->kpd, //no kompaun |
|
|
|
$this->kpd, //no kompaun |
|
|
|
'KPD', //jenis kompaun |
|
|
|
$r->fk_akta, //kod akta |
|
|
|
strtoupper($r->kesalahan), //keterangan kesalahan |
|
|
|
$compound->created_at->toDateString(), //tarikh |
|
|
|
$compound->created_at->toTimeString(), //masa |
|
|
|
14, //tempoh |
|
|
|
//namajalan, namataman |
|
|
|
//kodbandar |
|
|
|
$compound->nama_jalan .' , '. $compound->nama_taman,//namajalan, namataman |
|
|
|
10,//kodbandar |
|
|
|
'K',//jenis |
|
|
|
strtoupper($compound->plate_no), //no plat |
|
|
|
$compound->jumlah_asal_kompaun, //jumlah kompaun |
|
|
|
strtoupper($this->no_badan), //no badan |
|
|
|
'-', //no pembantu penguatkuasa |
|
|
|
strtoupper($this->enf_nama), //nama enforcer |
|
|
|
Carbon::now('YYYY-MM_DD hh:mm:ss'), //time created epbt |
|
|
|
$now, //time created epbt |
|
|
|
$r->kod, //kod kesalahan |
|
|
|
$compound->nama, //nama pesalah |
|
|
|
//nama jalan - alamat pesalah |
|
|
|
//nama taman - alamat pesalah |
|
|
|
$compound->nama_jalan,//nama jalan - alamat pesalah |
|
|
|
$compound->nama_taman,//nama taman - alamat pesalah |
|
|
|
'81300', //postcode |
|
|
|
//bandar |
|
|
|
$compound->nama_kawasan,//bandar |
|
|
|
'JOHOR', //negeri |
|
|
|
'B', //notis |
|
|
|
'NULL', //notisamaran |
|
|
@@ -118,21 +122,21 @@ class StoreCompoundEPBT implements ShouldQueue |
|
|
|
$compound->created_at->toDateString(), //tarikh |
|
|
|
$compound->created_at->toTimeString(), //masa |
|
|
|
14, //tempoh |
|
|
|
//namajalan, namataman |
|
|
|
//kodbandar |
|
|
|
$compound->nama_jalan .' , '. $compound->nama_taman,//namajalan, namataman |
|
|
|
10,//kodbandar |
|
|
|
'K',//jenis |
|
|
|
strtoupper($compound->plate_no), //no plat |
|
|
|
$compound->jumlah_asal_kompaun, //jumlah kompaun |
|
|
|
strtoupper($this->no_badan), //no badan |
|
|
|
'-', //no pembantu penguatkuasa |
|
|
|
strtoupper($this->enf_nama), //nama enforcer |
|
|
|
Carbon::now('YYYY-MM_DD hh:mm:ss'), //time created epbt |
|
|
|
$now, //time created epbt |
|
|
|
$r->kod, //kod kesalahan |
|
|
|
$compound->nama, //nama pesalah |
|
|
|
//nama jalan - alamat pesalah |
|
|
|
//nama taman - alamat pesalah |
|
|
|
$compound->nama_jalan,//nama jalan - alamat pesalah |
|
|
|
$compound->nama_taman,//nama taman - alamat pesalah |
|
|
|
'81300', //postcode |
|
|
|
'ISKANDAR PUTERI'//bandar |
|
|
|
$compound->nama_kawasan,//bandar |
|
|
|
'JOHOR', //negeri |
|
|
|
'B', //notis |
|
|
|
'NULL', //notisamaran |
|
|
@@ -152,28 +156,28 @@ class StoreCompoundEPBT implements ShouldQueue |
|
|
|
elseif($compound->jenis == 'Pelbagai_JPB') |
|
|
|
{ |
|
|
|
array_push($k, |
|
|
|
$this->kpd, //no kompaun |
|
|
|
$this->kpd, //no kompaun |
|
|
|
'KPD', //jenis kompaun |
|
|
|
$r->fk_akta, //kod akta |
|
|
|
strtoupper($r->kesalahan), //keterangan kesalahan |
|
|
|
$compound->created_at->toDateString(), //tarikh |
|
|
|
$compound->created_at->toTimeString(), //masa |
|
|
|
14, //tempoh |
|
|
|
//namajalan, namataman |
|
|
|
//kodbandar |
|
|
|
$compound->nama_jalan .' , '. $compound->nama_taman,//namajalan, namataman |
|
|
|
10,//kodbandar |
|
|
|
'K',//jenis |
|
|
|
strtoupper($compound->plate_no), //no plat |
|
|
|
$compound->jumlah_asal_kompaun, //jumlah kompaun |
|
|
|
strtoupper($this->no_badan), //no badan |
|
|
|
'-', //no pembantu penguatkuasa |
|
|
|
strtoupper($this->enf_nama), //nama enforcer |
|
|
|
Carbon::now('YYYY-MM_DD hh:mm:ss'), //time created epbt |
|
|
|
$now, //time created epbt |
|
|
|
$r->kod, //kod kesalahan |
|
|
|
$compound->nama, //nama pesalah |
|
|
|
//nama jalan - alamat pesalah |
|
|
|
//nama taman - alamat pesalah |
|
|
|
$compound->nama_jalan,//nama jalan - alamat pesalah |
|
|
|
$compound->nama_taman,//nama taman - alamat pesalah |
|
|
|
'81300', //postcode |
|
|
|
'ISKANDAR PUTERI'//bandar |
|
|
|
$compound->nama_kawasan,//bandar |
|
|
|
'JOHOR', //negeri |
|
|
|
'B', //notis |
|
|
|
'NULL', //notisamaran |
|
|
@@ -193,28 +197,28 @@ class StoreCompoundEPBT implements ShouldQueue |
|
|
|
elseif($compound->jenis == 'Pelbagai_PA') |
|
|
|
{ |
|
|
|
array_push($k, |
|
|
|
$this->kpd, //no kompaun |
|
|
|
$this->kpd, //no kompaun |
|
|
|
'KPD', //jenis kompaun |
|
|
|
$r->fk_akta, //kod akta |
|
|
|
strtoupper($r->kesalahan), //keterangan kesalahan |
|
|
|
$compound->created_at->toDateString(), //tarikh |
|
|
|
$compound->created_at->toTimeString(), //masa |
|
|
|
14, //tempoh |
|
|
|
//namajalan, namataman |
|
|
|
//kodbandar |
|
|
|
$compound->nama_jalan .' , '. $compound->nama_taman,//namajalan, namataman |
|
|
|
10,//kodbandar |
|
|
|
'K',//jenis |
|
|
|
strtoupper($compound->plate_no), //no plat |
|
|
|
$compound->jumlah_asal_kompaun, //jumlah kompaun |
|
|
|
strtoupper($this->no_badan), //no badan |
|
|
|
'-', //no pembantu penguatkuasa |
|
|
|
strtoupper($this->enf_nama), //nama enforcer |
|
|
|
Carbon::now('YYYY-MM_DD hh:mm:ss'), //time created epbt |
|
|
|
$now, //time created epbt |
|
|
|
$r->kod, //kod kesalahan |
|
|
|
$compound->nama, //nama pesalah |
|
|
|
//nama jalan - alamat pesalah |
|
|
|
//nama taman - alamat pesalah |
|
|
|
$compound->nama_jalan,//nama jalan - alamat pesalah |
|
|
|
$compound->nama_taman,//nama taman - alamat pesalah |
|
|
|
'81300', //postcode |
|
|
|
'ISKANDAR PUTERI'//bandar |
|
|
|
$compound->nama_kawasan,//bandar |
|
|
|
'JOHOR', //negeri |
|
|
|
'B', //notis |
|
|
|
'NULL', //notisamaran |
|
|
@@ -234,28 +238,28 @@ class StoreCompoundEPBT implements ShouldQueue |
|
|
|
elseif($compound->jenis == 'Pelbagai_LESEN') |
|
|
|
{ |
|
|
|
array_push($k, |
|
|
|
$this->kpd, //no kompaun |
|
|
|
$this->kpd, //no kompaun |
|
|
|
'KPD', //jenis kompaun |
|
|
|
$r->fk_akta, //kod akta |
|
|
|
strtoupper($r->kesalahan), //keterangan kesalahan |
|
|
|
$compound->created_at->toDateString(), //tarikh |
|
|
|
$compound->created_at->toTimeString(), //masa |
|
|
|
14, //tempoh |
|
|
|
//namajalan, namataman |
|
|
|
//kodbandar |
|
|
|
$compound->nama_jalan .' , '. $compound->nama_taman,//namajalan, namataman |
|
|
|
10,//kodbandar |
|
|
|
'K',//jenis |
|
|
|
strtoupper($compound->plate_no), //no plat |
|
|
|
$compound->jumlah_asal_kompaun, //jumlah kompaun |
|
|
|
strtoupper($this->no_badan), //no badan |
|
|
|
'-', //no pembantu penguatkuasa |
|
|
|
strtoupper($this->enf_nama), //nama enforcer |
|
|
|
Carbon::now('YYYY-MM_DD hh:mm:ss'), //time created epbt |
|
|
|
$now, //time created epbt |
|
|
|
$r->kod, //kod kesalahan |
|
|
|
$compound->nama, //nama pesalah |
|
|
|
//nama jalan - alamat pesalah |
|
|
|
//nama taman - alamat pesalah |
|
|
|
$compound->nama_jalan,//nama jalan - alamat pesalah |
|
|
|
$compound->nama_taman,//nama taman - alamat pesalah |
|
|
|
'81300', //postcode |
|
|
|
'ISKANDAR PUTERI'//bandar |
|
|
|
$compound->nama_kawasan,//bandar |
|
|
|
'JOHOR', //negeri |
|
|
|
'B', //notis |
|
|
|
'NULL', //notisamaran |
|
|
@@ -272,6 +276,28 @@ class StoreCompoundEPBT implements ShouldQueue |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
$urlQueryString = ''; |
|
|
|
|
|
|
|
for ($i=0; $i < count($k); $i++) { |
|
|
|
|
|
|
|
if($i == 0) |
|
|
|
{ |
|
|
|
$urlQueryString = $urlQueryString . '?'; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
$urlQueryString = $urlQueryString . '&'; |
|
|
|
} |
|
|
|
|
|
|
|
$urlQueryString = $urlQueryString . 'KompaunDetails[]=' . $k[$i]; |
|
|
|
// bla/bla/my/registerkompaunDetails?KompaunDetails[]=KP45&KompaunDetails[]=ayu |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$client = new \GuzzleHttp\Client(); |
|
|
|
$result = $client->request('GET', 'http://218.208.81.239:81/appsepbtkompaun_ws/registerkompaun/registerkompaunDetails' . $urlQueryString); |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |