Update JatahCutiDanIzinServiceImpl.java
Penerapan TMT SK cuti 2024 menghapus jatah cuti bersama untuk cuti tahunan di tanggal cuti bersama
This commit is contained in:
parent
b64bb1d054
commit
29fe69e5ee
@ -12,6 +12,7 @@ import com.jasamedika.medifirst2000.util.DateUtil;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -173,7 +174,14 @@ public class JatahCutiDanIzinServiceImpl implements JatahCutiDanIzinService {
|
|||||||
// Hitung Absen di tanggal cuti bersama
|
// Hitung Absen di tanggal cuti bersama
|
||||||
List<String> listTglCutiBersama = mapKalenderToHariLiburDao.getTglCutiBersama(year);
|
List<String> listTglCutiBersama = mapKalenderToHariLiburDao.getTglCutiBersama(year);
|
||||||
int countDataHabsen = 0;
|
int countDataHabsen = 0;
|
||||||
|
Date awal2024 = new Date(1704042000000L);
|
||||||
for (String tglStr : listTglCutiBersama) {
|
for (String tglStr : listTglCutiBersama) {
|
||||||
|
Date tglCheck;
|
||||||
|
try {
|
||||||
|
tglCheck = sdf.parse(tglStr);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
tglCheck = new Date();
|
||||||
|
}
|
||||||
List<Date> dataHabsen = new ArrayList<>();
|
List<Date> dataHabsen = new ArrayList<>();
|
||||||
// cek shift malam
|
// cek shift malam
|
||||||
String tglPrev = sdf.format(java.sql.Date.valueOf(LocalDate.parse(tglStr).minusDays(1)));
|
String tglPrev = sdf.format(java.sql.Date.valueOf(LocalDate.parse(tglStr).minusDays(1)));
|
||||||
@ -206,7 +214,7 @@ public class JatahCutiDanIzinServiceImpl implements JatahCutiDanIzinService {
|
|||||||
} else {
|
} else {
|
||||||
countDataHabsen += 1;
|
countDataHabsen += 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (tglCheck.before(awal2024)) {
|
||||||
// cuti tahunan di tanggal cuti bersama
|
// cuti tahunan di tanggal cuti bersama
|
||||||
List<Date> tglCutiTahunanDiTglCutiBersama = jatahCutiDanIzinDao
|
List<Date> tglCutiTahunanDiTglCutiBersama = jatahCutiDanIzinDao
|
||||||
.getCutiTahunanDiTglCutiBersama(CUTI_TAHUNAN, pegawaiId, tglStr);
|
.getCutiTahunanDiTglCutiBersama(CUTI_TAHUNAN, pegawaiId, tglStr);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user