main
Ilham Wara Nugroho 2025-09-02 09:57:16 +07:00
parent 24b9f38c46
commit a835941849
22 changed files with 506 additions and 265 deletions

View File

@ -37,14 +37,14 @@ public function model(array $row)
return new DatasetTable21([ return new DatasetTable21([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'lokasi' => $row[0], 'lokasi' => $row[1],
'nama_perusahaan' => $row[1], 'nama_perusahaan' => $row[2],
'luas_pemanfaatan_aliran_air' => $row[2], 'luas_pemanfaatan_aliran_air' => $row[3],
'luas_wisata_alam' => $row[3], 'luas_wisata_alam' => $row[4],
'luas_perlindungan_kehati' => $row[4], 'luas_perlindungan_kehati' => $row[5],
'luas_penyelamatan_lingkungan' => $row[5], 'luas_penyelamatan_lingkungan' => $row[6],
'luas_penyerapan_karbon' => $row[6], 'luas_penyerapan_karbon' => $row[7],
'sk' => $row[7], 'sk' => $row[8],
]); ]);
} }
} }

View File

@ -31,53 +31,96 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null &&
$row[16] === null &&
$row[17] === null &&
$row[18] === null &&
$row[19] === null &&
$row[20] === null &&
$row[21] === null &&
$row[22] === null &&
$row[23] === null &&
$row[24] === null &&
$row[25] === null &&
$row[26] === null &&
$row[27] === null &&
$row[28] === null &&
$row[29] === null &&
$row[30] === null &&
$row[31] === null &&
$row[32] === null &&
$row[33] === null &&
$row[34] === null &&
$row[35] === null &&
$row[36] === null &&
$row[37] === null &&
$row[38] === null &&
$row[39] === null &&
$row[40] === null &&
$row[41] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable22([ return new DatasetTable22([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'lokasi' => $row[0], 'lokasi' => $row[1],
'waktu' => $row[1], 'waktu' => $row[2],
'lat' => $row[2], 'lat' => $row[3],
'long' => $row[3], 'long' => $row[4],
'tempratur' => $row[4], 'tempratur' => $row[5],
'ph' => $row[5], 'ph' => $row[6],
'kekeruhan' => $row[6], 'kekeruhan' => $row[7],
'warna' => $row[7], 'warna' => $row[8],
'rasa' => $row[8], 'rasa' => $row[9],
'bau' => $row[9], 'bau' => $row[10],
'tds' => $row[10], 'tds' => $row[11],
'bod' => $row[11], 'bod' => $row[12],
'cod' => $row[12], 'cod' => $row[13],
'do' => $row[13], 'do' => $row[14],
'fosfat' => $row[14], 'fosfat' => $row[15],
'no3' => $row[15], 'no3' => $row[16],
'nh3' => $row[16], 'nh3' => $row[17],
'arsen' => $row[17], 'arsen' => $row[18],
'kobalt' => $row[18], 'kobalt' => $row[19],
'barium' => $row[19], 'barium' => $row[20],
'boron' => $row[20], 'boron' => $row[21],
'selenium' => $row[21], 'selenium' => $row[22],
'kadmium' => $row[22], 'kadmium' => $row[23],
'khrom' => $row[23], 'khrom' => $row[24],
'tembaga' => $row[24], 'tembaga' => $row[25],
'besi' => $row[25], 'besi' => $row[26],
'timbal' => $row[26], 'timbal' => $row[27],
'mangan' => $row[27], 'mangan' => $row[28],
'air_raksa' => $row[28], 'air_raksa' => $row[29],
'seng' => $row[29], 'seng' => $row[30],
'khlorida' => $row[30], 'khlorida' => $row[31],
'sianida' => $row[31], 'sianida' => $row[32],
'fluorida' => $row[32], 'fluorida' => $row[33],
'nitrit' => $row[33], 'nitrit' => $row[34],
'sulfat' => $row[34], 'sulfat' => $row[35],
'khlorin_bebas' => $row[35], 'khlorin_bebas' => $row[36],
'belereng' => $row[36], 'belereng' => $row[37],
'fecal_coliform' => $row[37], 'fecal_coliform' => $row[38],
'total_coliform' => $row[38], 'total_coliform' => $row[39],
'gross' => $row[39], 'gross' => $row[40],
'grossb' => $row[40], 'grossb' => $row[41],
]); ]);
} }
} }

