/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sikd.ikonsol.ctrl;

import java.io.Serializable;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.application.FacesMessage;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
import org.primefaces.PrimeFaces;
import sikd.ikonsol.ejb.session.AkunEliminasiEjbHome;
import sikd.ikonsol.ejb.session.HeaderResiprokalEjbHome;
import sikd.ikonsol.ejb.session.JenisBasEjbHome;
import sikd.ikonsol.ejb.session.JenisLaporanEjbHome;
import sikd.ikonsol.ejb.session.JenisTransferEjbHome;
import sikd.ikonsol.ejb.session.KategoriPemdaEjbHome;
import sikd.ikonsol.ejb.session.PeriodeEjbHome;
import sikd.ikonsol.ejb.session.RefPemdaEjbHome;
import sikd.ikonsol.model.AkunEliminasi;
import sikd.ikonsol.model.HeaderResiprokal;
import sikd.ikonsol.model.JenisBas;
import sikd.ikonsol.model.JenisLaporan;
import sikd.ikonsol.model.JenisTransfer;
import sikd.ikonsol.model.KategoriPemda;
import sikd.ikonsol.model.Periode;
import sikd.ikonsol.model.ReferensiPemda;
import sikd.ikonsol.model.ReferensiWilayah;

/**
 *
 * @author Imam Bhoim
 */
@ViewScoped
@Named(value = "akunEliminasiBeanCtrl")
public class AkunEliminasiBeanCtrl extends AbstractReportBean implements Serializable {

    private String COMPILE_FILE_NAME = "";//"spd_depan";
    AkunEliminasi akel;
    AkunEliminasi obj;

    private List<AkunEliminasi> list, listkode;
    private List<ReferensiPemda> listProv;
    private List<ReferensiWilayah> listDataWilayah;

    private List<JenisBas> listjbas;
    private List<JenisLaporan> listjlaporan, listlak;
    private List<Periode> listperiode;

    private List<AkunEliminasi> listNasional, listNasionalLak;
    private List<AkunEliminasi> listWilayah, listWilayahLak;
    private List<AkunEliminasi> listProvinsi, listProvinsiLak;

    private List<KategoriPemda> listkatpemda;

    private List<JenisTransfer> listjtransfer;

    private int idbas = 0;
    private int tahun;
    private int idjnslaporan;
    private String kdPeriode = null;
    private String kdPemda = null;
    private String kdWilayah = null;

    private String kdp = null;
    private String namaprov = null;
    private String namaperiode = null;

    HeaderResiprokal hd;
    JenisBas jb;
    ReferensiPemda rp;
    JenisLaporan jl;
    Periode p;

    @EJB
    AkunEliminasiEjbHome akeliminasiEjbHome;

    @EJB
    JenisBasEjbHome jenisBasEjbHome;

    @EJB
    JenisLaporanEjbHome jenisLaporanEjbHome;

    @EJB
    PeriodeEjbHome periodeBasEjbHome;

    @EJB
    RefPemdaEjbHome pemdaEjbHome;

    @EJB
    KategoriPemdaEjbHome katPemdaEjbHome;

    @EJB
    HeaderResiprokalEjbHome headerResiprokalEjbHome;

    @EJB
    JenisTransferEjbHome jenisTransferEjbHome;

