Browse Source

group strat group end fix

main^2
pecintaseni 6 months ago committed by =
parent
commit
e2ff3e7eff
  1. 12
      app/Controllers/Kewilayahan/IdentAktifitasHasil/IdentifikasiLapangan.php
  2. 8
      app/Controllers/Kewilayahan/PoiGoogleMatoa/PoiGoogleMatoa.php
  3. 11
      app/Controllers/Kewilayahan/Sebaran/Identifikasi.php
  4. 8
      app/Controllers/Kewilayahan/Sebaran/JenisStatus.php
  5. 8
      app/Controllers/Kewilayahan/Sebaran/KLU.php
  6. 8
      app/Controllers/Kewilayahan/Sebaran/PayComp.php
  7. 8
      app/Controllers/Kewilayahan/Sebaran/Pembayaran.php
  8. 8
      app/Controllers/Kewilayahan/Sebaran/Pengampu.php
  9. 8
      app/Controllers/Kewilayahan/Sebaran/SPTTAhunan.php
  10. 149
      app/Controllers/Kewilayahan/Sebaran/Sof.php
  11. 8
      app/Controllers/Kewilayahan/Sebaran/ZonaPengawasan.php
  12. 2
      app/Views/kewilayahan/dist/peta.js
  13. 4
      app/Views/kewilayahan/peta/layers/overlayLayers.js

12
app/Controllers/Kewilayahan/IdentAktifitasHasil/IdentifikasiLapangan.php

@ -63,8 +63,8 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp
return [];
}
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -134,8 +134,8 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$npwp = $npwp->getCompiledSelect();
$data = $db->table('BULAN A')
@ -178,8 +178,8 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp
return [];
}
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -249,8 +249,8 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
$data = $data->getCompiledSelect();
// print_r($data);
// exit;
@ -344,8 +344,8 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp
$data->whereIn('ID_POLY_ZONA', $id_poly_zona);
}
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -415,8 +415,8 @@ class IdentifikasiLapangan extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
if ($opsiWilZona == 'perekam') {
$data->whereIn('CREATED_BY', $nip_ar_perekam);

8
app/Controllers/Kewilayahan/PoiGoogleMatoa/PoiGoogleMatoa.php

@ -45,8 +45,8 @@ class PoiGoogleMatoa extends \App\Controllers\Kewilayahan\Kytp
return [];
}
$sqlGenerate->groupStart();
if (session('kppadm') != '000') {
$sqlGenerate->groupStart();
if (session('tpkantor') == 'Kanwil') {
$sqlGenerate->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
$sqlGenerate->where('B.KD_KANWIL', session('kwladm'));
@ -81,8 +81,8 @@ class PoiGoogleMatoa extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$sqlGenerate->groupEnd();
}
// print_r($sqlGenerate->getCompiledSelect());
// exit;
$sqlGenerate = $sqlGenerate->getCompiledSelect();
@ -134,8 +134,8 @@ class PoiGoogleMatoa extends \App\Controllers\Kewilayahan\Kytp
return [];
}
$sqlGenerate->groupStart();
if (session('kppadm') != '000') {
$sqlGenerate->groupStart();
if (session('tpkantor') == 'Kanwil') {
$sqlGenerate->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
$sqlGenerate->where('B.KD_KANWIL', session('kwladm'));
@ -170,8 +170,8 @@ class PoiGoogleMatoa extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$sqlGenerate->groupEnd();
}
$sqlGenerate = $sqlGenerate->getCompiledSelect();

11
app/Controllers/Kewilayahan/Sebaran/Identifikasi.php

@ -58,8 +58,8 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp
return [];
}
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -129,10 +129,9 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
// print_r($npwp->getCompiledSelect());
// exit;
}
$data = $npwp->get()->getResult();
$ret = [];
@ -226,8 +225,8 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp
return [];
}
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -297,8 +296,8 @@ class Identifikasi extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
if ($query == 'NON NPWP') {
$data->where('A.NPWP IS NULL');

8
app/Controllers/Kewilayahan/Sebaran/JenisStatus.php

@ -72,8 +72,8 @@ class JenisStatus extends \App\Controllers\Kewilayahan\Kytp
}
//opsiWilZona = '' (Default)
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -143,8 +143,8 @@ class JenisStatus extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$data = $npwp->get()->getResult();
@ -231,8 +231,8 @@ class JenisStatus extends \App\Controllers\Kewilayahan\Kytp
if ($opsiWilZona == 'pengampu') {
$data->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu);
}
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
if (session('tpkantor') == 'Kanwil') { // kanwil
@ -301,8 +301,8 @@ class JenisStatus extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
$npwp = $data;

8
app/Controllers/Kewilayahan/Sebaran/KLU.php

@ -66,8 +66,8 @@ class KLU extends \App\Controllers\Kewilayahan\Kytp
}
//opsiWilZona = '' (Default)
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -137,8 +137,8 @@ class KLU extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$agg = "count(DISTINCT NPWP) as JML";
if ($jenischart == 'dataRupiahBayar') {
@ -248,8 +248,8 @@ class KLU extends \App\Controllers\Kewilayahan\Kytp
$npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu);
}
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
if (session('tpkantor') == 'Kanwil') { // kanwil
@ -318,8 +318,8 @@ class KLU extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$data = $db->newQuery()->fromSubquery($npwp, "A")
// ->join('MFWP B', "A.NPWP = B.NPWP", "left")

8
app/Controllers/Kewilayahan/Sebaran/PayComp.php

@ -54,8 +54,8 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp
}
//opsiWilZona = '' (Default)
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -125,8 +125,8 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$data = $db->newQuery()
->select("'" . $tahun . '-' . $bulan . "' AS THN_BLN, B.JML|| ' bulan' as KETERANGAN, COUNT(1) AS Y", false)
@ -223,8 +223,8 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp
}
//opsiWilZona = '' (Default)
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -294,8 +294,8 @@ class PayComp extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
$npwp = $data;