View File

@ -31,40 +31,70 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null &&
$row[16] === null &&
$row[17] === null &&
$row[18] === null &&
$row[19] === null &&
$row[20] === null &&
$row[21] === null &&
$row[22] === null &&
$row[23] === null &&
$row[24] === null &&
$row[25] === null &&
$row[26] === null &&
$row[27] === null &&
$row[28] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable23([ return new DatasetTable23([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'lokasi' => $row[0], 'lokasi' => $row[1],
'waktu' => $row[1], 'waktu' => $row[2],
'lat' => $row[2], 'lat' => $row[3],
'long' => $row[3], 'long' => $row[4],
'lokasi_sampling' => $row[4], 'lokasi_sampling' => $row[5],
'warna' => $row[5], 'warna' => $row[6],
'kecerahan' => $row[6], 'kecerahan' => $row[7],
'kekeruhan' => $row[7], 'kekeruhan' => $row[8],
'tss' => $row[8], 'tss' => $row[9],
'sampah' => $row[9], 'sampah' => $row[10],
'lapisan_minyak' => $row[10], 'lapisan_minyak' => $row[11],
'tempratur' => $row[11], 'tempratur' => $row[12],
'ph' => $row[12], 'ph' => $row[13],
'salinitas' => $row[13], 'salinitas' => $row[14],
'do' => $row[14], 'do' => $row[15],
'bod5' => $row[15], 'bod5' => $row[16],
'cod' => $row[16], 'cod' => $row[17],
'amonia_total' => $row[17], 'amonia_total' => $row[18],
'no2n' => $row[18], 'no2n' => $row[19],
'no3n' => $row[19], 'no3n' => $row[20],
'po4p' => $row[20], 'po4p' => $row[21],
'sianida' => $row[21], 'sianida' => $row[22],
'sulfida' => $row[22], 'sulfida' => $row[23],
'klor' => $row[23], 'klor' => $row[24],
'minyak_bumi' => $row[24], 'minyak_bumi' => $row[25],
'fenol' => $row[25], 'fenol' => $row[26],
'pestisida' => $row[26], 'pestisida' => $row[27],
'pcb' => $row[27], 'pcb' => $row[28],
]); ]);
} }
} }

View File

@ -31,27 +31,44 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable24([ return new DatasetTable24([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'lokasi' => $row[0], 'lokasi' => $row[1],
'lat' => $row[1], 'lat' => $row[2],
'long' => $row[2], 'long' => $row[3],
'jan' => $row[3], 'jan' => $row[4],
'feb' => $row[4], 'feb' => $row[5],
'mar' => $row[5], 'mar' => $row[6],
'apr' => $row[6], 'apr' => $row[7],
'mei' => $row[7], 'mei' => $row[8],
'jun' => $row[8], 'jun' => $row[9],
'jul' => $row[9], 'jul' => $row[10],
'agust' => $row[10], 'agust' => $row[11],
'sept' => $row[11], 'sept' => $row[12],
'okt' => $row[12], 'okt' => $row[13],
'nov' => $row[13], 'nov' => $row[14],
'des' => $row[14], 'des' => $row[15],
]); ]);
} }
} }

View File

@ -31,20 +31,20 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null && $row[7] === null && $row[8] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable25([ return new DatasetTable25([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'mata_air' => $row[0], 'mata_air' => $row[1],
'ledeng_pam' => $row[1], 'ledeng_pam' => $row[2],
'sumur_bor_pompa' => $row[2], 'sumur_bor_pompa' => $row[3],
'sumur_tak_terlindung' => $row[3], 'sumur_tak_terlindung' => $row[4],
'sungai' => $row[4], 'sungai' => $row[5],
'terlindung_air' => $row[5], 'terlindung_air' => $row[6],
'air_kemasan' => $row[6], 'air_kemasan' => $row[7],
'lainnya' => $row[7], 'lainnya' => $row[8],
]); ]);
} }
} }

View File

