Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3750aa82d3 | |||
| 3f49372822 |
@@ -120,7 +120,7 @@ class KeseluruhanController extends Controller
|
|||||||
|
|
||||||
private function buildRekap(int $tahun, ?string $jenisPegawai): Collection
|
private function buildRekap(int $tahun, ?string $jenisPegawai): Collection
|
||||||
{
|
{
|
||||||
$cacheKey = 'remunerasi_keseluruhan_v4_'.$tahun.'_'.($jenisPegawai ?: 'semua');
|
$cacheKey = 'remunerasi_keseluruhan_v5_'.$tahun.'_'.($jenisPegawai ?: 'semua');
|
||||||
|
|
||||||
return collect(Cache::remember($cacheKey, now()->addHours(6), fn () => $this->computeRekap($tahun, $jenisPegawai)));
|
return collect(Cache::remember($cacheKey, now()->addHours(6), fn () => $this->computeRekap($tahun, $jenisPegawai)));
|
||||||
}
|
}
|
||||||
@@ -167,6 +167,7 @@ class KeseluruhanController extends Controller
|
|||||||
->selectRaw('SUM(rpb.p2_bruto) as total')
|
->selectRaw('SUM(rpb.p2_bruto) as total')
|
||||||
->whereNull('rpb.deleted_at')
|
->whereNull('rpb.deleted_at')
|
||||||
->where('jp.periode', $periodeSemester1)
|
->where('jp.periode', $periodeSemester1)
|
||||||
|
->where('jp.active', true)
|
||||||
->when($jenisPegawai, fn ($q) => $q->where('jpd.jenis_pegawai', $jenisPegawai))
|
->when($jenisPegawai, fn ($q) => $q->where('jpd.jenis_pegawai', $jenisPegawai))
|
||||||
->groupBy('verifikator.pegawais.nip')
|
->groupBy('verifikator.pegawais.nip')
|
||||||
->havingRaw('SUM(rpb.p2_bruto) > 0')
|
->havingRaw('SUM(rpb.p2_bruto) > 0')
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ class P2Controller extends Controller
|
|||||||
->selectRaw('SUM(rpb.p2_netto) as total_p2_netto')
|
->selectRaw('SUM(rpb.p2_netto) as total_p2_netto')
|
||||||
->whereNull('rpb.deleted_at')
|
->whereNull('rpb.deleted_at')
|
||||||
->where('jp.periode', $periode)
|
->where('jp.periode', $periode)
|
||||||
|
->where('jp.active', true)
|
||||||
->groupBy('verifikator.pegawais.nip', 'verifikator.pegawais.nama')
|
->groupBy('verifikator.pegawais.nip', 'verifikator.pegawais.nama')
|
||||||
->havingRaw('SUM(rpb.p2_bruto) > 0');
|
->havingRaw('SUM(rpb.p2_bruto) > 0');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user