8
app/Controllers/Kewilayahan/Sebaran/Pembayaran.php

@ -59,8 +59,8 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp
}
//opsiWilZona = '' (Default)
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -130,8 +130,8 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$data = $db->newQuery()
->select("'" . $tahun . '-' . $bulan . "' AS THN_BLN, NVL(WARNA_BYR, 'black') WARNA_BYR, COUNT(1) AS Y")
@ -244,8 +244,8 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp
//opsiWilZona = '' (Default)
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
if (session('tpkantor') == 'Kanwil') { // kanwil
@ -314,8 +314,8 @@ class Pembayaran extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
// print_r($data->getCompiledSelect());
// exit;
$npwp = $data;

8
app/Controllers/Kewilayahan/Sebaran/Pengampu.php

@ -72,8 +72,8 @@ class Pengampu extends \App\Controllers\Kewilayahan\Kytp
}
//opsiWilZona = '' (Default)
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -143,8 +143,8 @@ class Pengampu extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$data = $npwp->get()->getResult();
$ret = [];
@ -231,8 +231,8 @@ class Pengampu extends \App\Controllers\Kewilayahan\Kytp
if ($opsiWilZona == 'pengampu') {
$data->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu);
}
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
if (session('tpkantor') == 'Kanwil') { // kanwil
@ -301,8 +301,8 @@ class Pengampu extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
$npwp = $data;
$data = $db->newQuery()->fromSubquery($npwp, "A")

8
app/Controllers/Kewilayahan/Sebaran/SPTTAhunan.php

@ -58,8 +58,8 @@ class SPTTAhunan extends \App\Controllers\Kewilayahan\Kytp
}
//opsiWilZona = '' (Default)
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -129,8 +129,8 @@ class SPTTAhunan extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$data = $db->newQuery()
->fromSubquery($npwp, "A")
@ -221,8 +221,8 @@ class SPTTAhunan extends \App\Controllers\Kewilayahan\Kytp
if ($opsiWilZona == 'pengampu') {
$data->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu);
}
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
if (session('tpkantor') == 'Kanwil') { // kanwil
@ -291,8 +291,8 @@ class SPTTAhunan extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
$npwp = $data;
$data = $db->newQuery()->fromSubquery($npwp, "A")

149
app/Controllers/Kewilayahan/Sebaran/Sof.php

@ -51,6 +51,80 @@ class Sof extends \App\Controllers\Kewilayahan\Kytp
if ($opsiWilZona == 'pengampu') {
$npwp = $npwp->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu);
}
//opsiWilZona = '' (Default)
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
$npwp->orGroupStart();
$npwp->where('B.KD_KANWIL', session('kwladm'));
$npwp->groupEnd();
}
if (session('tpkantor') == 'KPP') { //KPP
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
$currentPegawai = currentPegawai();
if (in_array($currentPegawai->KD_JAB_STRUKTURAL, ['602'])) { //AR
//zona
$npwp->orGroupStart()
->where('B.KD_UNIT_OR', $currentPegawai->KD_UNIT_ORGANISASI)
->where('A.KPPADM_ZONA', session('kppadm'))
->where('A.NIP_AR_ZONA', session('nip'))
->groupEnd();
//perekam
$npwp->orGroupStart()
->where('A.KODE_PEG_PEREKAM', session('kppadm') . '-' . $currentPegawai->KD_UNIT_ORGANISASI . '-' . session('nip')) //direkam saat di seksi aktif saat ini
->groupEnd();
//pengampu
$npwp->orGroupStart()
->where('A.NIP_AR_PENGAMPU', session('nip'))
->where('A.KPPADM_PENGAMPU', session('kppadm'))
->groupEnd();
} else if (in_array($currentPegawai->KD_JAB_STRUKTURAL, ['401'])) { //kasi
//zona
$npwp->orGroupStart()
->where('B.KD_UNIT_OR', $currentPegawai->KD_UNIT_ORGANISASI)
->where('A.KPPADM_ZONA', session('kppadm'))
->groupEnd();
//perekam
$npwp->orGroupStart()
->where('A.KODE_SEKSI_PEREKAM', session('kppadm') . '-' . $currentPegawai->KD_UNIT_ORGANISASI)
->groupEnd();
//pengampu
$npwp->join('PEGAWAI C', 'A.NIP_AR_PENGAMPU=C.NIP9', 'left');
$npwp->orGroupStart()
->where('C.KD_UNIT_ORGANISASI', $currentPegawai->KD_UNIT_ORGANISASI)
->where('A.KPPADM_PENGAMPU', session('kppadm'))
->groupEnd();
} else if (in_array($currentPegawai->KD_JAB_STRUKTURAL, ['304'])) { //Kepala Kantor
//zona
$npwp->orGroupStart()
->where('A.KPPADM_ZONA', session('kppadm'))
->groupEnd();
//perekam
$npwp->orGroupStart()
->where('A.KPP_ADM_PEREKAM', session('kppadm') . '-' . $currentPegawai->KD_UNIT_ORGANISASI)
->groupEnd();
//pengampu
$npwp->join('PEGAWAI C', 'A.NIP_AR_PENGAMPU=C.NIP9', 'left');
$npwp->orGroupStart()
->where('A.KPPADM_PENGAMPU', session('kppadm'))
->groupEnd();
} else {
return [];
}
}
$npwp->groupEnd();
}
$sqlBulanIni = $db->newQuery()
->select("'" . $tahun . '-' . $bulan . "' AS THN_BLN, B.LAPISAN, count(1) JML", false)
@ -159,7 +233,82 @@ class Sof extends \App\Controllers\Kewilayahan\Kytp
if ($opsiWilZona == 'pengampu') {
$data->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu);
}
$npwp = $data;
//opsiWilZona = '' (Default)
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
$npwp->orGroupStart();
$npwp->where('B.KD_KANWIL', session('kwladm'));
$npwp->groupEnd();
}
if (session('tpkantor') == 'KPP') { //KPP
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
$currentPegawai = currentPegawai();
if (in_array($currentPegawai->KD_JAB_STRUKTURAL, ['602'])) { //AR
//zona
$npwp->orGroupStart()
->where('B.KD_UNIT_OR', $currentPegawai->KD_UNIT_ORGANISASI)
->where('A.KPPADM_ZONA', session('kppadm'))
->where('A.NIP_AR_ZONA', session('nip'))
->groupEnd();
//perekam
$npwp->orGroupStart()
->where('A.KODE_PEG_PEREKAM', session('kppadm') . '-' . $currentPegawai->KD_UNIT_ORGANISASI . '-' . session('nip')) //direkam saat di seksi aktif saat ini
->groupEnd();
//pengampu
$npwp->orGroupStart()
->where('A.NIP_AR_PENGAMPU', session('nip'))
->where('A.KPPADM_PENGAMPU', session('kppadm'))
->groupEnd();
} else if (in_array($currentPegawai->KD_JAB_STRUKTURAL, ['401'])) { //kasi
//zona
$npwp->orGroupStart()
->where('B.KD_UNIT_OR', $currentPegawai->KD_UNIT_ORGANISASI)
->where('A.KPPADM_ZONA', session('kppadm'))
->groupEnd();
//perekam
$npwp->orGroupStart()
->where('A.KODE_SEKSI_PEREKAM', session('kppadm') . '-' . $currentPegawai->KD_UNIT_ORGANISASI)
->groupEnd();
//pengampu
$npwp->join('PEGAWAI C', 'A.NIP_AR_PENGAMPU=C.NIP9', 'left');
$npwp->orGroupStart()
->where('C.KD_UNIT_ORGANISASI', $currentPegawai->KD_UNIT_ORGANISASI)
->where('A.KPPADM_PENGAMPU', session('kppadm'))
->groupEnd();
} else if (in_array($currentPegawai->KD_JAB_STRUKTURAL, ['304'])) { //Kepala Kantor
//zona
$npwp->orGroupStart()
->where('A.KPPADM_ZONA', session('kppadm'))
->groupEnd();
//perekam
$npwp->orGroupStart()
->where('A.KPP_ADM_PEREKAM', session('kppadm') . '-' . $currentPegawai->KD_UNIT_ORGANISASI)
->groupEnd();
//pengampu
$npwp->join('PEGAWAI C', 'A.NIP_AR_PENGAMPU=C.NIP9', 'left');
$npwp->orGroupStart()
->where('A.KPPADM_PENGAMPU', session('kppadm'))
->groupEnd();
} else {
return [];
}
}
$npwp->groupEnd();
}
$tahunBulan = $Ald->decryptMe($request->tahunBulan ?? '', $username) ?? "2024-09";
$tahunBulanArr = explode("-", $tahunBulan);

