package com.jasamedika.medifirst2000.controller; import java.text.ParseException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.orm.jpa.JpaSystemException; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.jasamedika.medifirst2000.constants.Constants; import com.jasamedika.medifirst2000.constants.Master; import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.core.web.WebConstants; import com.jasamedika.medifirst2000.dao.JenisGajiDao; import com.jasamedika.medifirst2000.dao.MapUraianTugasToRincianKegiatanDao; import com.jasamedika.medifirst2000.entities.JenisGaji; import com.jasamedika.medifirst2000.entities.MapUraianTugasToRincianKegiatan; import com.jasamedika.medifirst2000.entities.Pegawai; import com.jasamedika.medifirst2000.entities.UnitKerjaPegawai; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.AbsensiPegawaiService; import com.jasamedika.medifirst2000.service.ActivityPegawaiService; import com.jasamedika.medifirst2000.service.AnggaranRemunerasiService; import com.jasamedika.medifirst2000.service.AsuransiNakerService; import com.jasamedika.medifirst2000.service.AturanPeminjamanService; import com.jasamedika.medifirst2000.service.BerkasLamaranService; import com.jasamedika.medifirst2000.service.BibliographyService; import com.jasamedika.medifirst2000.service.CustomIndexKerjaService; import com.jasamedika.medifirst2000.service.DaftarKeanggotaanService; import com.jasamedika.medifirst2000.service.DataKeluargaService; import com.jasamedika.medifirst2000.service.DataPegawaiService; import com.jasamedika.medifirst2000.service.DegreeService; import com.jasamedika.medifirst2000.service.EvaluasiJabatanService; import com.jasamedika.medifirst2000.service.FaktorEvaluasiService; import com.jasamedika.medifirst2000.service.FakultasService; import com.jasamedika.medifirst2000.service.GajiPokokService; import com.jasamedika.medifirst2000.service.GolonganService; import com.jasamedika.medifirst2000.service.IndekKinerjaService; import com.jasamedika.medifirst2000.service.InformasiDaftarGajiService; import com.jasamedika.medifirst2000.service.InputDaftarPaketPelatihanService; import com.jasamedika.medifirst2000.service.InputDaftarPaketSeminarService; import com.jasamedika.medifirst2000.service.InstitusiPendidikanService; import com.jasamedika.medifirst2000.service.IsianPelamarService; import com.jasamedika.medifirst2000.service.JabatanService; import com.jasamedika.medifirst2000.service.JadwalDokterService; import com.jasamedika.medifirst2000.service.JadwalOrientasiService; import com.jasamedika.medifirst2000.service.JenisCutiService; import com.jasamedika.medifirst2000.service.JenisGajiService; import com.jasamedika.medifirst2000.service.JenisHonorService; import com.jasamedika.medifirst2000.service.JenisKompetensiService; import com.jasamedika.medifirst2000.service.JenisPnsService; import com.jasamedika.medifirst2000.service.JenisSkService; import com.jasamedika.medifirst2000.service.JurusanPeminatanService; import com.jasamedika.medifirst2000.service.KategoriPegawaiService; import com.jasamedika.medifirst2000.service.KategoryTugasService; import com.jasamedika.medifirst2000.service.KedudukanService; import com.jasamedika.medifirst2000.service.KelompokKompetensiService; import com.jasamedika.medifirst2000.service.KompetensiService; import com.jasamedika.medifirst2000.service.MappingPegawaiToAtasanService; import com.jasamedika.medifirst2000.service.MasterEvaluasiJabatanService; import com.jasamedika.medifirst2000.service.MasterHonorTimService; import com.jasamedika.medifirst2000.service.MasterJenisSantunanService; import com.jasamedika.medifirst2000.service.MonitoringAbsenService; import com.jasamedika.medifirst2000.service.MutasiPegawaiService; import com.jasamedika.medifirst2000.service.NamaAsuransiService; import com.jasamedika.medifirst2000.service.NamaPegawaiService; import com.jasamedika.medifirst2000.service.NamaPembimbingService; import com.jasamedika.medifirst2000.service.NilaiKelompokJabatanService; import com.jasamedika.medifirst2000.service.PegawaiJadwalKerjaService; import com.jasamedika.medifirst2000.service.PegawaiMutasiSanksiResignService; import com.jasamedika.medifirst2000.service.PekerjaanService; import com.jasamedika.medifirst2000.service.PendapatanService; import com.jasamedika.medifirst2000.service.PerhitunganAbkService; import com.jasamedika.medifirst2000.service.PerhitunganHonorTimPegawaiService; import com.jasamedika.medifirst2000.service.PerhitunganPremiBPJSKesehatanService; import com.jasamedika.medifirst2000.service.PerhitunganPremiBPJSKetenagaKerjaanService; import com.jasamedika.medifirst2000.service.PerhitunganSantunanPegawaiMeninggalDuniaService; import com.jasamedika.medifirst2000.service.PerhitunganUangLemburPegawaiService; import com.jasamedika.medifirst2000.service.PeriodePengajarService; import com.jasamedika.medifirst2000.service.PeriodePinjamanService; import com.jasamedika.medifirst2000.service.PermohonanCutiPegawaiService; import com.jasamedika.medifirst2000.service.PermohonanStatusPegawaiService; import com.jasamedika.medifirst2000.service.PernelitianEksternalService; import com.jasamedika.medifirst2000.service.PosisiLamaranService; import com.jasamedika.medifirst2000.service.ProgramPendidikanService; import com.jasamedika.medifirst2000.service.ProgramPengajaranService; import com.jasamedika.medifirst2000.service.RangeKmkService; import com.jasamedika.medifirst2000.service.RegistrasiKeanggotaanService; import com.jasamedika.medifirst2000.service.RekamDataPegawaiService; import com.jasamedika.medifirst2000.service.RekamUraianRincianKegiatanService; import com.jasamedika.medifirst2000.service.RemunerasiService; import com.jasamedika.medifirst2000.service.ReservasiService; import com.jasamedika.medifirst2000.service.RiwayatJabatanService; import com.jasamedika.medifirst2000.service.RiwayatPendidikanService; import com.jasamedika.medifirst2000.service.RiwayatPenilaianKompetensiPegawaiService; import com.jasamedika.medifirst2000.service.RuanganService; import com.jasamedika.medifirst2000.service.ShiftKerjaService; import com.jasamedika.medifirst2000.service.SimulasiPendapatanService; import com.jasamedika.medifirst2000.service.StatusKawinService; import com.jasamedika.medifirst2000.service.StatusMeninggalDuniaService; import com.jasamedika.medifirst2000.service.StatusPegawaiService; import com.jasamedika.medifirst2000.service.TahunUmrService; import com.jasamedika.medifirst2000.service.TanggunganService; import com.jasamedika.medifirst2000.service.TargetLayananService; import com.jasamedika.medifirst2000.service.TipeKeanggotaanService; import com.jasamedika.medifirst2000.service.TipeKoleksiService; import com.jasamedika.medifirst2000.service.UnitKerjaPegawaiService; import com.jasamedika.medifirst2000.service.UraianTugasService; import com.jasamedika.medifirst2000.service.UraianTugasTransaksiService; import com.jasamedika.medifirst2000.util.CommonUtil; import com.jasamedika.medifirst2000.util.DateUtil; import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.*; @RestController @RequestMapping("/sdm") public class SdmController extends LocaleController { private static final Logger LOGGER = LoggerFactory.getLogger(SdmController.class); @Autowired private BerkasLamaranService berkasLamaranService; @Autowired private MonitoringAbsenService monitoringAbsenService; @Autowired private RiwayatPenilaianKompetensiPegawaiService riwayatPenilaianKompetensiPegawaiService; @Autowired private CustomIndexKerjaService customIndexKerjaService; @Autowired private UraianTugasService uraianTugasService; @Autowired private UnitKerjaPegawaiService unitKerjaPegawaiService; @Autowired private PegawaiJadwalKerjaService pegawaiJadwalKerjaService; @Autowired private UraianTugasTransaksiService uraianTugasTransaksiService; @Autowired private MappingPegawaiToAtasanService mappingPegawaiToAtasanService; @Autowired private KategoriPegawaiService kategoriPegawaiService; @Autowired private RiwayatJabatanService riwayatJabatanService; @Autowired private RiwayatPendidikanService riwayatPendidikanService; @Autowired private RemunerasiService remunerasiService; @Autowired private DegreeService degreeService; @Autowired private ReservasiService reservasiService; @Autowired private JadwalDokterService jadwalDokterService; @Autowired private AbsensiPegawaiService absensiPegawaiService; @Autowired private NamaPembimbingService namaPembimbingService; @Autowired private NamaAsuransiService namaAsuransiService; @Autowired private KedudukanService kedudukanService; @Autowired private JurusanPeminatanService jurusanPeminatanService; @Autowired private InformasiDaftarGajiService informasiDaftarGajiService; @Autowired private PegawaiMutasiSanksiResignService serviceMusare; @Autowired private PermohonanStatusPegawaiService servicePermohonanStatus; @Autowired private JenisSkService jenisSkService; @Autowired private JenisPnsService jenisPnsService; @Autowired private JenisCutiService jenisCutiService; @Autowired private JabatanService jabatanService; @Autowired private InstitusiPendidikanService institusiPendidikanService; @Autowired private FakultasService fakultasService; @Autowired private TipeKoleksiService tipeKoleksiService; @Autowired private TipeKeanggotaanService tipeKeanggotaanService; @Autowired private TanggunganService tanggunganService; @Autowired private StatusPegawaiService statusPegawaiService; @Autowired private StatusMeninggalDuniaService statusMeninggalDunia; @Autowired private StatusKawinService statusKawinService; @Autowired private ProgramPengajaranService programPengajaranService; @Autowired private ProgramPendidikanService programPendidikanService; @Autowired private PosisiLamaranService posisiLamaranService; @Autowired private PeriodePinjamanService periodePinjamanService; @Autowired private PekerjaanService pekerjaanService; @Autowired private ShiftKerjaService shiftKerjaService; @Autowired private AturanPeminjamanService aturanPeminjamanService; @Autowired private BibliographyService bibliographyService; @Autowired private DaftarKeanggotaanService daftarKeanggotaanService; @Autowired private DataKeluargaService dataKeluargaService; @Autowired private DataPegawaiService dataPegawaiService; @Autowired private MutasiPegawaiService mutasiPegawaiService; @Autowired private PerhitunganPremiBPJSKesehatanService perhitunganPremiBPJSKesehatanService; @Autowired private PerhitunganPremiBPJSKetenagaKerjaanService perhitunganPremiBPJSKetenagakerjaanService; @Autowired private PerhitunganSantunanPegawaiMeninggalDuniaService perhitunganSantunanPegawaiMeninggalDuniaService; @Autowired private PerhitunganUangLemburPegawaiService perhitunganUangLemburPegawaiService; @Autowired private PeriodePengajarService periodePengajarService; @Autowired private PermohonanCutiPegawaiService permohonanCutiPegawaiService; @Autowired private RegistrasiKeanggotaanService registrasiKeanggotaanService; @Autowired private RekamDataPegawaiService rekamDataPegawaiService; @Autowired private KategoryTugasService KategoryTugasService; @Autowired private IsianPelamarService IsianPelamarService; @Autowired private AsuransiNakerService AsuransiNakerService; @Autowired private NamaPegawaiService NamaPegawaiService; @Autowired private MasterHonorTimService MasterHonorTimService; @Autowired private MasterJenisSantunanService MasterJenisSantunanService; @Autowired private PernelitianEksternalService PernelitianEksternalService; @Autowired private PerhitunganHonorTimPegawaiService PerhitunganHonorTimPegawaiService; @Autowired private JenisHonorService JenisHonorService; @Autowired private TahunUmrService TahunUmrService; @Autowired private JenisGajiService JenisGajiService; @Autowired private JenisGajiDao jenisGajiDao; @Autowired private GolonganService GolonganService; @Autowired private GajiPokokService GajiPokokService; @Autowired private IndekKinerjaService indekKinerjaService; @Autowired private MapUraianTugasToRincianKegiatanDao mapUraianTugasToRincianKegiatanDao; @Autowired private JenisKompetensiService JenisKompetensiService; @Autowired private KompetensiService KompetensiService; @Autowired private KelompokKompetensiService KelompokKompetensiService; @Autowired private FaktorEvaluasiService FaktorEvaluasiService; @Autowired private NilaiKelompokJabatanService kelompokJabatanService; @Autowired private RangeKmkService RangeKmkService; @Autowired private MasterEvaluasiJabatanService MasterEvaluasiJabatanService; @Autowired private EvaluasiJabatanService evaluasiJabatanService; @Autowired private SimulasiPendapatanService simulasiPendapatanService; @Autowired private PerhitunganAbkService PerhitunganAbkService; @Autowired private JadwalOrientasiService jadwalOrientasiService; @Autowired private InputDaftarPaketPelatihanService inputDaftarPaketPelatihanService; @Autowired private InputDaftarPaketSeminarService inputDaftarPaketSeminarService; @Autowired private PendapatanService pendapatanService; @Autowired private RuanganService ruanganService; @Autowired private TargetLayananService targetLayananService; @Autowired private RekamUraianRincianKegiatanService rekamUraianRincianKegiatanService; @Autowired private ActivityPegawaiService activityPegawaiService; @Autowired private NilaiKelompokJabatanService nilaiKelompokJabatanService; @Autowired private AnggaranRemunerasiService anggaranRemunerasiService; @RequestMapping(value = "/save-custom-uraian-kerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveBerkasLamaran(@Valid @RequestBody CustomIndexKerjaVO vo, HttpServletRequest request) throws ParseException { try { Map result = customIndexKerjaService.saveCustomIndexKerja(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/generate-logbook-dokter", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> generateLogbookDokter(HttpServletRequest request) { Map result = null; try { indekKinerjaService.generateAllTindakanDokter(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-custom-uraian-kerja/{id}/{tanggal}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getCustomUraianKerja(@PathVariable("id") String id, @PathVariable("tanggal") String tanggal, HttpServletRequest request) { Map result = null; try { result = customIndexKerjaService.findByPegawaiAndData(id, DateUtil.toDate(tanggal)); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-berkas-lamaran", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveBerkasLamaran(@Valid @RequestBody BerkasLamaranVO vo, HttpServletRequest request) throws ParseException { try { Map result = berkasLamaranService.saveBerkasLamaran(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-berkas-lamaran/{nama}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getsaveBerkasLamaran(@PathVariable("nama") String nama, HttpServletRequest request) { Map result = null; try { if (nama.equals("-")) nama = ""; result = berkasLamaranService.findByNamaPelamarNoRec(nama); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-reservasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveReservasi(@Valid @RequestBody ReservasiVO vo, HttpServletRequest request) throws ParseException { try { Map result = reservasiService.saveReservasi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pengembalian", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePengembalian(@Valid @RequestBody ReservasiVO vo, HttpServletRequest request) throws ParseException { try { Map result = reservasiService.saveReservasi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/upload-absen", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.ALL_VALUE) public ResponseEntity> uploadAbsen(@Valid @RequestBody UploadExcelVO fileInput, HttpServletRequest request) throws ParseException { try { Map result = jadwalDokterService.uploadAbsensi(fileInput); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-absen", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveAbsen(@Valid @RequestBody SaveAbsenVO fileInput, HttpServletRequest request) throws ParseException { try { Map result = null; for (AbsensiPegawaiVO absensiPegawaiVO : fileInput.getData()) { result = absensiPegawaiService.saveAbsensiPegawai(absensiPegawaiVO); } return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jadwal/{idFinger}/{tanggalMasuk}/{tanggalKeluar}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savejadwalAbsenPegawai(@PathVariable("idFinger") String idFinger, @PathVariable("tanggalMasuk") String tanggalMasuk, @PathVariable("tanggalKeluar") String tanggalKeluar, HttpServletRequest request) { Map result = null; try { result = jadwalDokterService.saveJadwalPegawai(idFinger, DateUtil.toDate(tanggalMasuk), DateUtil.toDate(tanggalKeluar)); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-reservasi-by-anggota/{norec}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getReservasiByNoRec(@PathVariable("norec") String norec, HttpServletRequest request) { Map result = null; try { result = reservasiService.findReservasiByAnggota(norec); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-degree", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveDegree(@Valid @RequestBody DegreeVO vo, HttpServletRequest request) { try { Map result = degreeService.saveDegree(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when saveAkun", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when saveAkun", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-nama-pembimbing", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveNamaPembimbing(@Valid @RequestBody NamaPembimbingVO vo, HttpServletRequest request) { try { Map result = namaPembimbingService.saveNamaPembimbing(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-nama-asuransi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveNamaAsuransi(@Valid @RequestBody NamaAsuransiVO vo, HttpServletRequest request) { try { Map result = namaAsuransiService.saveNamaAsuransi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-kedudukan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveKedudukan(@Valid @RequestBody KedudukanVO vo, HttpServletRequest request) { try { Map result = kedudukanService.saveKedudukan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jurusan-peminatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJurusanPeminatan(@Valid @RequestBody JurusanPeminatanVO vo, HttpServletRequest request) { try { Map result = jurusanPeminatanService.saveJurusanPeminatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jenis-sk", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJenisSk(@Valid @RequestBody JenisSkVO vo, HttpServletRequest request) { try { Map result = jenisSkService.saveJenisSk(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jenis-pns", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJenisPns(@Valid @RequestBody JenisPnsVO vo, HttpServletRequest request) { try { Map result = jenisPnsService.saveJenisPns(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jenis-cuti", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJenisCuti(@Valid @RequestBody JenisCutiVO vo, HttpServletRequest request) { try { Map result = jenisCutiService.saveJenisCuti(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJabatan(@Valid @RequestBody JabatanVO vo, HttpServletRequest request) { try { Map result = jabatanService.saveJabatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-institusi-pendidikan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveInstitusiPendidikan(@Valid @RequestBody InstitusiPendidikanVO vo, HttpServletRequest request) { try { Map result = institusiPendidikanService.saveInstitusiPendidikan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-fakultas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveFakultas(@Valid @RequestBody FakultasVO vo, HttpServletRequest request) { try { Map result = fakultasService.saveFakultas(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-tipe-koleksi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveTipeKoleksi(@Valid @RequestBody TipeKoleksiVO vo, HttpServletRequest request) { try { Map result = tipeKoleksiService.saveTipeKoleksi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-tipe-keanggotaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveTipeKeanggotaan(@Valid @RequestBody TipeKeanggotaanVO vo, HttpServletRequest request) { try { Map result = tipeKeanggotaanService.saveTipeKeanggotaan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-tanggungan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveTanggungan(@Valid @RequestBody TanggunganVO vo, HttpServletRequest request) { try { Map result = tanggunganService.saveTanggungan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-status-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveStatusPegawai(@Valid @RequestBody StatusPegawaiVO vo, HttpServletRequest request) { try { Map result = statusPegawaiService.saveStatusPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-status-meninggal-dunia", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveStatusMeninggalDunia(@Valid @RequestBody StatusMeninggalDuniaVO vo, HttpServletRequest request) { try { Map result = statusMeninggalDunia.saveStatusMeninggalDunia(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-status-kawin", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveStatusKawin(@Valid @RequestBody StatusKawinVO vo, HttpServletRequest request) { try { Map result = statusKawinService.saveStatusKawin(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-program-pengajaran", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveProgramPengajaran(@Valid @RequestBody ProgramPengajaranVO vo, HttpServletRequest request) { try { Map result = programPengajaranService.saveProgramPengajaran(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-program-pendidikan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveProgramPendidikan(@Valid @RequestBody ProgramPendidikanVO vo, HttpServletRequest request) { try { Map result = programPendidikanService.saveProgramPendidikan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-posisi-lamaran", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePosisiLamaran(@Valid @RequestBody PosisiLamaranVO vo, HttpServletRequest request) { try { Map result = posisiLamaranService.savePosisiLamaran(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-periode-pinjaman", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePeriodePinjaman(@Valid @RequestBody PeriodePinjamanVO vo, HttpServletRequest request) { try { Map result = periodePinjamanService.savePeriodePinjaman(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pekerjaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePekerjaan(@Valid @RequestBody PekerjaanVO vo, HttpServletRequest request) { try { Map result = pekerjaanService.savePekerjaan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-shift-kerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveShiftKerja(@Valid @RequestBody ShiftKerjaVO vo, HttpServletRequest request) { try { Map result = shiftKerjaService.saveShiftKerja(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/delete-shift-kerja/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> deleteShiftKerja(@RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) { try { Map result = shiftKerjaService.deleteShiftKerja(id); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-shift-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getShiftKerja(HttpServletRequest request) { try { Map result = shiftKerjaService.findAll(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-aturan-peminjaman", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveAturanPeminjaman(@Valid @RequestBody AturanPeminjamanVO vo, HttpServletRequest request) { try { Map result = aturanPeminjamanService.saveAturanPeminjaman(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-bibliography", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveBibliography(@Valid @RequestBody BibliographyVO vo, HttpServletRequest request) { try { Map result = bibliographyService.saveBibliography(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-bibliography/{nama}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getBibliography(@PathVariable("nama") String nama, HttpServletRequest request) { Map result = null; try { if (nama.equals("-")) nama = ""; result = bibliographyService.findByName(nama); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-daftar-keanggotaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveDaftarKeanggotaan(@Valid @RequestBody DaftarKeanggotaanVO vo, HttpServletRequest request) { try { Map result = daftarKeanggotaanService.saveDaftarKeanggotaan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-data-keluarga", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveDataKeluarga(@Valid @RequestBody DataKeluargaVO vo, HttpServletRequest request) { try { Map result = dataKeluargaService.saveDataKeluarga(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-data-keluarga", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDataKeluarga(HttpServletRequest request) { try { List> result = dataKeluargaService.findAll(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-data-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveDataPegawai(@Valid @RequestBody DataPegawaiVO vo, HttpServletRequest request) { try { Map result = dataPegawaiService.saveDataPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-mutasi-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveMutasiPegawai(@Valid @RequestBody MutasiPegawaiVO vo, HttpServletRequest request) { try { Map result = mutasiPegawaiService.saveMutasiPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-load-mutasi-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getLoadDataMutasi(HttpServletRequest request) { try { Map result = mutasiPegawaiService.noAgenda(); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getLoadData", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getLoadData", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-perhitungan-premi-b-p-j-s-kesehatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePerhitunganPremiBPJSKesehatan( @Valid @RequestBody PerhitunganPremiBPJSKesehatanVO vo, HttpServletRequest request) { try { Map result = perhitunganPremiBPJSKesehatanService.savePerhitunganPremiBPJSKesehatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-perhitungan-premi-b-p-j-s-ketenagakerjaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePerhitunganPremiBPJSKetenagakerjaan( @Valid @RequestBody PerhitunganPremiBPJSKetenagaKerjaanVO vo, HttpServletRequest request) { try { Map result = perhitunganPremiBPJSKetenagakerjaanService .savePerhitunganPremiBPJSKetenagaKerjaan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-perhitungan-santunan-pegawai-meninggal-dunia", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePerhitunganSantunanPegawaiMeninggalDunia( @Valid @RequestBody PerhitunganSantunanPegawaiMeninggalDuniaVO vo, HttpServletRequest request) { try { Map result = perhitunganSantunanPegawaiMeninggalDuniaService .savePerhitunganSantunanPegawaiMeninggalDunia(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-perhitungan-uang-lembur-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePerhitunganUangLemburPegawai( @Valid @RequestBody PerhitunganUangLemburPegawaiVO vo, HttpServletRequest request) { try { Map result = perhitunganUangLemburPegawaiService.savePerhitunganUangLemburPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-periode-pengajar", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePeriodePengajar(@Valid @RequestBody PeriodePengajarVO vo, HttpServletRequest request) { try { Map result = periodePengajarService.savePeriodePengajar(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-permohonan-cuti-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePermohonanCutiPegawai(@Valid @RequestBody PermohonanCutiPegawaiVO vo, HttpServletRequest request) { try { Map result = permohonanCutiPegawaiService.savePermohonanCutiPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-registrasi-keanggotaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRegistrasiKeanggotaan(@Valid @RequestBody RegistrasiKeanggotaanVO vo, HttpServletRequest request) { try { Map result = registrasiKeanggotaanService.saveRegistrasiKeanggotaan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-registrasi-keanggotaan/{nama}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getRegistrasiKeanggotaan(@PathVariable("nama") String nama, HttpServletRequest request) { Map result = null; try { if (nama.equals("-")) nama = ""; result = registrasiKeanggotaanService.findByName(nama); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/hapus-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> hapusPegawai(@Valid @RequestBody RekamDataPegawaiVO vo, HttpServletRequest request) { try { Map result = rekamDataPegawaiService.saveRekamDataPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-rekam-data-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRekamDataPegawai(@Valid @RequestBody RekamDataPegawaiVO vo, HttpServletRequest request) { try { Map result = rekamDataPegawaiService.saveRekamDataPegawaiRev(vo); if (null != result && result.get("noRec").equals(Master.TIDAK_ADA_PERUBAHAN_DATA)) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS_OK, getMessage(MessageResource.LABEL_SUCCESS_OK, request)); return RestUtil.getJsonResponse(result, HttpStatus.NOT_MODIFIED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-uraian-tugas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveUraianTugas(@Valid @RequestBody UraianTugasVO vo, HttpServletRequest request) { try { Map result = uraianTugasService.saveUraianTugas(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-kategory-tugas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveKategoryTugas(@Valid @RequestBody KategoryTugasVO vo, HttpServletRequest request) { try { Map result = KategoryTugasService.saveKategoryTugas(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-isian-pelamar", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveIsianPelamar(@Valid @RequestBody IsianPelamarVO vo, HttpServletRequest request) { try { Map result = IsianPelamarService.saveIsianPelamar(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-isian-pelamar/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getIsianPelamar(HttpServletRequest request) { Map result = null; try { result = IsianPelamarService.findDataPelamar(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-asuransi-naker", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveAsuransiNaker(@Valid @RequestBody AsuransiNakerVO vo, HttpServletRequest request) { try { Map result = AsuransiNakerService.saveAsuransiNaker(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-nama-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveNamaPegawai(@Valid @RequestBody NamaPegawaiVO vo, HttpServletRequest request) { try { Map result = NamaPegawaiService.saveNamaPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-master-honor-tim", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveMasterHonorTim(@Valid @RequestBody MasterHonorTimVO vo, HttpServletRequest request) { try { Map result = MasterHonorTimService.saveMasterHonorTim(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-master-jenis-santunan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveMasterJenisSantunan(@Valid @RequestBody MasterJenisSantunanVO vo, HttpServletRequest request) { try { Map result = MasterJenisSantunanService.saveMasterJenisSantunan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pernelitian-eksternal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePernelitianEksternal(@Valid @RequestBody PernelitianEksternalVO vo, HttpServletRequest request) { try { Map result = PernelitianEksternalService.savePernelitianEksternal(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-perhitungan-honor-tim-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePerhitunganHonorTimPegawai( @Valid @RequestBody PerhitunganHonorTimPegawaiVO vo, HttpServletRequest request) { try { Map result = PerhitunganHonorTimPegawaiService.savePerhitunganHonorTimPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jenis-honor", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJenisHonor(@Valid @RequestBody JenisHonorVO vo, HttpServletRequest request) { try { Map result = JenisHonorService.saveJenisHonor(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-tahun-umr", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveTahunUmr(@Valid @RequestBody TahunUmrVO vo, HttpServletRequest request) { try { Map result = TahunUmrService.saveTahunUmr(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jenis-gaji", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJenisGaji(@Valid @RequestBody JenisGajiVO vo, HttpServletRequest request) { try { Map result = JenisGajiService.saveJenisGaji(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/jenis-gaji", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> listJenisGaji() { List listJenisGaji = (List) jenisGajiDao.findAll(); return RestUtil.getJsonResponse(listJenisGaji); } @RequestMapping(value = "/save-golongan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveGolongan(@Valid @RequestBody GolonganVO vo, HttpServletRequest request) { try { Map result = GolonganService.saveGolongan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-gaji-pokok", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveGajiPokok(@Valid @RequestBody GajiPokokVO vo, HttpServletRequest request) { try { Map result = GajiPokokService.saveGajiPokok(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-indek-kinerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveIndekKinerja(@Valid @RequestBody List vo, HttpServletRequest request) { try { Map result = indekKinerjaService.saveIndekKinerja(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-indek-kinerja/{tahun}/{bulan}/{pegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getPegawaiByJadwal(@PathVariable("tahun") Integer tahun, @PathVariable("bulan") Integer bulan, @PathVariable("pegawai") Integer pegawai, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.findPegawaiByRuangan(tahun, bulan, pegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/set-uraian-tugas/{id}/{bobot}/{target}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> setBobot(@PathVariable("id") Integer id, @PathVariable("bobot") Integer bobot, @PathVariable("target") Integer target, HttpServletRequest request) { Map result = null; try { result = new HashMap<>(); MapUraianTugasToRincianKegiatan model = mapUraianTugasToRincianKegiatanDao.findOne(id); model.setBobot(bobot.toString()); model.setTarget(target.toString()); model.setReportDisplay(model.getRincianKegiatan()); model.setNamaExternal("-"); model.setReportDisplay("-"); model.setKodeExternal("-"); mapUraianTugasToRincianKegiatanDao.save(model); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/add-uraian-tugas/{id}/{group}/{bobot}/{target}/{description}/{jabatanId}/{pegawaiId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> addBobot(@PathVariable("id") Integer id, @PathVariable("bobot") Integer bobot, @PathVariable("target") Integer target, @PathVariable("group") String group, @PathVariable("description") String description, @PathVariable("jabatanId") Integer jabatanId, @PathVariable("pegawaiId") Integer pegawaiId, HttpServletRequest request) { Map result = null; try { result = new HashMap<>(); MapUraianTugasToRincianKegiatan model = mapUraianTugasToRincianKegiatanDao.findOne(id); model.setBobot(bobot.toString()); model.setTarget(target.toString()); model.setReportDisplay(model.getRincianKegiatan()); model.setNamaExternal("-"); model.setReportDisplay("-"); model.setKodeExternal("-"); mapUraianTugasToRincianKegiatanDao.save(model); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-jenis-kompetensi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJenisKompetensi(@Valid @RequestBody JenisKompetensiVO vo, HttpServletRequest request) { try { Map result = JenisKompetensiService.saveJenisKompetensi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-kompetensi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveKompetensi(@Valid @RequestBody KompetensiVO vo, HttpServletRequest request) { try { Map result = KompetensiService.saveKompetensi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-kelompok-kompetensi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveKelompokKompetensi(@Valid @RequestBody KelompokKompetensiVO vo, HttpServletRequest request) { try { Map result = KelompokKompetensiService.saveKelompokKompetensi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-faktor-evaluasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveFaktorEvaluasi(@Valid @RequestBody FaktorEvaluasiVO vo, HttpServletRequest request) { try { Map result = FaktorEvaluasiService.saveFaktorEvaluasi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-kelompok-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveKelompokJabatan(@Valid @RequestBody NilaiKelompokJabatanVO vo, HttpServletRequest request) { try { Map result = kelompokJabatanService.saveNilaiKelompokJabatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add kelompok jabatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add kelompok jabatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-plafon-remunerasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveKelompokJabatan(@Valid @RequestBody PlafonRemunerasiKemenkeuVO vo, HttpServletRequest request) { try { Map result = kelompokJabatanService.saveNilaiKelompokJabatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add plafon remunerasi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add plafon remunerasi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-range-kmk", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRangeKmk(@Valid @RequestBody RangeKmkVO vo, HttpServletRequest request) { try { Map result = RangeKmkService.saveRangeKmk(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-master-evaluasi-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveMasterEvaluasiJabatan(@Valid @RequestBody MasterEvaluasiJabatanVO vo, HttpServletRequest request) { try { Map result = MasterEvaluasiJabatanService.saveMasterEvaluasiJabatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/hitung-master-evaluasi-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> hitungMasterEvaluasiJabatan( @Valid @RequestBody MasterEvaluasiJabatanVO vo, HttpServletRequest request) { try { Map result = MasterEvaluasiJabatanService.hitungPoinEvaluasi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/hitung-grade-evaluasi-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> hitungGradeEvaluasiJabatan(@Valid @RequestBody EvaluasiJabatanVO vo, HttpServletRequest request) { try { Map result = evaluasiJabatanService.hitungPoinEvaluasi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListJabatan(HttpServletRequest request) { Map result = null; try { result = MasterEvaluasiJabatanService.findJabatan(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-by-jabatan/{idJabatan}/{bulan}/{tahun}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListByJabatan(@PathVariable("idJabatan") Integer idJabatan, @PathVariable("bulan") String bulan, @PathVariable("tahun") Integer tahun, HttpServletRequest request) { Map result = null; try { result = MasterEvaluasiJabatanService.findEvaluasiByJabatan(idJabatan, tahun, bulan); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-evaluasi-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveEvaluasiJabatan(@Valid @RequestBody EvaluasiJabatanVO vo, HttpServletRequest request) { try { Map result = evaluasiJabatanService.saveEvaluasiJabatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-evaluasi-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getEvaluasiJabatan(@RequestParam(value = "tahun") Integer tahun, @RequestParam(value = "bulan") String bulan, @RequestParam(value = "ruangan") Integer ruangan, HttpServletRequest request) throws ParseException { Map result = null; try { result = evaluasiJabatanService.findEvaluasiJabatan(tahun, bulan, ruangan); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-count-evaluasi-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getCountEvaluasiJabatan(@RequestParam(value = "tahun") Integer tahun, HttpServletRequest request) throws ParseException { Map result = null; try { result = evaluasiJabatanService.CountEvaluasi(tahun); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-rekap", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getRekap(@RequestParam(value = "tahun") Integer tahun, HttpServletRequest request) throws ParseException { Map result = null; try { result = evaluasiJabatanService.findPegawaiByTahun(tahun); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-evaluasi-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getEvaluasiPegawai(@RequestParam(value = "tahun") Integer tahun, @RequestParam(value = "idPegawai") Integer idPegawai, @RequestParam(value = "bulan") Integer bulan, HttpServletRequest request) throws ParseException { Map result = null; try { result = evaluasiJabatanService.findPegawaiByTahun(tahun, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-simulasi-pendapatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveSimulasiPendapatan(@Valid @RequestBody SimulasiPendapatanVO vo, HttpServletRequest request) throws ParseException { try { Map result = simulasiPendapatanService.saveSimulasiPendapatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-save-simulasi-pendapatan/{tahun}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getsaveSimulasiPendapatan(@PathVariable("tahun") Integer tahun, HttpServletRequest request) { Map result = null; try { result = simulasiPendapatanService.findByTahun(tahun); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-perhitungan-abk", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePerhitunganAbk(@Valid @RequestBody List vo, HttpServletRequest request) throws ParseException { try { Map result = PerhitunganAbkService.savePerhitunganAbk(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-perhitungan-abk", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getPerhitunganAbk(@RequestParam(value = "tahun") Integer tahun, HttpServletRequest request) throws ParseException { Map result = null; try { result = PerhitunganAbkService.findByTahun(tahun); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-jadwal-orientasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJadwalOrientasi(@Valid @RequestBody JadwalOrientasiVO vo, HttpServletRequest request) throws ParseException { try { Map result = jadwalOrientasiService.saveJadwalOrientasi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-save-jadwal-orientasi/{nama}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getsaveJadwalOrientasi(@PathVariable("nama") String nama, HttpServletRequest request) { Map result = null; try { if (nama.equals("-")) nama = ""; result = jadwalOrientasiService.findByName(nama); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-tindakan-by-user-id/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getTindakanByUserId(@PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { List> result = null; try { System.out.println(endDate); result = indekKinerjaService.findByUserId(startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-tindakan-by-period/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllTindakanByPeriod( @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findAllTindakanByPeriod(idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-logbook-summary-by-user-id", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getLogbookSummaryByUserId( @RequestParam(value = "idPegawai") Integer idPegawai, @RequestParam(value = "startDate") String startDate, @RequestParam(value = "endDate") String endDate, @RequestParam(value = "idTindakan") Integer idProduk, HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findTindakanByUserId(idPegawai, startDate, endDate, idProduk); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-tindakan-by-user-id-and-periode/{month}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getTindakanByIdUserAndPeriod(@PathVariable("month") String month, HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findTindakanByIdUserAndPeriod(month); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-uraian-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getUraianKerja(HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findUraianTugas();// validasitargetbobotnull mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-persen-uraian-kerja/{idPegawai}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPersen(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findCountTindakanByIdUserAndPeriod(idPegawai, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-detail-poin/{tgl}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDetailPoin(@PathVariable("tgl") String tgl, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.detailPoin(tgl, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-rekap-poin/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getRekapPoin(@PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.rekapPoin(month, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-uraian-tugas-transaksi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveUraianTugasTransaksi(@Valid @RequestBody UraianTugasCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = uraianTugasTransaksiService.saveUraianTugas(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-indek-kinerja-kuantitas/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getIndekKinerjaKuantitas(@PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, @RequestParam(value = "isNew", required = false) Boolean isNew, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.getIndekKinerjaKuantitasData(month, idPegawai, isNew); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-rekapitulasi-capaian/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getRekapitulasiCapaian(@PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.getRekapitulasiCapaianUraianTugas(month, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-uraian-kerja-dan-capaian/{date}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getUraianKerjaDanCapaian(@PathVariable("date") String date, HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findUraianTugasByTanggal(date); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-target-bobot-uraian-kerja/{idPegawai}/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getTargetBobotUraianKerja(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("periode") String periode, HttpServletRequest request) { Map result = null; try { result = uraianTugasTransaksiService.findTargetAndBobot(idPegawai, periode); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-id-pgw", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity getIDs(HttpServletRequest request) { Pegawai result = null; try { result = indekKinerjaService.getPegawaiByUserLogin(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-target-bobot-uraian-tugas-transaksi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveTargetBobotUraianTugasTransaksi( @Valid @RequestBody UraianTugasCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = uraianTugasTransaksiService.saveTargetBobotUraianTugas(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-indeks-kinerja-individu", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveIndeksKinerjaindividu(@Valid @RequestBody IndeksKinerjaIndividuVO vo, HttpServletRequest request) throws ParseException { try { Map result = indekKinerjaService.saveIndekKinerjaIndividu(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-list-indeks-kinerja-individu", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveListIndeksKinerjaindividu( @Valid @RequestBody IndeksKinerjaIndividuCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = indekKinerjaService.saveAllIndekKinerja(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-kualitas-inovasi-IKI/{periode}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKualitasAndInovasi(@PathVariable("periode") String periode, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.findKualitasAndInovasi(periode, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-detail-presensi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDetailPresensi(HttpServletRequest request, @RequestParam(value = "listTrNo", required = true) List listTrNo) { try { List> result = absensiPegawaiService.findDetailPresensi(listTrNo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get detail presensi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get detail presensi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-kehadiran/{idPegawai}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKehadiran(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.jumlahKehadiran(idPegawai, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-kehadiran-rev/{idPegawai}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKehadiranRev(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.jumlahKehadiranRev(idPegawai, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-monitoring-absen", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveMonitoringAbsen(@Valid @RequestBody MonitoringAbsenCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = monitoringAbsenService.saveMonitoring(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-kehadiran-iki/{periode}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKehadiranIKI(@PathVariable("periode") String periode, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.findKehadiran(periode, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-kehadiran-by-ruangan/{idUnitKerja}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKehadiranByRuangan(@PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.findKehadiranByRuangan(idUnitKerja, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-kehadiran-by-ruangan/{idUnitKerja}/{idSubUnitKerja}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKehadiranByRuangan(@PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("idSubUnitKerja") Integer idSubUnitKerja, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.findKehadiranByRuangan(idUnitKerja, idSubUnitKerja, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-kehadiran-all-pegawai/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findAllKehadiran(@PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.findKehadiranAllPegawai(startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-rekap-IKI/{idRuangan}/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findRekapIKI(@PathVariable("idRuangan") Integer idRuangan, @PathVariable("periode") String periode, HttpServletRequest request) { Map result = null; try { result = indekKinerjaService.rekapIKI(idRuangan, periode); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-penilaian-kompetensi/{idJabatan}/{tglPenilaian}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findRekapIKI(@PathVariable("idJabatan") Integer idJabatan, @PathVariable("tglPenilaian") String tglPenilaian, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { Map result = null; try { result = riwayatPenilaianKompetensiPegawaiService.getPenilaianKompetensiPegawai(idJabatan, tglPenilaian, idPegawai);// bp mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-penilaian-kompetensi-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePenilaianKompetensiPegawai(@Valid @RequestBody StrukHistoriVO vo, HttpServletRequest request) throws ParseException { try { Map result = riwayatPenilaianKompetensiPegawaiService.savePenilaianKompetensiPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-input-daftar-paket-pelatihan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveInputDaftarPaketPelatihan( @Valid @RequestBody InputDaftarPaketPelatihanVO vo, HttpServletRequest request) { Map result = inputDaftarPaketPelatihanService.saveInputDaftarPaketPelatihan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } @RequestMapping(value = "/save-input-daftar-paket-seminar", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveInputDaftarPaketSeminar( @Valid @RequestBody InputDaftarPaketSeminarVO vo, HttpServletRequest request) { Map result = inputDaftarPaketSeminarService.saveInputDaftarPaketSeminar(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } @RequestMapping(value = "/get-login-user-musare", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getUserLogin(HttpServletRequest request) { try { Map result = serviceMusare.getUserLogin(); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getUserLogin", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getUserLogin", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-data-by-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDataByPegawai(@RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) { try { Map result = serviceMusare.getDataMuSaReByPegawai(id); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataByPegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataByPegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-load-pengajuan-mutasi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> loadPagePengajuanMutasi( @RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) { try { Map result = serviceMusare.loadPagePengajuanMutasi(ruanganId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when loadPagePengajuanMutasi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when loadPagePengajuanMutasi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pengajuan-mutasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePengajuanMutasi(@Valid @RequestBody PlanningPegawaiMuSaReVO vo, HttpServletRequest request) { try { Map result = serviceMusare.savePengajuanMutasi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when savePengajuanMutasi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when savePengajuanMutasi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-pengajuan-mutasi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListPengajuanMutasi( @RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) { try { Map result = serviceMusare.getListPengajuanMutasi(id); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListPengajuanMutasi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListPengajuanMutasi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-load-pengajuan-sanksi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> loadPagePengajuanSanksi( @RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) { try { Map result = serviceMusare.loadPagePengajuanSanksi(ruanganId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when loadPagePengajuanSanksi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when loadPagePengajuanSanksi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pengajuan-sanksi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePengajuanSanksi(@Valid @RequestBody PlanningPegawaiMuSaReVO vo, HttpServletRequest request) { try { Map result = serviceMusare.savePengajuanSanksi(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when savePengajuanSanksi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when savePengajuanSanksi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-pengajuan-sanksi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListPengajuanSanksi( @RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) { try { Map result = serviceMusare.getListPengajuanSanksi(id); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListPengajuanSanksi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListPengajuanSanksi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-load-pengajuan-resign", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> loadPagePengajuanResign( @RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) { try { Map result = serviceMusare.loadPagePengajuanResign(ruanganId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when loadPagePengajuanResign", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when loadPagePengajuanResign", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pengajuan-resign", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePengajuanResign(@Valid @RequestBody PlanningPegawaiMuSaReVO vo, HttpServletRequest request) { try { Map result = serviceMusare.savePengajuanResign(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when savePengajuanResign", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when savePengajuanResign", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-pengajuan-resign", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListPengajuanResign( @RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) { try { Map result = serviceMusare.getListPengajuanResign(id); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListPengajuanResign", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListPengajuanResign", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-pengajuan-musare", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListDaftarMuSaRe( @RequestParam(value = "namaPegawai", required = true) String namaPegawai, HttpServletRequest request) { try { Map result = serviceMusare.getListDaftarMuSaRe(namaPegawai); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListDaftarMuSaRe", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListDaftarMuSaRe", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/verifikasi-pengajuan-musare", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> ApprovalMusare(@Valid @RequestBody PlanningPegawaiMuSaReVO vo, HttpServletRequest request) { try { Map result = serviceMusare.ApprovalMusare(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when ApprovalMusare", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when ApprovalMusare", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/unverif-pengajuan-musare", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> unVerifMusare(@Valid @RequestBody PlanningPegawaiMuSaReVO vo, HttpServletRequest request) { try { Map result = serviceMusare.unVerifMusare(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when unVerifMusare", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when unVerifMusare", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-history-sanksi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getHistoryExecSanksi( @RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) { try { Map result = serviceMusare.getHistoryExecSanksi(pegawaiId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getHistoryExecSanksi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getHistoryExecSanksi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-history-pangkat", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getHistoryExecPangkat( @RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) { try { Map result = serviceMusare.getHistoryExecPangkat(pegawaiId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getHistoryExecPangkat", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getHistoryExecPangkat", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-history-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getHistoryExecJabatan( @RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) { try { Map result = serviceMusare.getHistoryExecJabatan(pegawaiId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getHistoryExecJabatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getHistoryExecJabatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-login-user-permohonan-status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getUserLoginPermohonanStatus(HttpServletRequest request, @RequestParam(value = "idPegawai", required = true) Integer idPegawai) { try { Map result = servicePermohonanStatus.getUserLogin(idPegawai); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when servicePermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when servicePermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-jabatan-login-user", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getJabatanUserLogin(HttpServletRequest request, @RequestParam(value = "idPegawai", required = true) Integer idPegawai) { try { Map result = servicePermohonanStatus.getUserLogin(idPegawai); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when servicePermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when servicePermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-load-permohonan-status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getLoadData( @RequestParam(value = "subUnitKerjaId", required = true) Integer subUnitKerjaId, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getLoadData(subUnitKerjaId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getLoadData", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getLoadData", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-data-cuti", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDataCuti( @RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, @RequestParam(value = "year", required = false) String year, @RequestParam(value = "statusPegawaiId", required = true) Integer statusPegawaiId, @RequestParam(value = "kategoriPegawaiId", required = false) Integer kategoriPegawaiId, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getDataCuti(pegawaiId, year, statusPegawaiId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataCuti", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataCuti", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/perbarui-data-cuti", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> perbaruiDataCuti(HttpServletRequest request, @RequestParam(value = "pegawaiId", required = true) Integer idPegawai, @RequestParam(value = "year", required = false) String year, @RequestParam(value = "statusPegawaiId", required = true) Integer idStatusPegawai) { try { Map result = servicePermohonanStatus.perbaruiDataCuti(idPegawai, idStatusPegawai); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_UPDATE_DATA_CUTI, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when perbaruiDataCuti", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when perbaruiDataCuti", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-data-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDataPermohonanStatus( @RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getDataPermohonanStatus(pegawaiId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-data-map-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDataMPermohonanStatus( @RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getDataMapPermohonanStatus(pegawaiId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-permohonan-status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListPermohonanStatus( @RequestParam(value = "unitKerjaId", required = false) Integer unitKerjaId, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getListPermohonanStatus(unitKerjaId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-approval-status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListApprovalStatus( @RequestParam(value = "idPegawai", required = true) Integer idPegawai, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getApprovalStatus(idPegawai); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListApprovalStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListApprovalStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-tanggal-permohonan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListTanggalPermohonan( @RequestParam(value = "idPegawai", required = true) Integer idPegawai, HttpServletRequest request) { try { List> result = servicePermohonanStatus.getListTanggalPermohonan(idPegawai); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListTanggalPermohonan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListTanggalPermohonan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-approval-status-paging", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListApprovalStatusPaging( @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, @RequestParam(value = "take", required = false, defaultValue = "5") Integer limit, @RequestParam(value = "sort", required = false, defaultValue = "namaLengkap asc, a.tglPengajuan") String sort, @RequestParam(value = "dir", required = false, defaultValue = "desc") String dir, @RequestParam(value = "idPegawai", required = true) Integer idPegawai, @RequestParam(value = "nama", required = false) String nama, @RequestParam(value = "jenisPermohonan", required = false) String jenisPermohonan, @RequestParam(value = "statusPermohonan", required = false) Integer statusPermohonan, @RequestParam(value = "tglPermohonan", required = false) String tglPermohonan, @RequestParam(value = "isCutiLuarNegeri", required = false) Boolean isCutiLuarNegeri, @RequestParam(value = "isCutiLuarKota", required = false) Boolean isCutiLuarKota, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getApprovalStatusPaging(page, limit, sort, dir, idPegawai, nama, jenisPermohonan, statusPermohonan, tglPermohonan, isCutiLuarNegeri, isCutiLuarKota); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListApprovalStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListApprovalStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-approval-status-by-planning", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListApprovalStatusByNorecPlanning( @RequestParam(value = "idPegawai", required = true) Integer idPegawai, @RequestParam(value = "noRec", required = true) String noRec, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getApprovalStatusByNorecPlanning(idPegawai, noRec); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListApprovalStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListApprovalStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-approval-status-by-status-pegawai-plan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getApprovalStatusByStatusPegawaiPlan( @RequestParam(value = "idPegawai", required = true) Integer idPegawai, @RequestParam(value = "statusPegawaiPlanId", required = false) Integer statusPegawaiPlanId, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getApprovalStatusByStatusPegawaiPlan(idPegawai, statusPegawaiPlanId); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListApprovalStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListApprovalStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pegawai-status", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePlanningPegawaiStatus(@Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) { try { Map result = new HashMap<>(); boolean statusTanggalPermohonan = servicePermohonanStatus.validateTanggalPermohonanRev( vo.getStatusPegawaiPlan().getId(), vo.getListTanggal(), vo.getPegawai().getId()); if (CommonUtil.isNotNullOrEmpty(statusTanggalPermohonan) && !statusTanggalPermohonan) { result.put("bisaCuti", statusTanggalPermohonan); result.put("status", "Tanggal Permohonan sudah pernah diajukan!"); // Validasi_tanggal_permohonan_yang_sudah_diajukan return RestUtil.getJsonResponse(result, HttpStatus.OK); } result = servicePermohonanStatus.savePlanningPegawaiStatus(vo); if (CommonUtil.isNotNullOrEmpty(result.get("noRec"))) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when savePlanningPegawaiStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when savePlanningPegawaiStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-pegawai-status-rev", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> savePlanningPegawaiStatusRev( @Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) { try { Map result = new HashMap<>(); boolean statusTanggalPermohonan = servicePermohonanStatus.validateTanggalPermohonanRev( vo.getStatusPegawaiPlan().getId(), vo.getListTanggal(), vo.getPegawai().getId()); if (CommonUtil.isNotNullOrEmpty(statusTanggalPermohonan) && !statusTanggalPermohonan) { result.put("bisaCuti", statusTanggalPermohonan); result.put("status", "Tanggal Permohonan sudah pernah diajukan!"); // Validasi_tanggal_permohonan_yang_sudah_diajukan return RestUtil.getJsonResponse(result, HttpStatus.OK); } else { result = servicePermohonanStatus.savePlanningPegawaiStatus(vo); if (CommonUtil.isNotNullOrEmpty(result.get("noRec"))) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when savePlanningPegawaiStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when savePlanningPegawaiStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/update-pegawai-status", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> updatePlanningPegawaiStatus( @Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) { try { Map result = servicePermohonanStatus.updatePlanningPegawaiStatus(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when update PlanningPegawaiStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when update PlanningPegawaiStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/delete-pegawai-status/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> deletePlanningPegawaiStatus( @RequestParam(value = "noRec", required = true) String noRec, HttpServletRequest request) { try { Map result = servicePermohonanStatus.deletePlanningPegawaiStatus(noRec); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when update PlanningPegawaiStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when update PlanningPegawaiStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/approval-permohonan-status", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> approvalPermohonanStatus(@Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) { try { // update_data_jadwal_pegawai List vos = pegawaiJadwalKerjaService.generateJadwalKerja(vo); pegawaiJadwalKerjaService.saveListJadwalPegawai(vos, false, false); Map result = servicePermohonanStatus.approvalPermohonanStatus(vo); // update_data_jatah_cuti_dan_izin if (vo.getStatusPegawaiExec().getId() == 1) { // hanya_jika_cuti_tahunan JatahCutiDanIzinVO cutiVo = servicePermohonanStatus.setJatahCutiDanIzinVo(vo.getPegawai().getId(), vo.getStatusPegawaiExec().getId()); servicePermohonanStatus.setJatahCutiPegawaiRecursive(cutiVo); } if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when approvalPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when approvalPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/unverif-permohonan-status", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> unVerifPermohonanStatus(@Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) { try { Map result = servicePermohonanStatus.unVerifPermohonanStatus(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when unVerifPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when unVerifPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-periode-golongan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getPeriodeRekap(HttpServletRequest request) { try { Map result = informasiDaftarGajiService.getPeriodeGolongan(); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getPeriodeRekap", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getPeriodeRekap", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-daftar-gaji-pns", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDaftarGajiPns( @RequestParam(value = "periode", required = true) String periode, HttpServletRequest request) { try { Map result = informasiDaftarGajiService.getDaftarGajiPns(periode); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getStrukHistori", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getStrukHistori", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-detail-gaji-pns", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDtailGajiPns( @RequestParam(value = "noRec", required = true) String noRec, @RequestParam(value = "id", required = true) Integer id, @RequestParam(value = "periode", required = true) String periode, @RequestParam(value = "namaPegawai", required = true) String namaPegawai, HttpServletRequest request) { try { Map result = informasiDaftarGajiService.getDtailGajiPns(noRec, id, namaPegawai, periode); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataGajiPegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataGajiPegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-daftar-gaji-pkwt", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDaftarGajiPkwt( @RequestParam(value = "periode", required = true) String periode, HttpServletRequest request) { try { Map result = informasiDaftarGajiService.getDaftarGajiPkwt(periode); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDaftarGajiPkwt", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDaftarGajiPkwt", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-detail-gaji-pkwt", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDtailGajiPkwt( @RequestParam(value = "noRec", required = true) String noRec, @RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) { try { Map result = informasiDaftarGajiService.getDtailGajiPkwt(noRec, id); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDtailGajiPkwt", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDtailGajiPkwt", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-gap-kompetensi/{idRuangan}/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> findGapKompetensi(@PathVariable("idRuangan") Integer idRuangan, @PathVariable("periode") String periode, HttpServletRequest request) { List> result = null; try { result = riwayatPenilaianKompetensiPegawaiService.getGapKompetensiPegawai(idRuangan, periode); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-kompetensi-by-ruangan/{idRuangan}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findGapKompetensi(@PathVariable("idRuangan") Integer idRuangan, HttpServletRequest request) { Map result = null; try { result = riwayatPenilaianKompetensiPegawaiService.getKompetensiPegawai(idRuangan); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-rekap-kehadiran", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRekapKehadiran(@Valid @RequestBody StrukHistoriVO vo, HttpServletRequest request) throws ParseException { try { Map result = monitoringAbsenService.saveRekapKomponen(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add rekapKehadiran", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add rekapKehadiran", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-total-index-kehadiran", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveTotalIndexKehadiran(@Valid @RequestBody StrukHistoriVO vo, HttpServletRequest request) throws ParseException { try { Map result = monitoringAbsenService.saveTotalIndexRekapitulasiKehadiran(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add rekapKehadiran", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add rekapKehadiran", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-factor-rate-kelompok-Shift", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveFactorRateKelompokShift( @Valid @RequestBody KelompokShiftKerjaCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = monitoringAbsenService.saveFactorRate(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add factor rate", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add factor rate", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-rencana-tindak-lanjut", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> findRencanaTindakLanjut(HttpServletRequest request) { List> result = null; try { result = riwayatPenilaianKompetensiPegawaiService.getRencanaTindakLanjut(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/rekap-kehadiran/{idPegawai}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> rekapKehadiran(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.rekapitulasiKehadiranAllPegawai(idPegawai, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/rekap-kehadiran-by-unit-kerja/{idUnitKerja}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> rekapKehadiranByUnitKerja( @PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.rekapitulasiKehadiranByUnitKerja(idUnitKerja, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/rekap-kehadiran-by-unit-kerja-rescored/{idUnitKerja}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> rekapKehadiranByUnitKerjaRev( @PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.rekapitulasiKehadiranByUnitKerjaRev(idUnitKerja, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/rekap-index-kehadiran-by-unit-kerja/{idUnitKerja}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> rekapIndeksKehadiranByUnitKerja( @PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.rekapitulasiIndeksKehadiranByunitKerja(idUnitKerja, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/rekap-index-kehadiran/{idPegawai}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> rekapIndeksKehadiran(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.rekapitulasiIndexKehadiranAllPegawai(idPegawai, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-komponen-index", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListKomponenIndex(HttpServletRequest request) { List> result = null; try { result = shiftKerjaService.getListKomponenIndex(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-jadwal-Kerja/{idRuangan}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getJadwalKerja(@PathVariable("idRuangan") Integer idRuangan, HttpServletRequest request) { List> result = null; try { result = pegawaiJadwalKerjaService.getShiftKerja(idRuangan); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-pegawai-jadwal-kerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveapegawaiJadwalKerja( @Valid @RequestBody PegawaiJadwalKerjaCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = pegawaiJadwalKerjaService.saveJadwalKerja(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Pegawai Jadwal kerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pegawai Jadwal kerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-shift-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListShiftKerja(HttpServletRequest request) { List> result = null; try { result = shiftKerjaService.getListShiftKerja(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-keterangan-shift", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListKetShift(HttpServletRequest request) { List> result = null; try { result = shiftKerjaService.getListKetShift(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-factor-rate-shift-kerja/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListFactorRateShiftKerja(HttpServletRequest request, @PathVariable("periode") String periode) { List> result = null; try { result = monitoringAbsenService.findFactorRateIndekkehadiran(periode); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } // Get data list Master Jabatan Evaluasi @RequestMapping(value = "/get-list-master-evaluasi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListMasterJabatanEvaluasiByTahunBulan( @RequestParam(value = "tahun", required = false) Integer tahun, @RequestParam(value = "bulan", required = false) String bulan, HttpServletRequest request) { Map result = null; try { result = evaluasiJabatanService.findEvaluasiJabatanTahun(tahun); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-kehadiran-lembur-sdm/{idPegawai}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKehadiranLemburKerjaSdm(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.jumlahKehadiranLemburKerjaSdm(idPegawai, startDate, endDate); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-kehadiran-lembur-sdm-by-periode/{idPegawai}/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> findKehadiranLemburKerjaSdm(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("periode") String periode, HttpServletRequest request) { Map result = null; try { result = monitoringAbsenService.jumlahKehadiranLemburKerjaSdm(idPegawai, periode); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-input-lembur-verifikasi-sdm", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveInputLemburVerifikasiSdm( @Valid @RequestBody InputLemburSdmCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = monitoringAbsenService.saveLemburVerifikasiSdm(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-all-pegawai-aktif-verified-by-unitkerja/{period}", method = RequestMethod.GET) public ResponseEntity> getAllPegawaiAktifVerfiedByUnitKerja(@PathVariable("period") String period, HttpServletRequest request) { try { List listPegawaiVo = monitoringAbsenService.findPegawaiAktifAndVerifiedByUnitKerja(period); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(listPegawaiVo, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifVerfiedByUnitKerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifVerfiedByUnitKerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-running-text-struk-histori/", method = RequestMethod.GET) public ResponseEntity getRunningTextStrukHistori(HttpServletRequest request) { try { String runningNumber = monitoringAbsenService.getRunningNumberStrukHistori(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(runningNumber, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifVerfiedByUnitKerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifVerfiedByUnitKerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-pegawai-lembur-by-priod/{period}", method = RequestMethod.GET) public ResponseEntity>> getPegawaiLemburByPeriod(@PathVariable("period") String period, HttpServletRequest request) { try { List> runningNumber = monitoringAbsenService.findJumlahLembur(period); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(runningNumber, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifVerfiedByUnitKerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifVerfiedByUnitKerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-perhitungan-uang-lembur", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveUangLembur(@Valid @RequestBody Set vo, HttpServletRequest request) throws ParseException { try { Map result = monitoringAbsenService.saveUangLembur(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-poin-dokter/{idUnitKerja}/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPoinDokter(@PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("periode") String periode, HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.getIndekKinerjaKuantitasPerUnitKerja(periode, idUnitKerja); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/menangguhkan-permohonan-status", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> menangguhkanVerifPermohonanStatus( @Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) { try { // update_data_jadwal_pegawai List vos = pegawaiJadwalKerjaService.generateJadwalKerjaPenangguhan(vo); pegawaiJadwalKerjaService.saveListJadwalPegawai(vos, false, true); Map result = servicePermohonanStatus.penangguhanPerubahanStatusKehadiran(vo); // update_data_jatah_cuti_dan_izin if (vo.getStatusPegawaiExec().getId() == 1) { // hanya_jika_cuti_tahunan JatahCutiDanIzinVO cutiVo = servicePermohonanStatus.setJatahCutiDanIzinVo(vo.getPegawai().getId(), vo.getStatusPegawaiExec().getId()); servicePermohonanStatus.setJatahCutiPegawaiRecursive(cutiVo); } if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when unVerifPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when unVerifPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-permohonan-status-cuti", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListPermohonanStatusCuti(@RequestParam("isSdm") Boolean isSdm, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getListPermohonanStatusPegawai(isSdm); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-permohonan-status-cuti-paging", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListPermohonanStatusCutiPaging( @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, @RequestParam(value = "take", required = false, defaultValue = "5") Integer limit, @RequestParam(value = "sort", required = false, defaultValue = "namaLengkap") String sort, @RequestParam(value = "dir", required = false, defaultValue = "asc") String dir, @RequestParam(value = "idPegawai", required = true) Integer idPegawai, @RequestParam(value = "nama", required = false) String nama, @RequestParam(value = "jenisPermohonan", required = false) String jenisPermohonan, @RequestParam(value = "statusPermohonan", required = false) Integer statusPermohonan, @RequestParam(value = "tglPermohonan", required = false) String tglPermohonan, @RequestParam(value = "isSdm", required = false) Boolean isSdm, @RequestParam(value = "isCutiLuarNegeri", required = false) Boolean isCutiLuarNegeri, @RequestParam(value = "isCutiLuarKota", required = false) Boolean isCutiLuarKota, HttpServletRequest request) { try { Map result = servicePermohonanStatus.getListPermohonanStatusPegawaiPaging(page, limit, sort, dir, idPegawai, nama, jenisPermohonan, statusPermohonan, tglPermohonan, isSdm, isCutiLuarNegeri, isCutiLuarKota); if (null != result) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } else { return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getListPermohonanStatus", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getListPermohonanStatus", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jatah-cuti-dan-izin", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJatahCutiDanIzin(@Valid @RequestBody KelompokShiftKerjaCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = servicePermohonanStatus.setJatahCutiRecursive(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add jatahCuti", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add jatahCuti", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-jatah-cuti-dan-izin-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveJatahCutiDanIzinPegawai(@Valid @RequestBody JatahCutiDanIzinVO vo, HttpServletRequest request) throws ParseException { try { Map result = servicePermohonanStatus.setJatahCutiPegawaiRecursive(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_UPDATE_DATA_CUTI, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add jatahCuti pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add jatahCuti pegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-mapping-pegawai-to-atasan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveMappingPegawaiToJabatan( @Valid @RequestBody List vo, HttpServletRequest request) throws ParseException { try { Map result = mappingPegawaiToAtasanService.saveMappingPegawaiToAtasan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-pegawai-bawahan/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPegawaibawahan(@PathVariable("id") Integer id, HttpServletRequest request) { List> result = null; try { result = mappingPegawaiToAtasanService.getPegawaibawahan(id); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-mapping-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getMappingPegawai(HttpServletRequest request) { List> result = null; try { result = mappingPegawaiToAtasanService.getMappingpegawai(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-pegawai-atasan/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPegawaiAtasan(@PathVariable("id") Integer id, HttpServletRequest request) { List> result = null; try { result = mappingPegawaiToAtasanService.getPegawaiAtasan(id); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-atasan-langsung-as-pejabat-penilai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAtasanLangsungAsPejabatPenilai( @RequestParam(value = "idAtasanLangsung", required = true) Integer idAtasanLangsung, HttpServletRequest request) { List> result = new ArrayList>(); try { Map data = mappingPegawaiToAtasanService .findAtasanLangsungAsPejabatPenilai(idAtasanLangsung); result.add(data); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-rincian-kegiatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRincianKegiatan(@Valid @RequestBody RincianKegiatanVO vo, HttpServletRequest request) throws ParseException { try { Map result = uraianTugasService.saveRincianKegiatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add rincian kegiatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add rincian kegiatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-map-rincian-kegiatan-to-uraian-tugas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRincianKegiatanToUraianTugas(@Valid @RequestBody UraianTugasMVO vo, HttpServletRequest request) throws ParseException { try { Map result = uraianTugasService.saveUraianTugasNew(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add rincian kegiatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add rincian kegiatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/rekam-uraian-rincian-kegiatan-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRekamUraianRincianKegiatan( @Valid @RequestBody RekamUraianRincianKegiatanVO vo, HttpServletRequest request) throws ParseException { try { Map result = rekamUraianRincianKegiatanService.saveUraianRincianKegiatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when rekam uraian rincian kegiatan pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when rekam uraian rincian kegiatan pegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-acuan-indeks-iki", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveAcuanIndeksIKI(@Valid @RequestBody List vo, HttpServletRequest request) throws ParseException { try { Map result = indekKinerjaService.saveTabelAcuanIndeksIKI(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add acuan indeks iki", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when acuan indeks iki", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-all-acuan-iki", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllAcuan(HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findAcuanIndeksIKI(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-indeks-iki/{nilai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity getIndeksIKI(@PathVariable("nilai") Double nilai, HttpServletRequest request) { Double result = 0.0; try { result = indekKinerjaService.getIndeksIKI(nilai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-uraian-tugas", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllUT(HttpServletRequest request) { List> result = null; try { result = uraianTugasTransaksiService.findAllUraianTugas(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-uraian-kerja-by-jabatan/{idJabatan}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getUraianKerjaByJabatan( @PathVariable("idJabatan") Integer idJabatan, HttpServletRequest request) { List> result = null; try { result = uraianTugasTransaksiService.getUraianTugasByJabatan(idJabatan); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-unit-kerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveRincianKegiatan(@Valid @RequestBody UnitKerjaPegawaiVO vo, HttpServletRequest request) throws ParseException { try { Map result = unitKerjaPegawaiService.saveUnitkerja(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add unit kerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add unit kerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-all-unit-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getAllUnitKerja(HttpServletRequest request) { List result = null; try { result = unitKerjaPegawaiService.getAllUnitKerja(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-unit-kerja-by-name/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getUnitKerjaByName(@PathVariable("name") String name, HttpServletRequest request) { List result = null; try { result = unitKerjaPegawaiService.getUnitKerjaByName(name); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-habsen-manual", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveHabsenManual(@Valid @RequestBody MonitoringAbsenCustomVO vo, HttpServletRequest request) throws ParseException { try { Map result = monitoringAbsenService.saveAbsenManual(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add habsen", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add habsen", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-sub-unit-kerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveSubUnitKerja(@Valid @RequestBody SubUnitKerjaPegawaiVO vo, HttpServletRequest request) throws ParseException { try { Map result = unitKerjaPegawaiService.saveSubUnitkerja(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add unit kerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add unit kerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-all-sub-unit-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllSubUnitKerja(HttpServletRequest request) { List> result = null; try { result = unitKerjaPegawaiService.getAllSubUnitKerja(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-sub-unit-kerja-by-unit-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getSubunitKerjaByUnitKerja( @RequestParam(value = "idUnitKerjaPegawai", required = true) Integer idUnitKerjaPegawai, HttpServletRequest request) { List> result = null; try { result = unitKerjaPegawaiService.getAllSubunitKerjaByUnitKerja(idUnitKerjaPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-sub-unit-kerja-by-name/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getSubUnitKerjaByName(@PathVariable("name") String name, HttpServletRequest request) { List> result = null; try { result = unitKerjaPegawaiService.getSubUnitKerjaByName(name); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-sub-unit-kerja-by-unit-kerja/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getSubUnitKerjaByUnitKerja(@PathVariable("id") Integer id, HttpServletRequest request) { List> result = null; try { result = unitKerjaPegawaiService.getAllSubUnitKerjaByUnitKerja(id); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-habsen-manual/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getHabsenManual(@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { List> result = null; try { result = monitoringAbsenService.getByLoc_Code(idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-tindakan-dokter-rescored/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllTindakanReview(@PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { try { List> result = indekKinerjaService.getAllTindakanByDokterReview(month, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (Exception e) { e.printStackTrace(); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @RequestMapping(value = "/get-all-tindakan-dokter/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllTindakan(@PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { try { List> result = indekKinerjaService.getAllTindakanByDokter(month, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (Exception e) { e.printStackTrace(); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @RequestMapping(value = "/get-all-tindakan-dokter-fee-for-service-rescored/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllTindakanFeeForServiceReview( @PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { try { List> result = indekKinerjaService.getAllTindakanByDokterForfeeForServiceReview(month, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (Exception e) { e.printStackTrace(); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @RequestMapping(value = "/get-pendapatan-fee-for-service/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPendapatanFeeForServiceReview( @PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { try { List> result = pendapatanService.getFeeForServiceDokter(month, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (Exception e) { e.printStackTrace(); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @RequestMapping(value = "/get-all-tindakan-dokter-fee-for-service/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllTindakanFeeForService(@PathVariable("month") String month, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { try { List> result = indekKinerjaService.getAllTindakanByDokterForfeeForService(month, idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (Exception e) { e.printStackTrace(); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @RequestMapping(value = "/get-detail-pasien/{idProduk}/{idKelas}/{idPegawai}/{tgl}/{ffs}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDetailPasien(@PathVariable("idProduk") Integer idProduk, @PathVariable("idKelas") Integer idKelas, @PathVariable("tgl") String tgl, @PathVariable("ffs") Boolean ffs, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.findPatientDetailForEveryTindakanReview(idProduk, idKelas, idPegawai, tgl, ffs); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-detail-pasien-ffs/{idProduk}/{idKelas}/{idKomponenHarga}/{idPegawai}/{tgl}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDetailPasienFfs(@PathVariable("idProduk") Integer idProduk, @PathVariable("idKelas") Integer idKelas, @PathVariable("idKomponenHarga") Integer idKomponenHarga, @PathVariable("tgl") String tgl, @PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { List> result = null; try { result = pendapatanService.getDetailFeeForServiceDokter(idProduk, idKelas, idKomponenHarga, idPegawai, tgl); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-kelompok-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllKelompokJabatan(HttpServletRequest request) { List> result = null; try { result = jabatanService.getKelompokJabatan(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-jabatan-by-jenis-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getJabatanByJenisJabatan(HttpServletRequest request, @RequestParam(value = "idJenisJabatan", required = true) Integer idJenisJabatan, @RequestParam(value = "kdJabatan", required = false) String kdJabatan) { List> result = null; try { result = jabatanService.getJabatanByJenisJabatan(idJenisJabatan, kdJabatan); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-master-kelompok-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveKelompokJabatan(@Valid @RequestBody KelompokJabatanVO vo, HttpServletRequest request) throws ParseException { try { Map result = jabatanService.saveKelompokJabatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add unit kerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add unit kerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-all-kedudukan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllKedudukan(HttpServletRequest request) { List> result = null; try { result = kedudukanService.getKedudukanByStatusEnabled(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-kategoriPegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getAllategoriPegawai(HttpServletRequest request) { Map result = new HashMap<>(); try { result = kategoriPegawaiService.findAlls(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-golongan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllGolongan(HttpServletRequest request) { List> result = null; try { result = GolonganService.getKedudukanByStatusEnabled(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-hari-libur", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllHariLibur(HttpServletRequest request) { List> result = null; try { result = indekKinerjaService.getAllMapKalenderToHariLibur(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-hari-libur", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveHariLibur(@Valid @RequestBody MapKalenderToHariLiburVO vo, HttpServletRequest request) throws ParseException { try { Map result = indekKinerjaService.saveMapKalenderToHariLibur(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add unit kerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add unit kerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-grade/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getGrade(@PathVariable("id") Integer id, HttpServletRequest request) { Map result = null; try { result = kelompokJabatanService.getNilaiKelompokJabatan(id); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-detail-kelompok-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDetailkelompokJabatan(HttpServletRequest request) { List> result = null; try { result = kelompokJabatanService.getAllByStatusEnabled(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-detail-history-pegawai/{noRec}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity getDetailHistoryPegawai(@PathVariable("noRec") String noRec, HttpServletRequest request) { RekamDataPegawaiCustomVO result = null; try { result = rekamDataPegawaiService.getDetailPerubahan(noRec); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-history-pegawai/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getListHistoryPegawai(@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) { Map result = new HashMap<>(); try { result = rekamDataPegawaiService.getListHistoryDatapegawai(idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-uraian-tugas-flexible", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveUraianTugasFlexible(@Valid @RequestBody UraianTugasFlexibleVO vo, HttpServletRequest request) throws ParseException { try { Map result = uraianTugasTransaksiService.saveUraianTugasFlexible(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add UraianTugas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add UraianTugas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-list-uraian-tugas-flexible-by-date/{idPegawai}/{date}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListUraianTugas(@PathVariable("idPegawai") Integer idPegawai, @PathVariable("date") String date, HttpServletRequest request) { List> result = null; try { result = uraianTugasTransaksiService.findAllUraianTugasToday(idPegawai, date); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-uraian-tugas-verified-monthly/{idPegawai}/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListUraianTugasMonthly( @PathVariable("idPegawai") Integer idPegawai, @PathVariable("periode") String periode, HttpServletRequest request) { List> result = null; try { result = uraianTugasTransaksiService.findAllUraianTugasMonthly(idPegawai, periode); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-uraian-tugas-bawahan/{idAtasan}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListUraianTugasBawahan( @PathVariable("idAtasan") Integer idAtasan, HttpServletRequest request) { List> result = null; try { result = uraianTugasTransaksiService.findAllUraianTugasBawahan(idAtasan); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-jatah-cuti/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListJatahCuti(HttpServletRequest request) { List> result = null; try { result = servicePermohonanStatus.getAllDataCuti(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-all-jatah-cuti-pegawai/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListJatahCuti( @RequestParam(value = "idPegawai", required = true) Integer idPegawai, HttpServletRequest request) { List> result = null; try { result = servicePermohonanStatus.getAllDataCuti(idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-list-penandatangan-surat-izin-cuti", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getListPenandaTanganSuratIzinCuti(HttpServletRequest request) { List> result = null; try { result = monitoringAbsenService.findListPenandaTangan(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-dataPegawai-rev", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDataPegawaiRevMonitoring( @RequestParam(value = "idUnitKerja", required = true) Integer idUnitKerja, @RequestParam(value = "idSubUnitKerja", required = true) Integer idSubUnitKerja, @RequestParam(value = "idPegawaiLogin", required = true) Integer idPegawaiLogin, HttpServletRequest request) { List> result = new ArrayList<>(); try { result = monitoringAbsenService.findDataPegawaiRev(idUnitKerja, idSubUnitKerja, idPegawaiLogin); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-id-kalender", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDataPegawaiRevMonitoring( @RequestParam(value = "tanggal", required = true) String tanggal, HttpServletRequest request) { List> result = new ArrayList<>(); try { Map map = new HashMap<>(); map.put("idKalender", pegawaiJadwalKerjaService.findIdKalender(tanggal)); result.add(map); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-mapping-hari-libur", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getMappingHariLibur( @RequestParam(value = "tahun", required = true) String tahun, HttpServletRequest request) { List> result = new ArrayList<>(); try { result = pegawaiJadwalKerjaService.findMappingHariLibur(tahun); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/non-shift-auto-jadwal-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> autoSaveJadwalKerjaNonShift( @RequestParam(value = "idSubUnitKerja", required = true) Integer idSubUnitKerja, HttpServletRequest request) { try { Map result = pegawaiJadwalKerjaService.autoSaveJadwalKerjaNonShift(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add PegawaiJadwalKerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add PegawaiJadwalKerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-riwayat-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getRiwayatJabatan(@RequestParam(value = "idPegawai") Integer idPegawai, @RequestParam(value = "idJenisJabatan") Integer idJenisJabatan, HttpServletRequest request) throws ParseException { Map result = new HashMap<>(); try { List> riwayatJabatanByPegawai = riwayatJabatanService.findRiwayatJabatan(idPegawai, idJenisJabatan); if (idJenisJabatan == 3) { result.put("dataJabatanInternal", riwayatJabatanByPegawai); } else { result.put("dataJabatanFungsional", riwayatJabatanByPegawai); } mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-data-riwayat-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDataRiwayatJabatan( @RequestParam(value = "idPegawai") Integer idPegawai, HttpServletRequest request) throws ParseException { Map result = new HashMap<>(); try { List> riwayatJabatanByPegawai = riwayatJabatanService.findDataRiwayatJabatan(idPegawai); result.put("riwayatJabatanByPegawai", riwayatJabatanByPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-data-riwayat-pendidikan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getDataRiwayatPendidikan( @RequestParam(value = "idPegawai") Integer idPegawai, HttpServletRequest request) throws ParseException { Map result = new HashMap<>(); try { List> riwayatPendidikanByPegawai = riwayatPendidikanService .findDataRiwayatPendidikan(idPegawai); result.put("riwayatPendidikanByPegawai", riwayatPendidikanByPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/save-program-kegiatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveProgramKegiatan(@Valid @RequestBody ProgramKegiatanVO vo, HttpServletRequest request) { try { Map result = remunerasiService.saveProgramKegiatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Program Kegiatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Program Kegiatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-uraian-kegiatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveUraianKegiatan(@Valid @RequestBody UraianKegiatanVO vo, HttpServletRequest request) { try { Map result = remunerasiService.saveUraianKegiatan(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Uraian Kegiatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Uraian Kegiatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-indikator-kualitas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveIndikatorKualitas(@Valid @RequestBody IndikatorKualitasVO vo, HttpServletRequest request) { try { Map result = remunerasiService.saveIndikatorKualitas(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Indikator Kualitas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Indikator Kualitas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-kategori-penilaian-kualitas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> saveIndikatorKualitas(@Valid @RequestBody KategoriPenilaianKualitasVO vo, HttpServletRequest request) { try { Map result = remunerasiService.saveKategoriPenilaianKualitas(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Kategori Penilaian Kualitas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Kategori Penilaian Kualitas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/delete-jadwal-dinas-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> deleteJadwalDinasPegawai(@Valid @RequestBody PegawaiJadwalKerjaVO vo, HttpServletRequest request) throws ParseException { try { Map result = new HashMap(); pegawaiJadwalKerjaService.deletePegawaiJadwalKerja(vo.getId()); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when delete jadwal dinas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when delete jadwal dinas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-jumlah-pengajuan-ketidakhadiran-diproses", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getJumlahCutiTahunanDiproses(HttpServletRequest request, @RequestParam(value = "idPegawai") Integer idPegawai, @RequestParam(value = "idPlan") Integer idPlan) throws ParseException { Map result = new HashMap<>(); try { Integer jumlahCutiTahunanDiproses = servicePermohonanStatus.countJumlahPengajuanDiprosesByPegawai(idPegawai, idPlan); result.put("jumlahPengajuanDiproses", jumlahCutiTahunanDiproses); if (idPlan.equals(Master.StatusPegawai.CUTI_TAHUNAN)) { Integer jumlahCutiTahunDepanDiproses = servicePermohonanStatus .countJumlahPengajuanTahunDepanDiprosesByPegawai(idPegawai, idPlan); result.put("jumlahPengajuanTahunDepanDiproses", jumlahCutiTahunDepanDiproses); } mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-jumlah-pengajuan-ketidakhadiran-diproses-edit", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getJumlahCutiTahunanDiproses(HttpServletRequest request, @RequestParam(value = "idPegawai") Integer idPegawai, @RequestParam(value = "idPlan") Integer idPlan, @RequestParam(value = "noPlanning") String noPlanning) throws ParseException { Map result = new HashMap<>(); try { Integer jumlahCutiTahunanDiproses = servicePermohonanStatus.countJumlahPengajuanDiprosesByPegawai(idPegawai, idPlan, noPlanning); result.put("jumlahPengajuanDiproses", jumlahCutiTahunanDiproses); if (idPlan.equals(Master.StatusPegawai.CUTI_TAHUNAN)) { Integer jumlahCutiTahunDepanDiproses = servicePermohonanStatus .countJumlahPengajuanTahunDepanDiprosesByPegawai(idPegawai, idPlan, noPlanning); result.put("jumlahPengajuanTahunDepanDiproses", jumlahCutiTahunDepanDiproses); } mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); } catch (Exception e) { e.printStackTrace(); } return RestUtil.getJsonResponse(result, HttpStatus.OK); } @RequestMapping(value = "/get-data-riwayat-pendidikan-pgw", method = RequestMethod.GET) public ResponseEntity> getRiwayatPendidikanByPegawai( @RequestParam(value = "id", required = false) Integer id, HttpServletRequest request) { try { Map result = new HashMap<>(); result.put("data", riwayatPendidikanService.findSimpleRiwayatPendidikanByPegawai(id)); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-str-expired-pegawai", method = RequestMethod.GET) public ResponseEntity> getPegawaiStrExpiredByPegawai(HttpServletRequest request) { try { Map pegawais = rekamDataPegawaiService.getpegawaiStrExpiredByPegawai(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(pegawais, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-sip-str-expired-pegawai", method = RequestMethod.GET) public ResponseEntity> getPegawaiSipExpiredByPegawai(HttpServletRequest request) { try { Map pegawais = rekamDataPegawaiService.getpegawaiSipStrExpiredByPegawai(); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(pegawais, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get data sip str login user", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get data sip str login user", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-daftar-ruangan", method = RequestMethod.GET) public ResponseEntity>> getListRuanganDepartemen(HttpServletRequest request, @RequestParam(value = "departemenId", required = true) Integer departemenId) { try { List> result = ruanganService.findListRuanganDepartemen(departemenId); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get data list ruangan departemen", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get data list ruangan departemen", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/save-target-layanan/", method = RequestMethod.POST) public ResponseEntity> addAllTargetLayanan(@RequestBody List vos, HttpServletRequest request) { try { Map result = targetLayananService.addAll(vos); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add target layanan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add target layanan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-jadwal-pegawai", method = RequestMethod.GET) public ResponseEntity> getJadwalPegawai(HttpServletRequest request, @RequestParam(value = "idPegawai", required = true) Integer idPegawai) { try { Map result = absensiPegawaiService.findJadwalPegawai(idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get jadwal pegawai login", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get jadwal pegawai login", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-histori-presensi-pegawai", method = RequestMethod.GET) public ResponseEntity>> getHistoriPresensiPegawai(HttpServletRequest request, @RequestParam(value = "idPegawai", required = true) Integer idPegawai) { try { List> result = absensiPegawaiService.findHistoriPresensi(idPegawai); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get histori presensi pegawai login", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get histori presensi pegawai login", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } public static String getClientIpAddress(HttpServletRequest request) { for (String header : Master.IP_HEADER_CANDIDATES) { String ip = request.getHeader(header); if (ip != null && ip.length() != 0 && !"unknown".equalsIgnoreCase(ip)) { return ip; } } return request.getRemoteAddr(); } @RequestMapping(value = "/save-presensi-pegawai/", method = RequestMethod.POST) public ResponseEntity> savePresensiPegawai(@RequestBody HabsenVO vo, HttpServletRequest request) { try { vo.setClientIPAddress(getClientIpAddress(request)); Map result = absensiPegawaiService.saveHabsensiPegawai(vo); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when save presensi pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save presensi pegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-rincian-kegiatan-pegawai", method = RequestMethod.GET) public ResponseEntity> getListRincianKegiatan(HttpServletRequest request, @RequestParam(value = "idJabatan", required = true) Integer idJabatan, @RequestParam(value = "idPelaksanaanTugas", required = true) Integer idPelaksanaanTugas) { try { Map result = uraianTugasService.getRincianKegiatanPegawai(idJabatan, idPelaksanaanTugas); mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get data list rincian kegiatan pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get data list rincian kegiatan pegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/generate-excel", method = RequestMethod.GET) public void generateExcel(@RequestParam(value = "bulan", required = true) String bulan, @RequestParam(value = "idUnitKerja", required = true) Integer idUnitKerja, @RequestParam(value = "idSubunitKerja", required = true) Integer idSubunitKerja, HttpServletRequest request, HttpServletResponse response) { try { String fileNamePath = pegawaiJadwalKerjaService.writeExcelPegawaiJadwalKerja(bulan, idUnitKerja, idSubunitKerja); response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition", "attachment; filename=" + fileNamePath); } catch (Exception e) { LOGGER.error("Got exception {} when generate excel file", e.getMessage()); } } @RequestMapping(value = "/download-jadwal", method = RequestMethod.GET) public ResponseEntity downloadJadwal(@RequestParam(value = "filename", required = true) String fileName, HttpServletRequest request) { Resource resource = null; if (CommonUtil.isNotNullOrEmpty(fileName)) { try { resource = pegawaiJadwalKerjaService.loadFileAsResource(fileName); } catch (Exception e) { LOGGER.error("Got exception {} when download jadwal", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } String contentType = null; try { contentType = request.getServletContext().getMimeType(resource.getFile().getAbsolutePath()); } catch (Exception e) { LOGGER.error("Got exception {} when download jadwal", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } if (CommonUtil.isNullOrEmpty(contentType)) { contentType = "application/octet-stream"; } return ResponseEntity.ok().contentType(MediaType.parseMediaType(contentType)) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + resource.getFilename()) .body(resource); } else { return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @RequestMapping(value = "/get-activity-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getActivityPegawai(HttpServletRequest request, @RequestParam(value = "tanggal", required = false) String tanggal, @RequestParam(value = "idPegawai", required = false) Integer idPegawai) { try { List> result = activityPegawaiService.getActivityData(tanggal, idPegawai); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get activity pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get activity pegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-rekap-status-wfh", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getRekapStatusWFH(HttpServletRequest request, @RequestParam(value = "bulan", required = false) String bulan) { try { List> result = monitoringAbsenService.getRekapStatusWFH(bulan); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get rekapitulasi status wfh", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get rekapitulasi status wfh", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-data-habsen", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getDataHabsen(HttpServletRequest request, @RequestParam(value = "tglAwal", required = false) String tglAwal, @RequestParam(value = "tglAkhir", required = false) String tglAkhir, @RequestParam(value = "idPegawai", required = false) Integer idPegawai) { try { List> result = monitoringAbsenService.getDataHabsen(tglAwal, tglAkhir, idPegawai); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get data habsen", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get data habsen", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-kuantitas-capaian-hari-kerja", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getKuantitasCapaianHariKerja(HttpServletRequest request, @RequestParam(value = "idPegawai", required = false) Integer idPegawai, @RequestParam(value = "bulan", required = false) String bulan) { try { Map result = remunerasiService.getKuantitasCapaianHariKerja(idPegawai, bulan); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get kuantitas capaian hari kerja", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get kuantitas capaian hari kerja", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-pegawai-atasan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPegawaiAtasan(HttpServletRequest request, @RequestParam(value = "id", required = false) Integer id, @RequestParam(value = "idJabatan", required = false) Integer idJabatan) { try { List> result = mappingPegawaiToAtasanService.getPegawaiAtasanByJabatan(id, idJabatan); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get pegawai atasan by jabatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get pegawai atasan by jabatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-all-evaluasi-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getAllEvaluasiJabatan(HttpServletRequest request) { try { List> result = evaluasiJabatanService.findActiveEvaluasiJabatan(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all evaluasi jabatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all evaluasi jabatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-histori-evaluasi-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getHistoriEvaluasiJabatan(HttpServletRequest request) { try { List> result = evaluasiJabatanService.findAllEvaluasiJabatan(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get histori evaluasi jabatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get histori evaluasi jabatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-anggaran-remunerasi-tahun-ini", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> getAnggaranRemunerasiTahunIni(HttpServletRequest request) { try { Map result = anggaranRemunerasiService.findAnggaranTahunIni(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get anggaran remunerasi tahun ini", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get anggaran remunerasi tahun ini", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-plafon-remunerasi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPlafonRemunerasi(HttpServletRequest request) { try { List> result = nilaiKelompokJabatanService.getPlafonRemunerasi(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get plafon kmk remunerasi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get plafon kmk remunerasi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-penempatan-evaluasi-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity>> getPenempatanEvaluasiJabatan(HttpServletRequest request) { try { List> result = nilaiKelompokJabatanService.getPenempatanEvaluasiJabatan(); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get penempatan evaluasi jabatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get penempatan evaluasi jabatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); } } }