Update
This commit is contained in:
@@ -22,39 +22,41 @@ class ImportDataBos implements WithColumnFormatting, ToModel, WithStartRow
|
||||
return 2;
|
||||
}
|
||||
|
||||
protected function replaceIni($str)
|
||||
{
|
||||
return str_replace(["'"],"",$str);
|
||||
}
|
||||
|
||||
public function model(array $row)
|
||||
{
|
||||
// if (!isset($row[0])) {
|
||||
// return null;
|
||||
// }
|
||||
var_dump($row); exit;
|
||||
$data = [
|
||||
"no"=>$row[0],
|
||||
"kanwil"=>$row[1],
|
||||
"kppn"=>$row[2],
|
||||
"lokasi_kewenangan"=>$row[3],
|
||||
"lokasi_sekolah"=>$row[4],
|
||||
"no_tgl_sk"=>$row[5],
|
||||
"jenis_bos"=>$row[6],
|
||||
"tahap"=>$row[7],
|
||||
"gelombang"=>$row[8],
|
||||
"npsn_nama_sekolah"=>$row[9],
|
||||
"jenis_satuan_pendidikan"=>$row[10],
|
||||
"status_sekolah"=>$row[11],
|
||||
"bank"=>$row[12],
|
||||
"no_rekening_nama_rekening"=>$row[13],
|
||||
"npsn"=>$row[14],
|
||||
"rekening"=>$row[15],
|
||||
"nama"=>$row[16],
|
||||
"jenjang_sekolah"=>$row[17],
|
||||
"no_tgl_sp2d_detail"=>$row[18],
|
||||
"no_sp2d"=>$row[19],
|
||||
"tgl_sp2d"=>$row[20],
|
||||
"status"=>$row[21],
|
||||
"nilai"=>$row[22],
|
||||
"pagu"=>$row[23],
|
||||
"jmlh_siswa"=>$row[24],
|
||||
"ket_retur"=>$row[25]
|
||||
"tahun"=>getTA(),
|
||||
"no"=>$this->replaceIni($row[0]),
|
||||
"kanwil"=>$this->replaceIni($row[1]),
|
||||
"kppn"=>$this->replaceIni($row[2]),
|
||||
"lokasi_kewenangan"=>$this->replaceIni($row[3]),
|
||||
"lokasi_sekolah"=>$this->replaceIni($row[4]),
|
||||
"no_tgl_sk"=>$this->replaceIni($row[5]),
|
||||
"jenis_bos"=>$this->replaceIni($row[6]),
|
||||
"tahap"=>$this->replaceIni($row[7]),
|
||||
"gelombang"=>$this->replaceIni($row[8]),
|
||||
"npsn_nama_sekolah"=>$this->replaceIni($row[9]),
|
||||
"jenis_satuan_pendidikan"=>$this->replaceIni($row[10]),
|
||||
"status_sekolah"=>$this->replaceIni($row[11]),
|
||||
"bank"=>$this->replaceIni($row[12]),
|
||||
"no_rekening_nama_rekening"=>$this->replaceIni($row[13]),
|
||||
"npsn"=>$this->replaceIni($row[14]),
|
||||
"rekening"=>$this->replaceIni($row[15]),
|
||||
"nama"=>$this->replaceIni($row[16]),
|
||||
"jenjang_sekolah"=>$this->replaceIni($row[17]),
|
||||
"no_tgl_sp2d_detail"=>$this->replaceIni($row[18]),
|
||||
"no_sp2d"=>$this->replaceIni($row[19]),
|
||||
"tgl_sp2d"=>is_numeric($row[20])?convertSerialDate($row[20]):$row[20],
|
||||
"status"=>$this->replaceIni($row[21]),
|
||||
"nilai"=>$this->replaceIni($row[22]),
|
||||
"pagu"=>$this->replaceIni($row[23]),
|
||||
"jmlh_siswa"=>$this->replaceIni($row[24]),
|
||||
"ket_retur"=>$this->replaceIni($row[25])
|
||||
];
|
||||
|
||||
return new DataUploadBosOmspan($data);
|
||||
|
||||
Reference in New Issue
Block a user