Compare commits
No commits in common. "74378cdde0eff00fd52ad18d166ef6cc0d4fe02a" and "a90e40be3e89c4f95dd8311890917615943408d5" have entirely different histories.
74378cdde0
...
a90e40be3e
@ -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()
|
||||||
} else {
|
.filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
|
||||||
logbookKinerja.setCapaian(0.0);
|
catatan.ifPresent(
|
||||||
}
|
c -> logbookKinerja.setCapaian(Double.parseDouble(c.get("avgCapaian").toString())));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao.findSumCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
|
List<Map<String, Object>> listCatatan = logbookKinerjaDetailDao
|
||||||
Optional<Map<String, Object>> catatan = listCatatan.stream().filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
|
.findSumCapaianByKontrak(logbookKinerja.getNoRec(), Arrays.asList(PERCENTAGE));
|
||||||
if (catatan.isPresent()) {
|
Optional<Map<String, Object>> catatan = listCatatan.stream()
|
||||||
logbookKinerja.setCapaian(Double.parseDouble(catatan.get().get("sumCapaian").toString()));
|
.filter(c -> logbookKinerja.getNoRec().equals(c.get("logbookId"))).findFirst();
|
||||||
} else {
|
catatan.ifPresent(
|
||||||
logbookKinerja.setCapaian(0.0);
|
c -> logbookKinerja.setCapaian(Double.parseDouble(c.get("sumCapaian").toString())));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
logbookKinerjaDao.save(logbookKinerja);
|
logbookKinerjaDao.save(logbookKinerja);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user