8
app/Controllers/Kewilayahan/Sebaran/ZonaPengawasan.php

@ -73,8 +73,8 @@ class ZonaPengawasan extends \App\Controllers\Kewilayahan\Kytp
return [];
}
$npwp->groupStart();
if (session('kppadm') != '000') {
$npwp->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$npwp->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -144,8 +144,8 @@ class ZonaPengawasan extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$npwp->groupEnd();
}
$data = $npwp->get()->getResult();
@ -234,8 +234,8 @@ class ZonaPengawasan extends \App\Controllers\Kewilayahan\Kytp
$data->whereIn('NIP_AR_PENGAMPU', $nip_ar_pengampu);
}
$data->groupStart();
if (session('kppadm') != '000') {
$data->groupStart();
if (session('tpkantor') == 'Kanwil') { // kanwil
$data->join('KPDL_ZP_NAS_DIFF B', 'ID_POLY_ZONA = B.OGC_FID');
@ -305,8 +305,8 @@ class ZonaPengawasan extends \App\Controllers\Kewilayahan\Kytp
}
}
}
$data->groupEnd();
}
$data->where("KPPADM_ZONA", $query);

2
app/Views/kewilayahan/dist/peta.js vendored

File diff suppressed because one or more lines are too long

4
app/Views/kewilayahan/peta/layers/overlayLayers.js

@ -50,7 +50,7 @@ const style = {
const parameterPeta = (id, layername) => {
return {
id: id,
url: '/engineN/geoserver/wms',
url: 'https://cendol-djp.intranet.pajak.go.id/geoserver/wms',
wmsParams: {
request: 'GetMap',
service: 'WMS',
@ -76,7 +76,7 @@ const parameterPeta = (id, layername) => {
const parameterPetaWms = (id, layername, style, minzoom) => {
return {
id: id,
url: '/engineN/geoserver/wms',
url: 'https://cendol-djp.intranet.pajak.go.id/geoserver/wms',
wmsParams: {
request: 'GetMap',
service: 'WMS',

Loading…
Cancel
Save