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([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'lokasi' => $row[0],
'nama_perusahaan' => $row[1],
'luas_pemanfaatan_aliran_air' => $row[2],
'luas_wisata_alam' => $row[3],
'luas_perlindungan_kehati' => $row[4],
'luas_penyelamatan_lingkungan' => $row[5],
'luas_penyerapan_karbon' => $row[6],
'sk' => $row[7],
'lokasi' => $row[1],
'nama_perusahaan' => $row[2],
'luas_pemanfaatan_aliran_air' => $row[3],
'luas_wisata_alam' => $row[4],
'luas_perlindungan_kehati' => $row[5],
'luas_penyelamatan_lingkungan' => $row[6],
'luas_penyerapan_karbon' => $row[7],
'sk' => $row[8],
]);
}
}

View File

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

View File

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

View File

@ -31,27 +31,44 @@ public function model(array $row)
{
// 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 new DatasetTable24([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'lokasi' => $row[0],
'lat' => $row[1],
'long' => $row[2],
'jan' => $row[3],
'feb' => $row[4],
'mar' => $row[5],
'apr' => $row[6],
'mei' => $row[7],
'jun' => $row[8],
'jul' => $row[9],
'agust' => $row[10],
'sept' => $row[11],
'okt' => $row[12],
'nov' => $row[13],
'des' => $row[14],
'lokasi' => $row[1],
'lat' => $row[2],
'long' => $row[3],
'jan' => $row[4],
'feb' => $row[5],
'mar' => $row[6],
'apr' => $row[7],
'mei' => $row[8],
'jun' => $row[9],
'jul' => $row[10],
'agust' => $row[11],
'sept' => $row[12],
'okt' => $row[13],
'nov' => $row[14],
'des' => $row[15],
]);
}
}

View File

@ -31,20 +31,20 @@ public function model(array $row)
{
// 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 new DatasetTable25([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'mata_air' => $row[0],
'ledeng_pam' => $row[1],
'sumur_bor_pompa' => $row[2],
'sumur_tak_terlindung' => $row[3],
'sungai' => $row[4],
'terlindung_air' => $row[5],
'air_kemasan' => $row[6],
'lainnya' => $row[7],
'mata_air' => $row[1],
'ledeng_pam' => $row[2],
'sumur_bor_pompa' => $row[3],
'sumur_tak_terlindung' => $row[4],
'sungai' => $row[5],
'terlindung_air' => $row[6],
'air_kemasan' => $row[7],
'lainnya' => $row[8],
]);
}
}

View File

@ -31,7 +31,21 @@ public function model(array $row)
{
// 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 new DatasetTable26([

View File

@ -31,20 +31,20 @@ public function model(array $row)
{
// 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 new DatasetTable27([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'nama_sungai' => $row[0],
'lokasi' => $row[1],
'panjang' => $row[2],
'lebar_permukaan' => $row[3],
'lebar_dasar' => $row[4],
'kedalaman' => $row[5],
'debit_maks' => $row[6],
'debit_min' => $row[7],
'nama_sungai' => $row[1],
'lokasi' => $row[2],
'panjang' => $row[3],
'lebar_permukaan' => $row[4],
'lebar_dasar' => $row[5],
'kedalaman' => $row[6],
'debit_maks' => $row[7],
'debit_min' => $row[8],
]);
}

View File

@ -31,16 +31,16 @@ public function model(array $row)
{
// 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 new DatasetTable28([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'nama_danau' => $row[0],
'lokasi' => $row[1],
'luas' => $row[2],
'volume' => $row[3],
'nama_danau' => $row[1],
'lokasi' => $row[2],
'luas' => $row[3],
'volume' => $row[4],
]);
}
}

View File

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

View File

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

View File

@ -31,19 +31,19 @@ public function model(array $row)
{
// 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 new DatasetTable31([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'kabupaten_kota' => $row[0],
'jumlah_kk' => $row[1],
'sendiri' => $row[2],
'bersama' => $row[3],
'umum' => $row[4],
'tidak_menggunakan' => $row[5],
'tidak_ada_fasilitas' => $row[6],
'kabupaten_kota' => $row[1],
'jumlah_kk' => $row[2],
'sendiri' => $row[3],
'bersama' => $row[4],
'umum' => $row[5],
'tidak_menggunakan' => $row[6],
'tidak_ada_fasilitas' => $row[7],
]);
}
}

View File

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

View File

