- penghapusan konstanta integrasi BIOS G2
- pembuatan service util hitung tanggal awal bulan dan akhir bulan - penambahan kondisi query untuk mendapatkan list dokter ksm yang mendapatkan remun - pembuatan service hitung capaian visite dokter per individu per bulan - penambahan perhitungan capaian visite dokter real time untuk tampilan logbook kinerja dokter
This commit is contained in:
parent
39a7c5c7dd
commit
1d20232143
@ -26,19 +26,6 @@ public class Master {
|
|||||||
"HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED", "HTTP_X_CLUSTER_CLIENT_IP", "HTTP_CLIENT_IP",
|
"HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED", "HTTP_X_CLUSTER_CLIENT_IP", "HTTP_CLIENT_IP",
|
||||||
"HTTP_FORWARDED_FOR", "HTTP_FORWARDED", "HTTP_VIA", "REMOTE_ADDR" };
|
"HTTP_FORWARDED_FOR", "HTTP_FORWARDED", "HTTP_VIA", "REMOTE_ADDR" };
|
||||||
|
|
||||||
public static final class BIOS {
|
|
||||||
public static final Integer KODE_JUMLAH_PASIEN = 5;
|
|
||||||
public static final Integer KODE_INDIKATOR_PELAYANAN = 6;
|
|
||||||
public static final Integer KODE_LAYANAN_KESEHATAN = 1;
|
|
||||||
public static final Integer KODE_PENERIMAAN = 2;
|
|
||||||
public static final Integer KODE_PENGELUARAN = 3;
|
|
||||||
public static final Integer KODE_SALDO = 4;
|
|
||||||
|
|
||||||
public static final String[] INDIKATOR_PELAYANAN = { "20008", "20009", "20010", "20011", "20012" };
|
|
||||||
public static final String[] JUMLAH_PASIEN = { "20001", "20002", "20003", "20004", "20005", "20006", "20007" };
|
|
||||||
public static final String[] LAYANAN_KESEHATAN = { "01", "02", "03", "04", "05" };
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final class CutiBersama {
|
public static final class CutiBersama {
|
||||||
public static final Integer HK_02_03_XXI_2_698_2019_5 = 24;
|
public static final Integer HK_02_03_XXI_2_698_2019_5 = 24;
|
||||||
}
|
}
|
||||||
@ -92,6 +79,10 @@ public class Master {
|
|||||||
public static final Integer PELAYANAN_NON_PASIEN_NAKES = 673;
|
public static final Integer PELAYANAN_NON_PASIEN_NAKES = 673;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final class IndikatorKinerjaDetail {
|
||||||
|
public static final Integer KEPATUHAN_WAKTU_VISITE = 17;
|
||||||
|
}
|
||||||
|
|
||||||
public static final class IndikatorKinerjaJamKerja {
|
public static final class IndikatorKinerjaJamKerja {
|
||||||
public static final Integer KONSUL_EKS = 1;
|
public static final Integer KONSUL_EKS = 1;
|
||||||
public static final Integer KONSUL_GADAR = 2;
|
public static final Integer KONSUL_GADAR = 2;
|
||||||
|
|||||||
@ -498,6 +498,8 @@ public interface MapPegawaiJabatanToUnitKerjaDao extends CrudRepository<MapPegaw
|
|||||||
+ "where mj.statusEnabled is true " + "and pg.statusEnabled is true " + "and pg.jenisPegawaiId = 1 "
|
+ "where mj.statusEnabled is true " + "and pg.statusEnabled is true " + "and pg.jenisPegawaiId = 1 "
|
||||||
+ "and jb.levelJabatan = 5 ";
|
+ "and jb.levelJabatan = 5 ";
|
||||||
|
|
||||||
|
String remun = "and mj.unitKerjaPegawaiId in (:ksmListId) and pg.kategoryPegawaiId in (1,10,14) ";
|
||||||
|
|
||||||
String ksm = "and mj.unitKerjaPegawaiId = :ksmId ";
|
String ksm = "and mj.unitKerjaPegawaiId = :ksmId ";
|
||||||
|
|
||||||
String kk = "and mj.subUnitKerjaPegawaiId = :kkId ";
|
String kk = "and mj.subUnitKerjaPegawaiId = :kkId ";
|
||||||
@ -522,4 +524,11 @@ public interface MapPegawaiJabatanToUnitKerjaDao extends CrudRepository<MapPegaw
|
|||||||
@Query(strDokter + dr + sortDr)
|
@Query(strDokter + dr + sortDr)
|
||||||
List<Map<String, Object>> findDokterById(@Param("drId") Integer idDr);
|
List<Map<String, Object>> findDokterById(@Param("drId") Integer idDr);
|
||||||
|
|
||||||
|
@Query(strDokter + remun + sortDr)
|
||||||
|
List<Map<String, Object>> findDokterByRemun(@Param("ksmListId") List<Integer> ksmListId);
|
||||||
|
|
||||||
|
@Query(strDokter + remun + dr + sortDr)
|
||||||
|
List<Map<String, Object>> findDokterByRemun(@Param("ksmListId") List<Integer> ksmListId,
|
||||||
|
@Param("drId") Integer idPegawai);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,9 +15,11 @@ import com.jasamedika.medifirst2000.vo.CatatanPerkembanganPasienTerintegrasiVO;
|
|||||||
public interface CatatanPerkembanganPasienTerintegrasiService
|
public interface CatatanPerkembanganPasienTerintegrasiService
|
||||||
extends BaseVoService<CatatanPerkembanganPasienTerintegrasi, CatatanPerkembanganPasienTerintegrasiVO, String> {
|
extends BaseVoService<CatatanPerkembanganPasienTerintegrasi, CatatanPerkembanganPasienTerintegrasiVO, String> {
|
||||||
|
|
||||||
|
List<Map<String, Object>> findDokter(Integer idKsm, Integer idKk, Integer idDr) throws JpaSystemException;
|
||||||
|
|
||||||
List<Map<String, Object>> findPresensiVisiteDokter(Integer idKsm, Integer idKk, Integer idDr, Long startDate,
|
List<Map<String, Object>> findPresensiVisiteDokter(Integer idKsm, Integer idKk, Integer idDr, Long startDate,
|
||||||
Long endDate) throws JpaSystemException;
|
Long endDate) throws JpaSystemException;
|
||||||
|
|
||||||
List<Map<String, Object>> findDokter(Integer idKsm, Integer idKk, Integer idDr) throws JpaSystemException;
|
Map<String, Object> findPresensiVisiteDokter(Integer idPegawai, Long bulan) throws JpaSystemException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,11 @@ package com.jasamedika.medifirst2000.service.impl;
|
|||||||
|
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -12,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.orm.jpa.JpaSystemException;
|
import org.springframework.orm.jpa.JpaSystemException;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.jasamedika.medifirst2000.constants.Master;
|
||||||
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
|
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
|
||||||
import com.jasamedika.medifirst2000.dao.CatatanPerkembanganPasienTerintegrasiDao;
|
import com.jasamedika.medifirst2000.dao.CatatanPerkembanganPasienTerintegrasiDao;
|
||||||
import com.jasamedika.medifirst2000.dao.KalenderDao;
|
import com.jasamedika.medifirst2000.dao.KalenderDao;
|
||||||
@ -279,4 +284,50 @@ public class CatatanPerkembanganPasienTerintegrasiServiceImpl extends BaseVoServ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> findPresensiVisiteDokter(Integer idPegawai, Long bulan) throws JpaSystemException {
|
||||||
|
Date startDate = CommonUtil.firstDayOfMonth(bulan);
|
||||||
|
Date endDate = CommonUtil.lastDayOfMonth(bulan);
|
||||||
|
|
||||||
|
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
DateFormat hf = new SimpleDateFormat("HH:mm:ss");
|
||||||
|
|
||||||
|
String strStartDate = df.format(startDate);
|
||||||
|
String strEndDate = df.format(endDate);
|
||||||
|
|
||||||
|
List<Date> listTgl = kalenderDao.getDateFromPeriodicParameter(strStartDate, strEndDate);
|
||||||
|
|
||||||
|
int daysOfMonth = listTgl.size();
|
||||||
|
|
||||||
|
List<Integer> listIdDokter = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> listDokter = mapJabatanDao.findDokterByRemun(Arrays.asList(Master.UnitKerja.KSM),
|
||||||
|
idPegawai);
|
||||||
|
for (Map<String, Object> dokter : listDokter) {
|
||||||
|
if (!listIdDokter.contains(Integer.valueOf(dokter.get("pegawaiId").toString()))) {
|
||||||
|
listIdDokter.add(Integer.valueOf(dokter.get("pegawaiId").toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CatatanPerkembanganPasienTerintegrasi> rawData = cpptDao.findPresensiCPPT(listIdDokter, strStartDate,
|
||||||
|
strEndDate);
|
||||||
|
for (Map<String, Object> dokter : listDokter) {
|
||||||
|
double totCapaian = 0.0;
|
||||||
|
for (CatatanPerkembanganPasienTerintegrasi cppt : rawData) {
|
||||||
|
if (dokter.get("pegawaiId").equals(cppt.getPegawai().getId())) {
|
||||||
|
LocalDateTime tenthOClock = LocalDateTime.of(LocalDate.parse(df.format(cppt.getTglInput())),
|
||||||
|
LocalTime.of(10, 0, 0, 0));
|
||||||
|
LocalDateTime tglInput = LocalDateTime.of(LocalDate.parse(df.format(cppt.getTglInput())),
|
||||||
|
LocalTime.parse(hf.format(cppt.getTglInput())));
|
||||||
|
if (tglInput.isBefore(tenthOClock) || tglInput.equals(tenthOClock)) {
|
||||||
|
totCapaian += 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
double avgCapaian = totCapaian / daysOfMonth;
|
||||||
|
dokter.put("rataCapaian", avgCapaian);
|
||||||
|
}
|
||||||
|
|
||||||
|
return listDokter.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,6 +51,7 @@ import com.jasamedika.medifirst2000.entities.LogbookKinerjaDokter;
|
|||||||
import com.jasamedika.medifirst2000.entities.Pegawai;
|
import com.jasamedika.medifirst2000.entities.Pegawai;
|
||||||
import com.jasamedika.medifirst2000.entities.SatuanIndikator;
|
import com.jasamedika.medifirst2000.entities.SatuanIndikator;
|
||||||
import com.jasamedika.medifirst2000.exception.ServiceVOException;
|
import com.jasamedika.medifirst2000.exception.ServiceVOException;
|
||||||
|
import com.jasamedika.medifirst2000.service.CatatanPerkembanganPasienTerintegrasiService;
|
||||||
import com.jasamedika.medifirst2000.service.LogbookKinerjaService;
|
import com.jasamedika.medifirst2000.service.LogbookKinerjaService;
|
||||||
import com.jasamedika.medifirst2000.util.CommonUtil;
|
import com.jasamedika.medifirst2000.util.CommonUtil;
|
||||||
import com.jasamedika.medifirst2000.vo.IndikatorKinerjaVO;
|
import com.jasamedika.medifirst2000.vo.IndikatorKinerjaVO;
|
||||||
@ -126,6 +127,9 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
|||||||
@Autowired
|
@Autowired
|
||||||
private JabatanDao jabatanDao;
|
private JabatanDao jabatanDao;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CatatanPerkembanganPasienTerintegrasiService cpptService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LogbookKinerjaVO add(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException {
|
public LogbookKinerjaVO add(LogbookKinerjaVO vo) throws JpaSystemException, ServiceVOException {
|
||||||
Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai());
|
Pegawai pegawai = pegawaiConverter.transferVOToModel(vo.getPegawai(), new Pegawai());
|
||||||
@ -615,6 +619,41 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
|||||||
new BigDecimal(Double.valueOf(map.get("fragCapaian").toString()) * 100).setScale(2,
|
new BigDecimal(Double.valueOf(map.get("fragCapaian").toString()) * 100).setScale(2,
|
||||||
RoundingMode.HALF_UP));
|
RoundingMode.HALF_UP));
|
||||||
data.add(map);
|
data.add(map);
|
||||||
|
} else if (map.get("idIndikator").equals(Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS)) {
|
||||||
|
List<Map<String, Object>> listDetail = logbookKinerjaDokterDao.findDetailKontrakKinerja(
|
||||||
|
mf.format(new Date(bulan)), idJabatan, idPegawai,
|
||||||
|
Master.IndikatorKinerja.KEPATUHAN_PELAYANAN_MEDIS);
|
||||||
|
|
||||||
|
int detailSize = listDetail.size();
|
||||||
|
double persenCapaian = 0.0;
|
||||||
|
for (Map<String, Object> detail : listDetail) {
|
||||||
|
if (Master.IndikatorKinerjaDetail.KEPATUHAN_WAKTU_VISITE.equals(detail.get("id"))) {
|
||||||
|
Map<String, Object> presensiVisite = cpptService.findPresensiVisite(idPegawai,
|
||||||
|
bulan);
|
||||||
|
if (CommonUtil.isNotNullOrEmpty(presensiVisite)) {
|
||||||
|
persenCapaian += Double.valueOf(presensiVisite.get("rataCapaian").toString())
|
||||||
|
/ Double.valueOf(detail.get("detailTarget").toString());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// TODO inserted by ITI-14 [Nov 19, 2021,
|
||||||
|
// 5:14:28 PM] : Detail Indikator Kinerja
|
||||||
|
// lainnya
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
double capaian = 0.0;
|
||||||
|
if (detailSize > 0) {
|
||||||
|
capaian = persenCapaian / detailSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
String fragCapaian = df.format(capaian * Double.valueOf(map.get("target").toString()));
|
||||||
|
hasil += capaian * Double.valueOf(map.get("target").toString()) / 100
|
||||||
|
* Double.valueOf(map.get("bobot").toString());
|
||||||
|
map.put("fragCapaian", Double.parseDouble(fragCapaian));
|
||||||
|
map.put("persenCapaianDibulatkan",
|
||||||
|
new BigDecimal(Double.valueOf(map.get("fragCapaian").toString())).setScale(2,
|
||||||
|
RoundingMode.HALF_UP));
|
||||||
|
data.add(map);
|
||||||
} else {
|
} else {
|
||||||
hasil += Double.parseDouble(df.format(Double.valueOf(map.get("fragCapaian").toString())))
|
hasil += Double.parseDouble(df.format(Double.valueOf(map.get("fragCapaian").toString())))
|
||||||
* Double.valueOf(map.get("bobot").toString());
|
* Double.valueOf(map.get("bobot").toString());
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.jasamedika.medifirst2000.util;
|
package com.jasamedika.medifirst2000.util;
|
||||||
|
|
||||||
import java.util.AbstractMap;
|
import java.util.AbstractMap;
|
||||||
|
import java.util.Calendar;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -63,8 +64,7 @@ public final class CommonUtil {
|
|||||||
try {
|
try {
|
||||||
value = PropertyUtils.getProperty(source, property);
|
value = PropertyUtils.getProperty(source, property);
|
||||||
} catch (java.lang.Exception e) {
|
} catch (java.lang.Exception e) {
|
||||||
LOG.error("Error when getting property: " + property
|
LOG.error("Error when getting property: " + property + " from source: " + source, e);
|
||||||
+ " from source: " + source, e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -141,14 +141,12 @@ public final class CommonUtil {
|
|||||||
* @param objectsToCompare
|
* @param objectsToCompare
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static boolean checkEquality(Object object,
|
public static boolean checkEquality(Object object, Object... objectsToCompare) {
|
||||||
Object... objectsToCompare) {
|
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (objectsToCompare == null || objectsToCompare.length == 0) {
|
if (objectsToCompare == null || objectsToCompare.length == 0) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException("ObjectsToCompare cannot be null or empty.");
|
||||||
"ObjectsToCompare cannot be null or empty.");
|
|
||||||
}
|
}
|
||||||
for (Object objectToCompare : objectsToCompare) {
|
for (Object objectToCompare : objectsToCompare) {
|
||||||
if (objectToCompare == null) {
|
if (objectToCompare == null) {
|
||||||
@ -169,14 +167,12 @@ public final class CommonUtil {
|
|||||||
* @param stringsToCompare
|
* @param stringsToCompare
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static boolean checkEqualityIgnoreCase(String string,
|
public static boolean checkEqualityIgnoreCase(String string, String... stringsToCompare) {
|
||||||
String... stringsToCompare) {
|
|
||||||
if (string == null) {
|
if (string == null) {
|
||||||
throw new IllegalArgumentException("String cannot be null.");
|
throw new IllegalArgumentException("String cannot be null.");
|
||||||
}
|
}
|
||||||
if (stringsToCompare == null || stringsToCompare.length == 0) {
|
if (stringsToCompare == null || stringsToCompare.length == 0) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException("StringsToCompare cannot be null or empty.");
|
||||||
"StringsToCompare cannot be null or empty.");
|
|
||||||
}
|
}
|
||||||
for (String stringToCompare : stringsToCompare) {
|
for (String stringToCompare : stringsToCompare) {
|
||||||
if (string.equalsIgnoreCase(stringToCompare)) {
|
if (string.equalsIgnoreCase(stringToCompare)) {
|
||||||
@ -185,30 +181,92 @@ public final class CommonUtil {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean isNotNullOrEmpty(Object object) {
|
public static Boolean isNotNullOrEmpty(Object object) {
|
||||||
return !isNullOrEmpty(object);
|
return !isNullOrEmpty(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public static Boolean isNullOrEmpty(Object object) {
|
public static Boolean isNullOrEmpty(Object object) {
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
if (object instanceof Collection) {
|
if (object instanceof Collection) {
|
||||||
if (((Collection) object).isEmpty()) {
|
if (((Collection) object).isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (object instanceof AbstractMap) {
|
} else if (object instanceof AbstractMap) {
|
||||||
if (((AbstractMap) object).isEmpty()) {
|
if (((AbstractMap) object).isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (object.toString().trim().equals("")) {
|
if (object.toString().trim().equals("")) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return first day of current month
|
||||||
|
*/
|
||||||
|
public static Date firstDayOfMonth() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
calendar.set(Calendar.MINUTE, 0);
|
||||||
|
calendar.set(Calendar.SECOND, 0);
|
||||||
|
calendar.set(Calendar.MILLISECOND, 0);
|
||||||
|
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return last day of current month
|
||||||
|
*/
|
||||||
|
public static Date lastDayOfMonth() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
|
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
calendar.set(Calendar.MINUTE, 59);
|
||||||
|
calendar.set(Calendar.SECOND, 59);
|
||||||
|
calendar.set(Calendar.MILLISECOND, 9999);
|
||||||
|
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param timestamp
|
||||||
|
* a specified time milliseconds
|
||||||
|
* @return first day of month from specified time milliseconds
|
||||||
|
*/
|
||||||
|
public static Date firstDayOfMonth(Long timestamp) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(new Date(timestamp));
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||||
|
calendar.set(Calendar.MINUTE, 0);
|
||||||
|
calendar.set(Calendar.SECOND, 0);
|
||||||
|
calendar.set(Calendar.MILLISECOND, 0);
|
||||||
|
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param timestamp
|
||||||
|
* a specified time milliseconds
|
||||||
|
* @return last day of month from specified time milliseconds
|
||||||
|
*/
|
||||||
|
public static Date lastDayOfMonth(Long timestamp) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(new Date(timestamp));
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
|
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
calendar.set(Calendar.MINUTE, 59);
|
||||||
|
calendar.set(Calendar.SECOND, 59);
|
||||||
|
calendar.set(Calendar.MILLISECOND, 9999);
|
||||||
|
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,6 @@ import com.jasamedika.medifirst2000.util.DateUtil;
|
|||||||
import com.jasamedika.medifirst2000.util.JsonUtil;
|
import com.jasamedika.medifirst2000.util.JsonUtil;
|
||||||
import com.jasamedika.medifirst2000.util.rest.RestUtil;
|
import com.jasamedika.medifirst2000.util.rest.RestUtil;
|
||||||
import com.jasamedika.medifirst2000.vo.AgamaVO;
|
import com.jasamedika.medifirst2000.vo.AgamaVO;
|
||||||
import com.jasamedika.medifirst2000.vo.JadwalDokter_VO;
|
|
||||||
import com.jasamedika.medifirst2000.vo.LoginUserVO;
|
import com.jasamedika.medifirst2000.vo.LoginUserVO;
|
||||||
import com.jasamedika.medifirst2000.vo.custom.AuthVO;
|
import com.jasamedika.medifirst2000.vo.custom.AuthVO;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user