add spatial plannings retribution calculations

This commit is contained in:
arifal hidayat
2025-06-18 02:54:41 +07:00
parent 6946fa7074
commit fc54e20fa4
29 changed files with 2926 additions and 416 deletions

View File

@@ -6,6 +6,7 @@ use App\Models\BigdataResume;
use App\Models\DataSetting;
use App\Models\ImportDatasource;
use App\Models\PbgTaskGoogleSheet;
use App\Models\RetributionProposal;
use Carbon\Carbon;
use Exception;
use Google\Client as Google_Client;
@@ -249,7 +250,7 @@ class ServiceGoogleSheet
BigdataResume::create([
'import_datasource_id' => $import_datasource->id,
'year' => now()->year,
'year' => 'leader',
// USAHA
'business_count' => $this->convertToInteger($result['USAHA']['total'] ?? null) ?? 0,
'business_sum' => $this->convertToDecimal($result['USAHA']['nominal'] ?? null) ?? 0,
@@ -273,7 +274,10 @@ class ServiceGoogleSheet
'waiting_click_dpmptsp_sum' => $this->convertToDecimal($result['WAITING_KLIK_DPMPTSP']['nominal'] ?? null) ?? 0,
// PROSES DINAS TEKNIS
'process_in_technical_office_count' => $this->convertToInteger($result['PROSES_DINAS_TEKNIS']['total'] ?? null) ?? 0,
'process_in_technical_office_sum' => $this->convertToDecimal($result['PROSES_DINAS_TEKNIS']['nominal'] ?? null) ?? 0
'process_in_technical_office_sum' => $this->convertToDecimal($result['PROSES_DINAS_TEKNIS']['nominal'] ?? null) ?? 0,
// TATA RUANG
'spatial_count' => RetributionProposal::count(),
'spatial_sum' => RetributionProposal::sum('total_retribution_amount'),
]);
// Save data settings