Compare commits
No commits in common. "master" and "ade/monitoring-absensi/bug-fixing-absen-tunggal" have entirely different histories.
master
...
ade/monito
@ -15,7 +15,7 @@
|
|||||||
</context-param>
|
</context-param>
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>spring.profiles.default</param-name>
|
<param-name>spring.profiles.default</param-name>
|
||||||
<param-value>bridging</param-value>
|
<param-value>localhost</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
|
|
||||||
<listener>
|
<listener>
|
||||||
|
|||||||
@ -333,25 +333,24 @@ public class LogbookKinerjaDetailServiceImpl extends BaseVoServiceImpl implement
|
|||||||
logbookKinerjaDetailDao.save(catatanKinerja);
|
logbookKinerjaDetailDao.save(catatanKinerja);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
Optional<LogbookKinerja> byIdLogbook = logbookKinerjaDao.findByNoRec(catatanKinerja.getLogbookKinerjaId());
|
Optional<LogbookKinerja> byIdLogbook = logbookKinerjaDao
|
||||||
|
.findByNoRec(catatanKinerja.getLogbookKinerjaId());
|
||||||
byIdLogbook.ifPresent(logbookKinerja -> {
|
byIdLogbook.ifPresent(logbookKinerja -> {
|
||||||
if (Arrays.asList(PERCENTAGE).contains(logbookKinerja.getIndikatorKinerja().getSatuanIndikatorId())) {
|
if (Arrays.asList(PERCENTAGE)
|
||||||
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao.findAvgCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
|
.contains(logbookKinerja.getIndikatorKinerja().getSatuanIndikatorId())) {
|
||||||
Optional<Map<String, Object>> catatan = listCatatan.stream().filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
|
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao
|
||||||
if (catatan.isPresent()) {
|
.findAvgCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
|
||||||
logbookKinerja.setCapaian(Double.parseDouble(catatan.get().get("avgCapaian").toString()));
|
Optional<Map<String, Object>> catatan = listCatatan.stream()
|
||||||
|
.filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
|
||||||
|
catatan.ifPresent(
|
||||||
|
c -> logbookKinerja.setCapaian(Double.parseDouble(c.get("avgCapaian").toString())));
|
||||||
} else {
|
} else {
|
||||||
logbookKinerja.setCapaian(0.0);
|
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao
|
||||||
}
|
.findSumCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
|
||||||
|
Optional<Map<String, Object>> catatan = listCatatan.stream()
|
||||||
} else {
|
.filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
|
||||||
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao.findSumCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
|
catatan.ifPresent(
|
||||||
Optional<Map<String, Object>> catatan = listCatatan.stream().filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
|
c -> logbookKinerja.setCapaian(Double.parseDouble(c.get("sumCapaian").toString())));
|
||||||
if (catatan.isPresent()) {
|
|
||||||
logbookKinerja.setCapaian(Double.parseDouble(catatan.get().get("sumCapaian").toString()));
|
|
||||||
} else {
|
|
||||||
logbookKinerja.setCapaian(0.0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
logbookKinerjaDao.save(logbookKinerja);
|
logbookKinerjaDao.save(logbookKinerja);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user