Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

oraclecentrino
Copy link

silahkan di cek mas

@wakataw
Copy link
Owner

wakataw commented Mar 1, 2022

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']
Copy link
Owner

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

Copy link
Author

@oraclecentrino oraclecentrino Mar 1, 2022

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

image

nah kalau https://lpse.kalselprov.go.id/eproc4/evaluasi/10298181/pemenang

image

Copy link
Owner

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?

Copy link
Author

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

Copy link
Owner

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 = ';')
Copy link
Owner

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

Copy link
Author

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 ^_^

Copy link
Owner

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.

Copy link
Author

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']
Copy link
Owner

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',
Copy link
Owner

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'):
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants