From ef2fd5ea12a1b4bb97c146d6a746632f10ce3a7a Mon Sep 17 00:00:00 2001 From: Salman Manoe Date: Fri, 19 Apr 2024 13:50:37 +0700 Subject: [PATCH] Clean code --- .../medifirst2000/dao/LogbookDokterDao.java | 8 +- .../service/IndekKinerjaService.java | 20 +- .../service/impl/IndekKinerjaServiceImpl.java | 1544 +++++++---------- .../entities/DetailLogbookDokter.java | 75 +- .../medifirst2000/entities/LogbookDokter.java | 193 +-- 5 files changed, 675 insertions(+), 1165 deletions(-) diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/LogbookDokterDao.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/LogbookDokterDao.java index efb5e402..f04fbd6b 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/LogbookDokterDao.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/dao/LogbookDokterDao.java @@ -1,11 +1,7 @@ package com.jasamedika.medifirst2000.dao; -import org.springframework.data.repository.PagingAndSortingRepository; -import org.springframework.stereotype.Repository; - import com.jasamedika.medifirst2000.entities.LogbookDokter; +import org.springframework.data.jpa.repository.JpaRepository; -@Repository("LogbookDokterDao") -public interface LogbookDokterDao extends PagingAndSortingRepository { - +public interface LogbookDokterDao extends JpaRepository { } diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/IndekKinerjaService.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/IndekKinerjaService.java index 58844556..631e0e93 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/IndekKinerjaService.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/IndekKinerjaService.java @@ -1,16 +1,11 @@ package com.jasamedika.medifirst2000.service; +import com.jasamedika.medifirst2000.entities.Pegawai; +import com.jasamedika.medifirst2000.vo.*; + import java.util.List; import java.util.Map; -import com.jasamedika.medifirst2000.entities.Pegawai; -import com.jasamedika.medifirst2000.vo.IndekKinerjaVO; -import com.jasamedika.medifirst2000.vo.IndeksKinerjaIndividuCustomVO; -import com.jasamedika.medifirst2000.vo.IndeksKinerjaIndividuVO; -import com.jasamedika.medifirst2000.vo.MapKalenderToHariLiburVO; -import com.jasamedika.medifirst2000.vo.NilaiIndexKinerjaIndividuVO; -import com.jasamedika.medifirst2000.vo.TabelAcuanIndeksIKIVO; - public interface IndekKinerjaService { Map saveIndekKinerja(List vo); @@ -58,7 +53,7 @@ public interface IndekKinerjaService { Map rekapIKI(Integer ruanganId, String periode); - public List splitIdProdukAdministrasi(); + List splitIdProdukAdministrasi(); Map rekapPoin(String periode, int idPegawai); @@ -84,7 +79,8 @@ public interface IndekKinerjaService { List> getAllTindakanByDokterReport(String periode, Integer idPegawai); - List> getAllTindakanByDokterReportReview(String periode, Integer idPegawai, Integer idAlternatif); + List> getAllTindakanByDokterReportReview(String periode, Integer idPegawai, + Integer idAlternatif); List> getAllTindakanDokter(String periode, Integer idPegawai); @@ -93,8 +89,8 @@ public interface IndekKinerjaService { List> findPatientDetailForEveryTindakan(Integer idProduk, Integer idKelas, Integer idPegawai, String tgl, Boolean ffs); - List> findPatientDetailForEveryTindakanReview(Integer idProduk, Integer idKelompokPasien, Integer idKelas, - Integer idPegawai, String tgl, Boolean ffs, Double diskon, Integer statusDiskon); + List> findPatientDetailForEveryTindakanReview(Integer idProduk, Integer idKelompokPasien, + Integer idKelas, Integer idPegawai, String tgl, Boolean ffs, Double diskon, Integer statusDiskon); List> findPatientDetailForEveryTindakanReview(Integer idPegawai, String tgl, Boolean ffs); diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/IndekKinerjaServiceImpl.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/IndekKinerjaServiceImpl.java index f3b23889..9798f305 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/IndekKinerjaServiceImpl.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/impl/IndekKinerjaServiceImpl.java @@ -1,71 +1,12 @@ package com.jasamedika.medifirst2000.service.impl; -import java.text.DateFormat; -import java.text.DecimalFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.DayOfWeek; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.ZoneId; -import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Optional; - -import org.joda.time.Chronology; -import org.joda.time.chrono.ISOChronology; -import org.joda.time.chrono.IslamicChronology; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - import com.jasamedika.medifirst2000.constants.Master; import com.jasamedika.medifirst2000.converter.BaseConverterImpl; -import com.jasamedika.medifirst2000.dao.CustomIndexKerjaDao; -import com.jasamedika.medifirst2000.dao.DetailLogbookDokterDao; -import com.jasamedika.medifirst2000.dao.HargaNettoProdukByKelasDDao; -import com.jasamedika.medifirst2000.dao.IkiDanRemunerasiDao; -import com.jasamedika.medifirst2000.dao.IndekKinerjaDao; -import com.jasamedika.medifirst2000.dao.IndeksKinerjaIndividuDao; -import com.jasamedika.medifirst2000.dao.LogbookDokterDao; -import com.jasamedika.medifirst2000.dao.MapKalenderToHariLiburDao; -import com.jasamedika.medifirst2000.dao.MapPegawaiLaboratRadiologiDao; -import com.jasamedika.medifirst2000.dao.MapRuanganToProdukDao; -import com.jasamedika.medifirst2000.dao.MonitoringAbsenDao; -import com.jasamedika.medifirst2000.dao.NilaiIndexKinerjaIndividuDao; -import com.jasamedika.medifirst2000.dao.PegawaiDao; -import com.jasamedika.medifirst2000.dao.PelayananPasienDetailDao; -import com.jasamedika.medifirst2000.dao.RevIndekKinerjaDao; -import com.jasamedika.medifirst2000.dao.SettingDataFixedDao; -import com.jasamedika.medifirst2000.dao.TabelAcuanIndeksIKIDao; -import com.jasamedika.medifirst2000.dao.UraianTugasTransaksiDao; +import com.jasamedika.medifirst2000.dao.*; import com.jasamedika.medifirst2000.dao.custom.IndeksKinerjaDaoCustom; import com.jasamedika.medifirst2000.dao.custom.RevIndeksKinerjaDaoCustom; -import com.jasamedika.medifirst2000.entities.CustomIndexKerja; -import com.jasamedika.medifirst2000.entities.CustomUraianKerja; -import com.jasamedika.medifirst2000.entities.DetailLogbookDokter; -import com.jasamedika.medifirst2000.entities.IndekKinerja; -import com.jasamedika.medifirst2000.entities.IndeksKinerjaIndividu; -import com.jasamedika.medifirst2000.entities.Jabatan; -import com.jasamedika.medifirst2000.entities.Kalender; -import com.jasamedika.medifirst2000.entities.KomponenIKI; -import com.jasamedika.medifirst2000.entities.LogbookDokter; -import com.jasamedika.medifirst2000.entities.LoginUser; -import com.jasamedika.medifirst2000.entities.MapKalenderToHariLibur; -import com.jasamedika.medifirst2000.entities.MapPegawaiLaboratRadiologi; -import com.jasamedika.medifirst2000.entities.MapUraianTugasToRincianKegiatan; -import com.jasamedika.medifirst2000.entities.NilaiIndexKinerjaIndividu; -import com.jasamedika.medifirst2000.entities.Pegawai; -import com.jasamedika.medifirst2000.entities.TabelAcuanIndeksIKI; +import com.jasamedika.medifirst2000.entities.*; +import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.IndekKinerjaService; import com.jasamedika.medifirst2000.service.LoginUserService; import com.jasamedika.medifirst2000.service.MonitoringAbsenService; @@ -73,23 +14,26 @@ import com.jasamedika.medifirst2000.util.CommonUtil; import com.jasamedika.medifirst2000.util.CurrencyUtil; import com.jasamedika.medifirst2000.util.DateUtil; import com.jasamedika.medifirst2000.util.JsonUtil; -import com.jasamedika.medifirst2000.vo.CustomIndexKerjaVO; -import com.jasamedika.medifirst2000.vo.CustomUraianKerjaVO; -import com.jasamedika.medifirst2000.vo.IndekKinerjaVO; -import com.jasamedika.medifirst2000.vo.IndeksKinerjaIndividuCustomVO; -import com.jasamedika.medifirst2000.vo.IndeksKinerjaIndividuVO; -import com.jasamedika.medifirst2000.vo.KomponenIKIVO; -import com.jasamedika.medifirst2000.vo.MapKalenderToHariLiburVO; -import com.jasamedika.medifirst2000.vo.MapUraianTugasToRincianKegiatanVO; -import com.jasamedika.medifirst2000.vo.NilaiIndexKinerjaIndividuVO; -import com.jasamedika.medifirst2000.vo.PegawaiVO; -import com.jasamedika.medifirst2000.vo.TabelAcuanIndeksIKIVO; +import com.jasamedika.medifirst2000.vo.*; +import org.joda.time.Chronology; +import org.joda.time.chrono.ISOChronology; +import org.joda.time.chrono.IslamicChronology; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.*; +import java.time.format.DateTimeFormatter; +import java.util.*; /** * Implement class for IndekKinerjaService * * @author Generator - * @param */ @Service("indekKinerjaService") public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekKinerjaService { @@ -196,11 +140,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } @Override - @Transactional(readOnly = false) + @Transactional public Map saveIndekKinerja(List vo) { - Map result = new HashMap(); + Map result = new HashMap<>(); for (IndekKinerjaVO indekKinerjaVO : vo) { - if (indekKinerjaVO.getIsCustom() == true) { + if (indekKinerjaVO.getIsCustom()) { CustomIndexKerja model = new CustomIndexKerja(); try { model = customIndexKerjaConverter.transferVOToModel(indekKinerjaVO.ToMap(), model); @@ -211,7 +155,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .transferVOToModel(indekKinerjaVO.getUraianTugas().ToMap(), new CustomUraianKerja())); } } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); + throw new ServiceVOException(e.getMessage()); } model.setValue(indekKinerjaVO.getNilai()); model.setTanggal(indekKinerjaVO.getTanggal()); @@ -242,12 +186,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map findPegawaiByRuangan(Integer tahun, Integer bulan, Integer pegawai) { - Map result = new HashMap(); + Map result = new HashMap<>(); try { result.put("items", JsonUtil.ToMaps(indekKinerjaDao.findKinerja(tahun, bulan, pegawai))); } catch (IllegalArgumentException | IllegalAccessException e) { - e.printStackTrace(); + throw new ServiceVOException(e.getMessage()); } return result; } @@ -256,10 +200,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public List> findAllTindakanByPeriod(Integer idPegawai) { Pegawai pegawai = this.getPegawaiByUserLogin(); List listException = getDetailProdukAdministrasi(pegawai); - List> result = new ArrayList<>(); + List> result; // check dokter patologi anatomi, lab klinik, radiologi, atw bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(pegawai.getId())) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK) @@ -275,29 +219,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK listDJP.addAll(listException); } - String prevMonth = ""; - Integer startMonth = 0; - Integer startYear = 0; - // start period - Calendar startCal = Calendar.getInstance(); - if (startCal.get(Calendar.MONTH) == 0) { // jika januari - startCal.add(Calendar.YEAR, -1); // tahun awalnya adalah tahun lalu - startMonth = 12; - startYear = startCal.get(Calendar.YEAR); - } else { // jika bulan februari dst - // karena dimulai dari array 0 - startMonth = startCal.get(Calendar.MONTH); - if (startMonth < 10) { - prevMonth = "0" + startMonth; - } - startYear = startCal.get(Calendar.YEAR); - } - String startPeriod = startYear + "-" + prevMonth; + String startPeriod = getStartPeriod(); // end period String thisMonth = ""; Calendar endCal = Calendar.getInstance(); // karena dimulai dari array 0 - Integer endMonth = endCal.get(Calendar.MONTH) + 1; + int endMonth = endCal.get(Calendar.MONTH) + 1; if (endMonth < 10) { thisMonth = "0" + endMonth; } @@ -311,15 +238,34 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK return result; } + private static String getStartPeriod() { + String prevMonth = ""; + int startMonth; + int startYear; + // start period + Calendar startCal = Calendar.getInstance(); + if (startCal.get(Calendar.MONTH) == Calendar.JANUARY) { // jika januari + startCal.add(Calendar.YEAR, -1); // tahun awalnya adalah tahun lalu + } else { // jika bulan februari dst + // karena dimulai dari array 0 + startMonth = startCal.get(Calendar.MONTH); + if (startMonth < 10) { + prevMonth = "0" + startMonth; + } + } + startYear = startCal.get(Calendar.YEAR); + return startYear + "-" + prevMonth; + } + @Override public List> findTindakanByUserId(Integer idPegawai, String startDate, String endDate, Integer idProduk) { Pegawai pegawai = this.getPegawaiByUserLogin(); List listException = getDetailProdukAdministrasi(pegawai); - List> result = new ArrayList<>(); + List> result; // check dokter patologi anatomi, lab klinik, radiologi, atw bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(pegawai.getId())) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK) @@ -347,10 +293,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public List> findByUserId(String startDate, String endDate) { Pegawai pegawai = this.getPegawaiByUserLogin(); List listException = getDetailProdukAdministrasi(pegawai); - List> result = new ArrayList<>(); + List> result; // check dokter patologi anatomi, lab klinik, radiologi, atw bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(pegawai.getId())) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK) @@ -374,15 +320,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public List> findTindakanByIdUserAndPeriod(String month) { Date start = DateUtil.startMonth(month); Date end = DateUtil.endMonth(month); - Pegawai pegawai = new Pegawai(); - pegawai = this.getPegawaiByUserLogin(); - List> result = new ArrayList>(); - List> hasil = new ArrayList>(); + Pegawai pegawai = this.getPegawaiByUserLogin(); + List> result; + List> hasil = new ArrayList<>(); List listDetailException = getDetailProdukAdministrasi(pegawai); for (int i = 1; i <= 31; i++) { - Map map = new HashMap(); + Map map = new HashMap<>(); - String date = ""; + String date; if (i < 10) { date = month + "-0" + i; } else { @@ -427,8 +372,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public Double getPoin(Double totalTarif, Double percentage, Double tarif) { DecimalFormat df = new DecimalFormat("#.##"); Double poin = (totalTarif * percentage) / tarif; - Double result = Double.parseDouble(df.format(poin)); - return result; + return Double.parseDouble(df.format(poin)); } /** @@ -451,8 +395,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } else { DecimalFormat df = new DecimalFormat("#.##"); Double poin = (totalTarif * percentage) / tarif; - Double result = Double.parseDouble(df.format(poin)); - return result; + return Double.parseDouble(df.format(poin)); } } @@ -480,13 +423,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public List> findCountTindakanByIdUserAndPeriod(String startDate, String endDate) { Pegawai pegawai = this.getPegawaiByUserLogin(); - List> datas = new ArrayList<>(); + List> datas; Long size; List listDetailException = getDetailProdukAdministrasi(pegawai.getId()); // check dokter patologi anatomi, lab klinik, radiologi, atw bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(pegawai.getId())) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK) @@ -504,15 +447,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK datas = revIndekKinerjaDao.findCountTindakanByIdUser(pegawai.getId(), startDate, endDate, listDJP); size = revIndekKinerjaDao.findTotalTindakan(pegawai.getId(), startDate, endDate, listDJP); - List> hasil = new ArrayList>(); + List> hasil = new ArrayList<>(); for (Map data : datas) { - Map result = new HashMap(); long jumlah = 0; if (data.get("count") != null) { jumlah = (long) data.get("count"); } - result.put("namaProduk", data.get("namaProduk")); - result.put("count", data.get("count")); double persen = (((double) jumlah / (double) size) * 100); persen = (double) Math.round(persen * 100) / 100; data.put("persen", persen); @@ -527,13 +467,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public List> findCountTindakanByIdUserAndPeriod(Integer idPegawai, String startDate, String endDate) { Pegawai pegawai = this.getPegawaiByUserLogin(); - List> datas = new ArrayList<>(); + List> datas; Long size; List listDetailException = getDetailProdukAdministrasi(idPegawai); // check dokter patologi anatomi, lab klinik, radiologi, atw bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(pegawai.getId())) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK) @@ -551,15 +491,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK datas = revIndekKinerjaDao.findCountTindakanByIdUser(idPegawai, startDate, endDate, listDJP); size = revIndekKinerjaDao.findTotalTindakan(idPegawai, startDate, endDate, listDJP); - List> hasil = new ArrayList>(); + List> hasil = new ArrayList<>(); for (Map data : datas) { - Map result = new HashMap(); long jumlah = 0; if (data.get("count") != null) { jumlah = (long) data.get("count"); } - result.put("namaProduk", data.get("namaProduk")); - result.put("count", data.get("count")); double persen = (((double) jumlah / (double) size) * 100); persen = (double) Math.round(persen * 100) / 100; data.put("persen", persen); @@ -573,20 +510,18 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map detailPoin(String tgl, Integer idPegawai) { - Map result = new HashMap(); + Map result = new HashMap<>(); Pegawai pgw = pegawaiDao.findOne(idPegawai); - Double total = 0.0; - List> datas = new ArrayList<>(); - List> temp = new ArrayList<>(); + double total = 0.0; List listDetailException = getDetailProdukAdministrasi(pgw); - temp = indeksKinerjaDaoCustom.findTindakanByIdUser(idPegawai, tgl, splitIdProdukAdministrasi(), false, - listDetailException); + List> temp = indeksKinerjaDaoCustom.findTindakanByIdUser(idPegawai, tgl, + splitIdProdukAdministrasi(), false, listDetailException); - datas.addAll(temp); + List> datas = new ArrayList<>(temp); for (Map data : datas) { int idDetail = (int) data.get("detailId"); - Double pointQty = 0.0; + double pointQty = 0.0; Double percentage = 0.0; Double tarif = 0.0; @@ -617,11 +552,9 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map getIndekKinerjaKuantitasData(String periode, Integer id, Boolean isNew) { - Map result = new HashMap(); - Map pelayananPasien = new HashMap(); - List> listResult = new ArrayList>(); - if (isNew == null) - isNew = false; + Map result = new HashMap<>(); + Map pelayananPasien; + List> listResult = new ArrayList<>(); Double total = 0.0; Jabatan jabatan = pegawaiDao.findJabatanInternalByIdPegawai(id);// jabatanFungsional @@ -639,7 +572,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK for (Map data : temp) { int idRincianKegiatan = (int) data.get("idRincianKegiatan"); - Double hasil = 0.0; + Double hasil; if (idRincianKegiatan == getIdPelayananPasien()) { pelayananPasien = kuantitasPelayanan(periode, id, 10); listResult.add(pelayananPasien); @@ -670,7 +603,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } public Map kuantitasPelayanan(String periode, int idPegawai, int rincianKegiatan) { - Map result = new HashMap(); + Map result = new HashMap<>(); Double nilai = 0.0; Double totalAll = 0.0; Double hasil = 0.0; @@ -711,32 +644,31 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map rekapPoin(String periode, int idPegawai) { Pegawai pgw = pegawaiDao.findOne(idPegawai); - Map result = new HashMap(); + Map result = new HashMap<>(); Double nilai = 0.0; - Double totalAll = 0.0; + double totalAll = 0.0; List listDetailException = getDetailProdukAdministrasi(pgw); int maxday = monitoringAbsenService.iterateDate(periode + "-01"); for (int i = 1; i <= maxday; i++) { - String date = ""; - Double total = 0.0; + String date; + double total = 0.0; if (i < 10) { date = periode + "-0" + i; } else { date = periode + "-" + i; } - List> datas = new ArrayList<>(); - List> temp = new ArrayList<>(); - List> temps = new ArrayList<>(); + List> temp; + List> temps; temp = indeksKinerjaDaoCustom.findAllProdukPerTanggal(idPegawai, date, splitIdProdukAdministrasi(), false, null, null, listDetailException); temps = indeksKinerjaDaoCustom.findAllProdukPerTanggal(idPegawai, date, splitIdProdukAdministrasi(), true, null, null, listDetailException); - datas.addAll(temp); + List> datas = new ArrayList<>(temp); temp.addAll(temps); for (Map data : datas) { int idDetail = (int) data.get("detailId"); - Double pointQty = 0.0; + double pointQty = 0.0; Double percentage = 0.0; Double tarif = 0.0; @@ -767,8 +699,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Double getNilai(Double jumlah, Double target) { - Double result = jumlah / target; - if (result.isNaN()) { + double result = jumlah / target; + if (Double.isNaN(result)) { result = 0.0; } return result; @@ -776,8 +708,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Double getHasil(Double nilai, Double bobot) { - Double result = (nilai * bobot); - if (result.isNaN()) { + double result = (nilai * bobot); + if (Double.isNaN(result)) { result = 0.0; } return result; @@ -785,8 +717,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public int getIdPelayananPasien() { String temp = indekKinerjaDao.findIdPelayananPasien(); - int id = Integer.parseInt(temp); - return id; + return Integer.parseInt(temp); } @Override @@ -794,7 +725,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK String periode = date.substring(0, 7); List> temp = uraianTugasTransaksiDao .findUraianTugasByPeriode(getPegawaiByUserLogin().getId(), periode); - List> result = new ArrayList>(); + List> result = new ArrayList<>(); for (Map data : temp) { if (CommonUtil.isNotNullOrEmpty(data.get("rincianKegiatanId"))) { @@ -821,7 +752,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map SaveTotalIndexKinerja(NilaiIndexKinerjaIndividuVO vo) { - Map result = new HashMap(); + Map result = new HashMap<>(); if (CommonUtil.isNotNullOrEmpty(vo)) { NilaiIndexKinerjaIndividu nilaiIndexKinerjaIndividu = nilaiIndexKinerjaIndividuConverter @@ -830,7 +761,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK nilaiIndexKinerjaIndividu.setPegawai(pegawai); if (CommonUtil.isNotNullOrEmpty(nilaiIndexKinerjaIndividu)) { NilaiIndexKinerjaIndividu model = nilaiIndexKinerjaIndividuDao.save(nilaiIndexKinerjaIndividu); - result.put(model.getPeriode() + "", model.noRec); + result.put(model.getPeriode(), model.noRec); } } return result; @@ -838,7 +769,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map saveIndekKinerjaIndividu(IndeksKinerjaIndividuVO vo) { - Map result = new HashMap(); + Map result = new HashMap<>(); if (CommonUtil.isNotNullOrEmpty(vo)) { IndeksKinerjaIndividu indekKinerjaIndividu = indekKinerjaIndividuConverter.transferVOToModel(vo, new IndeksKinerjaIndividu()); @@ -853,13 +784,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Map nilaiIKI = indekKinerjaDao.findNilaiIndeksKinerja(pegawai.getId(), periode); if (CommonUtil.isNotNullOrEmpty(indekKinerjaIndividu)) { IndeksKinerjaIndividu model = indeksKinerjaIndividuDao.save(indekKinerjaIndividu); - result.put(model.getPeriode() + "", model.noRec); + result.put(model.getPeriode(), model.noRec); if (CommonUtil.isNotNullOrEmpty(model)) { if (CommonUtil.isNotNullOrEmpty(nilaiIKI)) { String noRec = (String) nilaiIKI.get("noRec"); nilaiIndexKinerjaIndividu.setNoRec(noRec); NilaiIndexKinerjaIndividu modell = nilaiIndexKinerjaIndividuDao.save(nilaiIndexKinerjaIndividu); - result.put(modell.getPeriode() + "", modell.noRec); + result.put(modell.getPeriode(), modell.noRec); } } nilaiIndexKinerjaIndividu.setPegawai(pegawai); @@ -875,9 +806,9 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map saveAllIndekKinerja(IndeksKinerjaIndividuCustomVO vo) { - Map result = new HashMap(); + Map result = new HashMap<>(); NilaiIndexKinerjaIndividu nilaiIndexKinerjaIndividu = new NilaiIndexKinerjaIndividu(); - Map nilaiIKI = new HashMap(); + Map nilaiIKI = new HashMap<>(); int state = 0; if (CommonUtil.isNotNullOrEmpty(vo)) { for (IndeksKinerjaIndividuVO temp : vo.getIndeksKinerjaIndividu()) { @@ -895,7 +826,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .transferVOToModel(temp.getNilaiIndexKinerjaIndividu(), new NilaiIndexKinerjaIndividu()); if (CommonUtil.isNotNullOrEmpty(indekKinerjaIndividu)) { IndeksKinerjaIndividu model = indeksKinerjaIndividuDao.save(indekKinerjaIndividu); - result.put(model.getPeriode() + "", model.noRec); + result.put(model.getPeriode(), model.noRec); state++; } nilaiIndexKinerjaIndividu.setPegawai(pegawai); @@ -909,7 +840,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (state == vo.getIndeksKinerjaIndividu().size()) { if (CommonUtil.isNotNullOrEmpty(nilaiIndexKinerjaIndividu)) { NilaiIndexKinerjaIndividu model = nilaiIndexKinerjaIndividuDao.save(nilaiIndexKinerjaIndividu); - result.put(model.getPeriode() + "", model.noRec); + result.put(model.getPeriode(), model.noRec); } } return result; @@ -917,7 +848,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map findKualitasAndInovasi(String periode, Integer idPegawai) { - Map result = new HashMap(); + Map result = new HashMap<>(); Map remun = ikiDanRemunerasiDao.findRemun(idPegawai, periode); if (CommonUtil.isNotNullOrEmpty(remun)) { result.put("status", true);// remun sudah dihitung @@ -941,7 +872,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map findKehadiran(String periode, Integer idPegawai) { - Map result = new HashMap(); + Map result = new HashMap<>(); Pegawai pegawai = pegawaiDao.findOne(idPegawai); if (CommonUtil.isNotNullOrEmpty(pegawai)) { @@ -975,15 +906,15 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map rekapIKI(Integer ruanganId, String periode) { - Map result = new HashMap(); - List> listIKI = new ArrayList>(); + Map result = new HashMap<>(); + List> listIKI; if (CommonUtil.isNotNullOrEmpty(ruanganId)) { listIKI = nilaiIndexKinerjaIndividuDao.findRekapitulasiIKI(ruanganId, periode); } else { listIKI = nilaiIndexKinerjaIndividuDao.findAllRekapitulasiIKI(periode); } Double jumlah = 0.0; - Integer index = 0; + int index = 0; String unitKerja = ""; for (Map data : listIKI) { index++; @@ -994,13 +925,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } result.put("listIKI", listIKI); result.put("unitKerja", unitKerja); - result.put("jumlah", jumlah / (index.doubleValue())); + result.put("jumlah", jumlah / ((double) index)); return result; } @Override public List> getIndekKinerjaKuantitasPerUnitKerja(String periode, Integer idUnitKerja) { - List> result = new ArrayList>(); + List> result = new ArrayList<>(); List listPegawai = monitoringAbsenDao.findPegawaiaAktifDanKaryawanByRuangan(idUnitKerja); for (Integer id : listPegawai) { Map pelayananPasien = kuantitasPelayanan(periode, id, getIdPelayananPasien()); @@ -1013,12 +944,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public List splitIdProdukAdministrasi() { - List listId = new ArrayList(); + List listId = new ArrayList<>(); String idJenisProdukAdministrasi = indekKinerjaDao.findIdJenisProdukAdministrasi(); if (CommonUtil.isNotNullOrEmpty(idJenisProdukAdministrasi)) { - String idSplit[] = idJenisProdukAdministrasi.split(","); - for (int i = 0; i < idSplit.length; i++) { - listId.add(Integer.parseInt(idSplit[i])); + String[] idSplit = idJenisProdukAdministrasi.split(","); + for (String s : idSplit) { + listId.add(Integer.parseInt(s)); } } return listId; @@ -1039,7 +970,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public List getDetailProdukAdministrasi(Pegawai pgw) { List maps = mapPegawaiLaboratRadiologiDao.findAllDataObject(); - Boolean isLab = false; + boolean isLab = false; if (CommonUtil.isNotNullOrEmpty(maps)) { if (CommonUtil.isNotNullOrEmpty(pgw.getId())) { for (MapPegawaiLaboratRadiologi tmps : maps) { @@ -1061,7 +992,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public List getDetailProdukAdministrasi(Integer idPegawai) { List maps = mapPegawaiLaboratRadiologiDao.findAllDataObject(); - Boolean isLab = false; + boolean isLab = false; if (CommonUtil.isNotNullOrEmpty(maps)) { if (CommonUtil.isNotNullOrEmpty(idPegawai)) { for (MapPegawaiLaboratRadiologi tmps : maps) { @@ -1082,7 +1013,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map saveTabelAcuanIndeksIKI(List vos) { - Map result = new HashMap(); + Map result = new HashMap<>(); for (TabelAcuanIndeksIKIVO vo : vos) { TabelAcuanIndeksIKI model = tabelAcuanIndeksIKIConverter.transferVOToModel(vo, new TabelAcuanIndeksIKI()); if (CommonUtil.isNotNullOrEmpty(model)) { @@ -1096,15 +1027,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public List> findAcuanIndeksIKI() { - List> result = new ArrayList>(); + List> result = new ArrayList<>(); List datas = tabelAcuanIndeksIKIDao.findAllAcuan(); for (TabelAcuanIndeksIKI data : datas) { try { result.add(data.ToMap()); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); + } catch (IllegalArgumentException | IllegalAccessException e) { + throw new ServiceVOException(e.getMessage()); } } return result; @@ -1112,21 +1041,20 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Double getIndeksIKI(Double nilai) { - Double result = indekKinerjaDao.findIndeksIKI(nilai); - return result; + return indekKinerjaDao.findIndeksIKI(nilai); } @Override @Transactional public List> getAllTindakanByDokter(String periode, Integer idPegawai) { List> results = new ArrayList<>(); - List> tindakans = new ArrayList<>(); + List> tindakans; Pegawai pgw = pegawaiDao.findOne(idPegawai); List listDetailException = getDetailProdukAdministrasi(pgw); String month = periode.substring(0, 7); // Check dokter radiologi/klinik/patologi anatom/bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -1150,7 +1078,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Integer bpjsKelPasienId = Integer.valueOf(settingDataFixedDao.getSettingDataFixed("bpjsRemun")); String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); String departementRawatInap = settingDataFixedDao.getSettingDataFixed("KdDepartemenInstalasiRawatInap"); String departementICU = settingDataFixedDao.getSettingDataFixed("KdInstalasiICU"); @@ -1194,13 +1122,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double pointQty = 0.0; - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + double pointQty; + double percentage; + double tarif; + Double harga; Long count = (long) 0; - Double point = 0.0; + Double point; tarif = 45000.0; List> datas = revIndeksKinerjaDaoCustom.findAllProdukPerPeriode(idPegawai, periode, @@ -1208,7 +1135,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK (Integer) tindakan.get("idJenisPelaksana"), listKelas2Down, listAllDepartemen, listInapDepartemen, listJalanDepartemen, bpjsKelPasienId, drPatologiAnatomiList); - result.putAll(tindakan); + Map result = new HashMap<>(tindakan); if (CommonUtil.isNotNullOrEmpty(datas)) { for (Map data : datas) { if (CommonUtil.isNotNullOrEmpty(data.get("count"))) { @@ -1243,10 +1170,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK harga = (Double) tindakan.get("harga"); } - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } + point = getPoin(harga, percentage, tarif); + result.put("poin", point); if (CommonUtil.isNotNullOrEmpty(datas)) { result.put("idPegawai", idPegawai); @@ -1311,7 +1236,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List drPatologiAnatomiList = pegawaiDao .getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI); - List> DetailPasien = new ArrayList<>(); + List> DetailPasien; if (listKategoriDokterLuar.contains(kategoryPgw)) { DetailPasien = revIndeksKinerjaDaoCustom.findPatientDetailDokterLuarForEveryTindakan(idPegawai, tgl, @@ -1331,9 +1256,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listFriday = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, true); List listSK = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, false); List listRanap = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, null); - List> DetailPasien = indeksKinerjaDaoCustom.findPatientDetailForEveryTindakanAll(idProduk, - harga, idPegawai, periode, listFriday, listSK, listRanap); - return DetailPasien; + return indeksKinerjaDaoCustom.findPatientDetailForEveryTindakanAll(idProduk, harga, idPegawai, periode, + listFriday, listSK, listRanap); } @Override @@ -1341,9 +1265,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listFriday = indeksKinerjaDaoCustom.convertMonthtoDateCustom(tgl, true); List listSK = indeksKinerjaDaoCustom.convertMonthtoDateCustom(tgl, false); List listRanap = indeksKinerjaDaoCustom.convertMonthtoDateCustom(tgl, null); - List> DetailPasien = indeksKinerjaDaoCustom - .findPatientDetailForEveryTindakanAllV2(idPegawai, tgl, listFriday, listSK, listRanap); - return DetailPasien; + return indeksKinerjaDaoCustom.findPatientDetailForEveryTindakanAllV2(idPegawai, tgl, listFriday, listSK, + listRanap); } @Override @@ -1383,11 +1306,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK for (Map data : datas) { DetailLogbookDokter detailLogbookDokter = new DetailLogbookDokter(); SimpleDateFormat tanggalFormat = new SimpleDateFormat("yyyy-MM-dd"); - Date tanggal = new Date(); + Date tanggal; try { tanggal = tanggalFormat.parse(data.get("tanggal").toString()); } catch (ParseException e) { - e.printStackTrace(); + throw new ServiceVOException(e.getMessage()); } detailLogbookDokter.setCount((Long) data.get("count")); @@ -1407,13 +1330,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Transactional public List> getAllTindakanDokter(String periode, Integer idPegawai) { List> results = new ArrayList<>(); - List> tindakans = new ArrayList<>(); + List> tindakans; Pegawai pgw = pegawaiDao.findOne(idPegawai); List listDetailException = getDetailProdukAdministrasi(pgw); // Check dokter radiologi/klinik/patologi anatom/bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -1437,7 +1360,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Integer bpjsKelPasienId = Integer.valueOf(settingDataFixedDao.getSettingDataFixed("bpjsRemun")); String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); String departementRawatInap = settingDataFixedDao.getSettingDataFixed("KdDepartemenInstalasiRawatInap"); String departementICU = settingDataFixedDao.getSettingDataFixed("KdInstalasiICU"); @@ -1477,11 +1400,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tindakans = revIndekKinerjaDao.findIdProdukByIdUser(idPegawai, periode, listDJP); for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double pointQty = 0.0; - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + Map result = new HashMap<>(); + double pointQty; + double percentage; + double tarif; + Double harga; if (drAnastesiList.contains(idPegawai)) { if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { @@ -1510,12 +1433,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK harga = (Double) tindakan.get("harga"); } Long count = (long) 0; - Double point = 0.0; + Double point; - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } + point = getPoin(harga, percentage, tarif); + result.put("poin", point); List> datas = revIndeksKinerjaDaoCustom.findAllProdukPerPeriode(idPegawai, periode, (Integer) tindakan.get("idProduk"), (Integer) tindakan.get("idKelas"), @@ -1552,10 +1473,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List> results = new ArrayList<>(); Pegawai pgw = pegawaiDao.findOne(idPegawai); List listDetailException = getDetailProdukAdministrasi(pgw); - List> tindakans = new ArrayList<>(); + List> tindakans; // Check dokter radiologi/klinik/patologi anatom/bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -1579,7 +1500,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Integer bpjsKelPasienId = Integer.valueOf(settingDataFixedDao.getSettingDataFixed("bpjsRemun")); String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); String departementRawatInap = settingDataFixedDao.getSettingDataFixed("KdDepartemenInstalasiRawatInap"); String departementICU = settingDataFixedDao.getSettingDataFixed("KdInstalasiICU"); @@ -1623,11 +1544,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK int maxday = monitoringAbsenService.iterateDate(periode + "-01"); for (Map tindakan : tindakans) { - Map result = new HashMap(); + Map result = new HashMap<>(); Double pointQty = 0.0; - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + double percentage; + double tarif; + Double harga; if (drAnastesiList.contains(idPegawai)) { if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { @@ -1656,13 +1577,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK harga = (Double) tindakan.get("harga"); } Long count = (long) 0; - Double point = 0.0; + Double point; - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - result.put("poins", df.format(point)); - } + point = getPoin(harga, percentage, tarif); + result.put("poin", point); + result.put("poins", df.format(point)); List> datas = revIndeksKinerjaDaoCustom.findAllProdukPerPeriode(idPegawai, periode, (Integer) tindakan.get("idProduk"), (Integer) tindakan.get("idKelas"), @@ -1701,7 +1620,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map saveMapKalenderToHariLibur(MapKalenderToHariLiburVO vo) { - Map result = new HashMap(); + Map result = new HashMap<>(); if (CommonUtil.isNotNullOrEmpty(vo)) { MapKalenderToHariLibur mapKalenderToHariLibur = mapKalenderToHariLiburConverter.transferVOToModel(vo, new MapKalenderToHariLibur()); @@ -1727,7 +1646,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Calendar cal = Calendar.getInstance(); cal.setTime((Date) data.get("tanggal")); int month = cal.get(Calendar.MONTH) + 1; - data.put("date", +month + "/" + cal.get(Calendar.DATE) + "/" + cal.get(Calendar.YEAR)); + data.put("date", month + "/" + cal.get(Calendar.DATE) + "/" + cal.get(Calendar.YEAR)); } } return result; @@ -1737,14 +1656,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Transactional public List> getAllTindakanByDokterForfeeForService(String periode, Integer idPegawai) { List> results = new ArrayList<>(); - List> tindakans = new ArrayList<>(); + List> tindakans; Pegawai pgw = pegawaiDao.findOne(idPegawai); Integer kategoryPgw = pgw.getKategoryPegawaiId(); List listDetailException = getDetailProdukAdministrasi(pgw); String month = periode.substring(0, 7); // Check dokter radiologi/klinik/patologi anatom/bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -1770,7 +1689,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Integer bpjsKelPasienId = Integer.valueOf(settingDataFixedDao.getSettingDataFixed("bpjsRemun")); String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); String departementRawatInap = settingDataFixedDao.getSettingDataFixed("KdDepartemenInstalasiRawatInap"); String departementICU = settingDataFixedDao.getSettingDataFixed("KdInstalasiICU"); @@ -1814,11 +1733,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double pointQty = 0.0; - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + Map result = new HashMap<>(); + double pointQty; + double percentage; + double tarif; + Double harga; if (drAnastesiList.contains(idPegawai)) { if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { @@ -1847,13 +1766,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK harga = (Double) tindakan.get("harga"); } Long count = (long) 0; - Double point = 0.0; - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } + Double point; + point = getPoin(harga, percentage, tarif); + result.put("poin", point); - List> datas = new ArrayList<>(); + List> datas; if (listKategoriDokterLuar.contains(kategoryPgw)) { datas = revIndeksKinerjaDaoCustom.findAllProdukDokterLuarPerPeriode(idPegawai, periode, (Integer) tindakan.get("idProduk"), (Integer) tindakan.get("idKelas"), @@ -1889,8 +1806,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public Map getRekapitulasiCapaianUraianTugas(String periode, Integer id) { - Map result = new HashMap(); - List> listResult = new ArrayList>(); + Map result = new HashMap<>(); + List> listResult = new ArrayList<>(); Double total = 0.0; Jabatan jabatan = pegawaiDao.findJabatanInternalByIdPegawai(id);// jabatanFungsional @@ -1908,13 +1825,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK for (Map data : temp) { int idRincianKegiatan = (int) data.get("idRincianKegiatan"); - Double hasil = 0.0; + Double hasil; if (idRincianKegiatan != getIdPelayananPasien()) { Map dataMaster = uraianTugasTransaksiDao.findUraianTugas(id, idRincianKegiatan, periode); int maxday = monitoringAbsenService.iterateDate(periode + "-01"); for (int i = 1; i <= maxday; i++) { - String date = ""; + String date; if (i < 10) { date = periode + "-0" + i; } else { @@ -1964,7 +1881,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK @Override public List> reportrekapitulasi(Integer idPegawai, String periode, Boolean isFFS) { - List> result = new ArrayList>(); + List> result; if (isFFS) { result = getAllTindakanByDokterForfeeForServiceReportReview(periode, idPegawai); } else { @@ -1979,10 +1896,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List> results = new ArrayList<>(); Pegawai pgw = pegawaiDao.findOne(idPegawai); List listDetailException = getDetailProdukAdministrasi(pgw); - List> tindakans = new ArrayList<>(); + List> tindakans; // Check dokter radiologi/klinik/patologi anatom/bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -2006,7 +1923,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Integer bpjsKelPasienId = Integer.valueOf(settingDataFixedDao.getSettingDataFixed("bpjsRemun")); String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); String departementRawatInap = settingDataFixedDao.getSettingDataFixed("KdDepartemenInstalasiRawatInap"); String departementICU = settingDataFixedDao.getSettingDataFixed("KdInstalasiICU"); @@ -2046,54 +1963,19 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tindakans = revIndekKinerjaDao.findIdProdukByIdUser(idPegawai, periode, listDJP); for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + double percentage; + double tarif; + Double harga; - if (drAnastesiList.contains(idPegawai)) { - if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { - percentage = 30.0; - } else if ((Integer) tindakan.get("idJenisPelaksana") == 4) { - percentage = 30.0; - } else { - percentage = 15.0; - } - } else { - if ((Integer) tindakan.get("idJenisPelaksana") == 13) { - percentage = 15.0; - } else { - percentage = 30.0; - } - } - tarif = 45000.0; - - percentage = percentage / 100; - if (isTarifSatuHarga) { - harga = (Double) tindakan.get("hargaKelas1"); - if (CommonUtil.isNullOrEmpty(harga)) { - harga = (Double) tindakan.get("harga"); - } - } else { - harga = (Double) tindakan.get("harga"); - } Long count = (long) 0; - Double point = 0.0; - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } - List> datas = revIndeksKinerjaDaoCustom.findAllProdukPerPeriode(idPegawai, periode, (Integer) tindakan.get("idProduk"), (Integer) tindakan.get("idKelas"), (Integer) tindakan.get("idJenisPelaksana"), listKelas2Down, listAllDepartemen, listInapDepartemen, listJalanDepartemen, bpjsKelPasienId, drPatologiAnatomiList); - result.putAll(tindakan); if (CommonUtil.isNotNullOrEmpty(datas)) { for (Map data : datas) { - Map tmp = new HashMap(); - tmp.putAll(tindakan); + Map tmp = new HashMap<>(tindakan); tmp.put("count", data.get("count")); tmp.put("tglPelayanan", data.get("tanggal")); count += (Long) data.get("count"); @@ -2114,10 +1996,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Pegawai pgw = pegawaiDao.findOne(idPegawai); Integer kategoryPgw = pgw.getKategoryPegawaiId(); List listDetailException = getDetailProdukAdministrasi(pgw); - List> tindakans = new ArrayList<>(); + List> tindakans; // Check dokter radiologi/klinik/patologi anatom/bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -2142,7 +2024,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Integer bpjsKelPasienId = Integer.valueOf(settingDataFixedDao.getSettingDataFixed("bpjsRemun")); String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); String departementRawatInap = settingDataFixedDao.getSettingDataFixed("KdDepartemenInstalasiRawatInap"); String departementICU = settingDataFixedDao.getSettingDataFixed("KdInstalasiICU"); @@ -2182,45 +2064,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tindakans = revIndekKinerjaDao.findIdProdukByIdUser(idPegawai, periode, listDJP); for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + double percentage; + double tarif; + Double harga; - if (drAnastesiList.contains(idPegawai)) { - if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { - percentage = 30.0; - } else if ((Integer) tindakan.get("idJenisPelaksana") == 4) { - percentage = 30.0; - } else { - percentage = 15.0; - } - } else { - if ((Integer) tindakan.get("idJenisPelaksana") == 13) { - percentage = 15.0; - } else { - percentage = 30.0; - } - } - tarif = 45000.0; - - percentage = percentage / 100; - if (isTarifSatuHarga) { - harga = (Double) tindakan.get("hargaKelas1"); - if (CommonUtil.isNullOrEmpty(harga)) { - harga = (Double) tindakan.get("harga"); - } - } else { - harga = (Double) tindakan.get("harga"); - } Long count = (long) 0; - Double point = 0.0; - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } - - List> datas = new ArrayList>(); + List> datas; if (listKategoriDokterLuar.contains(kategoryPgw)) { datas = revIndeksKinerjaDaoCustom.findAllProdukDokterLuarPerPeriode(idPegawai, periode, (Integer) tindakan.get("idProduk"), (Integer) tindakan.get("idKelas"), @@ -2231,14 +2080,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK (Integer) tindakan.get("idJenisPelaksana"), listKelas2Down, listAllDepartemen, listInapDepartemen, listJalanDepartemen, bpjsKelPasienId, drPatologiAnatomiList); } - result.putAll(tindakan); - - result.putAll(tindakan); if (CommonUtil.isNotNullOrEmpty(datas)) { for (Map data : datas) { - Map tmp = new HashMap(); - tmp.putAll(tindakan); + Map tmp = new HashMap<>(tindakan); tmp.put("count", data.get("count")); tmp.put("tglPelayanan", data.get("tanggal")); if (CommonUtil.isNotNullOrEmpty(data.get("count"))) { @@ -2260,10 +2105,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Integer kategoryPgw = pgw.getKategoryPegawaiId(); List listDetailException = getDetailProdukAdministrasi(pgw); - List> tindakans = new ArrayList<>(); + List> tindakans; // Check dokter radiologi/klinik/patologi anatom/bukan - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -2325,15 +2170,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tindakans = revIndekKinerjaDao.findIdProdukByIdUser(idPegawai, periode, listDJP); for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + double percentage; + double tarif; + Double harga; Long count = (long) 0; Long countRemun = (long) 0; Long countFfs = (long) 0; - Double point = 0.0; - tarif = 45000.0; + Double point; Long remun = revIndeksKinerjaDaoCustom.countAllProdukPerPeriode(idPegawai, periode, (Integer) tindakan.get("idProduk"), (Integer) tindakan.get("idKelas"), @@ -2343,7 +2186,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK remun = 0L; } - Long ffs = 0L; + Long ffs; if (listKategoriDokterLuar.contains(kategoryPgw)) { ffs = revIndeksKinerjaDaoCustom.countAllProdukDokterLuarPerPeriode(idPegawai, periode, (Integer) tindakan.get("idProduk"), (Integer) tindakan.get("idKelas"), @@ -2358,66 +2201,26 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK ffs = 0L; } - result.putAll(tindakan); - - if (drAnastesiList.contains(idPegawai)) { - if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { - percentage = 30.0; - } else if ((Integer) tindakan.get("idJenisPelaksana") == 4) { - percentage = 30.0; - } else { - percentage = 15.0; - } - } else { - if ((Integer) tindakan.get("idJenisPelaksana") == 13) { - percentage = 15.0; - } else { - percentage = 30.0; - } - } - - percentage = percentage / 100; - harga = (Double) tindakan.get("harga"); - - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } - - Map tmp = new HashMap(); + Map tmp = new HashMap<>(); if (CommonUtil.isNotNullOrEmpty(remun) || CommonUtil.isNotNullOrEmpty(ffs)) { if (CommonUtil.isNotNullOrEmpty(remun)) { tmp.put("remun", remun); } else { tmp.put("remun", 0); } - if (CommonUtil.isNotNullOrEmpty(tmp.get("remun"))) { - countRemun += (Long) tmp.get("remun"); - } if (CommonUtil.isNotNullOrEmpty(ffs)) { tmp.put("ffs", ffs); } else { tmp.put("ffs", 0); } - if (CommonUtil.isNotNullOrEmpty(tmp.get("ffs"))) { - countFfs += (Long) tmp.get("ffs"); - } tmp.putAll(tindakan); tmp.put("count", (ffs + remun)); - if (CommonUtil.isNotNullOrEmpty(tmp.get("count"))) { - count += (Long) tmp.get("count"); - } results.add(tmp); } } - Collections.sort(results, new Comparator>() { - public int compare(final Map o1, final Map o2) { - // ascending order - return ((String) o1.get("namaProduk")).compareTo((String) o2.get("namaProduk")); - } - }); + results.sort(Comparator.comparing(o -> ((String) o.get("namaProduk")))); return results; } @@ -2428,10 +2231,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Pegawai pgw = pegawaiDao.findOne(idPegawai); List listDetailException = getDetailProdukAdministrasi(pgw); - List> tindakans = new ArrayList<>(); + List> tindakans; // check dokter patologi anatomi, lab klinik, radiologi, atw yg lain - List listDJP = new ArrayList<>(); + List listDJP; if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_ANATOMI).contains(idPegawai)) { listDJP = splitDataSettingDatafixed("detailJenisProdukLabPA"); } else if (pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_PATOLOGI_KLINIK).contains(idPegawai)) { @@ -2447,7 +2250,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); List drAnastesiList = pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_ANESTESI); List listTindakanAnastesiException = splitDataSettingDatafixed("excepTindakAnastesi"); @@ -2457,45 +2260,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listFriday = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, true); List listSK = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, false); for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; - - if (drAnastesiList.contains(idPegawai)) { - if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { - percentage = 30.0; - } else if ((Integer) tindakan.get("idJenisPelaksana") == 4) { - percentage = 30.0; - } else { - percentage = 15.0; - } - } else { - if ((Integer) tindakan.get("idJenisPelaksana") == 13) { - percentage = 15.0; - } else { - percentage = 30.0; - } - } - tarif = 45000.0; - - percentage = percentage / 100; - if (isTarifSatuHarga) { - harga = (Double) tindakan.get("hargaKelas1"); - if (CommonUtil.isNullOrEmpty(harga)) { - harga = (Double) tindakan.get("harga"); - } - } else { - harga = (Double) tindakan.get("harga"); - } + double percentage; + double tarif; + Double harga; Long count = (long) 0; - Double point = 0.0; - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } - List listRanap = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, null); Long remun = revIndeksKinerjaDaoCustom.countAllProdukPerPeriode(idPegawai, periode, false, @@ -2516,9 +2285,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK ffs = 0L; } - result.putAll(tindakan); - - Map tmp = new HashMap(); + Map tmp = new HashMap<>(); if (CommonUtil.isNotNullOrEmpty(remun) || CommonUtil.isNotNullOrEmpty(ffs)) { if (CommonUtil.isNotNullOrEmpty(remun)) { tmp.put("remun", remun); @@ -2532,20 +2299,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } tmp.putAll(tindakan); tmp.put("count", (ffs + remun)); - if (CommonUtil.isNotNullOrEmpty(tmp.get("count"))) { - count += (Long) tmp.get("count"); - } results.add(tmp); } } - Collections.sort(results, new Comparator>() { - public int compare(final Map o1, final Map o2) { - // ascending order - return ((String) o1.get("namaProduk")).compareTo((String) o2.get("namaProduk")); - } - }); + results.sort(Comparator.comparing(o -> ((String) o.get("namaProduk")))); return results; } @@ -2554,9 +2313,9 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List> results = new ArrayList<>(); Pegawai pgw = pegawaiDao.findOne(idPegawai); List listDetailException = getDetailProdukAdministrasi(pgw); - List> tindakans = new ArrayList<>(); + List> tindakans; String tarifSatuHarga = settingDataFixedDao.getSettingDataFixed("tarifSatuHarga"); - Boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); + boolean isTarifSatuHarga = Boolean.parseBoolean(tarifSatuHarga); List drAnastesiList = pegawaiDao.getDokterByKelompokKerja(Master.SubUnitKerja.KK_ANESTESI); List listTindakanAnastesiException = splitDataSettingDatafixed("excepTindakAnastesi"); @@ -2572,44 +2331,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } for (Map tindakan : tindakans) { - Map result = new HashMap(); - Double percentage = 0.0; - Double tarif = 0.0; - Double harga = 0.0; + double percentage; + double tarif; + Double harga; - if (drAnastesiList.contains(idPegawai)) { - if (listTindakanAnastesiException.contains(tindakan.get("idProduk"))) { - percentage = 30.0; - } else if ((Integer) tindakan.get("idJenisPelaksana") == 4) { - percentage = 30.0; - } else { - percentage = 15.0; - } - } else { - if ((Integer) tindakan.get("idJenisPelaksana") == 13) { - percentage = 15.0; - } else { - percentage = 30.0; - } - } - tarif = 45000.0; - - percentage = percentage / 100; - - if (isTarifSatuHarga) { - harga = (Double) tindakan.get("hargaKelas1"); - if (CommonUtil.isNullOrEmpty(harga)) { - harga = (Double) tindakan.get("harga"); - } - } else { - harga = (Double) tindakan.get("harga"); - } Long count = (long) 0; - Double point = 0.0; - if (tarif != 0) { - point = getPoin(harga, percentage, tarif); - result.put("poin", point); - } List listFriday = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, true); List listSK = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, false); List listRanap = indeksKinerjaDaoCustom.convertMonthtoDateCustom(periode, null); @@ -2622,9 +2348,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK splitIdProdukAdministrasi(), false, (Integer) tindakan.get("idProduk"), (Double) tindakan.get("harga"), false, listDetailException); - result.putAll(tindakan); - - Map tmp = new HashMap(); + Map tmp = new HashMap<>(); if (CommonUtil.isNotNullOrEmpty(remun) || CommonUtil.isNotNullOrEmpty(ffs)) { if (CommonUtil.isNotNullOrEmpty(remun)) { tmp.put("remun", remun); @@ -2637,21 +2361,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tmp.put("ffs", 0); } tmp.putAll(tindakan); - tmp.put("count", (Long) (ffs + remun)); - if (CommonUtil.isNotNullOrEmpty(tmp.get("count"))) { - count += (Long) tmp.get("count"); - } + tmp.put("count", ffs + remun); results.add(tmp); } } - Collections.sort(results, new Comparator>() { - public int compare(final Map o1, final Map o2) { - // ascending order - return ((String) o1.get("namaProduk")).compareTo((String) o2.get("namaProduk")); - } - }); + results.sort(Comparator.comparing(o -> ((String) o.get("namaProduk")))); return results; } @@ -2660,8 +2376,6 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK try { return dateFormat.parse(GetSettingDataFixed("batasAkhirTarif2017")); } catch (ParseException e) { - e.printStackTrace(); - return null; } } @@ -2682,24 +2396,24 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listKelompokPasienId = new ArrayList<>(); List listKelasId = new ArrayList<>(); List listPelaksanaId = new ArrayList<>(); - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); List listTanggalPelayanan = new ArrayList<>(); - Double harga = 0.0; - Double point = 0.0; - Double pointQty = 0.0; - Double formatPointQty = 0.0; - Double formatRpJasamedis = 0.0; - Double formatRpKontribusi = 0.0; - Double percentage = 0.0; + double harga; + Double point; + Double pointQty; + double formatPointQty; + double formatRpJasamedis = 0.0; + double formatRpKontribusi = 0.0; + Double percentage; DateFormat dateFormat = new SimpleDateFormat("yyyy-MM"); - Date datePeriode = new Date(); + Date datePeriode; try { datePeriode = dateFormat.parse(periode); } catch (ParseException e) { - e.printStackTrace(); + throw new ServiceVOException(e.getMessage()); } Date dateAkhirTarifLama = batasAkhirTarifLama(); boolean isSatuTarif = false; @@ -2850,8 +2564,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -2941,8 +2655,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -3032,8 +2746,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -3125,8 +2839,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -3219,8 +2933,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -3309,8 +3023,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - Collections.sort(listKelompokPasienId, Collections.reverseOrder()); - Collections.sort(listKelasId, Collections.reverseOrder()); + listKelompokPasienId.sort(Collections.reverseOrder()); + listKelasId.sort(Collections.reverseOrder()); for (Integer idProduk : listProdukId) { for (Integer idKelompokPasien : listKelompokPasienId) { for (Integer idKelas : listKelasId) { @@ -3372,14 +3086,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Map mapResult2 = new HashMap<>(); List> datas1 = new ArrayList<>(); List> datas2 = new ArrayList<>(); - Double totalKonsul1 = 0.0; - Double totalKonsul2 = 0.0; - Double totalVisit1 = 0.0; - Double totalVisit2 = 0.0; - Double totalTindakan1 = 0.0; - Double totalTindakan2 = 0.0; - Double totalProduk1 = 0.0; - Double totalProduk2 = 0.0; + double totalKonsul1 = 0.0; + double totalKonsul2 = 0.0; + double totalVisit1 = 0.0; + double totalVisit2 = 0.0; + double totalTindakan1 = 0.0; + double totalTindakan2 = 0.0; + double totalProduk1 = 0.0; + double totalProduk2 = 0.0; int counter1 = 0; int counter2 = 0; boolean isDiskonJasamedis1 = false; @@ -3443,7 +3157,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } if (CommonUtil.isNotNullOrEmpty(mapResult1.get("count"))) { if (isSatuTarif) { - if (isSatuTarif && CommonUtil.isNotNullOrEmpty(mapResult1.get("hargaKelas1"))) { + if (CommonUtil.isNotNullOrEmpty(mapResult1.get("hargaKelas1"))) { harga = Double.parseDouble(mapResult1.get("hargaKelas1").toString()); } else { harga = Double.parseDouble(mapResult1.get("harga").toString()); @@ -3455,7 +3169,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (drAnastesiList.contains(idPegawai)) { if (idsPenunjangBukanAnestesi.contains(mapResult1.get("idProduk"))) { percentage = persenOperator; - } else if ((Integer) mapResult1 + } else if (mapResult1 .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA) { percentage = persenOperator; if (Double.parseDouble(mapResult1.get("diskon").toString()) > 0 @@ -3473,7 +3187,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = persenCooperator; } } else { - if ((Integer) mapResult1.get( + if (mapResult1.get( "idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { percentage = persenCooperator; } else { @@ -3494,7 +3208,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = percentage / 100; point = getPoinLogbookDokter(harga, percentage, komponenDasar, isDiskonJasamedis1); - pointQty = point * totalProduk1.doubleValue(); + pointQty = point * totalProduk1; formatPointQty = Double.parseDouble(df.format(pointQty)); if (Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA @@ -3503,33 +3217,33 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Master.KomponenHarga.JASA_DOKTER, Integer.parseInt(mapResult1.get("idProduk").toString()), Integer.parseInt(mapResult1.get("idKelas").toString())); - formatRpJasamedis = nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0; + formatRpJasamedis = nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0; formatRpKontribusi = totalProduk1 - * (nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0); + * (nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0); } else if (Master.JenisPetugasPelaksana.DOKTER_ANASTESI .equals(mapResult1.get("idJenisPelaksana"))) { Optional nettoKomponen = detailHargaNettoDao.findHargetNetto1Komponen( Master.KomponenHarga.JASA_DOKTER_ANASTESI, Integer.parseInt(mapResult1.get("idProduk").toString()), Integer.parseInt(mapResult1.get("idKelas").toString())); - formatRpJasamedis = nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0; + formatRpJasamedis = nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0; formatRpKontribusi = totalProduk1 - * (nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0); + * (nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0); } else if (Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS .equals(mapResult1.get("idJenisPelaksana"))) { Optional nettoKomponen = detailHargaNettoDao.findHargetNetto1Komponen( Master.KomponenHarga.JASA_ASISTEN_SPESIALIS, Integer.parseInt(mapResult1.get("idProduk").toString()), Integer.parseInt(mapResult1.get("idKelas").toString())); - formatRpJasamedis = nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0; + formatRpJasamedis = nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0; formatRpKontribusi = totalProduk1 - * (nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0); + * (nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0); } - mapResult1.put("totalKonsul", totalKonsul1.longValue()); - mapResult1.put("totalVisit", totalVisit1.longValue()); - mapResult1.put("totalTindakan", totalTindakan1.longValue()); - mapResult1.put("totalProduk", totalProduk1.longValue()); + mapResult1.put("totalKonsul", totalKonsul1); + mapResult1.put("totalVisit", totalVisit1); + mapResult1.put("totalTindakan", totalTindakan1); + mapResult1.put("totalProduk", totalProduk1); mapResult1.put("datas", datas1); mapResult1.put("poin", point); mapResult1.put("pointQty", formatPointQty); @@ -3553,7 +3267,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (drAnastesiList.contains(idPegawai)) { if (idsPenunjangBukanAnestesi.contains(mapResult2.get("idProduk"))) { percentage = persenOperator; - } else if ((Integer) mapResult2 + } else if (mapResult2 .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA) { percentage = persenOperator; if (Double.parseDouble(mapResult2.get("diskon").toString()) > 0 @@ -3571,7 +3285,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = persenCooperator; } } else { - if ((Integer) mapResult2.get( + if (mapResult2.get( "idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { percentage = persenCooperator; } else { @@ -3592,7 +3306,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = percentage / 100; point = getPoinLogbookDokter(harga, percentage, komponenDasar, isDiskonJasamedis2); - pointQty = point * totalProduk2.doubleValue(); + pointQty = point * totalProduk2; formatPointQty = Double.parseDouble(df.format(pointQty)); if (Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA @@ -3601,33 +3315,33 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Master.KomponenHarga.JASA_DOKTER, Integer.parseInt(mapResult2.get("idProduk").toString()), Integer.parseInt(mapResult2.get("idKelas").toString())); - formatRpJasamedis = nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0; + formatRpJasamedis = nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0; formatRpKontribusi = totalProduk2 - * (nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0); + * (nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0); } else if (Master.JenisPetugasPelaksana.DOKTER_ANASTESI .equals(mapResult2.get("idJenisPelaksana"))) { Optional nettoKomponen = detailHargaNettoDao.findHargetNetto1Komponen( Master.KomponenHarga.JASA_DOKTER_ANASTESI, Integer.parseInt(mapResult2.get("idProduk").toString()), Integer.parseInt(mapResult2.get("idKelas").toString())); - formatRpJasamedis = nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0; + formatRpJasamedis = nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0; formatRpKontribusi = totalProduk2 - * (nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0); + * (nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0); } else if (Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS .equals(mapResult2.get("idJenisPelaksana"))) { Optional nettoKomponen = detailHargaNettoDao.findHargetNetto1Komponen( Master.KomponenHarga.JASA_ASISTEN_SPESIALIS, Integer.parseInt(mapResult2.get("idProduk").toString()), Integer.parseInt(mapResult2.get("idKelas").toString())); - formatRpJasamedis = nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0; + formatRpJasamedis = nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0; formatRpKontribusi = totalProduk2 - * (nettoKomponen != null ? nettoKomponen.orElse(0.0) : 0.0); + * (nettoKomponen.isPresent() ? nettoKomponen.orElse(0.0) : 0.0); } - mapResult2.put("totalKonsul", totalKonsul2.longValue()); - mapResult2.put("totalVisit", totalVisit2.longValue()); - mapResult2.put("totalTindakan", totalTindakan2.longValue()); - mapResult2.put("totalProduk", totalProduk2.longValue()); + mapResult2.put("totalKonsul", totalKonsul2); + mapResult2.put("totalVisit", totalVisit2); + mapResult2.put("totalTindakan", totalTindakan2); + mapResult2.put("totalProduk", totalProduk2); mapResult2.put("datas", datas2); mapResult2.put("poin", point); mapResult2.put("pointQty", formatPointQty); @@ -3659,15 +3373,15 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listProdukId = new ArrayList<>(); List listKelasId = new ArrayList<>(); - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); List listTanggalPelayanan = new ArrayList<>(); - Double harga = 0.0; - Double point = 0.0; - Double pointQty = 0.0; - Double formatPointQty = 0.0; - Double percentage = 0.0; + double harga; + Double point; + Double pointQty; + double formatPointQty; + double percentage; DecimalFormat df = new DecimalFormat("#.##"); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); @@ -3710,8 +3424,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List idsDokterPerinatologi = splitDataSettingDatafixed("pr_dokter_perinatologi"); List idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi"); Double komponenDasar = Double.parseDouble(GetSettingDataFixed("ld_komponen_dasar")); - Double persenOperator = Double.parseDouble(GetSettingDataFixed("ld_persen_operator")); - Double persenCooperator = Double.parseDouble(GetSettingDataFixed("ld_persen_cooperator")); + double persenOperator = Double.parseDouble(GetSettingDataFixed("ld_persen_operator")); + double persenCooperator = Double.parseDouble(GetSettingDataFixed("ld_persen_cooperator")); // LOGIC_RULES_REMUN if (CommonUtil.isNotNullOrEmpty(listData)) { @@ -3785,8 +3499,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -3876,8 +3590,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -3966,8 +3680,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4059,8 +3773,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4153,8 +3867,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4237,7 +3951,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - Collections.sort(listKelasId, Collections.reverseOrder()); + listKelasId.sort(Collections.reverseOrder()); for (Integer idProduk : listProdukId) { for (Integer idKelas : listKelasId) { for (String tanggal : listTanggalPelayanan) { @@ -4267,10 +3981,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK for (Integer idKelas : listKelasId) { Map mapResult = new HashMap<>(); List> datas = new ArrayList<>(); - Double totalKonsul = 0.0; - Double totalVisit = 0.0; - Double totalTindakan = 0.0; - Double totalProduk = 0.0; + double totalKonsul = 0.0; + double totalVisit = 0.0; + double totalTindakan = 0.0; + double totalProduk = 0.0; int counter = 0; for (Map map : countResult) { Map countMap = new HashMap<>(); @@ -4312,15 +4026,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (drAnastesiList.contains(idPegawai)) { if (idsPenunjangBukanAnestesi.contains(mapResult.get("idProduk"))) { percentage = persenOperator; - } else if ((Integer) mapResult + } else if (mapResult .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA) { percentage = persenOperator; } else { percentage = persenCooperator; } } else { - if ((Integer) mapResult - .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { + if (mapResult.get("idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { percentage = persenCooperator; } else { percentage = persenOperator; @@ -4329,13 +4042,13 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = percentage / 100; point = getPoin(harga, percentage, komponenDasar); - pointQty = point * totalProduk.doubleValue(); + pointQty = point * totalProduk; formatPointQty = Double.parseDouble(df.format(pointQty)); - mapResult.put("totalKonsul", totalKonsul.longValue()); - mapResult.put("totalVisit", totalVisit.longValue()); - mapResult.put("totalTindakan", totalTindakan.longValue()); - mapResult.put("totalProduk", totalProduk.longValue()); + mapResult.put("totalKonsul", totalKonsul); + mapResult.put("totalVisit", totalVisit); + mapResult.put("totalTindakan", totalTindakan); + mapResult.put("totalProduk", totalProduk); mapResult.put("datas", datas); mapResult.put("poin", point); mapResult.put("pointQty", formatPointQty); @@ -4359,7 +4072,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listProdukId = new ArrayList<>(); List listKelasId = new ArrayList<>(); List listPelaksanaId = new ArrayList<>(); - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); List listTanggalPelayanan = new ArrayList<>(); @@ -4369,19 +4082,19 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime PSBBDate = LocalDateTime.of(2020, 9, 14, 0, 0, 0); LocalDateTime PSBBEnd = LocalDateTime.parse(GetSettingDataFixed("psbbperiod"), dtf); - Double harga = 0.0; - Double point = 0.0; - Double pointQty = 0.0; - Double percentage = 0.0; + double harga; + Double point; + Double pointQty; + Double percentage; Double totalPoint = 0.0; - Long tindakanTotal = 0L; + long tindakanTotal = 0L; DateFormat dateFormat = new SimpleDateFormat("yyyy-MM"); - Date datePeriode = new Date(); + Date datePeriode; try { datePeriode = dateFormat.parse(periode); } catch (ParseException e) { - e.printStackTrace(); + throw new ServiceVOException(e.getMessage()); } Date dateAkhirTarifLama = batasAkhirTarifLama(); boolean isSatuTarif = false; @@ -4528,8 +4241,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4620,8 +4333,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4710,8 +4423,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4803,8 +4516,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4897,8 +4610,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -4932,7 +4645,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK rawResult.add(map); } else if (Arrays.asList(Master.Departemen.GRUP_RAWAT_INAP) .contains(Integer.parseInt(map.get("departemenId").toString())) - && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isAfter(datePulang) + && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang)) && Arrays.asList(Master.Kelas.KELAS_DUA_TIGA_NONKELAS) .contains(Integer.parseInt(map.get("idKelas").toString()))) { @@ -4984,7 +4697,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - Collections.sort(listKelasId, Collections.reverseOrder()); + listKelasId.sort(Collections.reverseOrder()); for (Integer idProduk : listProdukId) { for (Integer idKelas : listKelasId) { for (Integer idPelaksana : listPelaksanaId) { @@ -5000,7 +4713,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Integer.parseInt(map.get("idKelas").toString()) == idKelas && Integer.parseInt(map.get("idJenisPelaksana").toString()) == idPelaksana && map.get("tanggal").toString().equals(tanggal) - && (Double.valueOf(map.get("diskon").toString()) > 0 + && (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0)))) { count1 = count1 + Double.parseDouble(map.get("count").toString()); @@ -5039,8 +4752,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK Map mapResult2 = new HashMap<>(); List> datas1 = new ArrayList<>(); List> datas2 = new ArrayList<>(); - Double totalTindakan1 = 0.0; - Double totalTindakan2 = 0.0; + double totalTindakan1 = 0.0; + double totalTindakan2 = 0.0; int counter1 = 0; int counter2 = 0; boolean isDiskonJasamedis1 = false; @@ -5050,7 +4763,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (Integer.parseInt(map.get("idProduk").toString()) == idProduk && Integer.parseInt(map.get("idKelas").toString()) == idKelas && Integer.parseInt(map.get("idJenisPelaksana").toString()) == idPelaksana - && (Double.valueOf(map.get("diskon").toString()) > 0 + && (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0)))) { countMap.put("count", map.get("count")); @@ -5064,8 +4777,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK totalTindakan1 = totalTindakan1 + Double.parseDouble(map.get("count").toString()); String tgl = map.get("tanggal").toString().substring(8, 10); - Long count = (new Double(Double.parseDouble(map.get("count").toString()))).longValue(); - mapResult1.put(tgl, count.toString()); + long count = (new Double(Double.parseDouble(map.get("count").toString()))).longValue(); + mapResult1.put(tgl, Long.toString(count)); counter1 = counter1 + 1; if (counter1 == 1) { @@ -5085,8 +4798,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK totalTindakan2 = totalTindakan2 + Double.parseDouble(map.get("count").toString()); String tgl = map.get("tanggal").toString().substring(8, 10); - Long count = (new Double(Double.parseDouble(map.get("count").toString()))).longValue(); - mapResult2.put(tgl, count.toString()); + long count = (new Double(Double.parseDouble(map.get("count").toString()))).longValue(); + mapResult2.put(tgl, Long.toString(count)); counter2 = counter2 + 1; if (counter2 == 1) { @@ -5108,7 +4821,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (drAnastesiList.contains(idPegawai)) { if (idsPenunjangBukanAnestesi.contains(mapResult1.get("idProduk"))) { percentage = persenOperator; - } else if ((Integer) mapResult1 + } else if (mapResult1 .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA) { percentage = persenOperator; if (Double.parseDouble(mapResult1.get("diskon").toString()) > 0 @@ -5125,7 +4838,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = persenCooperator; } } else { - if ((Integer) mapResult1 + if (mapResult1 .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { percentage = persenCooperator; } else { @@ -5145,12 +4858,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = percentage / 100; point = getPoinLogbookDokter(harga, percentage, komponenDasar, isDiskonJasamedis1); - pointQty = point * totalTindakan1.doubleValue(); + pointQty = point * totalTindakan1; - tindakanTotal += totalTindakan1.longValue(); + tindakanTotal += (long) totalTindakan1; totalPoint += pointQty; - mapResult1.put("totalTindakan", totalTindakan1.longValue()); + mapResult1.put("totalTindakan", totalTindakan1); mapResult1.put("tindakanTotal", tindakanTotal); mapResult1.put("datas", datas1); mapResult1.put("poin", point); @@ -5179,7 +4892,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (drAnastesiList.contains(idPegawai)) { if (idsPenunjangBukanAnestesi.contains(mapResult2.get("idProduk"))) { percentage = persenOperator; - } else if ((Integer) mapResult2 + } else if (mapResult2 .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA) { percentage = persenOperator; if (Double.parseDouble(mapResult2.get("diskon").toString()) > 0 @@ -5196,7 +4909,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = persenCooperator; } } else { - if ((Integer) mapResult2 + if (mapResult2 .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { percentage = persenCooperator; } else { @@ -5216,12 +4929,12 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = percentage / 100; point = getPoinLogbookDokter(harga, percentage, komponenDasar, isDiskonJasamedis2); - pointQty = point * totalTindakan2.doubleValue(); + pointQty = point * totalTindakan2; - tindakanTotal += totalTindakan2.longValue(); + tindakanTotal += (long) totalTindakan2; totalPoint += pointQty; - mapResult2.put("totalTindakan", totalTindakan2.longValue()); + mapResult2.put("totalTindakan", totalTindakan2); mapResult2.put("tindakanTotal", tindakanTotal); mapResult2.put("datas", datas2); mapResult2.put("poin", point); @@ -5252,15 +4965,15 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listProdukId = new ArrayList<>(); List listKelasId = new ArrayList<>(); - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); List listTanggalPelayanan = new ArrayList<>(); - Double harga = 0.0; - Double point = 0.0; - Double pointQty = 0.0; - Double formatPointQty = 0.0; - Double percentage = 0.0; + double harga; + Double point; + Double pointQty; + double formatPointQty; + double percentage; DecimalFormat df = new DecimalFormat("#.##"); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); @@ -5299,8 +5012,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List idsDokterUmumIGD = splitDataSettingDatafixed("pr_dokter_umum_igd"); List idsPenunjangBukanAnestesi = splitDataSettingDatafixed("pr_penunjang_nonanestesi"); Double komponenDasar = Double.parseDouble(GetSettingDataFixed("ld_komponen_dasar")); - Double persenOperator = Double.parseDouble(GetSettingDataFixed("ld_persen_operator")); - Double persenCooperator = Double.parseDouble(GetSettingDataFixed("ld_persen_cooperator")); + double persenOperator = Double.parseDouble(GetSettingDataFixed("ld_persen_operator")); + double persenCooperator = Double.parseDouble(GetSettingDataFixed("ld_persen_cooperator")); // LOGIC_RULES_FFS if (CommonUtil.isNotNullOrEmpty(listData)) { @@ -5345,8 +5058,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -5389,8 +5102,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -5434,8 +5147,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -5478,8 +5191,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -5522,8 +5235,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -5566,8 +5279,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -5610,7 +5323,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } - Collections.sort(listKelasId, Collections.reverseOrder()); + listKelasId.sort(Collections.reverseOrder()); for (Integer idProduk : listProdukId) { for (Integer idKelas : listKelasId) { for (String tanggal : listTanggalPelayanan) { @@ -5641,7 +5354,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK for (Integer idKelas : listKelasId) { Map mapResult = new HashMap<>(); List> datas = new ArrayList<>(); - Double totalTindakan = 0.0; + double totalTindakan = 0.0; int counter = 0; for (Map map : countResult) { Map countMap = new HashMap<>(); @@ -5676,15 +5389,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK if (drAnastesiList.contains(idPegawai)) { if (idsPenunjangBukanAnestesi.contains(mapResult.get("idProduk"))) { percentage = persenOperator; - } else if ((Integer) mapResult + } else if (mapResult .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.DOKTER_PEMERIKSA) { percentage = persenOperator; } else { percentage = persenCooperator; } } else { - if ((Integer) mapResult - .get("idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { + if (mapResult.get("idJenisPelaksana") == Master.JenisPetugasPelaksana.ASISTEN_SPESIALIS) { percentage = persenCooperator; } else { percentage = persenOperator; @@ -5693,10 +5405,10 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK percentage = percentage / 100; point = getPoin(harga, percentage, komponenDasar); - pointQty = point * totalTindakan.doubleValue(); + pointQty = point * totalTindakan; formatPointQty = Double.parseDouble(df.format(pointQty)); - mapResult.put("totalTindakan", totalTindakan.longValue()); + mapResult.put("totalTindakan", totalTindakan); mapResult.put("datas", datas); mapResult.put("poin", point); mapResult.put("pointQty", formatPointQty); @@ -5714,9 +5426,9 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public List> findPatientDetailForEveryTindakanReview(Integer idProduk, Integer idKelompokPasien, Integer idKelas, Integer idPegawai, String tgl, Boolean ffs, Double diskon, Integer statusDiskon) { List> result = new ArrayList<>(); - List> listData = new ArrayList<>(); + List> listData; - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); Chronology iso = ISOChronology.getInstance(); @@ -5816,14 +5528,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || idsRegDJPPenunjangPK .contains(Integer.parseInt(map.get("detailId").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -5836,14 +5548,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || Master.KelompokPasien.JAMKESDA .equals(Integer.parseInt(map.get("kelompokPasienId").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -5868,8 +5580,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -5896,14 +5608,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -5919,14 +5631,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || dateTimePelayanan.isAfter(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -5942,14 +5654,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -5966,14 +5678,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulangPSBB))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -5988,14 +5700,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6009,14 +5721,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Arrays.asList(Master.Kelas.KELAS_DUA_TIGA_NONKELAS) .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6034,14 +5746,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || Master.KelompokPasien.JAMKESDA .equals(Integer.parseInt(map.get("kelompokPasienId").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6066,8 +5778,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -6094,14 +5806,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6117,14 +5829,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || dateTimePelayanan.isAfter(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6140,14 +5852,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6164,14 +5876,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulangPSBB))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6186,14 +5898,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6207,14 +5919,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Arrays.asList(Master.Kelas.KELAS_DUA_TIGA_NONKELAS) .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6231,14 +5943,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || Master.KelompokPasien.JAMKESDA .equals(Integer.parseInt(map.get("kelompokPasienId").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6263,8 +5975,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -6291,14 +6003,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6314,14 +6026,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || dateTimePelayanan.isAfter(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6337,14 +6049,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6361,14 +6073,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulangPSBB))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6383,14 +6095,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6404,14 +6116,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Arrays.asList(Master.Kelas.KELAS_DUA_TIGA_NONKELAS) .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6431,14 +6143,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || Master.KelompokPasien.JAMKESDA .equals(Integer.parseInt(map.get("kelompokPasienId").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6463,8 +6175,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -6491,14 +6203,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6514,14 +6226,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || dateTimePelayanan.isAfter(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6537,14 +6249,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6561,14 +6273,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulangPSBB))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6583,14 +6295,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6604,14 +6316,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Arrays.asList(Master.Kelas.KELAS_DUA_TIGA_NONKELAS) .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6625,14 +6337,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || idsRegDJPPenunjangPK .contains(Integer.parseInt(map.get("detailId").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6645,14 +6357,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || Master.KelompokPasien.JAMKESDA .equals(Integer.parseInt(map.get("kelompokPasienId").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6677,8 +6389,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -6705,14 +6417,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6728,14 +6440,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK || dateTimePelayanan.isAfter(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6751,14 +6463,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6775,14 +6487,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulangPSBB))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6797,14 +6509,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && dateTimePelayanan.isBefore(datePulang))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer.valueOf(map.get("statusDiskon").toString()) .equals(0))) { @@ -6818,14 +6530,14 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK && Arrays.asList(Master.Kelas.KELAS_DUA_TIGA_NONKELAS) .contains(Integer.parseInt(map.get("idKelas").toString()))) { if (diskon > 0 && (CommonUtil.isNullOrEmpty(statusDiskon) || statusDiskon.equals(0))) { - if (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) > 0 && (CommonUtil.isNullOrEmpty(map.get("statusDiskon")) || Integer.valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); } } else { - if (Double.valueOf(map.get("diskon").toString()) == 0 - || (Double.valueOf(map.get("diskon").toString()) > 0 + if (Double.parseDouble(map.get("diskon").toString()) == 0 + || (Double.parseDouble(map.get("diskon").toString()) > 0 && CommonUtil.isNotNullOrEmpty(map.get("statusDiskon")) && !Integer .valueOf(map.get("statusDiskon").toString()).equals(0))) { result.add(map); @@ -6912,13 +6624,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -6927,13 +6637,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -6943,8 +6651,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -6993,8 +6701,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP).contains( Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString() + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString() .toLowerCase()::contains)) { result.add(map); } @@ -7025,7 +6733,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) @@ -7098,13 +6806,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -7113,13 +6819,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -7129,8 +6833,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -7179,7 +6883,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains)) { result.add(map); } @@ -7210,7 +6914,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) @@ -7284,13 +6988,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -7299,13 +7001,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -7315,8 +7015,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -7365,8 +7065,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP).contains( Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString() + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString() .toLowerCase()::contains)) { result.add(map); } @@ -7397,7 +7097,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) @@ -7437,7 +7137,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listProdukId = new ArrayList<>(); List listKelasId = new ArrayList<>(); - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); List listTanggalPelayanan = new ArrayList<>(); @@ -7552,8 +7252,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -7643,8 +7343,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -7733,8 +7433,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -7826,8 +7526,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -7920,8 +7620,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -8043,7 +7743,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listProdukId = new ArrayList<>(); List listKelasId = new ArrayList<>(); - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); List listTanggalPelayanan = new ArrayList<>(); @@ -8186,13 +7886,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -8201,13 +7899,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -8217,8 +7913,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -8285,7 +7981,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains)) { rawResult.add(map); } @@ -8325,8 +8021,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -8407,13 +8103,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -8422,13 +8116,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -8438,8 +8130,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -8506,7 +8198,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains)) { rawResult.add(map); } @@ -8546,8 +8238,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -8626,13 +8318,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -8641,13 +8331,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulang = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulang = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -8657,8 +8345,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -8725,7 +8413,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains)) { rawResult.add(map); } @@ -8765,8 +8453,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -8855,7 +8543,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK List listProdukId = new ArrayList<>(); List listKelasId = new ArrayList<>(); - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); Chronology iso = ISOChronology.getInstance(); @@ -8916,7 +8604,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK for (Integer idKelas : listKelasId) { long remun = 0L; long ffs = 0L; - long count = 0L; + long count; int dataCountRemun = 0; int dataCountFfs = 0; Map mapResult = new HashMap<>(); @@ -8990,13 +8678,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -9005,13 +8691,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -9021,8 +8705,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -9208,8 +8892,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP).contains( Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString() + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString() .toLowerCase()::contains)) { ffs = ffs + (new Double( Double.parseDouble(map.get("count").toString()))) @@ -9251,8 +8935,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP).contains( Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString() + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString() .toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasukFfs) || dateTimePelayanan.isEqual(datePulangFfs) @@ -9411,13 +9095,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -9426,13 +9108,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -9442,8 +9122,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -9618,8 +9298,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP).contains( Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString() + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString() .toLowerCase()::contains)) { ffs = ffs + (new Double( Double.parseDouble(map.get("count").toString()))) @@ -9655,7 +9335,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT).anyMatch( + && Arrays.stream(Master.KONSUL_VISIT).noneMatch( map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasukFfs) || dateTimePelayanan.isEqual(datePulangFfs) @@ -9811,13 +9491,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "15:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.FRIDAY)) { org.joda.time.LocalDate tglIso = new org.joda.time.LocalDate( datePelayanan.getYear(), datePelayanan.getMonthValue(), @@ -9826,13 +9504,11 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK tglIso.toDateTimeAtStartOfDay(), hijri); if (tglHijri.getMonthOfYear() == 9) { jamPulang = "14:30:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else { jamPulang = "16:00:00"; - timePulang = LocalTime.parse(jamPulang); - datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } + timePulang = LocalTime.parse(jamPulang); + datePulangFfs = LocalDateTime.of(datePelayanan, timePulang); } else if (dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SATURDAY) || dateTimePelayanan.getDayOfWeek().equals(DayOfWeek.SUNDAY)) { jamPulang = "23:59:59"; @@ -9842,8 +9518,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10029,8 +9705,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP).contains( Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString() + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString() .toLowerCase()::contains)) { ffs = ffs + (new Double( Double.parseDouble(map.get("count").toString()))) @@ -10072,8 +9748,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP).contains( Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString() + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString() .toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasukFfs) || dateTimePelayanan.isEqual(datePulangFfs) @@ -10182,9 +9858,9 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK public List> findPatientDetailForEveryTindakanReview(Integer idPegawai, String tgl, Boolean ffs) { List> result = new ArrayList<>(); - List> listData = new ArrayList<>(); + List> listData; - List listDetailJenisProduk = new ArrayList<>(); + List listDetailJenisProduk; List listDetailJenisProdukException = new ArrayList<>(); String month = tgl.substring(0, 7); @@ -10307,8 +9983,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10404,8 +10080,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10500,8 +10176,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10599,8 +10275,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10700,8 +10376,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10772,7 +10448,7 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK } } } else { - /** + /* * @deprecated unused conditions */ if (CommonUtil.isNotNullOrEmpty(listData)) { @@ -10817,8 +10493,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10862,8 +10538,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -10907,8 +10583,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -10952,8 +10628,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { @@ -10996,8 +10672,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK LocalDateTime datePulang = LocalDateTime.of(datePelayanan, timePulang); String jamPulangPSBB = ""; - LocalTime timePulangPSBB = LocalTime.now(); - LocalDateTime datePulangPSBB = LocalDateTime.now(); + LocalTime timePulangPSBB; + LocalDateTime datePulangPSBB; if (getDayOfWeek((Date) map.get("tanggalPelayanan")) == 1 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 2 || getDayOfWeek((Date) map.get("tanggalPelayanan")) == 3 @@ -11041,8 +10717,8 @@ public class IndekKinerjaServiceImpl extends BaseVoServiceImpl implements IndekK .contains(Integer.parseInt(map.get("departemenId").toString())) && Arrays.asList(Master.Kelas.KELAS_SATU_VIP) .contains(Integer.parseInt(map.get("idKelas").toString())) - && !Arrays.stream(Master.KONSUL_VISIT) - .anyMatch(map.get("namaProduk").toString().toLowerCase()::contains) + && Arrays.stream(Master.KONSUL_VISIT) + .noneMatch(map.get("namaProduk").toString().toLowerCase()::contains) && (dateTimePelayanan.isBefore(dateMasuk) || dateTimePelayanan.isEqual(datePulang) || dateTimePelayanan.isAfter(datePulang))) { diff --git a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/DetailLogbookDokter.java b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/DetailLogbookDokter.java index afffbec7..d0ea27ab 100644 --- a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/DetailLogbookDokter.java +++ b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/DetailLogbookDokter.java @@ -1,74 +1,35 @@ package com.jasamedika.medifirst2000.entities; -import java.util.Date; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - import com.jasamedika.medifirst2000.base.BaseTransaction; import com.jasamedika.medifirst2000.helper.Caption; +import lombok.Getter; +import lombok.Setter; +import javax.persistence.*; +import java.util.Date; + +@Getter +@Setter @Entity @Table(name = "DetailLogbookDokter_T") public class DetailLogbookDokter extends BaseTransaction { - + private static final long serialVersionUID = 8003361970314967209L; - - @Column(name = "count", nullable = true) + + @Column(name = "count") @Caption(value = "Count") private Long count; - - @Column(name = "harga", nullable = true) + + @Column(name = "harga") @Caption(value = "Harga") private Double harga; - - @Column(name = "tanggal", nullable = true) + + @Column(name = "tanggal") @Caption(value = "Tanggal") private Date tanggal; - - @ManyToOne(fetch=FetchType.LAZY) - @Caption(value="Object Logbook Dokter") - @JoinColumn(name="ObjectLogbookDokterFK") + + @ManyToOne(fetch = FetchType.LAZY) + @Caption(value = "Object Logbook Dokter") + @JoinColumn(name = "ObjectLogbookDokterFK") private LogbookDokter logbookDokter; - - public Long getCount() { - return count; - } - - public void setCount(Long count) { - this.count = count; - } - - public Double getHarga() { - return harga; - } - - public void setHarga(Double harga) { - this.harga = harga; - } - - public Date getTanggal() { - return tanggal; - } - - public void setTanggal(Date tanggal) { - this.tanggal = tanggal; - } - - public LogbookDokter getLogbookDokter() { - return logbookDokter; - } - - public void setLogbookDokter(LogbookDokter logbookDokter) { - this.logbookDokter = logbookDokter; - } - - public static long getSerialversionuid() { - return serialVersionUID; - } - } diff --git a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/LogbookDokter.java b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/LogbookDokter.java index e042727b..87a56ecf 100644 --- a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/LogbookDokter.java +++ b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/entities/LogbookDokter.java @@ -1,192 +1,73 @@ package com.jasamedika.medifirst2000.entities; -import java.util.Set; - -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.OneToMany; -import javax.persistence.Table; - import com.jasamedika.medifirst2000.base.BaseTransaction; import com.jasamedika.medifirst2000.helper.Caption; +import lombok.Getter; +import lombok.Setter; +import javax.persistence.*; +import java.util.Set; + +@Getter +@Setter @Entity @Table(name = "LogbookDokter_T") public class LogbookDokter extends BaseTransaction { - + private static final long serialVersionUID = -3993902298828376060L; - - @Column(name = "objectProdukFk", nullable = true) + + @Column(name = "objectProdukFk") @Caption(value = "Id Produk") private Integer idProduk; - - @Column(name = "objectPegawaiFk", nullable = true) + + @Column(name = "objectPegawaiFk") @Caption(value = "Id Pegawai") private Integer idPegawai; - - @Column(name = "objectDetailJenisProdukFk", nullable = true) + + @Column(name = "objectDetailJenisProdukFk") @Caption(value = "Id Detail Jenis Produk") private Integer detailId; - - @Column(name = "detailJenisProduk", nullable = true) + + @Column(name = "detailJenisProduk") @Caption(value = "Detail Jenis Produk") private String detailJenisProduk; - - @Column(name = "harga", nullable = true) + + @Column(name = "harga") @Caption(value = "Harga") private Double harga; - - @Column(name = "hargaKelasSatu", nullable = true) + + @Column(name = "hargaKelasSatu") @Caption(value = "Harga Kelas 1") private Double hargaKelas1; - - @Column(name = "objectJenisPelaksanaFk", nullable = true) + + @Column(name = "objectJenisPelaksanaFk") @Caption(value = "Id Jenis Pelaksana") private Integer idJenisPelaksana; - - @Column(name = "objectKelasFk", nullable = true) + + @Column(name = "objectKelasFk") @Caption(value = "Id Kelas") private Integer idKelas; - - @Column(name = "namaKelas", nullable = true) + + @Column(name = "namaKelas") @Caption(value = "Nama Kelas") private String namaKelas; - - @Column(name = "namaProduk", nullable = true) + + @Column(name = "namaProduk") @Caption(value = "Nama Produk") private String namaProduk; - - @Column(name = "poin", nullable = true) + + @Column(name = "poin") @Caption(value = "Poin") private Double poin; - - @Column(name = "poinQty", nullable = true) + + @Column(name = "poinQty") @Caption(value = "Jumlah Poin") private Double poinQty; - - @Column(name = "totalTindakan", nullable = true) + + @Column(name = "totalTindakan") @Caption(value = "Total Tindakan") - private Long totalTindakan; - - @OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "logbookDokter") + private Long totalTindakan; + + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "logbookDokter") private Set detailLogbookDokter; - - public Integer getIdProduk() { - return idProduk; - } - - public void setIdProduk(Integer idProduk) { - this.idProduk = idProduk; - } - - public Integer getIdPegawai() { - return idPegawai; - } - - public void setIdPegawai(Integer idPegawai) { - this.idPegawai = idPegawai; - } - - public Integer getDetailId() { - return detailId; - } - - public void setDetailId(Integer detailId) { - this.detailId = detailId; - } - - public String getDetailJenisProduk() { - return detailJenisProduk; - } - - public void setDetailJenisProduk(String detailJenisProduk) { - this.detailJenisProduk = detailJenisProduk; - } - - public Double getHarga() { - return harga; - } - - public void setHarga(Double harga) { - this.harga = harga; - } - - public Double getHargaKelas1() { - return hargaKelas1; - } - - public void setHargaKelas1(Double hargaKelas1) { - this.hargaKelas1 = hargaKelas1; - } - - public Integer getIdJenisPelaksana() { - return idJenisPelaksana; - } - - public void setIdJenisPelaksana(Integer idJenisPelaksana) { - this.idJenisPelaksana = idJenisPelaksana; - } - - public Integer getIdKelas() { - return idKelas; - } - - public void setIdKelas(Integer idKelas) { - this.idKelas = idKelas; - } - - public String getNamaKelas() { - return namaKelas; - } - - public void setNamaKelas(String namaKelas) { - this.namaKelas = namaKelas; - } - - public String getNamaProduk() { - return namaProduk; - } - - public void setNamaProduk(String namaProduk) { - this.namaProduk = namaProduk; - } - - public Double getPoin() { - return poin; - } - - public void setPoin(Double poin) { - this.poin = poin; - } - - public Double getPoinQty() { - return poinQty; - } - - public void setPoinQty(Double poinQty) { - this.poinQty = poinQty; - } - - public Long getTotalTindakan() { - return totalTindakan; - } - - public void setTotalTindakan(Long totalTindakan) { - this.totalTindakan = totalTindakan; - } - - public Set getDetailLogbookDokter() { - return detailLogbookDokter; - } - - public void setDetailLogbookDokter(Set detailLogbookDokter) { - this.detailLogbookDokter = detailLogbookDokter; - } - - public static long getSerialversionuid() { - return serialVersionUID; - } - }