    @PostConstruct
    public void init() {

        akel = new AkunEliminasi();

        list = akeliminasiEjbHome.findAllByTahunBasJenisLap(tahun, idbas, idjnslaporan, kdPeriode);

        listjbas = jenisBasEjbHome.findAllAktif();

        listjlaporan = jenisLaporanEjbHome.findAllLra();

        listlak = jenisLaporanEjbHome.findAllLak();

        listperiode = periodeBasEjbHome.findAllAktif();

        listjtransfer = jenisTransferEjbHome.findAll();

        try {
            listNasional = akeliminasiEjbHome.findByListNasional(kdPeriode, idbas, idjnslaporan, tahun);

        } catch (Exception e) {
            // System.out.println(e);
        }

        try {
            listProvinsi = akeliminasiEjbHome.findByListProv(kdPeriode, idbas, idjnslaporan, tahun, kdPemda);

        } catch (Exception e) {
            // System.out.print(e);
        }

        try {
            listWilayah = akeliminasiEjbHome.findByListWilayah(kdPeriode, idbas, idjnslaporan, tahun, kdWilayah);

        } catch (Exception e) {
            // System.out.print(e);
        }

        try {
            listProvinsiLak = akeliminasiEjbHome.findAllByListProvLak(kdPeriode, idjnslaporan, tahun, kdPemda);

        } catch (Exception e) {
            // System.out.print(e);
        }

        try {
            listWilayahLak = akeliminasiEjbHome.findByListWilayahLak(kdPeriode, idjnslaporan, tahun, kdWilayah);

        } catch (Exception e) {
            // System.out.print(e);
        }

        try {
            listNasionalLak = akeliminasiEjbHome.findByListNasionalLak(kdPeriode, idjnslaporan, tahun);

        } catch (Exception e) {
            // System.out.print(e);
        }

        listProv = pemdaEjbHome.findAllProvinsi("__.00");
        listDataWilayah = pemdaEjbHome.findAllWilayah();

        listkatpemda = katPemdaEjbHome.findAll();

    }

    public void add(int idheader) {

        //  jbas = jbasEjbHome.createNew();
        akel = akeliminasiEjbHome.createNew();

        akel.setIdheaderkons(idheader);
    }

    public String saveProses() {

        // simpan
        akeliminasiEjbHome.saveProses(akel);

        list = akeliminasiEjbHome.selectCompare();

        //this.list = service.findAll();
        return "index?faces-redirect=true";
    }

    public void reload() {

        list = akeliminasiEjbHome.findAllByTahunBasJenisLap(tahun, idbas, idjnslaporan, kdPeriode);

    }

    public void reloadLaporanProv() {

        if (idjnslaporan == 1) {
            try {
                listProvinsi = akeliminasiEjbHome.findByListProv(kdPeriode, idbas, idjnslaporan, tahun, kdPemda);

            } catch (Exception r) {
                //r.printStackTrace();
            }
        } else {
        }

    }

    public void reloadLaporanWilayah() {

        try {
            listWilayah = akeliminasiEjbHome.findByListWilayah(kdPeriode, idbas, idjnslaporan, tahun, kdWilayah);
        } catch (Exception r) {
            // r.printStackTrace();
        }

    }

    public void reloadLaporan() {

        try {
            listNasional = akeliminasiEjbHome.findByListNasional(kdPeriode, idbas, idjnslaporan, tahun);
        } catch (Exception c) {
            // System.out.println("lnlistNasional.siec()" + listNasional.size());
        }

//        this.getSumNilai();
        //       this.getSumEliminasi();
    }

    public void reloadLaporanProvLak() {

        try {
            listProvinsiLak = akeliminasiEjbHome.findAllByListProvLak(kdPeriode, idjnslaporan, tahun, kdPemda);
        } catch (Exception r) {
            //r.printStackTrace();
        }

    }

    public void reloadLaporanWilayahLak() {

        try {
            listWilayahLak = akeliminasiEjbHome.findByListWilayahLak(kdPeriode, idjnslaporan, tahun, kdWilayah);
        } catch (Exception r) {
            // r.printStackTrace();
        }

    }

    public void reloadLaporanLak() {

        try {
            listNasionalLak = akeliminasiEjbHome.findByListNasionalLak(kdPeriode, idjnslaporan, tahun);
        } catch (Exception c) {
            // System.out.println("lnlistNasional.siec()" + listNasional.size());
        }

//        this.getSumNilai();
        //       this.getSumEliminasi();
    }

    public String refNama1(int kode1, int bast) {
        String name = null;
        try {
            name = akeliminasiEjbHome.selectRefAkun1(String.valueOf(kode1), 1).getNamaakun();
        } catch (Exception c) {
            //c.printStackTrace();
        }
        return name;
    }