@ -31,7 +31,21 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable26([ return new DatasetTable26([

View File

@ -31,20 +31,20 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null && $row[7] === null && $row[8] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable27([ return new DatasetTable27([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'nama_sungai' => $row[0], 'nama_sungai' => $row[1],
'lokasi' => $row[1], 'lokasi' => $row[2],
'panjang' => $row[2], 'panjang' => $row[3],
'lebar_permukaan' => $row[3], 'lebar_permukaan' => $row[4],
'lebar_dasar' => $row[4], 'lebar_dasar' => $row[5],
'kedalaman' => $row[5], 'kedalaman' => $row[6],
'debit_maks' => $row[6], 'debit_maks' => $row[7],
'debit_min' => $row[7], 'debit_min' => $row[8],
]); ]);
} }

View File

@ -31,16 +31,16 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable28([ return new DatasetTable28([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'nama_danau' => $row[0], 'nama_danau' => $row[1],
'lokasi' => $row[1], 'lokasi' => $row[2],
'luas' => $row[2], 'luas' => $row[3],
'volume' => $row[3], 'volume' => $row[4],
]); ]);
} }
} }

View File

@ -31,38 +31,66 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null &&
$row[16] === null &&
$row[17] === null &&
$row[18] === null &&
$row[19] === null &&
$row[20] === null &&
$row[21] === null &&
$row[22] === null &&
$row[23] === null &&
$row[24] === null &&
$row[25] === null &&
$row[26] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable29([ return new DatasetTable29([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'nama_sungai' => $row[0], 'nama_sungai' => $row[1],
'lokasi' => $row[1], 'lokasi' => $row[2],
'titik_pantau' => $row[2], 'titik_pantau' => $row[3],
'koordinat_lintang' => $row[3], 'koordinat_lintang' => $row[4],
'koordinat_bujur' => $row[4], 'koordinat_bujur' => $row[5],
'waktu_sampling' => $row[5], 'waktu_sampling' => $row[6],
'temperatur' => $row[6], 'temperatur' => $row[7],
'ph' => $row[7], 'ph' => $row[8],
'dhl' => $row[8], 'dhl' => $row[9],
'tds' => $row[9], 'tds' => $row[10],
'tss' => $row[10], 'tss' => $row[11],
'do' => $row[11], 'do' => $row[12],
'bod' => $row[12], 'bod' => $row[13],
'cod' => $row[13], 'cod' => $row[14],
'no2' => $row[14], 'no2' => $row[15],
'no3' => $row[15], 'no3' => $row[16],
'nh3' => $row[16], 'nh3' => $row[17],
'klorin_bebas' => $row[17], 'klorin_bebas' => $row[18],
'tp' => $row[18], 'tp' => $row[19],
'fenol' => $row[19], 'fenol' => $row[20],
'minyak_lemak' => $row[20], 'minyak_lemak' => $row[21],
'detergen' => $row[21], 'detergen' => $row[22],
'fecal_coliform' => $row[22], 'fecal_coliform' => $row[23],
'total_coliform' => $row[23], 'total_coliform' => $row[24],
'sianida' => $row[24], 'sianida' => $row[25],
'h2s' => $row[25], 'h2s' => $row[26],
]); ]);
} }
} }

View File

@ -31,39 +31,68 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null &&
$row[16] === null &&
$row[17] === null &&
$row[18] === null &&
$row[19] === null &&
$row[20] === null &&
$row[21] === null &&
$row[22] === null &&
$row[23] === null &&
$row[24] === null &&
$row[25] === null &&
$row[26] === null &&
$row[27] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable30([ return new DatasetTable30([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'nama' => $row[0], 'nama' => $row[1],
'lokasi' => $row[1], 'lokasi' => $row[2],
'waktu_sampling' => $row[2], 'waktu_sampling' => $row[3],
'lat' => $row[3], 'lat' => $row[4],
'long' => $row[4], 'long' => $row[5],
'temperatur' => $row[5], 'temperatur' => $row[6],
'residu_terlarut' => $row[6], 'residu_terlarut' => $row[7],
'residu_tersuspensi' => $row[7], 'residu_tersuspensi' => $row[8],
'ph' => $row[8], 'ph' => $row[9],
'dhl' => $row[9], 'dhl' => $row[10],
'tds' => $row[10], 'tds' => $row[11],
'tss' => $row[11], 'tss' => $row[12],
'do' => $row[12], 'do' => $row[13],
'bod' => $row[13], 'bod' => $row[14],
'cod' => $row[14], 'cod' => $row[15],
'no2' => $row[15], 'no2' => $row[16],
'no3' => $row[16], 'no3' => $row[17],
'nh3' => $row[17], 'nh3' => $row[18],
'klorin_bebas' => $row[18], 'klorin_bebas' => $row[19],
'tp' => $row[19], 'tp' => $row[20],
'fenol' => $row[20], 'fenol' => $row[21],
'minyak_lemak' => $row[21], 'minyak_lemak' => $row[22],
'detergen' => $row[22], 'detergen' => $row[23],
'fecal_coliform' => $row[23], 'fecal_coliform' => $row[24],
'total_coliform' => $row[24], 'total_coliform' => $row[25],
'sianida' => $row[25], 'sianida' => $row[26],
'h2s' => $row[26], 'h2s' => $row[27],
]); ]);
} }
} }

