From 835830e13dd9e2803aaf36bbd39697dbed469864 Mon Sep 17 00:00:00 2001 From: salmanoe Date: Thu, 27 Oct 2022 11:08:59 +0700 Subject: [PATCH] Update ReportServiceImpl.java Perbaikan tertanda pengesahan cuti setara menkes --- .../medifirst2000/constants/Master.java | 12 +- .../medifirst2000/dao/PegawaiDao.java | 2 +- .../service/impl/ReportServiceImpl.java | 116 +++++++++++++++++- .../jrxml/lapPermohonanCuti2021.jrxml | 43 ++++--- .../jrxml/lapPermohonanCutiLuarNegeri.jrxml | 6 +- .../lapPermohonanCutiLuarNegeri2021.jrxml | 27 ++-- .../jrxml/lapPermohonanCutiNew.jrxml | 43 ++++--- 7 files changed, 194 insertions(+), 55 deletions(-) diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java index 204664b8..eed4776e 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/constants/Master.java @@ -70,6 +70,10 @@ public class Master { public static final Double HK_02_04_III_558_2015_5_B_C_D = 0.35; } + public static final class GolonganPegawai { + public static final Integer[] JF_AHLI_UTAMA = { 1, 2, 3 }; + } + public static final class IndikatorKinerja { public static final Integer KEPATUHAN_PELAYANAN_MEDIS = 674; public static final Integer KETEPATAN_KEHADIRAN = 357; @@ -235,7 +239,7 @@ public class Master { public static final Double PERSENTASE_TINDAKAN_PENUNJANG_BUKAN_ANASTESI = 30.0; public static final Double TARIF_REMUNERASI = 45000.0; } - + public static final class Logging { public static final String PRESENSI_PEGAWAI = "logging-presensi-pegawai"; } @@ -367,6 +371,10 @@ public class Master { } public static final class StatusPegawai { + public static final Integer CUTI_ALASAN_PENTING = 26; + public static final Integer CUTI_BESAR = 24; + public static final Integer CUTI_MELAHIRKAN = 25; + public static final Integer CUTI_SAKIT = 29; public static final Integer CUTI_TAHUNAN = 1; public static final Integer IZIN = 27; @@ -376,7 +384,7 @@ public class Master { public static final Integer[] SAKIT_ALASAN_PENTING = { 26, 29 }; public static final Integer[] TUGAS_LUAR = { 28 }; } - + public static final class SubKategoriPegawai { public static final Integer DOKTER_FARMAKOLOGI = 1; } diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PegawaiDao.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PegawaiDao.java index 6f796e80..7d8626e6 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PegawaiDao.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/PegawaiDao.java @@ -537,7 +537,7 @@ public interface PegawaiDao extends PagingAndSortingRepository @Param("tahun") String tahun); String strQryJabatanCetak = "select new map (pegawai.id as idPegawai, " + "pegawai.namaLengkap as nama, " - + "golongan.golonganPegawai as namaGolongan, " + "pegawai.noTlp as noTlp, " + + "golongan.id as idGolongan,golongan.golonganPegawai as namaGolongan, " + "pegawai.noTlp as noTlp, " + "pegawai.noHandphone as noHandphone, " + "agama.agama as agama, " + "pegawai.alamat as alamat, " + "detailKategoryPegawai.detailKategoryPegawai as detailKategoryPegawai, " + "dokumen.namaJudulDokumen as namaJudulDokumen, " + "eselon.eselon as eselon, " diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/ReportServiceImpl.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/ReportServiceImpl.java index 88e41a70..a4af0d08 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/ReportServiceImpl.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/ReportServiceImpl.java @@ -2075,8 +2075,12 @@ public class ReportServiceImpl extends BaseVoServiceImpl implements ReportServic result.put("satuTahunLalu", String.valueOf(now.getYear() - 1)); result.put("duaTahunLalu", String.valueOf(now.getYear() - 2)); + String labelTtdMenkes = "Menteri Kesehatan Republik Indonesia"; String menteriKesehatan = settingDataFixedDao.getSettingDataFixed("menteriKesehatan"); + String nipMenkes = null; + result.put("labelTtdMenkes", labelTtdMenkes); result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); Map atasan1 = pegawaiDao.findPegawaiById(idAtasan1); Map atasan2 = pegawaiDao.findPegawaiById(idAtasan2); @@ -2111,6 +2115,59 @@ public class ReportServiceImpl extends BaseVoServiceImpl implements ReportServic } PlanningPegawaiStatus planningPegawaiStatus = planningPegawaiStatusDao.findOne(noRecPlanning); + Map pegawai = pegawaiDao.findPegawaiById(planningPegawaiStatus.getPegawai().getId()); + + { + Integer statusPegawaiId = planningPegawaiStatus.getStatusPegawaiExec().getId(); + if (Master.StatusPegawai.CUTI_TAHUNAN == statusPegawaiId + || Master.StatusPegawai.CUTI_SAKIT == statusPegawaiId + || Master.StatusPegawai.CUTI_MELAHIRKAN == statusPegawaiId) { + if (Arrays.asList(Master.GolonganPegawai.JF_AHLI_UTAMA).contains(pegawai.get("idGolongan"))) { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiA1"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = arrCutiA1[2]; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } else { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiA2"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = arrCutiA1[2]; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } + } else if (Master.StatusPegawai.CUTI_BESAR == statusPegawaiId + || Master.StatusPegawai.CUTI_ALASAN_PENTING == statusPegawaiId) { + if (Arrays.asList(Master.GolonganPegawai.JF_AHLI_UTAMA).contains(pegawai.get("idGolongan"))) { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiB1"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = null; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } else { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiB2C"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = arrCutiA1[2]; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } + } + } // Get data statistik seluruh pengajuan cuti List> listDataCutiBesar = planningPegawaiStatusDao @@ -2198,7 +2255,6 @@ public class ReportServiceImpl extends BaseVoServiceImpl implements ReportServic } result.put("listDate", tgl); if (CommonUtil.isNotNullOrEmpty(planningPegawaiStatus.getPegawai())) { - Map pegawai = pegawaiDao.findPegawaiById(planningPegawaiStatus.getPegawai().getId()); if (CommonUtil.isNotNullOrEmpty(pegawai.get("tglMasuk"))) { result.put("masaKerja", pegawaiService.hitungMasaKerja((Date) pegawai.get("tglMasuk"))); result.put("tglMasuk", new SimpleDateFormat("dd MMMM yyyy", new Locale("id")) @@ -2247,8 +2303,12 @@ public class ReportServiceImpl extends BaseVoServiceImpl implements ReportServic String jabatanAtasan1, String atasan2, String nipPnsAtasan2, String jabatanAtasan2, Integer idKaRu) { Map result = new HashMap(); + String labelTtdMenkes = "Menteri Kesehatan Republik Indonesia"; String menteriKesehatan = settingDataFixedDao.getSettingDataFixed("menteriKesehatan"); + String nipMenkes = null; + result.put("labelTtdMenkes", labelTtdMenkes); result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); // Map atasan1 = pegawaiDao.findPegawaiById(idAtasan1); // Map atasan2 = pegawaiDao.findPegawaiById(idAtasan2); @@ -2285,6 +2345,59 @@ public class ReportServiceImpl extends BaseVoServiceImpl implements ReportServic } PlanningPegawaiStatus planningPegawaiStatus = planningPegawaiStatusDao.findOne(noRecPlanning); + Map pegawai = pegawaiDao.findPegawaiById(planningPegawaiStatus.getPegawai().getId()); + + { + Integer statusPegawaiId = planningPegawaiStatus.getStatusPegawaiExec().getId(); + if (Master.StatusPegawai.CUTI_TAHUNAN == statusPegawaiId + || Master.StatusPegawai.CUTI_SAKIT == statusPegawaiId + || Master.StatusPegawai.CUTI_MELAHIRKAN == statusPegawaiId) { + if (Arrays.asList(Master.GolonganPegawai.JF_AHLI_UTAMA).contains(pegawai.get("idGolongan"))) { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiA1"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = arrCutiA1[2]; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } else { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiA2"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = arrCutiA1[2]; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } + } else if (Master.StatusPegawai.CUTI_BESAR == statusPegawaiId + || Master.StatusPegawai.CUTI_ALASAN_PENTING == statusPegawaiId) { + if (Arrays.asList(Master.GolonganPegawai.JF_AHLI_UTAMA).contains(pegawai.get("idGolongan"))) { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiB1"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = null; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } else { + String cutiA1 = settingDataFixedDao.getSettingDataFixed("cutiB2C"); + String[] arrCutiA1 = cutiA1.split("_"); + labelTtdMenkes = arrCutiA1[0]; + menteriKesehatan = arrCutiA1[1]; + nipMenkes = arrCutiA1[2]; + + result.put("labelTtdMenkes", labelTtdMenkes); + result.put("menteriKesehatan", menteriKesehatan); + result.put("nipMenkes", nipMenkes); + } + } + } // Get data statistik seluruh pengajuan cuti List> listDataCutiBesar = planningPegawaiStatusDao @@ -2367,7 +2480,6 @@ public class ReportServiceImpl extends BaseVoServiceImpl implements ReportServic } result.put("listDate", tgl); if (CommonUtil.isNotNullOrEmpty(planningPegawaiStatus.getPegawai())) { - Map pegawai = pegawaiDao.findPegawaiById(planningPegawaiStatus.getPegawai().getId()); result.put("nama", pegawai.get("nama")); result.put("nip", pegawai.get("nipPns")); result.put("pangkat", pegawai.get("namaGolongan")); diff --git a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCuti2021.jrxml b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCuti2021.jrxml index 2e99add4..251248c9 100644 --- a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCuti2021.jrxml +++ b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCuti2021.jrxml @@ -67,6 +67,8 @@ + + @@ -1043,26 +1045,17 @@ - - - - - - - - - - + - + @@ -1071,56 +1064,56 @@ - + - + - + - + - + - + - + - + @@ -1227,6 +1220,18 @@ + + + + + + + + + + + + diff --git a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri.jrxml b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri.jrxml index 639b3b72..4298381a 100644 --- a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri.jrxml +++ b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri.jrxml @@ -74,6 +74,8 @@ + + @@ -1163,7 +1165,7 @@ - + @@ -1181,7 +1183,7 @@ - + diff --git a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri2021.jrxml b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri2021.jrxml index 68c5ef83..cee33c0e 100644 --- a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri2021.jrxml +++ b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiLuarNegeri2021.jrxml @@ -74,6 +74,8 @@ + + @@ -1041,21 +1043,12 @@ - + - - - - - - - - - @@ -1164,6 +1157,20 @@ + + + + + + + + + + + + + + diff --git a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiNew.jrxml b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiNew.jrxml index efe3fc65..a5b81eed 100644 --- a/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiNew.jrxml +++ b/jasamedika-reporting/src/main/webapp/WEB-INF/templates/jrxml/lapPermohonanCutiNew.jrxml @@ -67,8 +67,10 @@ + + - + @@ -1151,15 +1153,6 @@ - - - - - - - - - @@ -1170,7 +1163,7 @@ - + @@ -1179,56 +1172,56 @@ - + - + - + - + - + - + - + - + @@ -1332,6 +1325,18 @@ + + + + + + + + + + + +