    public String refNama2(int kode1, int kode2, int bast) {
        String name = null;
        try {
            name = akeliminasiEjbHome.selectRefAkun2(String.valueOf(kode1), String.valueOf(kode2), bast).getNamaakun();
        } catch (Exception c) {
            //c.printStackTrace();
        }
        return name;
    }

    public String refNama3(int kode1, int kode2, int kode3, int bast) {
        String name = null;
        try {
            name = akeliminasiEjbHome.selectRefAkun3(String.valueOf(kode1), String.valueOf(kode2), String.valueOf(kode3), bast).getNamaakun();
        } catch (Exception c) {
            //c.printStackTrace();
        }
        return name;
    }

    public String refNama4(int kode1, int kode2, int kode3, String kode4, int bast) {
        String name = null;
        try {
            name = akeliminasiEjbHome.selectRefAkun4(String.valueOf(kode1), String.valueOf(kode2), String.valueOf(kode3),
                    String.valueOf(kode4), bast).getNamaakun();
        } catch (Exception c) {
            //c.printStackTrace();
            name = "-";
        }
        return name;
    }

    public double refEliminasi(double nilai, int kode1, int kode2, int kode3, int bast, String kdperiode1, String kdprov1, int idjnslap1, int tahun1) {

        double name = 0;
        try {
            name = akeliminasiEjbHome.selectEliminasi(String.valueOf(kode1), String.valueOf(kode2), String.valueOf(kode3), bast, kdperiode1, kdprov1,
                    idjnslap1, tahun1).getNilaieliminasi();
            name = name;
        } catch (Exception ex) {
            //ex.printStackTrace();
            name = nilai;
        }

        return name;

    }

    public String getSumNilai(int kdlvl1, int kdlvl2) {

        double total = 0;
        listNasional = akeliminasiEjbHome.findByListNasionalSummary(kdPeriode, idbas, idjnslaporan, tahun,
                kdlvl1, kdlvl2);

        for (AkunEliminasi obj : listNasional) {

            total += obj.getNilai();

        }

        return new DecimalFormat("#,##0.00").format(total);

    }

    public String getSumEliminasi() {

        double total = 0;
        listNasional = akeliminasiEjbHome.findByListNasional(kdPeriode, idbas, idjnslaporan, tahun);

        for (AkunEliminasi obj : listNasional) {

            total += obj.getNilaieliminasi();

            // System.out.println("ttl " + total);
        }
        return new DecimalFormat("#,##0.00").format(total);
    }

    public String getSumNilaiProvinsi(int kdlvl1, int kdlvl2) {

        double total = 0;
        listProvinsi = akeliminasiEjbHome.findByListProvSummary(kdPeriode, idbas, idjnslaporan, tahun, kdPemda, kdlvl1, kdlvl2);

        for (AkunEliminasi obj : listProvinsi) {

            total += obj.getNilai();

        }

        return new DecimalFormat("#,##0.00").format(total);

    }

    public String getSumEliminasiProvinsi() {

        double total = 0;
        listProvinsi = akeliminasiEjbHome.findByListProv(kdPeriode, idbas, idjnslaporan, tahun, kdPemda);

        for (AkunEliminasi obj : listProvinsi) {

            total += obj.getNilaieliminasi();

            //   System.out.println("ttl " + total);
        }
        return new DecimalFormat("#,##0.00").format(total);
    }

    public String getSumNilaiWilayah(int kdlvl1, int kdlvl2) {

        double total = 0;
        listWilayah = akeliminasiEjbHome.findByListWilayahSummary(kdPeriode, idbas, idjnslaporan, tahun, kdWilayah, kdlvl1, kdlvl2);

        for (AkunEliminasi obj : listWilayah) {

            total += obj.getNilai();

        }

        return new DecimalFormat("#,##0.00").format(total);

    }

    public String getSumEliminasiWilayah(int kdlvl1, int kdlvl2) {

        double total = 0;
        listWilayah = akeliminasiEjbHome.findByListWilayahSummary(kdPeriode, idbas, idjnslaporan, tahun, kdWilayah, kdlvl1, kdlvl2);

        for (AkunEliminasi obj : listWilayah) {

            total += obj.getNilaieliminasi();

            //    System.out.println("ttl " + total);
        }
        return new DecimalFormat("#,##0.00").format(total);
    }