View File

@ -31,19 +31,19 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null && $row[7] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable31([ return new DatasetTable31([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'kabupaten_kota' => $row[0], 'kabupaten_kota' => $row[1],
'jumlah_kk' => $row[1], 'jumlah_kk' => $row[2],
'sendiri' => $row[2], 'sendiri' => $row[3],
'bersama' => $row[3], 'bersama' => $row[4],
'umum' => $row[4], 'umum' => $row[5],
'tidak_menggunakan' => $row[5], 'tidak_menggunakan' => $row[6],
'tidak_ada_fasilitas' => $row[6], 'tidak_ada_fasilitas' => $row[7],
]); ]);
} }
} }

View File

@ -31,29 +31,48 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null &&
$row[16] === null &&
$row[17] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable32([ return new DatasetTable32([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'lokasi' => $row[0], 'lokasi' => $row[1],
'tidak_sekolah_l' => $row[1], 'tidak_sekolah_l' => $row[2],
'tidak_sekolah_p' => $row[2], 'tidak_sekolah_p' => $row[3],
'sd_l' => $row[3], 'sd_l' => $row[4],
'sd_p' => $row[4], 'sd_p' => $row[5],
'sltp_l' => $row[5], 'sltp_l' => $row[6],
'sltp_p' => $row[6], 'sltp_p' => $row[7],
'slta_smk_l' => $row[7], 'slta_smk_l' => $row[8],
'slta_smk_p' => $row[8], 'slta_smk_p' => $row[9],
'pt_l' => $row[9], 'pt_l' => $row[10],
'pt_p' => $row[10], 'pt_p' => $row[11],
's1_l' => $row[11], 's1_l' => $row[12],
's1_p' => $row[12], 's1_p' => $row[13],
's2_l' => $row[13], 's2_l' => $row[14],
's2_p' => $row[14], 's2_p' => $row[15],
's3_l' => $row[15], 's3_l' => $row[16],
's3_p' => $row[16], 's3_p' => $row[17],
]); ]);
} }
} }

View File

@ -31,15 +31,15 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable33([ return new DatasetTable33([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'lokasi' => $row[0], 'lokasi' => $row[1],
'jenis_penyakit' => $row[1], 'jenis_penyakit' => $row[2],
'jumlah_penderita' => $row[2], 'jumlah_penderita' => $row[4],
]); ]);
} }
} }

View File

@ -31,16 +31,16 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable34([ return new DatasetTable34([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'kabupaten_kota' => $row[0], 'kabupaten_kota' => $row[1],
'jumlah_rumah_tangga' => $row[1], 'jumlah_rumah_tangga' => $row[2],
'jumlah_rumah_tangga_miskin' => $row[2], 'jumlah_rumah_tangga_miskin' => $row[3],
'persentase_rumah_tangga_miskin' => $row[3], 'persentase_rumah_tangga_miskin' => $row[4],
]); ]);
} }
} }

View File

@ -31,20 +31,30 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable35([ return new DatasetTable35([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'sumber_pencemaran' => $row[0], 'sumber_pencemaran' => $row[1],
'lokasi' => $row[1], 'lokasi' => $row[2],
'tipe_jenis_klasifikasi' => $row[2], 'tipe_jenis_klasifikasi' => $row[3],
'luas' => $row[3], 'luas' => $row[4],
'volume_limbah_padat' => $row[4], 'volume_limbah_padat' => $row[5],
'volume_air_limbah' => $row[5], 'volume_air_limbah' => $row[6],
'jumlah_limbah_b3_padat' => $row[6], 'jumlah_limbah_b3_padat' => $row[7],
'jumlah_limbah_b3_cair' => $row[7], 'jumlah_limbah_b3_cair' => $row[8],
]); ]);
} }
} }

View File

