-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Downloader #53
base: master
Are you sure you want to change the base?
Conversation
boleh dikasih konteks sedikit ini perubahannya untuk apa ya mas? |
pemenang_field = ['npwp', 'nama_pemenang', 'harga_penawaran', 'harga_terkoreksi', 'hasil_negosiasi', 'alamat', | ||
'p', 'pk'] | ||
data = [None] * 8 | ||
field = ['npwp', 'nama_pemenang', 'alamat', 'penawaran_hasil','penawaran_pemenang', 'harga_negosiasi', 'harga_terkoreksi', 'hasil_negosiasi', 'p', 'pk'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ini field
-nya di update untuk keperluan apa ya mas?
soalnya ini field di halaman evaluasi, saya sampling beberapa lpse kayanya belum berubah
https://lpse.kalselprov.go.id/eproc4/evaluasi/10298181/hasil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
untuk bagian penawaran hasil dan penawaran_pemenang biar datanya lengkap
nah pas bagian 'harga_terkoreksi', 'hasil_negosiasi' ini datanya ada di 'harga_negosiasi' sehingga saya tambahin jadi 'harga_negosiasi', 'harga_terkoreksi', 'hasil_negosiasi' biar semua data terambil mas, ini sudah saya coba
mungkin bisa di coba
https://lpse.bp2mi.go.id/eproc4/evaluasi/499158/pemenang
ini mas
nah kalau https://lpse.kalselprov.go.id/eproc4/evaluasi/10298181/pemenang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ini tujuannya gabungin data dari seluruh tabel ya?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iya mas export semua data yg terdownload, soalnya kadang kala nilai kontrak pemenang ada di salah satu 'harga_negosiasi', 'harga_terkoreksi', 'hasil_negosiasi' kolom ini, ini sudah saya coba sendiri mas soalnya
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maaf baru ngeh, ini ternyata header tabel nya berubah lagi ya.
Kalo gitu harusnya gak banyak banget ini yang perlu diubah kodenya, di variable field
sama pemenang_field
tinggal ditambahin aja harga_negosiasi
, posisinya terserah tapi yang penting urutannya sama antara 2 variable itu.
other_header = ['jadwal', 'peserta'] | ||
|
||
with self.get_file_obj('csv').open('w', newline='', encoding='utf-8') as f: | ||
writer = csv.writer(f) | ||
writer = csv.writer(f, delimiter = ';') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ini kayanya bisa dihilangin dulu, paling kalo mau nanti delimiternya kita tambahin di argumen aja
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
siap mas, soalnya lebih bagus delimiternya pake ";" saya sebagai user seh gitu ^_^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sebenarnya gak ngaruh sih mau delimiter apa karena pasti udah diantisipasi sama csv writernya.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iya sehn nda terlalu urgen klo yg ini hehehe
pemenang_field = ['npwp', 'nama_pemenang', 'harga_penawaran', 'harga_terkoreksi', 'hasil_negosiasi', 'alamat', | ||
'p', 'pk'] | ||
data = [None] * 8 | ||
field = ['npwp', 'nama_pemenang', 'alamat', 'penawaran_hasil','penawaran_pemenang', 'harga_negosiasi', 'harga_terkoreksi', 'hasil_negosiasi', 'p', 'pk'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maaf baru ngeh, ini ternyata header tabel nya berubah lagi ya.
Kalo gitu harusnya gak banyak banget ini yang perlu diubah kodenya, di variable field
sama pemenang_field
tinggal ditambahin aja harga_negosiasi
, posisinya terserah tapi yang penting urutannya sama antara 2 variable itu.
@@ -638,26 +638,23 @@ def to_csv(self): | |||
header[7] = 'metode_pengadaan' | |||
header[-3] = 'peserta_non_tender' | |||
|
|||
header_pemenang = ['npwp', 'nama_peserta', 'penawaran', 'penawaran_terkoreksi', 'hasil_negosiasi', 'alamat', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
di sini juga tinggal ditambahin harga_negosiasi
sesuai urutan di get_pemenang
writer.writerow(['url'] + header + header_pemenang + other_header) | ||
|
||
for item in self.get_detail(): | ||
if item.get('pengumuman'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ini sampai ke bawah kayanya gak perlu
silahkan di cek mas