    public void listkode(String kode, int id) {

        listkode = akeliminasiEjbHome.findByKodeProvinsi(kode, id, tahun, idbas, idjnslaporan, kdPeriode);

        jb = jenisBasEjbHome.findByID(idbas);
        hd = headerResiprokalEjbHome.findByID(id);

        //rp = pemdaEjbHome.findByKodeId(kode);
        jl = jenisLaporanEjbHome.findByID(idjnslaporan);

        kdp = kode;

        p = periodeBasEjbHome.findByKode(kdPeriode);

        rp = pemdaEjbHome.findByKodeProv(kdp);

        namaprov = rp.getNama_pemda();
        namaperiode = p.getNama();

    }

    public String save() {

        AkunEliminasi are = new AkunEliminasi();

        are = akeliminasiEjbHome.findByKodeAkunHeaderLengkap(tahun, kdp,
                akel.getKdrek1(), akel.getKdrek2(), akel.getKdrek3(),
                akel.getKdrek4(), akel.getKdrek5(), akel.getIdkatpemda(), idbas, idjnslaporan,
                akel.getIdheaderresipo(), akel.getIdjenistransfer(), akel.getIdheaderkons(), akel.getKdperiode());
        try {
            if (are == null) {

                akel.setTahun(tahun);
                akel.setIdbas(idbas);
                akel.setKdpemda(kdp);
                akel.setIdjnslaporan(idjnslaporan);
                akel.setIdheaderresipo(hd.getId());
                akel.setKdperiode(kdPeriode);

                String kdrek4 = akel.getKdrek4();
                String kdrek5 = akel.getKdrek5();

                if (kdrek4.equalsIgnoreCase("01")) {
                    kdrek4 = "1";
                } else if (kdrek4.equalsIgnoreCase("02")) {
                    kdrek4 = "2";
                } else if (kdrek4.equalsIgnoreCase("03")) {
                    kdrek4 = "3";
                } else if (kdrek4.equalsIgnoreCase("04")) {
                    kdrek4 = "4";
                } else if (kdrek4.equalsIgnoreCase("05")) {
                    kdrek4 = "5";
                } else if (kdrek4.equalsIgnoreCase("06")) {
                    kdrek4 = "6";
                } else if (kdrek4.equalsIgnoreCase("07")) {
                    kdrek4 = "7";
                } else if (kdrek4.equalsIgnoreCase("08")) {
                    kdrek4 = "8";
                } else if (kdrek4.equalsIgnoreCase("09")) {
                    kdrek4 = "9";
                } else {
                    kdrek4 = kdrek4;
                }

                if (kdrek5.equalsIgnoreCase("01")) {
                    kdrek5 = "1";
                } else if (kdrek5.equalsIgnoreCase("02")) {
                    kdrek5 = "2";
                } else if (kdrek5.equalsIgnoreCase("03")) {
                    kdrek5 = "3";
                } else if (kdrek5.equalsIgnoreCase("04")) {
                    kdrek5 = "4";
                } else if (kdrek5.equalsIgnoreCase("05")) {
                    kdrek5 = "5";
                } else if (kdrek5.equalsIgnoreCase("06")) {
                    kdrek5 = "6";
                } else if (kdrek5.equalsIgnoreCase("07")) {
                    kdrek5 = "7";
                } else if (kdrek5.equalsIgnoreCase("08")) {
                    kdrek5 = "8";
                } else if (kdrek5.equalsIgnoreCase("09")) {
                    kdrek5 = "9";
                } else {
                    kdrek5 = kdrek5;
                }

                akel.setKdrek4(kdrek4);
                akel.setKdrek5(kdrek5);
                akel.setFlag("8");
                akel.setFlagProses("1");

                akeliminasiEjbHome.save(akel);
                System.out.println("SIMPAN 3");

                PrimeFaces.current().executeScript("PF('wg_entryform').hide()");
                PrimeFaces.current().ajax().update(":filterForm:dteliminasi");

                list = akeliminasiEjbHome.findAllByTahunBasJenisLap(tahun, idbas, idjnslaporan, kdPeriode);
            } else {
                System.out.println("SIMPAN 4");
                FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,
                        "Info", "Kode Akun Eliminasi Sudah Ada");
                PrimeFaces.current().dialog().showMessageDynamic(message);
            }
        } catch (Exception ex) {
            System.out.println("GAGAL!");
            ex.printStackTrace();
//            FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Info!", "Kode Sudah Ada");
//            FacesContext.getCurrentInstance().addMessage(null, message);
            FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,
                    "Info", "Kode Akun Eliminasi Sudah Ada");
            PrimeFaces.current().dialog().showMessageDynamic(message);
        }
        //this.list = service.findAll();
        return "index?faces-redirect=true";
    }

    public ArrayList<Integer> listTahun() {

        ArrayList<Integer> numbers = new ArrayList<Integer>();
        for (int years = 2015; years <= Calendar.getInstance().get(Calendar.YEAR); years++) {
            numbers.add(years);
        }
        return (numbers);
    }

    //print
    public void printForm() {

        System.out.println("PRINT " + kdPeriode);
        System.out.println("PRINT2 " + idbas);
        System.out.println("PRINT3 " + idjnslaporan);
        System.out.println("PRINT4 " + tahun);

        try {
            initExecute();
            super.prepareReport();

        } catch (Exception e) {
            // make your own exception handling
            e.printStackTrace();
        }

    }
    
    public void printFormProvinsi() {

        try {
            initExecuteProvinsi();
            super.prepareReport2();

        } catch (Exception e) {
            // make your own exception handling
            e.printStackTrace();
        }

    }
    
     public void printFormWilayah() {


        try {
            initExecuteWilayah();
            super.prepareReport3();

        } catch (Exception e) {
            // make your own exception handling
            e.printStackTrace();
        }

    }

    public void printFormExcel() {

        try {
            initExecute();
            //super.setExportOption(ExportOption.EXCEL);
            super.prepareReport();

        } catch (Exception e) {
            // make your own exception handling
            e.printStackTrace();
        }

    }

    public void initExecute() {
        setCOMPILE_FILE_NAME("laporanNasional");
    }
    
    public void initExecuteProvinsi() {
        setCOMPILE_FILE_NAME("laporanProvinsi");
    }
    
    public void initExecuteWilayah() {
        setCOMPILE_FILE_NAME("laporanWilayah");
    }

    @Override
    protected Map<String, Object> getReportParameters() {
        Map<String, Object> reportParameters = new HashMap<String, Object>();

        reportParameters.put("kdperiode", kdPeriode);
        reportParameters.put("tahun", tahun);
        reportParameters.put("idbas", idbas);
        reportParameters.put("idlap", idjnslaporan);

        String namalaporan = null;
        if (idjnslaporan == 1) {
            namalaporan = "LAPORAN REALISASI ANGGARAN ";
        } else if (idjnslaporan == 2) {
            namalaporan = "NERACA";
        } else if (idjnslaporan == 3) {
            namalaporan = "LAPORAN OPERASIONAL";
        } else {
            namalaporan = "-";
        }

        reportParameters.put("namalaporan", namalaporan);

        return reportParameters;
    }
    
     @Override
    protected Map<String, Object> getReportParameters2() {
        Map<String, Object> reportParameters = new HashMap<String, Object>();

        reportParameters.put("kdperiode", kdPeriode);
        reportParameters.put("tahun", tahun);
        reportParameters.put("idbas", idbas);
        reportParameters.put("idlap", idjnslaporan);
        reportParameters.put("kdprovinsi", kdPemda);

        String namalaporan = null;
        if (idjnslaporan == 1) {
            namalaporan = "LAPORAN REALISASI ANGGARAN ";
        } else if (idjnslaporan == 2) {
            namalaporan = "NERACA";
        } else if (idjnslaporan == 3) {
            namalaporan = "LAPORAN OPERASIONAL";
        } else {
            namalaporan = "-";
        }

        reportParameters.put("namalaporan", namalaporan);
        

        return reportParameters;
    }
    
     @Override
    protected Map<String, Object> getReportParameters3() {
        Map<String, Object> reportParameters = new HashMap<String, Object>();

        reportParameters.put("kdperiode", kdPeriode);
        reportParameters.put("tahun", tahun);
        reportParameters.put("idbas", idbas);
        reportParameters.put("idlap", idjnslaporan);
        reportParameters.put("kdwilayah", kdWilayah);

        String namalaporan = null;
        if (idjnslaporan == 1) {
            namalaporan = "LAPORAN REALISASI ANGGARAN ";
        } else if (idjnslaporan == 2) {
            namalaporan = "NERACA";
        } else if (idjnslaporan == 3) {
            namalaporan = "LAPORAN OPERASIONAL";
        } else {
            namalaporan = "-";
        }

        reportParameters.put("namalaporan", namalaporan);
        

        return reportParameters;
    }

    public AkunEliminasi getAkel() {
        return akel;
    }

    public void setAkel(AkunEliminasi akel) {
        this.akel = akel;
    }

    public AkunEliminasi getObj() {
        return obj;
    }

    public void setObj(AkunEliminasi obj) {
        this.obj = obj;
    }

    public List<AkunEliminasi> getList() {
        return list;
    }

    public void setList(List<AkunEliminasi> list) {
        this.list = list;
    }

    public List<JenisBas> getListjbas() {
        return listjbas;
    }

    public void setListjbas(List<JenisBas> listjbas) {
        this.listjbas = listjbas;
    }

    public List<JenisLaporan> getListjlaporan() {
        return listjlaporan;
    }

    public void setListjlaporan(List<JenisLaporan> listjlaporan) {
        this.listjlaporan = listjlaporan;
    }

    public int getIdbas() {
        return idbas;
    }

    public void setIdbas(int idbas) {
        this.idbas = idbas;
    }

    public int getTahun() {
        return tahun;
    }

    public void setTahun(int tahun) {
        this.tahun = tahun;
    }

    public int getIdjnslaporan() {
        return idjnslaporan;
    }

    public void setIdjnslaporan(int idjnslaporan) {
        this.idjnslaporan = idjnslaporan;
    }

    public AkunEliminasiEjbHome getAkeliminasiEjbHome() {
        return akeliminasiEjbHome;
    }

    public void setAkeliminasiEjbHome(AkunEliminasiEjbHome akeliminasiEjbHome) {
        this.akeliminasiEjbHome = akeliminasiEjbHome;
    }

    public JenisBasEjbHome getJenisBasEjbHome() {
        return jenisBasEjbHome;
    }

    public void setJenisBasEjbHome(JenisBasEjbHome jenisBasEjbHome) {
        this.jenisBasEjbHome = jenisBasEjbHome;
    }

    public JenisLaporanEjbHome getJenisLaporanEjbHome() {
        return jenisLaporanEjbHome;
    }

    public void setJenisLaporanEjbHome(JenisLaporanEjbHome jenisLaporanEjbHome) {
        this.jenisLaporanEjbHome = jenisLaporanEjbHome;
    }

    public List<AkunEliminasi> getListkode() {
        return listkode;
    }

    public void setListkode(List<AkunEliminasi> listkode) {
        this.listkode = listkode;
    }

    public List<Periode> getListperiode() {
        return listperiode;
    }

    public void setListperiode(List<Periode> listperiode) {
        this.listperiode = listperiode;
    }

    public List<AkunEliminasi> getListNasional() {
        return listNasional;
    }

    public void setListNasional(List<AkunEliminasi> listProv) {
        this.listNasional = listNasional;
    }

    public List<AkunEliminasi> getListWilayah() {
        return listWilayah;
    }

    public void setListWilayah(List<AkunEliminasi> listWilayah) {
        this.listWilayah = listWilayah;
    }

    public List<AkunEliminasi> getListProvinsi() {
        return listProvinsi;
    }

    public void setListProvinsi(List<AkunEliminasi> listProvinsi) {
        this.listProvinsi = listProvinsi;
    }

    public String getKdPeriode() {
        return kdPeriode;
    }

    public void setKdPeriode(String kdPeriode) {
        this.kdPeriode = kdPeriode;
    }

    public List<ReferensiPemda> getListProv() {
        return listProv;
    }

    public void setListProv(List<ReferensiPemda> listProv) {
        this.listProv = listProv;
    }

    public String getKdPemda() {
        return kdPemda;
    }

    public void setKdPemda(String kdPemda) {
        this.kdPemda = kdPemda;
    }

    public List<ReferensiWilayah> getListDataWilayah() {
        return listDataWilayah;
    }

    public void setListDataWilayah(List<ReferensiWilayah> listDataWilayah) {
        this.listDataWilayah = listDataWilayah;
    }

    public String getKdWilayah() {
        return kdWilayah;
    }

    public void setKdWilayah(String kdWilayah) {
        this.kdWilayah = kdWilayah;
    }

    public List<KategoriPemda> getListkatpemda() {
        return listkatpemda;
    }

    public void setListkatpemda(List<KategoriPemda> listkatpemda) {
        this.listkatpemda = listkatpemda;
    }

    public List<JenisTransfer> getListjtransfer() {
        return listjtransfer;
    }

    public void setListjtransfer(List<JenisTransfer> listjtransfer) {
        this.listjtransfer = listjtransfer;
    }

    public String getKdp() {
        return kdp;
    }

    public void setKdp(String kdp) {
        this.kdp = kdp;
    }

    public HeaderResiprokal getHd() {
        return hd;
    }

    public void setHd(HeaderResiprokal hd) {
        this.hd = hd;
    }

    public JenisBas getJb() {
        return jb;
    }

    public void setJb(JenisBas jb) {
        this.jb = jb;
    }

    public ReferensiPemda getRp() {
        return rp;
    }

    public void setRp(ReferensiPemda rp) {
        this.rp = rp;
    }

    public JenisLaporan getJl() {
        return jl;
    }

    public void setJl(JenisLaporan jl) {
        this.jl = jl;
    }

    public String getNamaprov() {
        return namaprov;
    }

    public void setNamaprov(String namaprov) {
        this.namaprov = namaprov;
    }

    public String getNamaperiode() {
        return namaperiode;
    }

    public void setNamaperiode(String namaperiode) {
        this.namaperiode = namaperiode;
    }

    public Periode getP() {
        return p;
    }

    public void setP(Periode p) {
        this.p = p;
    }

    public List<AkunEliminasi> getListProvinsiLak() {
        return listProvinsiLak;
    }

    public void setListProvinsiLak(List<AkunEliminasi> listProvinsiLak) {
        this.listProvinsiLak = listProvinsiLak;
    }

    public List<JenisLaporan> getListlak() {
        return listlak;
    }

    public void setListlak(List<JenisLaporan> listlak) {
        this.listlak = listlak;
    }

    public List<AkunEliminasi> getListNasionalLak() {
        return listNasionalLak;
    }

    public void setListNasionalLak(List<AkunEliminasi> listNasionalLak) {
        this.listNasionalLak = listNasionalLak;
    }

    public List<AkunEliminasi> getListWilayahLak() {
        return listWilayahLak;
    }

    public void setListWilayahLak(List<AkunEliminasi> listWilayahLak) {
        this.listWilayahLak = listWilayahLak;
    }

    public String getCOMPILE_FILE_NAME() {
        return COMPILE_FILE_NAME;
    }

    public void setCOMPILE_FILE_NAME(String COMPILE_FILE_NAME) {
        this.COMPILE_FILE_NAME = COMPILE_FILE_NAME;
    }

    @Override
    protected String getCompileFileName() {
        return this.COMPILE_FILE_NAME;
    }

    @Override
    protected String getCompileFileName2() {
        return this.COMPILE_FILE_NAME;
    }
    
     @Override
    protected String getCompileFileName3() {
        return this.COMPILE_FILE_NAME;
    }

}
