Compare commits
No commits in common. "8b65c492cf16b9017d2d34534bcb186a9d28ec17" and "77eb8f36720ae5dc6e8f2cfb2d27ecbcbaf94098" have entirely different histories.
8b65c492cf
...
77eb8f3672
@ -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