package com.jasamedika.medifirst2000.controller;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
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.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.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.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.PengembalianService;
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.PesertaDidikService;
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.ReservasiService;
import com.jasamedika.medifirst2000.service.RiwayatPenilaianKompetensiPegawaiService;
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.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.DateUtil;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.AbsensiPegawaiVO;
import com.jasamedika.medifirst2000.vo.AkunVO;
import com.jasamedika.medifirst2000.vo.AsuransiNakerVO;
import com.jasamedika.medifirst2000.vo.AturanPeminjamanVO;
import com.jasamedika.medifirst2000.vo.BerkasLamaranVO;
import com.jasamedika.medifirst2000.vo.BibliographyVO;
import com.jasamedika.medifirst2000.vo.CustomIndexKerjaVO;
import com.jasamedika.medifirst2000.vo.DaftarKeanggotaanVO;
import com.jasamedika.medifirst2000.vo.DataKeluargaVO;
import com.jasamedika.medifirst2000.vo.DataPegawaiVO;
import com.jasamedika.medifirst2000.vo.DegreeVO;
import com.jasamedika.medifirst2000.vo.EvaluasiJabatanVO;
import com.jasamedika.medifirst2000.vo.FaktorEvaluasiVO;
import com.jasamedika.medifirst2000.vo.FakultasVO;
import com.jasamedika.medifirst2000.vo.GajiPokokVO;
import com.jasamedika.medifirst2000.vo.GolonganVO;
import com.jasamedika.medifirst2000.vo.IndekKinerjaVO;
import com.jasamedika.medifirst2000.vo.IndeksKinerjaIndividuCustomVO;
import com.jasamedika.medifirst2000.vo.IndeksKinerjaIndividuVO;
import com.jasamedika.medifirst2000.vo.InputDaftarPaketPelatihanVO;
import com.jasamedika.medifirst2000.vo.InputDaftarPaketSeminarVO;
import com.jasamedika.medifirst2000.vo.InputLemburSdmCustomVO;
import com.jasamedika.medifirst2000.vo.InstitusiPendidikanVO;
import com.jasamedika.medifirst2000.vo.IsianPelamarVO;
import com.jasamedika.medifirst2000.vo.JabatanVO;
import com.jasamedika.medifirst2000.vo.JadwalOrientasiVO;
import com.jasamedika.medifirst2000.vo.JatahCutiDanIzinVO;
import com.jasamedika.medifirst2000.vo.JenisCutiVO;
import com.jasamedika.medifirst2000.vo.JenisGajiVO;
import com.jasamedika.medifirst2000.vo.JenisHonorVO;
import com.jasamedika.medifirst2000.vo.JenisKompetensiVO;
import com.jasamedika.medifirst2000.vo.JenisPnsVO;
import com.jasamedika.medifirst2000.vo.JenisSkVO;
import com.jasamedika.medifirst2000.vo.JurusanPeminatanVO;
import com.jasamedika.medifirst2000.vo.KategoryTugasVO;
import com.jasamedika.medifirst2000.vo.KedudukanVO;
import com.jasamedika.medifirst2000.vo.KelompokJabatanVO;
import com.jasamedika.medifirst2000.vo.KelompokKompetensiVO;
import com.jasamedika.medifirst2000.vo.KelompokShiftKerjaCustomVO;
import com.jasamedika.medifirst2000.vo.KompetensiVO;
import com.jasamedika.medifirst2000.vo.MapKalenderToHariLiburVO;
import com.jasamedika.medifirst2000.vo.MappingPegawaiToAtasanVO;
import com.jasamedika.medifirst2000.vo.MasterEvaluasiJabatanVO;
import com.jasamedika.medifirst2000.vo.MasterHonorTimVO;
import com.jasamedika.medifirst2000.vo.MasterJenisSantunanVO;
import com.jasamedika.medifirst2000.vo.MonitoringAbsenCustomVO;
import com.jasamedika.medifirst2000.vo.MutasiPegawaiVO;
import com.jasamedika.medifirst2000.vo.NamaAsuransiVO;
import com.jasamedika.medifirst2000.vo.NamaPegawaiVO;
import com.jasamedika.medifirst2000.vo.NamaPembimbingVO;
import com.jasamedika.medifirst2000.vo.NilaiKelompokJabatanVO;
import com.jasamedika.medifirst2000.vo.PegawaiJadwalKerjaCustomVO;
import com.jasamedika.medifirst2000.vo.PekerjaanVO;
import com.jasamedika.medifirst2000.vo.PerhitunganAbkVO;
import com.jasamedika.medifirst2000.vo.PerhitunganHonorTimPegawaiVO;
import com.jasamedika.medifirst2000.vo.PerhitunganPremiBPJSKesehatanVO;
import com.jasamedika.medifirst2000.vo.PerhitunganPremiBPJSKetenagaKerjaanVO;
import com.jasamedika.medifirst2000.vo.PerhitunganSantunanPegawaiMeninggalDuniaVO;
import com.jasamedika.medifirst2000.vo.PerhitunganUangLemburPegawaiVO;
import com.jasamedika.medifirst2000.vo.PeriodePengajarVO;
import com.jasamedika.medifirst2000.vo.PeriodePinjamanVO;
import com.jasamedika.medifirst2000.vo.PermohonanCutiPegawaiVO;
import com.jasamedika.medifirst2000.vo.PernelitianEksternalVO;
/*import com.jasamedika.medifirst2000.vo.PesertaDidikVO;*/
import com.jasamedika.medifirst2000.vo.PlanningPegawaiMuSaReVO;
import com.jasamedika.medifirst2000.vo.PlanningPegawaiStatusVO;
import com.jasamedika.medifirst2000.vo.PosisiLamaranVO;
import com.jasamedika.medifirst2000.vo.ProgramPendidikanVO;
import com.jasamedika.medifirst2000.vo.ProgramPengajaranVO;
import com.jasamedika.medifirst2000.vo.RangeKmkVO;
import com.jasamedika.medifirst2000.vo.RegistrasiKeanggotaanVO;
import com.jasamedika.medifirst2000.vo.RekamDataPegawaiCustomVO;
import com.jasamedika.medifirst2000.vo.RekamDataPegawaiVO;
import com.jasamedika.medifirst2000.vo.ReservasiVO;
import com.jasamedika.medifirst2000.vo.RincianKegiatanVO;
import com.jasamedika.medifirst2000.vo.SaveAbsenVO;
import com.jasamedika.medifirst2000.vo.ShiftKerjaVO;
import com.jasamedika.medifirst2000.vo.SimulasiPendapatanVO;
import com.jasamedika.medifirst2000.vo.StatusKawinVO;
import com.jasamedika.medifirst2000.vo.StatusMeninggalDuniaVO;
import com.jasamedika.medifirst2000.vo.StatusPegawaiVO;
import com.jasamedika.medifirst2000.vo.StrukHistoriVO;
import com.jasamedika.medifirst2000.vo.SubUnitKerjaPegawaiVO;
import com.jasamedika.medifirst2000.vo.TabelAcuanIndeksIKIVO;
import com.jasamedika.medifirst2000.vo.TahunUmrVO;
import com.jasamedika.medifirst2000.vo.TanggunganVO;
import com.jasamedika.medifirst2000.vo.TipeKeanggotaanVO;
import com.jasamedika.medifirst2000.vo.TipeKoleksiVO;
import com.jasamedika.medifirst2000.vo.UangLemburVO;
import com.jasamedika.medifirst2000.vo.UnitKerjaPegawaiVO;
import com.jasamedika.medifirst2000.vo.UploadExcelVO;
import com.jasamedika.medifirst2000.vo.UraianTugasCustomVO;
import com.jasamedika.medifirst2000.vo.UraianTugasFlexibleVO;
import com.jasamedika.medifirst2000.vo.UraianTugasMVO;
import com.jasamedika.medifirst2000.vo.UraianTugasVO;

