- perbaikan service get data kontrak kinerja
- perbaikan informasi status internet harian saat presensi jika internet bermasalah
This commit is contained in:
parent
cbe27cdae4
commit
fd68e0c908
@ -37,7 +37,7 @@ public interface LogbookKinerjaDao extends PagingAndSortingRepository<LogbookKin
|
||||
@Param("jabatanId") Integer idJabatan, @Param("bulan") String bulan,
|
||||
@Param("indikatorId") Integer idIndikator);
|
||||
|
||||
@Query("select new Map(lk.noRec as noRec," + "pg.id as idPegawai,pg.namaLengkap as namaPegawai,"
|
||||
String strKontrakKinerja = "select new Map(lk.noRec as noRec," + "pg.id as idPegawai,pg.namaLengkap as namaPegawai,"
|
||||
+ "jb.id as idJabatan,jb.namaJabatan as namaJabatan,"
|
||||
+ "ik.id as idIndikator,ik.namaIndikator as namaIndikator," + "ik.jenisIndikator as idJenisIndikator,"
|
||||
+ "(case when ik.jenisIndikator = 1 then 'Kuantitas' " + "when ik.jenisIndikator = 2 then 'Kualitas' "
|
||||
@ -48,14 +48,47 @@ public interface LogbookKinerjaDao extends PagingAndSortingRepository<LogbookKin
|
||||
+ "when lk.statusVerifikasi is true then 'Terverifikasi' end) as statusVerifikasi) "
|
||||
+ "from LogbookKinerja lk " + "inner join lk.indikatorKinerja ik " + "inner join lk.pegawai pg "
|
||||
+ "inner join lk.jabatan jb " + "where lk.statusEnabled is true and ik.statusEnabled is true "
|
||||
+ "and ik.statusVerifikasi is true " + "and lk.pegawaiId = :pegawaiId " + "and lk.jabatanId = :jabatanId "
|
||||
+ "and to_char(lk.bulan,'yyyy-MM') = :bulan " + "order by ik.jenisIndikator, ik.namaIndikator")
|
||||
List<Map<String, Object>> findKontrakKinerja(@Param("pegawaiId") Integer idPegawai,
|
||||
+ "and ik.statusVerifikasi is true ";
|
||||
|
||||
String pegawaiLogbook = "and lk.pegawaiId = :pegawaiId ";
|
||||
|
||||
String jabatanLogbook = "and lk.jabatanId = :jabatanId ";
|
||||
|
||||
String bulanLogbook = "and to_char(lk.bulan,'yyyy-MM') = :bulan ";
|
||||
|
||||
String sortIndikator = "order by ik.jenisIndikator, ik.namaIndikator";
|
||||
|
||||
@Query(strKontrakKinerja + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerja();
|
||||
|
||||
@Query(strKontrakKinerja + pegawaiLogbook + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerjaByPegawai(@Param("pegawaiId") Integer idPegawai);
|
||||
|
||||
@Query(strKontrakKinerja + jabatanLogbook + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerjaByJabatan(@Param("jabatanId") Integer idJabatan);
|
||||
|
||||
@Query(strKontrakKinerja + bulanLogbook + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerjaByBulan(@Param("bulan") String bulan);
|
||||
|
||||
@Query(strKontrakKinerja + pegawaiLogbook + jabatanLogbook + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerjaByPegawaiJabatan(@Param("pegawaiId") Integer idPegawai,
|
||||
@Param("jabatanId") Integer idJabatan);
|
||||
|
||||
@Query(strKontrakKinerja + pegawaiLogbook + bulanLogbook + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerjaByPegawaiBulan(@Param("pegawaiId") Integer idPegawai,
|
||||
@Param("bulan") String bulan);
|
||||
|
||||
@Query(strKontrakKinerja + jabatanLogbook + bulanLogbook + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerjaByJabatanBulan(@Param("jabatanId") Integer idJabatan,
|
||||
@Param("bulan") String bulan);
|
||||
|
||||
@Query(strKontrakKinerja + pegawaiLogbook + jabatanLogbook + bulanLogbook + sortIndikator)
|
||||
List<Map<String, Object>> findKontrakKinerjaByAll(@Param("pegawaiId") Integer idPegawai,
|
||||
@Param("jabatanId") Integer idJabatan, @Param("bulan") String bulan);
|
||||
|
||||
@Query("select new Map(lk.noRec as noRec,ik.namaIndikator as namaIndikator) " + "from LogbookKinerja lk "
|
||||
+ "inner join lk.indikatorKinerja ik " + "where ik.id = :indikatorId")
|
||||
List<Map<String, Object>> findKontrakKinerja(@Param("indikatorId") Integer idIndikator);
|
||||
List<Map<String, Object>> findKontrakKinerjaByIndikator(@Param("indikatorId") Integer idIndikator);
|
||||
|
||||
@Query("select new Map(lk.noRec as noRec," + "pg.id as idPegawai,pg.namaLengkap as namaPegawai,"
|
||||
+ "jb.id as idJabatan,jb.namaJabatan as namaJabatan,"
|
||||
|
||||
@ -292,6 +292,8 @@ public class AbsensiPegawaiServiceImpl extends BaseVoServiceImpl implements Abse
|
||||
}
|
||||
if (listIp.contains(map.get("ip_addr"))) {
|
||||
map.put("ip_addr", "menggunakan jaringan internet RSAB");
|
||||
} else if (CommonUtil.isNullOrEmpty(map.get("ip_addr"))) {
|
||||
map.put("ip_addr", "jaringan internet tidak terdeteksi");
|
||||
} else {
|
||||
map.put("ip_addr", "bukan menggunakan jaringan internet RSAB");
|
||||
}
|
||||
|
||||
@ -234,10 +234,34 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
@Override
|
||||
public List<Map<String, Object>> findKontrakKinerja(Integer idPegawai, Integer idJabatan, Long bulan)
|
||||
throws JpaSystemException {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM");
|
||||
|
||||
List<Map<String, Object>> result = logbookKinerjaDao.findKontrakKinerja(idPegawai, idJabatan,
|
||||
df.format(new Date(bulan)));
|
||||
if (CommonUtil.isNullOrEmpty(idPegawai) && CommonUtil.isNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerja();
|
||||
} else if (CommonUtil.isNotNullOrEmpty(idPegawai) && CommonUtil.isNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerjaByPegawai(idPegawai);
|
||||
} else if (CommonUtil.isNullOrEmpty(idPegawai) && CommonUtil.isNotNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerjaByJabatan(idJabatan);
|
||||
} else if (CommonUtil.isNullOrEmpty(idPegawai) && CommonUtil.isNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNotNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerjaByBulan(df.format(new Date(bulan)));
|
||||
} else if (CommonUtil.isNotNullOrEmpty(idPegawai) && CommonUtil.isNotNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerjaByPegawaiJabatan(idPegawai, idJabatan);
|
||||
} else if (CommonUtil.isNotNullOrEmpty(idPegawai) && CommonUtil.isNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNotNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerjaByPegawaiBulan(idPegawai, df.format(new Date(bulan)));
|
||||
} else if (CommonUtil.isNullOrEmpty(idPegawai) && CommonUtil.isNotNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNotNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerjaByJabatanBulan(idJabatan, df.format(new Date(bulan)));
|
||||
} else if (CommonUtil.isNotNullOrEmpty(idPegawai) && CommonUtil.isNotNullOrEmpty(idJabatan)
|
||||
&& CommonUtil.isNotNullOrEmpty(bulan)) {
|
||||
result = logbookKinerjaDao.findKontrakKinerjaByAll(idPegawai, idJabatan, df.format(new Date(bulan)));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -268,7 +292,7 @@ public class LogbookKinerjaServiceImpl extends BaseVoServiceImpl implements Logb
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> findKontrakKinerja(Integer idIndikator) throws JpaSystemException {
|
||||
List<Map<String, Object>> result = logbookKinerjaDao.findKontrakKinerja(idIndikator);
|
||||
List<Map<String, Object>> result = logbookKinerjaDao.findKontrakKinerjaByIndikator(idIndikator);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -476,9 +476,9 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
|
||||
|
||||
@RequestMapping(value = "/get-kontrak-kinerja", method = RequestMethod.GET)
|
||||
public ResponseEntity<List<Map<String, Object>>> getKontrakKinerja(HttpServletRequest request,
|
||||
@RequestParam(value = "pegawaiId", required = true) Integer idPegawai,
|
||||
@RequestParam(value = "jabatanId", required = true) Integer idJabatan,
|
||||
@RequestParam(value = "bulan", required = true) Long bulan) throws ParseException {
|
||||
@RequestParam(value = "pegawaiId", required = false) Integer idPegawai,
|
||||
@RequestParam(value = "jabatanId", required = false) Integer idJabatan,
|
||||
@RequestParam(value = "bulan", required = false) Long bulan) throws ParseException {
|
||||
try {
|
||||
List<Map<String, Object>> result = logbookKinerjaService.findKontrakKinerja(idPegawai, idJabatan, bulan);
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user