|
|
@ -17,7 +17,9 @@ use CodeIgniter\Controller; |
|
|
|
|
|
|
|
|
|
|
|
class Kytp extends Controller |
|
|
|
class Kytp extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
use ResponseTrait; |
|
|
|
use ResponseTrait; |
|
|
|
|
|
|
|
|
|
|
|
public function index() |
|
|
|
public function index() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$db = \Config\Database::connect(); |
|
|
|
$db = \Config\Database::connect(); |
|
|
@ -54,33 +56,33 @@ class Kytp extends Controller |
|
|
|
|
|
|
|
|
|
|
|
public function sebaranPembayaran() |
|
|
|
public function sebaranPembayaran() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$ret = []; |
|
|
|
$Ald = new AldLibrary; |
|
|
|
$tahun = $this->request->getPost('tahun') ?? date('Y'); |
|
|
|
$username = session('nip'); |
|
|
|
$bulan = $this->request->getPost('bulan') ?? date('m'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$tahun = $Ald->decryptMe($this->request->getPost('tahun'), $username) ?? date('Y'); |
|
|
|
|
|
|
|
$bulan = $Ald->decryptMe($this->request->getPost('bulan'), $username) ?? date('m'); |
|
|
|
$sebaranPembayaran = new Pembayaran; |
|
|
|
$sebaranPembayaran = new Pembayaran; |
|
|
|
|
|
|
|
|
|
|
|
$dataReturn['dataC'] = $sebaranPembayaran->dataC($this->request, $tahun, $bulan); |
|
|
|
$dataReturn['dataC'] = $sebaranPembayaran->dataC($this->request, $tahun, $bulan); |
|
|
|
$dataReturn['dataMin1'] = $sebaranPembayaran->dataC($this->request, $tahun, $bulan - 1); |
|
|
|
$dataReturn['dataMin1'] = $sebaranPembayaran->dataC($this->request, $tahun, $bulan - 1); |
|
|
|
$dataReturn['dataMin2'] = $sebaranPembayaran->dataC($this->request, $tahun, $bulan - 2); |
|
|
|
$dataReturn['dataMin2'] = $sebaranPembayaran->dataC($this->request, $tahun, $bulan - 2); |
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
// return json_encode($dataReturn); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function sebaranIdentifikasi() |
|
|
|
public function sebaranIdentifikasi() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$ret = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$sebaran = new Identifikasi; |
|
|
|
$sebaran = new Identifikasi; |
|
|
|
|
|
|
|
|
|
|
|
$dataReturn['data'] = $sebaran->data($this->request); |
|
|
|
$dataReturn['data'] = $sebaran->data($this->request); |
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
// return json_encode($dataReturn); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public function sebaranPayComp() |
|
|
|
public function sebaranPayComp() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$tahun = $this->request->getPost('tahun') ?? date('Y'); |
|
|
|
$Ald = new AldLibrary; |
|
|
|
$bulan = $this->request->getPost('bulan') ?? date('m'); |
|
|
|
$username = session('nip'); |
|
|
|
|
|
|
|
$tahun = $Ald->decryptMe($this->request->getPost('tahun'), $username) ?? date('Y'); |
|
|
|
|
|
|
|
$bulan = $Ald->decryptMe($this->request->getPost('bulan'), $username) ?? date('m'); |
|
|
|
|
|
|
|
|
|
|
|
$sebaran = new PayComp; |
|
|
|
$sebaran = new PayComp; |
|
|
|
|
|
|
|
|
|
|
@ -93,8 +95,11 @@ class Kytp extends Controller |
|
|
|
|
|
|
|
|
|
|
|
public function sebaranSof() |
|
|
|
public function sebaranSof() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$tahun = $this->request->getPost('tahun') ?? date('Y'); |
|
|
|
$Ald = new AldLibrary; |
|
|
|
$bulan = $this->request->getPost('bulan') ?? date('m'); |
|
|
|
$username = session('nip'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$tahun = $Ald->decryptMe($this->request->getPost('tahun'), $username) ?? date('Y'); |
|
|
|
|
|
|
|
$bulan = $Ald->decryptMe($this->request->getPost('bulan'), $username) ?? date('m'); |
|
|
|
|
|
|
|
|
|
|
|
$sebaran = new Sof; |
|
|
|
$sebaran = new Sof; |
|
|
|
$dataReturn['data'] = $sebaran->dataC($this->request, $tahun, $bulan); |
|
|
|
$dataReturn['data'] = $sebaran->dataC($this->request, $tahun, $bulan); |
|
|
@ -125,9 +130,8 @@ class Kytp extends Controller |
|
|
|
public function sebaranZonaPengawasan() |
|
|
|
public function sebaranZonaPengawasan() |
|
|
|
{ |
|
|
|
{ |
|
|
|
ini_set('max_input_vars', 3000); |
|
|
|
ini_set('max_input_vars', 3000); |
|
|
|
$sebaran = new ZonaPengawasan; |
|
|
|
$sebaran = new ZonaPengawasan; |
|
|
|
$dataReturn['dalamKpp'] = $sebaran->data($this->request, 'dalamKpp'); |
|
|
|
$dataReturn['all'] = $sebaran->data($this->request); |
|
|
|
$dataReturn['luarKpp'] = $sebaran->data($this->request, 'luarKpp'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
} |
|
|
|
} |
|
|
@ -145,11 +149,12 @@ class Kytp extends Controller |
|
|
|
public function sebaranKLU() |
|
|
|
public function sebaranKLU() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
$sebaran = new KLU; |
|
|
|
$sebaran = new KLU; |
|
|
|
$tahun = $this->request->getGet('tahun') ?? date('Y'); |
|
|
|
$tahun = $this->request->getGet('tahun') ?? date('Y'); |
|
|
|
$dataReturn['dataKluTerdaftar'] = $sebaran->data($this->request, 'dataKluTerdaftar'); |
|
|
|
$dataReturn['dataKluTerdaftar'] = $sebaran->data($this->request, 'dataKluTerdaftar'); |
|
|
|
$dataReturn['dataKluYgBayar'] = $sebaran->data($this->request, 'dataKluYgBayar'); |
|
|
|
$dataReturn['dataKluYgBayar'] = $sebaran->data($this->request, 'dataKluYgBayar'); |
|
|
|
$dataReturn['dataRupiahBayar'] = $sebaran->data($this->request, 'dataRupiahBayar'); |
|
|
|
$dataReturn['dataKluYgTidakBayar'] = $sebaran->data($this->request, 'dataKluYgTidakBayar'); |
|
|
|
|
|
|
|
$dataReturn['dataRupiahBayar'] = $sebaran->data($this->request, 'dataRupiahBayar'); |
|
|
|
|
|
|
|
|
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
return $this->respond($dataReturn, 200); |
|
|
|
} |
|
|
|
} |
|
|
@ -158,6 +163,11 @@ class Kytp extends Controller |
|
|
|
{ |
|
|
|
{ |
|
|
|
$Ald = new AldLibrary(); |
|
|
|
$Ald = new AldLibrary(); |
|
|
|
$username = session('nip'); |
|
|
|
$username = session('nip'); |
|
|
|
|
|
|
|
if (!$this->validate([ |
|
|
|
|
|
|
|
'bulan' => 'required|max_length[10]', |
|
|
|
|
|
|
|
])) { |
|
|
|
|
|
|
|
exit; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$sebaran = new IdentifikasiLapangan; |
|
|
|
$sebaran = new IdentifikasiLapangan; |
|
|
|
$bulan = $Ald->decryptMe($this->request->getPost('bulan'), $username) ?? 'semua'; |
|
|
|
$bulan = $Ald->decryptMe($this->request->getPost('bulan'), $username) ?? 'semua'; |
|
|
|