feat: Implement RekapGarduDistribusi resource and related DTOs
- Added RekapGarduDistribusiResource for handling data retrieval and synchronization. - Created RekapGarduDistribusiDTO to represent the data structure for distribution records. - Developed RekapGarduDistribusiResponse to encapsulate the response from the external API. - Introduced RekapGarduDistribusi entity to map to the database table. - Implemented GarduService for synchronizing data with external API. - Enhanced error handling and logging during data synchronization.
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
package id.co.iconpln.apkt.data309.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.*;
|
||||
|
||||
@Entity
|
||||
@Setter
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
@Table(name = "rekap_gardu_distribusi", schema = "apkt_transactional")
|
||||
public class RekapGarduDistribusi extends PanacheEntityBase {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id") // karena table tidak punya PK, kamu bisa tambahkan kolom id (serial) di DB
|
||||
public Long id;
|
||||
|
||||
@Column(name = "jmlplg_1_fasa")
|
||||
public Integer jmlplg1Fasa;
|
||||
|
||||
@Column(name = "unitupi")
|
||||
public String unitUpi;
|
||||
|
||||
@Column(name = "namaupi")
|
||||
public String namaUpi;
|
||||
|
||||
@Column(name = "kdgardu")
|
||||
public String kdGardu;
|
||||
|
||||
@Column(name = "jmlplg_3_fasa")
|
||||
public Integer jmlplg3Fasa;
|
||||
|
||||
@Column(name = "namaap")
|
||||
public String namaAp;
|
||||
|
||||
@Column(name = "keterangan_kdpembmeter")
|
||||
public String keteranganKdPembMeter;
|
||||
|
||||
@Column(name = "unitap")
|
||||
public String unitAp;
|
||||
|
||||
@Column(name = "jmlplg")
|
||||
public Integer jmlPlg;
|
||||
|
||||
@Column(name = "unitup")
|
||||
public String unitUp;
|
||||
|
||||
@Column(name = "kdpembmeter")
|
||||
public String kdPembMeter;
|
||||
|
||||
@Column(name = "jmldaya")
|
||||
public Integer jmlDaya;
|
||||
|
||||
@Column(name = "namaup")
|
||||
public String namaUp;
|
||||
|
||||
@Column(name = "thbllap")
|
||||
public String thblLap;
|
||||
|
||||
@Column(name = "nama_gardu")
|
||||
public String namaGardu;
|
||||
}
|
Reference in New Issue
Block a user