@RestController
@RequestMapping("/sdm")
public class SdmController extends LocaleController<AkunVO> {

	@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;

	@RequestMapping(value = "/save-custom-uraian-kerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveBerkasLamaran(@Valid @RequestBody CustomIndexKerjaVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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 = "/get-custom-uraian-kerja/{id}/{tanggal}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> getCustomUraianKerja(@PathVariable("id") String id,
			@PathVariable("tanggal") String tanggal, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> saveBerkasLamaran(@Valid @RequestBody BerkasLamaranVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getsaveBerkasLamaran(@PathVariable("nama") String nama,
			HttpServletRequest request) {
		Map<String, Object> 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);
	}

	@Autowired
	private DegreeService degreeService;
	@Autowired
	private ReservasiService reservasiService;
	private static final Logger LOGGER = LoggerFactory.getLogger(SdmController.class);

	@RequestMapping(value = "/save-reservasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveReservasi(@Valid @RequestBody ReservasiVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> savePengembalian(@Valid @RequestBody ReservasiVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JadwalDokterService jadwalDokterService;

	@RequestMapping(value = "/upload-absen", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.ALL_VALUE)
	public ResponseEntity<Map<String, Object>> uploadAbsen(@Valid @RequestBody UploadExcelVO fileInput,
			HttpServletRequest request) throws ParseException {
		try {

			String fileName = "";

			Map<String, Object> 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);
		}

	}

	@Autowired
	private AbsensiPegawaiService absensiPegawaiService;

	@RequestMapping(value = "/save-absen", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveAbsen(@Valid @RequestBody SaveAbsenVO fileInput,
			HttpServletRequest request) throws ParseException {
		try {

			String fileName = "";

			Map<String, Object> 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<Map<String, Object>> savejadwalAbsenPegawai(@PathVariable("idFinger") String idFinger,
			@PathVariable("tanggalMasuk") String tanggalMasuk, @PathVariable("tanggalKeluar") String tanggalKeluar,
			HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> getReservasiByNoRec(@PathVariable("norec") String norec,
			HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> saveDegree(@Valid @RequestBody DegreeVO vo, HttpServletRequest request) {
		try {
			Map<String, Object> 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);
		}
	}

	@Autowired
	private NamaPembimbingService namaPembimbingService;

	@RequestMapping(value = "/save-nama-pembimbing", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveNamaPembimbing(@Valid @RequestBody NamaPembimbingVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private NamaAsuransiService namaAsuransiService;

	@RequestMapping(value = "/save-nama-asuransi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveNamaAsuransi(@Valid @RequestBody NamaAsuransiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private KedudukanService kedudukanService;

	@RequestMapping(value = "/save-kedudukan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveKedudukan(@Valid @RequestBody KedudukanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JurusanPeminatanService jurusanPeminatanService;

	@RequestMapping(value = "/save-jurusan-peminatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJurusanPeminatan(@Valid @RequestBody JurusanPeminatanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JenisSkService jenisSkService;

	@RequestMapping(value = "/save-jenis-sk", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJenisSk(@Valid @RequestBody JenisSkVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JenisPnsService jenisPnsService;

	@RequestMapping(value = "/save-jenis-pns", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJenisPns(@Valid @RequestBody JenisPnsVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JenisCutiService jenisCutiService;

	@RequestMapping(value = "/save-jenis-cuti", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJenisCuti(@Valid @RequestBody JenisCutiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JabatanService jabatanService;

	@RequestMapping(value = "/save-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJabatan(@Valid @RequestBody JabatanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private InstitusiPendidikanService institusiPendidikanService;

	@RequestMapping(value = "/save-institusi-pendidikan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveInstitusiPendidikan(@Valid @RequestBody InstitusiPendidikanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private FakultasService fakultasService;

	@RequestMapping(value = "/save-fakultas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveFakultas(@Valid @RequestBody FakultasVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private TipeKoleksiService tipeKoleksiService;

	@RequestMapping(value = "/save-tipe-koleksi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveTipeKoleksi(@Valid @RequestBody TipeKoleksiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private TipeKeanggotaanService tipeKeanggotaanService;

	@RequestMapping(value = "/save-tipe-keanggotaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveTipeKeanggotaan(@Valid @RequestBody TipeKeanggotaanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private TanggunganService tanggunganService;

	@RequestMapping(value = "/save-tanggungan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveTanggungan(@Valid @RequestBody TanggunganVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private StatusPegawaiService statusPegawaiService;

	@RequestMapping(value = "/save-status-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveStatusPegawai(@Valid @RequestBody StatusPegawaiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private StatusMeninggalDuniaService statusMeninggalDunia;

	@RequestMapping(value = "/save-status-meninggal-dunia", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveStatusMeninggalDunia(@Valid @RequestBody StatusMeninggalDuniaVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private StatusKawinService statusKawinService;

	@RequestMapping(value = "/save-status-kawin", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveStatusKawin(@Valid @RequestBody StatusKawinVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private ProgramPengajaranService programPengajaranService;

	@RequestMapping(value = "/save-program-pengajaran", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveProgramPengajaran(@Valid @RequestBody ProgramPengajaranVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private ProgramPendidikanService programPendidikanService;

	@RequestMapping(value = "/save-program-pendidikan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveProgramPendidikan(@Valid @RequestBody ProgramPendidikanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PosisiLamaranService posisiLamaranService;

	@RequestMapping(value = "/save-posisi-lamaran", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePosisiLamaran(@Valid @RequestBody PosisiLamaranVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PeriodePinjamanService periodePinjamanService;

	@RequestMapping(value = "/save-periode-pinjaman", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePeriodePinjaman(@Valid @RequestBody PeriodePinjamanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PekerjaanService pekerjaanService;

	@RequestMapping(value = "/save-pekerjaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePekerjaan(@Valid @RequestBody PekerjaanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private ShiftKerjaService shiftKerjaService;

	@RequestMapping(value = "/save-shift-kerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveShiftKerja(@Valid @RequestBody ShiftKerjaVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> deleteShiftKerja(@RequestParam(value = "id", required = true) Integer id,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getShiftKerja(HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private AturanPeminjamanService aturanPeminjamanService;

	@RequestMapping(value = "/save-aturan-peminjaman", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveAturanPeminjaman(@Valid @RequestBody AturanPeminjamanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private BibliographyService bibliographyService;

	@RequestMapping(value = "/save-bibliography", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveBibliography(@Valid @RequestBody BibliographyVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getBibliography(@PathVariable("nama") String nama,
			HttpServletRequest request) {
		Map<String, Object> 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);
	}
	// caun

	@Autowired
	private DaftarKeanggotaanService daftarKeanggotaanService;

	@RequestMapping(value = "/save-daftar-keanggotaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveDaftarKeanggotaan(@Valid @RequestBody DaftarKeanggotaanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private DataKeluargaService dataKeluargaService;

	@RequestMapping(value = "/save-data-keluarga", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveDataKeluarga(@Valid @RequestBody DataKeluargaVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<List<Map<String, Object>>> getDataKeluarga(HttpServletRequest request) {
		try {

			List<Map<String, Object>> 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);
		}

	}

	@Autowired
	private DataPegawaiService dataPegawaiService;

	@RequestMapping(value = "/save-data-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveDataPegawai(@Valid @RequestBody DataPegawaiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private MutasiPegawaiService mutasiPegawaiService;

	@RequestMapping(value = "/save-mutasi-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveMutasiPegawai(@Valid @RequestBody MutasiPegawaiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PengembalianService pengembalianService;

	// @RequestMapping(value = "/save-pengembalian", method =
	// RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes
	// = MediaType.APPLICATION_JSON_VALUE)
	// public ResponseEntity<Map<String, Object>> savePengembalian(@Valid
	// @RequestBody PengembalianVO vo,
	// HttpServletRequest request) {
	// try {
	// SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");
	//
	// Map<String, Object> result = pengembalianService.savePengembalian(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);
	// }
	//
	// }

	@Autowired
	private PerhitunganPremiBPJSKesehatanService perhitunganPremiBPJSKesehatanService;

	@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<Map<String, Object>> savePerhitunganPremiBPJSKesehatan(
			@Valid @RequestBody PerhitunganPremiBPJSKesehatanVO vo, HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PerhitunganPremiBPJSKetenagaKerjaanService perhitunganPremiBPJSKetenagakerjaanService;

	@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<Map<String, Object>> savePerhitunganPremiBPJSKetenagakerjaan(
			@Valid @RequestBody PerhitunganPremiBPJSKetenagaKerjaanVO vo, HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PerhitunganSantunanPegawaiMeninggalDuniaService perhitunganSantunanPegawaiMeninggalDuniaService;

	@RequestMapping(value = "/save-perhitungan-santunan-pegawai-meninggal-dunia", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePerhitunganSantunanPegawaiMeninggalDunia(
			@Valid @RequestBody PerhitunganSantunanPegawaiMeninggalDuniaVO vo, HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PerhitunganUangLemburPegawaiService perhitunganUangLemburPegawaiService;

	@RequestMapping(value = "/save-perhitungan-uang-lembur-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePerhitunganUangLemburPegawai(
			@Valid @RequestBody PerhitunganUangLemburPegawaiVO vo, HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PeriodePengajarService periodePengajarService;

	@RequestMapping(value = "/save-periode-pengajar", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePeriodePengajar(@Valid @RequestBody PeriodePengajarVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PermohonanCutiPegawaiService permohonanCutiPegawaiService;

	@RequestMapping(value = "/save-permohonan-cuti-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePermohonanCutiPegawai(@Valid @RequestBody PermohonanCutiPegawaiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PesertaDidikService pesertaDidikService;

	/*
	 * @RequestMapping(value = "/save-peserta-didik", method =
	 * RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes
	 * = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Map<String,
	 * Object>> savePesertaDidik(@Valid @RequestBody PesertaDidikVO vo,
	 * HttpServletRequest request) { try { SimpleDateFormat format = new
	 * SimpleDateFormat("dd-MM-yyyy");
	 * 
	 * Map<String, Object> result = pesertaDidikService.savePesertaDidik(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);
	 * }
	 * 
	 * }
	 */

	@Autowired
	private RegistrasiKeanggotaanService registrasiKeanggotaanService;

	@RequestMapping(value = "/save-registrasi-keanggotaan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveRegistrasiKeanggotaan(@Valid @RequestBody RegistrasiKeanggotaanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getRegistrasiKeanggotaan(@PathVariable("nama") String nama,
			HttpServletRequest request) {
		Map<String, Object> 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);
	}

	// regius

	@Autowired
	private RekamDataPegawaiService rekamDataPegawaiService;

	@RequestMapping(value = "/save-rekam-data-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveRekamDataPegawai(@Valid @RequestBody RekamDataPegawaiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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-uraian-tugas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveUraianTugas(@Valid @RequestBody UraianTugasVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private KategoryTugasService KategoryTugasService;

	@RequestMapping(value = "/save-kategory-tugas", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveKategoryTugas(@Valid @RequestBody KategoryTugasVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private IsianPelamarService IsianPelamarService;

	@RequestMapping(value = "/save-isian-pelamar", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveIsianPelamar(@Valid @RequestBody IsianPelamarVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getIsianPelamar(HttpServletRequest request) {
		Map<String, Object> 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);
	}

	@Autowired
	private AsuransiNakerService AsuransiNakerService;

	@RequestMapping(value = "/save-asuransi-naker", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveAsuransiNaker(@Valid @RequestBody AsuransiNakerVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private NamaPegawaiService NamaPegawaiService;

	@RequestMapping(value = "/save-nama-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveNamaPegawai(@Valid @RequestBody NamaPegawaiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private MasterHonorTimService MasterHonorTimService;

	@RequestMapping(value = "/save-master-honor-tim", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveMasterHonorTim(@Valid @RequestBody MasterHonorTimVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private MasterJenisSantunanService MasterJenisSantunanService;

	@RequestMapping(value = "/save-master-jenis-santunan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveMasterJenisSantunan(@Valid @RequestBody MasterJenisSantunanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PernelitianEksternalService PernelitianEksternalService;

	@RequestMapping(value = "/save-pernelitian-eksternal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePernelitianEksternal(@Valid @RequestBody PernelitianEksternalVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private PerhitunganHonorTimPegawaiService PerhitunganHonorTimPegawaiService;

	@RequestMapping(value = "/save-perhitungan-honor-tim-pegawai", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePerhitunganHonorTimPegawai(
			@Valid @RequestBody PerhitunganHonorTimPegawaiVO vo, HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JenisHonorService JenisHonorService;

	@RequestMapping(value = "/save-jenis-honor", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJenisHonor(@Valid @RequestBody JenisHonorVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private TahunUmrService TahunUmrService;

	@RequestMapping(value = "/save-tahun-umr", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveTahunUmr(@Valid @RequestBody TahunUmrVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JenisGajiService JenisGajiService;

	@RequestMapping(value = "/save-jenis-gaji", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJenisGaji(@Valid @RequestBody JenisGajiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private JenisGajiDao jenisGajiDao;

	@RequestMapping(value = "/jenis-gaji", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<JenisGaji>> listJenisGaji() {
		List<JenisGaji> listJenisGaji = (List<JenisGaji>) jenisGajiDao.findAll();
		return RestUtil.getJsonResponse(listJenisGaji);
	}

	@Autowired
	private GolonganService GolonganService;

	@RequestMapping(value = "/save-golongan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveGolongan(@Valid @RequestBody GolonganVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private GajiPokokService GajiPokokService;

	@RequestMapping(value = "/save-gaji-pokok", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveGajiPokok(@Valid @RequestBody GajiPokokVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private IndekKinerjaService indekKinerjaService;

	@RequestMapping(value = "/save-indek-kinerja", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveIndekKinerja(@Valid @RequestBody List<IndekKinerjaVO> vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getPegawaiByJadwal(@PathVariable("tahun") Integer tahun,
			@PathVariable("bulan") Integer bulan, @PathVariable("pegawai") Integer pegawai,
			HttpServletRequest request) {
		Map<String, Object> 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);
	}

	@Autowired
	private MapUraianTugasToRincianKegiatanDao mapUraianTugasToRincianKegiatanDao;

	@RequestMapping(value = "/set-uraian-tugas/{id}/{bobot}/{target}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> setBobot(@PathVariable("id") Integer id,
			@PathVariable("bobot") Integer bobot, @PathVariable("target") Integer target, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> 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<String, Object> 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);
	}

	@Autowired
	private JenisKompetensiService JenisKompetensiService;

	@RequestMapping(value = "/save-jenis-kompetensi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJenisKompetensi(@Valid @RequestBody JenisKompetensiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private KompetensiService KompetensiService;

	@RequestMapping(value = "/save-kompetensi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveKompetensi(@Valid @RequestBody KompetensiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private KelompokKompetensiService KelompokKompetensiService;

	@RequestMapping(value = "/save-kelompok-kompetensi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveKelompokKompetensi(@Valid @RequestBody KelompokKompetensiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private com.jasamedika.medifirst2000.service.FaktorEvaluasiService FaktorEvaluasiService;

	@RequestMapping(value = "/save-faktor-evaluasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveFaktorEvaluasi(@Valid @RequestBody FaktorEvaluasiVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private NilaiKelompokJabatanService kelompokJabatanService;

	@RequestMapping(value = "/save-kelompok-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveKelompokJabatan(@Valid @RequestBody NilaiKelompokJabatanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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 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);
		}

	}

	@Autowired
	private RangeKmkService RangeKmkService;

	@RequestMapping(value = "/save-range-kmk", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveRangeKmk(@Valid @RequestBody RangeKmkVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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);
		}

	}

	@Autowired
	private MasterEvaluasiJabatanService MasterEvaluasiJabatanService;

	@RequestMapping(value = "/save-master-evaluasi-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveMasterEvaluasiJabatan(@Valid @RequestBody MasterEvaluasiJabatanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> hitungMasterEvaluasiJabatan(
			@Valid @RequestBody MasterEvaluasiJabatanVO vo, HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> hitungGradeEvaluasiJabatan(@Valid @RequestBody EvaluasiJabatanVO vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getListJabatan(HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> getListByJabatan(@PathVariable("idJabatan") Integer idJabatan,
			@PathVariable("bulan") String bulan, @PathVariable("tahun") Integer tahun, HttpServletRequest request) {
		Map<String, Object> 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);
	}

	@Autowired
	private EvaluasiJabatanService EvaluasiJabatanService;

	@RequestMapping(value = "/save-evaluasi-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveEvaluasiJabatan(@Valid @RequestBody List<EvaluasiJabatanVO> vo,
			HttpServletRequest request) {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getEvaluasiJabatan(@RequestParam(value = "tahun") Integer tahun,
			@RequestParam(value = "bulan") String bulan, @RequestParam(value = "ruangan") Integer ruangan,
			// @RequestParam(value = "noOrder") String noOrder,
			HttpServletRequest request) throws ParseException {
		// try {

		// @RequestMapping(value =
		// "/get-evaluasi-jabatan/{tahun}/{bulan}/{pegawai}", method =
		// RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
		// public ResponseEntity<Map<String, Object>> getEvaluasiJabatan(
		// @PathVariable("tahun") Integer tahun,
		// @PathVariable("bulan") Integer bulan,
		// @PathVariable("ruangan") Integer ruangan,
		// HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> getCountEvaluasiJabatan(@RequestParam(value = "tahun") Integer tahun,
			// @RequestParam(value = "noOrder") String noOrder,
			HttpServletRequest request) throws ParseException {

		Map<String, Object> 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<Map<String, Object>> getRekap(@RequestParam(value = "tahun") Integer tahun,
			// @RequestParam(value = "noOrder") String noOrder,
			HttpServletRequest request) throws ParseException {
		// try {

		// @RequestMapping(value =
		// "/get-evaluasi-jabatan/{tahun}/{bulan}/{pegawai}", method =
		// RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
		// public ResponseEntity<Map<String, Object>> getEvaluasiJabatan(
		// @PathVariable("tahun") Integer tahun,
		// @PathVariable("bulan") Integer bulan,
		// @PathVariable("ruangan") Integer ruangan,
		// HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> getEvaluasiPegawai(@RequestParam(value = "tahun") Integer tahun,
			@RequestParam(value = "idPegawai") Integer idPegawai, @RequestParam(value = "bulan") Integer bulan,
			// @RequestParam(value = "noOrder") String noOrder,
			HttpServletRequest request) throws ParseException {
		// try {

		Map<String, Object> 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);
	}

	@Autowired
	private SimulasiPendapatanService simulasiPendapatanService;

	@RequestMapping(value = "/save-simulasi-pendapatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveSimulasiPendapatan(@Valid @RequestBody SimulasiPendapatanVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getsaveSimulasiPendapatan(@PathVariable("tahun") Integer tahun,
			HttpServletRequest request) {
		Map<String, Object> 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);
	}

	@Autowired
	private com.jasamedika.medifirst2000.service.PerhitunganAbkService PerhitunganAbkService;

	@RequestMapping(value = "/save-perhitungan-abk", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> savePerhitunganAbk(@Valid @RequestBody List<PerhitunganAbkVO> vo,
			HttpServletRequest request) throws ParseException {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getPerhitunganAbk(@RequestParam(value = "tahun") Integer tahun,

			HttpServletRequest request) throws ParseException {

		Map<String, Object> 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);
	}

	@Autowired
	private JadwalOrientasiService jadwalOrientasiService;

	@RequestMapping(value = "/save-jadwal-orientasi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJadwalOrientasi(@Valid @RequestBody JadwalOrientasiVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy");

			Map<String, Object> 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<Map<String, Object>> getsaveJadwalOrientasi(@PathVariable("nama") String nama,
			HttpServletRequest request) {
		Map<String, Object> 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<List<Map<String, Object>>> getTindakanByUserId(@PathVariable("startDate") String startDate,
			@PathVariable("endDate") String endDate, HttpServletRequest request) {
		List<Map<String, Object>> 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-tindakan-by-user-id-and-periode/{month}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getTindakanByIdUserAndPeriod(@PathVariable("month") String month,
			HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getUraianKerja(HttpServletRequest request) {
		List<Map<String, Object>> 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/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getPersen(@PathVariable("startDate") String startDate,
			@PathVariable("endDate") String endDate, HttpServletRequest request) {
		List<Map<String, Object>> result = null;
		try {

			result = indekKinerjaService.findCountTindakanByIdUserAndPeriod(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<Map<String, Object>> getDetailPoin(@PathVariable("tgl") String tgl,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> getRekapPoin(@PathVariable("month") String month,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> saveUraianTugasTransaksi(@Valid @RequestBody UraianTugasCustomVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> getIndekKinerjaKuantitas(@PathVariable("month") String month,
			@PathVariable("idPegawai") Integer idPegawai,
			@RequestParam(value = "isNew", required = false) Boolean isNew, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> getRekapitulasiCapaian(@PathVariable("month") String month,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		Map<String, Object> 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<List<Map<String, Object>>> getUraianKerjaDanCapaian(@PathVariable("date") String date,
			HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> getTargetBobotUraianKerja(@PathVariable("idPegawai") Integer idPegawai,
			@PathVariable("periode") String periode, HttpServletRequest request) {
		Map<String, Object> 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<Pegawai> 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<Map<String, Object>> saveTargetBobotUraianTugasTransaksi(
			@Valid @RequestBody UraianTugasCustomVO vo, HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> saveIndeksKinerjaindividu(@Valid @RequestBody IndeksKinerjaIndividuVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> saveListIndeksKinerjaindividu(
			@Valid @RequestBody IndeksKinerjaIndividuCustomVO vo, HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> findKualitasAndInovasi(@PathVariable("periode") String periode,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		Map<String, Object> 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-kehadiran/{idPegawai}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> findKehadiran(@PathVariable("idPegawai") Integer idPegawai,
			@PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate,
			HttpServletRequest request) {
		Map<String, Object> result = null;
		try {

			result = monitoringAbsenService.jumlahKehadiran(null, null, 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<Map<String, Object>> saveMonitoringAbsen(@Valid @RequestBody MonitoringAbsenCustomVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> findKehadiranIKI(@PathVariable("periode") String periode,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> findKehadiranByRuangan(@PathVariable("idUnitKerja") Integer idUnitKerja,
			@PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate,
			HttpServletRequest request) {
		Map<String, Object> result = null;
		try {

			result = monitoringAbsenService.jumlahKehadiran(idUnitKerja, null, null, 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<Map<String, Object>> findKehadiranByRuangan(@PathVariable("idUnitKerja") Integer idUnitKerja,
			@PathVariable("idSubUnitKerja") Integer idSubUnitKerja, @PathVariable("startDate") String startDate,
			@PathVariable("endDate") String endDate, HttpServletRequest request) {
		Map<String, Object> result = null;
		try {

			result = monitoringAbsenService.jumlahKehadiran(idUnitKerja, idSubUnitKerja, null, 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<Map<String, Object>> findAllKehadiran(@PathVariable("startDate") String startDate,
			@PathVariable("endDate") String endDate, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> findRekapIKI(@PathVariable("idRuangan") Integer idRuangan,
			@PathVariable("periode") String periode, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> findRekapIKI(@PathVariable("idJabatan") Integer idJabatan,
			@PathVariable("tglPenilaian") String tglPenilaian, @PathVariable("idPegawai") Integer idPegawai,
			HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> savePenilaianKompetensiPegawai(@Valid @RequestBody StrukHistoriVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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);
		}

	}

	@Autowired
	private InputDaftarPaketPelatihanService inputDaftarPaketPelatihanService;

	@RequestMapping(value = "/save-input-daftar-paket-pelatihan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveInputDaftarPaketPelatihan(
			@Valid @RequestBody InputDaftarPaketPelatihanVO vo, HttpServletRequest request) {

		Map<String, Object> 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);
	}

	@Autowired
	private InputDaftarPaketSeminarService inputDaftarPaketSeminarService;

	@RequestMapping(value = "/save-input-daftar-paket-seminar", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveInputDaftarPaketSeminar(
			@Valid @RequestBody InputDaftarPaketSeminarVO vo, HttpServletRequest request) {

		Map<String, Object> 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);

	}

	/*
	 * Reza---------------------------------------------------------------------
	 * ---- ------------------------------------------
	 */

	@Autowired
	private PegawaiMutasiSanksiResignService serviceMusare;

	@Autowired
	private PermohonanStatusPegawaiService servicePermohonanStatus;

	@RequestMapping(value = "/get-login-user-musare", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> getUserLogin(HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getDataByPegawai(@RequestParam(value = "id", required = true) Integer id,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> loadPagePengajuanMutasi(
			@RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> savePengajuanMutasi(@Valid @RequestBody PlanningPegawaiMuSaReVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getListPengajuanMutasi(
			@RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> loadPagePengajuanSanksi(
			@RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> savePengajuanSanksi(@Valid @RequestBody PlanningPegawaiMuSaReVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getListPengajuanSanksi(
			@RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> loadPagePengajuanResign(
			@RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> savePengajuanResign(@Valid @RequestBody PlanningPegawaiMuSaReVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getListPengajuanResign(
			@RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getListDaftarMuSaRe(
			@RequestParam(value = "namaPegawai", required = true) String namaPegawai, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> ApprovalMusare(@Valid @RequestBody PlanningPegawaiMuSaReVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> unVerifMusare(@Valid @RequestBody PlanningPegawaiMuSaReVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getHistoryExecSanksi(
			@RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getHistoryExecPangkat(
			@RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getHistoryExecJabatan(
			@RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getUserLoginPermohonanStatus(HttpServletRequest request,
			@RequestParam(value = "idPegawai", required = true) Integer idPegawai) {
		try {
			Map<String, Object> 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<Map<String, Object>> getLoadData(
			@RequestParam(value = "subUnitKerjaId", required = true) Integer subUnitKerjaId,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getDataCuti(
			@RequestParam(value = "pegawaiId", required = true) Integer pegawaiId,
			@RequestParam(value = "year", required = false) String year,
			@RequestParam(value = "statusPegawaiId", required = true) Integer statusPegawaiId,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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 = "/get-data-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> getDataPermohonanStatus(
			@RequestParam(value = "pegawaiId", required = true) Integer pegawaiId, HttpServletRequest request) {
		try {
			Map<String, Object> 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-list-permohonan-status", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> getListPermohonanStatus(
			@RequestParam(value = "unitKerjaId", required = false) Integer unitKerjaId, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getListApprovalStatus(
			@RequestParam(value = "idPegawai", required = true) Integer idPegawai, HttpServletRequest request) {
		try {
			Map<String, Object> 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-approval-status-by-status-pegawai-plan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> getApprovalStatusByStatusPegawaiPlan(
			@RequestParam(value = "idPegawai", required = true) Integer idPegawai,
			@RequestParam(value = "statusPegawaiPlanId", required = false) Integer statusPegawaiPlanId,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> savePlanningPegawaiStatus(@Valid @RequestBody PlanningPegawaiStatusVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> result = servicePermohonanStatus.savePlanningPegawaiStatus(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 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<Map<String, Object>> updatePlanningPegawaiStatus(
			@Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> deletePlanningPegawaiStatus(
			@RequestParam(value = "noRec", required = true) String noRec, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> approvalPermohonanStatus(@Valid @RequestBody PlanningPegawaiStatusVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> result = servicePermohonanStatus.approvalPermohonanStatus(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 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<Map<String, Object>> unVerifPermohonanStatus(@Valid @RequestBody PlanningPegawaiStatusVO vo,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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);
		}
	}

	@Autowired
	private InformasiDaftarGajiService informasiDaftarGajiService;

	@RequestMapping(value = "/get-list-periode-golongan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> getPeriodeRekap(HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getDaftarGajiPns(
			@RequestParam(value = "periode", required = true) String periode, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> 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<String, Object> 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<Map<String, Object>> getDaftarGajiPkwt(
			@RequestParam(value = "periode", required = true) String periode, HttpServletRequest request) {
		try {
			Map<String, Object> 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<Map<String, Object>> getDtailGajiPkwt(
			@RequestParam(value = "noRec", required = true) String noRec,
			@RequestParam(value = "id", required = true) Integer id, HttpServletRequest request) {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> findGapKompetensi(@PathVariable("idRuangan") Integer idRuangan,
			@PathVariable("periode") String periode, HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> findGapKompetensi(@PathVariable("idRuangan") Integer idRuangan,
			HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> saveRekapKehadiran(@Valid @RequestBody StrukHistoriVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> saveTotalIndexKehadiran(@Valid @RequestBody StrukHistoriVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> saveFactorRateKelompokShift(
			@Valid @RequestBody KelompokShiftKerjaCustomVO vo, HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> findRencanaTindakLanjut(HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> rekapKehadiran(@PathVariable("idPegawai") Integer idPegawai,
			@PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate,
			HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> rekapKehadiranByUnitKerja(
			@PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("startDate") String startDate,
			@PathVariable("endDate") String endDate, HttpServletRequest request) {
		Map<String, Object> 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-index-kehadiran-by-unit-kerja/{idUnitKerja}/{startDate}/{endDate}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> rekapIndeksKehadiranByUnitKerja(
			@PathVariable("idUnitKerja") Integer idUnitKerja, @PathVariable("startDate") String startDate,
			@PathVariable("endDate") String endDate, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> rekapIndeksKehadiran(@PathVariable("idPegawai") Integer idPegawai,
			@PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate,
			HttpServletRequest request) {
		Map<String, Object> 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<List<Map<String, Object>>> getListKomponenIndex(HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getJadwalKerja(@PathVariable("idRuangan") Integer idRuangan,
			HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> saveapegawaiJadwalKerja(
			@Valid @RequestBody PegawaiJadwalKerjaCustomVO vo, HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> getListShiftKerja(HttpServletRequest request) {
		List<Map<String, Object>> 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-factor-rate-shift-kerja/{periode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getListFactorRateShiftKerja(HttpServletRequest request,
			@PathVariable("periode") String periode) {
		List<Map<String, Object>> 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<Map<String, Object>> getListMasterJabatanEvaluasiByTahunBulan(
			@RequestParam(value = "tahun", required = false) Integer tahun,
			@RequestParam(value = "bulan", required = false) String bulan, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> findKehadiranLemburKerjaSdm(@PathVariable("idPegawai") Integer idPegawai,
			@PathVariable("startDate") String startDate, @PathVariable("endDate") String endDate,
			HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> findKehadiranLemburKerjaSdm(@PathVariable("idPegawai") Integer idPegawai,
			@PathVariable("periode") String periode, HttpServletRequest request) {
		Map<String, Object> 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<Map<String, Object>> saveInputLemburVerifikasiSdm(
			@Valid @RequestBody InputLemburSdmCustomVO vo, HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Pegawai>> getAllPegawaiAktifVerfiedByUnitKerja(@PathVariable("period") String period,
			HttpServletRequest request) {
		try {
			List<Pegawai> 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<String> 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<List<Map<String, Object>>> getPegawaiLemburByPeriod(@PathVariable("period") String period,
			HttpServletRequest request) {
		try {
			List<Map<String, Object>> 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<Map<String, Object>> saveUangLembur(@Valid @RequestBody Set<UangLemburVO> vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> getPoinDokter(@PathVariable("idUnitKerja") Integer idUnitKerja,
			@PathVariable("periode") String periode, HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> menangguhkanVerifPermohonanStatus(
			@Valid @RequestBody PlanningPegawaiStatusVO vo, HttpServletRequest request) {
		try {
			Map<String, Object> result = servicePermohonanStatus.penangguhanPerubahanStatusKehadiran(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-permohonan-status-cuti", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> getListPermohonanStatusCuti(@RequestParam("isSdm") Boolean isSdm,
			HttpServletRequest request) {
		try {
			Map<String, Object> 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 = "/save-jatah-cuti-dan-izin", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveJatahCutiDanIzin(@Valid @RequestBody KelompokShiftKerjaCustomVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> result = servicePermohonanStatus.setJatahCuti(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<Map<String, Object>> saveJatahCutiDanIzinPegawai(@Valid @RequestBody JatahCutiDanIzinVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> result = servicePermohonanStatus.setJatahCutiPegawai(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 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<Map<String, Object>> saveMappingPegawaiToJabatan(
			@Valid @RequestBody List<MappingPegawaiToAtasanVO> vo, HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> getPegawaibawahan(@PathVariable("id") Integer id,
			HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getMappingPegawai(HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getPegawaiAtasan(@PathVariable("id") Integer id,
			HttpServletRequest request) {
		List<Map<String, Object>> 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 = "/save-rincian-kegiatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveRincianKegiatan(@Valid @RequestBody RincianKegiatanVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> saveRincianKegiatanToUraianTugas(@Valid @RequestBody UraianTugasMVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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 = "/save-acuan-indeks-iki", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveAcuanIndeksIKI(@Valid @RequestBody List<TabelAcuanIndeksIKIVO> vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> getAllAcuan(HttpServletRequest request) {
		List<Map<String, Object>> 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<Double> 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<List<Map<String, Object>>> getAllUT(HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getUraianKerjaByJabatan(
			@PathVariable("idJabatan") Integer idJabatan, HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> saveRincianKegiatan(@Valid @RequestBody UnitKerjaPegawaiVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<UnitKerjaPegawai>> getAllUnitKerja(HttpServletRequest request) {
		List<UnitKerjaPegawai> 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<List<UnitKerjaPegawai>> getUnitKerjaByName(@PathVariable("name") String name,
			HttpServletRequest request) {
		List<UnitKerjaPegawai> 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<Map<String, Object>> saveHabsenManual(@Valid @RequestBody MonitoringAbsenCustomVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> saveSubUnitKerja(@Valid @RequestBody SubUnitKerjaPegawaiVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> getAllSubUnitKerja(HttpServletRequest request) {
		List<Map<String, Object>> 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-name/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getSubUnitKerjaByName(@PathVariable("name") String name,
			HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getSubUnitKerjaByUnitKerja(@PathVariable("id") Integer id,
			HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getHabsenManual(@PathVariable("idPegawai") Integer idPegawai,
			HttpServletRequest request) {
		List<Map<String, Object>> 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/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getAllTindakan(@PathVariable("month") String month,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		List<Map<String, Object>> result = null;
		try {

			result = indekKinerjaService.getAllTindakanByDokter(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-all-tindakan-dokter-fee-for-service/{month}/{idPegawai}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getAllTindakanFeeForService(@PathVariable("month") String month,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		List<Map<String, Object>> result = null;
		try {

			result = indekKinerjaService.getAllTindakanByDokterForfeeForService(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-detail-pasien/{idProduk}/{idKelas}/{idPegawai}/{tgl}/{ffs}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getDetailPasien(@PathVariable("idProduk") Integer idProduk,
			@PathVariable("idKelas") Integer idKelas, @PathVariable("tgl") String tgl, @PathVariable("ffs") Boolean ffs,
			@PathVariable("idPegawai") Integer idPegawai, HttpServletRequest request) {
		List<Map<String, Object>> result = null;
		try {

			result = indekKinerjaService.findPatientDetailForEveryTindakan(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-all-kelompok-jabatan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getAllKelompokJabatan(HttpServletRequest request) {
		List<Map<String, Object>> 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 = "/save-master-kelompok-jabatan", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<Map<String, Object>> saveKelompokJabatan(@Valid @RequestBody KelompokJabatanVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> getAllKedudukan(HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> getAllategoriPegawai(HttpServletRequest request) {
		Map<String, Object> 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<List<Map<String, Object>>> getAllGolongan(HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getAllHariLibur(HttpServletRequest request) {
		List<Map<String, Object>> 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<Map<String, Object>> saveHariLibur(@Valid @RequestBody MapKalenderToHariLiburVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<Map<String, Object>> getGrade(@PathVariable("id") Integer id, HttpServletRequest request) {
		Map<String, Object> 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<List<Map<String, Object>>> getDetailkelompokJabatan(HttpServletRequest request) {
		List<Map<String, Object>> 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<RekamDataPegawaiCustomVO> 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<Map<String, Object>> getListHistoryPegawai(@PathVariable("idPegawai") Integer idPegawai,
			HttpServletRequest request) {
		Map<String, Object> result = null;
		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<Map<String, Object>> saveUraianTugasFlexible(@Valid @RequestBody UraianTugasFlexibleVO vo,
			HttpServletRequest request) throws ParseException {
		try {
			Map<String, Object> 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<List<Map<String, Object>>> getListUraianTugas(@PathVariable("idPegawai") Integer idPegawai,
			@PathVariable("date") String date, HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getListUraianTugasMonthly(
			@PathVariable("idPegawai") Integer idPegawai, @PathVariable("periode") String periode,
			HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getListUraianTugasBawahan(
			@PathVariable("idAtasan") Integer idAtasan, HttpServletRequest request) {
		List<Map<String, Object>> 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<List<Map<String, Object>>> getListJatahCuti(HttpServletRequest request) {
		List<Map<String, Object>> 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-list-penandatangan-surat-izin-cuti", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
	public ResponseEntity<List<Map<String, Object>>> getListPenandaTanganSuratIzinCuti(HttpServletRequest request) {
		List<Map<String, Object>> 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);
	}
}