@ -31,15 +31,15 @@ public function model(array $row)
{
// 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 new DatasetTable33([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'lokasi' => $row[0],
'jenis_penyakit' => $row[1],
'jumlah_penderita' => $row[2],
'lokasi' => $row[1],
'jenis_penyakit' => $row[2],
'jumlah_penderita' => $row[4],
]);
}
}

View File

@ -31,16 +31,16 @@ public function model(array $row)
{
// 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 new DatasetTable34([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'kabupaten_kota' => $row[0],
'jumlah_rumah_tangga' => $row[1],
'jumlah_rumah_tangga_miskin' => $row[2],
'persentase_rumah_tangga_miskin' => $row[3],
'kabupaten_kota' => $row[1],
'jumlah_rumah_tangga' => $row[2],
'jumlah_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
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 new DatasetTable35([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'sumber_pencemaran' => $row[0],
'lokasi' => $row[1],
'tipe_jenis_klasifikasi' => $row[2],
'luas' => $row[3],
'volume_limbah_padat' => $row[4],
'volume_air_limbah' => $row[5],
'jumlah_limbah_b3_padat' => $row[6],
'jumlah_limbah_b3_cair' => $row[7],
'sumber_pencemaran' => $row[1],
'lokasi' => $row[2],
'tipe_jenis_klasifikasi' => $row[3],
'luas' => $row[4],
'volume_limbah_padat' => $row[5],
'volume_air_limbah' => $row[6],
'jumlah_limbah_b3_padat' => $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
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 new DatasetTable36([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'golongan' => $row[0],
'nama_lokasi_stasuin' => $row[1],
'lokasi_pemantauan' => $row[2],
'lat' => $row[3],
'long' => $row[4],
'jan' => $row[5],
'feb' => $row[6],
'mar' => $row[7],
'apr' => $row[8],
'mei' => $row[9],
'jun' => $row[10],
'jul' => $row[11],
'agust' => $row[12],
'sept' => $row[13],
'okt' => $row[14],
'nov' => $row[15],
'des' => $row[16],
'golongan' => $row[1],
'nama_lokasi_stasuin' => $row[2],
'lokasi_pemantauan' => $row[3],
'lat' => $row[4],
'long' => $row[5],
'jan' => $row[6],
'feb' => $row[7],
'mar' => $row[8],
'apr' => $row[9],
'mei' => $row[10],
'jun' => $row[11],
'jul' => $row[12],
'agust' => $row[13],
'sept' => $row[14],
'okt' => $row[15],
'nov' => $row[16],
'des' => $row[17],
]);
}
}

View File

@ -31,7 +31,26 @@ public function model(array $row)
{
// 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 new DatasetTable37([

View File

@ -31,23 +31,36 @@ public function model(array $row)
{
// 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 new DatasetTable38([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'minyak_bakar' => $row[0],
'minyak_diesel' => $row[1],
'minyak_tanah' => $row[2],
'gas' => $row[3],
'batubara' => $row[4],
'lpg' => $row[5],
'briket' => $row[6],
'kayu_bakar' => $row[7],
'biomassa' => $row[8],
'bensin' => $row[9],
'solar' => $row[10],
'minyak_bakar' => $row[1],
'minyak_diesel' => $row[2],
'minyak_tanah' => $row[3],
'gas' => $row[4],
'batubara' => $row[5],
'lpg' => $row[6],
'briket' => $row[7],
'kayu_bakar' => $row[8],
'biomassa' => $row[9],
'bensin' => $row[10],
'solar' => $row[11],
]);
}
}

View File

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

View File

@ -31,17 +31,17 @@ public function model(array $row)
{
// 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 new DatasetTable39([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'kendaraan' => $row[0],
'jumlah' => $row[1],
'bensin' => $row[2],
'solar' => $row[3],
'gas' => $row[4],
'kendaraan' => $row[1],
'jumlah' => $row[2],
'bensin' => $row[3],
'solar' => $row[4],
'gas' => $row[5],
]);
}
}

View File

@ -31,15 +31,15 @@ public function model(array $row)
{
// 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 new DatasetTable40([
'dataset_id' => $this->datasetId,
'created_by' => $this->userId,
'kelas_jalan' => $row[0],
'panjang_jalan' => $row[1],
'panjang_jalan_terakhir' => $row[2],
'kelas_jalan' => $row[1],
'panjang_jalan' => $row[2],
'panjang_jalan_terakhir' => $row[3],
]);
}
}

BIN
public/.DS_Store vendored

Binary file not shown.