[Warning] Penambahan Simulasi dan Aturan Jurnal SINTA
This commit is contained in:
@@ -4,7 +4,7 @@ namespace App\Console\Commands\Remunerasi;
|
||||
|
||||
use App\Models\Verifikator\Periode;
|
||||
use App\Models\Verifikator\View\Pegawai;
|
||||
use App\Services\PerhitunganKegiatanService;
|
||||
use App\Services\PerhitunganKegiatanSimulasiService;
|
||||
use Exception;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\File;
|
||||
@@ -46,7 +46,7 @@ class HitungSimulasiP2Mengajar2026JsonCommand extends Command
|
||||
$nips = $this->argument('nip');
|
||||
|
||||
if ($this->option('all') || empty($nips)) {
|
||||
$query = Pegawai::query()
|
||||
$query = Pegawai::withoutGlobalScope('aktif')
|
||||
->whereHas('jabatans', function ($q) use ($periode) {
|
||||
$q->where('periode', $periode)->where('active', true);
|
||||
});
|
||||
@@ -66,7 +66,7 @@ class HitungSimulasiP2Mengajar2026JsonCommand extends Command
|
||||
}
|
||||
|
||||
$bulan = $periode % 2 === 1 ? [1, 2, 3, 4, 5, 6] : [7, 8, 9, 10, 11, 12];
|
||||
$service = new PerhitunganKegiatanService;
|
||||
$service = new PerhitunganKegiatanSimulasiService;
|
||||
$hasil = [];
|
||||
|
||||
$bar = $this->output->createProgressBar(count($nips));
|
||||
@@ -82,7 +82,7 @@ class HitungSimulasiP2Mengajar2026JsonCommand extends Command
|
||||
continue;
|
||||
}
|
||||
|
||||
$pegawai = Pegawai::with([
|
||||
$pegawai = Pegawai::withoutGlobalScope('aktif')->with([
|
||||
'jabatans' => fn ($q) => $q->where('periode', $periode)->where('active', true),
|
||||
'jabatans.detail' => fn ($q) => $q->whereIn('bulan', $bulan),
|
||||
'unit:id,nama',
|
||||
@@ -110,14 +110,13 @@ class HitungSimulasiP2Mengajar2026JsonCommand extends Command
|
||||
}
|
||||
|
||||
try {
|
||||
// Parameter: save = false (TIDAK SIMPAN KE DB), forceAturanBaru = false (ATURAN STANDAR SEBELUM 401), useDataApi = true (DATA API AKTIF)
|
||||
// Service simulasi tidak menulis ke DB. Parameter: aturanBaru = false (ATURAN STANDAR SEBELUM 401), useDataApi = true (DATA API AKTIF)
|
||||
$kegiatans = $service->listKegiatan(
|
||||
$pegawai->nip,
|
||||
$periode,
|
||||
$bulanLayak,
|
||||
null,
|
||||
save: false,
|
||||
forceAturanBaru: false,
|
||||
aturanBaru: false,
|
||||
useDataApi: true
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user