@ -31,29 +31,48 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null &&
$row[16] === null &&
$row[17] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable36([ return new DatasetTable36([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'golongan' => $row[0], 'golongan' => $row[1],
'nama_lokasi_stasuin' => $row[1], 'nama_lokasi_stasuin' => $row[2],
'lokasi_pemantauan' => $row[2], 'lokasi_pemantauan' => $row[3],
'lat' => $row[3], 'lat' => $row[4],
'long' => $row[4], 'long' => $row[5],
'jan' => $row[5], 'jan' => $row[6],
'feb' => $row[6], 'feb' => $row[7],
'mar' => $row[7], 'mar' => $row[8],
'apr' => $row[8], 'apr' => $row[9],
'mei' => $row[9], 'mei' => $row[10],
'jun' => $row[10], 'jun' => $row[11],
'jul' => $row[11], 'jul' => $row[12],
'agust' => $row[12], 'agust' => $row[13],
'sept' => $row[13], 'sept' => $row[14],
'okt' => $row[14], 'okt' => $row[15],
'nov' => $row[15], 'nov' => $row[16],
'des' => $row[16], 'des' => $row[17],
]); ]);
} }
} }

View File

@ -31,7 +31,26 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null &&
$row[12] === null &&
$row[13] === null &&
$row[14] === null &&
$row[15] === null &&
$row[16] === null &&
$row[17] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable37([ return new DatasetTable37([

View File

@ -31,23 +31,36 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if (
$row[0] === null &&
$row[1] === null &&
$row[2] === null &&
$row[3] === null &&
$row[4] === null &&
$row[5] === null &&
$row[6] === null &&
$row[7] === null &&
$row[8] === null &&
$row[9] === null &&
$row[10] === null &&
$row[11] === null
) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable38([ return new DatasetTable38([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'minyak_bakar' => $row[0], 'minyak_bakar' => $row[1],
'minyak_diesel' => $row[1], 'minyak_diesel' => $row[2],
'minyak_tanah' => $row[2], 'minyak_tanah' => $row[3],
'gas' => $row[3], 'gas' => $row[4],
'batubara' => $row[4], 'batubara' => $row[5],
'lpg' => $row[5], 'lpg' => $row[6],
'briket' => $row[6], 'briket' => $row[7],
'kayu_bakar' => $row[7], 'kayu_bakar' => $row[8],
'biomassa' => $row[8], 'biomassa' => $row[9],
'bensin' => $row[9], 'bensin' => $row[10],
'solar' => $row[10], 'solar' => $row[11],
]); ]);
} }
} }

View File

@ -37,12 +37,12 @@ public function model(array $row)
return new DatasetTable39A([ return new DatasetTable39A([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'kendaraan' => $row[0], 'kendaraan' => $row[1],
'jumlah' => $row[1], 'jumlah' => $row[2],
'bensin' => $row[2], 'bensin' => $row[3],
'solar' => $row[3], 'solar' => $row[4],
'gas' => $row[4], 'gas' => $row[5],
'listrik' => $row[5], 'listrik' => $row[6],
]); ]);
} }
} }

View File

@ -31,17 +31,17 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable39([ return new DatasetTable39([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'kendaraan' => $row[0], 'kendaraan' => $row[1],
'jumlah' => $row[1], 'jumlah' => $row[2],
'bensin' => $row[2], 'bensin' => $row[3],
'solar' => $row[3], 'solar' => $row[4],
'gas' => $row[4], 'gas' => $row[5],
]); ]);
} }
} }

View File

@ -31,15 +31,15 @@ public function model(array $row)
{ {
// cek kalau row kosong jangan insert // cek kalau row kosong jangan insert
if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null && $row[4] === null && $row[5] === null && $row[6] === null) { if ($row[0] === null && $row[1] === null && $row[2] === null && $row[3] === null) {
return null; // baris kosong dilewati return null; // baris kosong dilewati
} }
return new DatasetTable40([ return new DatasetTable40([
'dataset_id' => $this->datasetId, 'dataset_id' => $this->datasetId,
'created_by' => $this->userId, 'created_by' => $this->userId,
'kelas_jalan' => $row[0], 'kelas_jalan' => $row[1],
'panjang_jalan' => $row[1], 'panjang_jalan' => $row[2],
'panjang_jalan_terakhir' => $row[2], 'panjang_jalan_terakhir' => $row[3],
]); ]);
} }
} }

BIN
public/.DS_Store vendored

Binary file not shown.