diff --git a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/PemakaianAsuransiService.java b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/PemakaianAsuransiService.java index 6310d053..d9f01072 100644 --- a/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/PemakaianAsuransiService.java +++ b/jasamedika-business/src/main/java/com/jasamedika/medifirst2000/service/PemakaianAsuransiService.java @@ -1,6 +1,6 @@ package com.jasamedika.medifirst2000.service; -import com.jasamedika.medifirst2000.dto.SuratEligibilitasAsuransi; +import com.jasamedika.medifirst2000.dto.SuratEligibilitasAsuransiDto; import com.jasamedika.medifirst2000.vo.PemakaianAsuransiVO; import java.util.List; @@ -10,6 +10,6 @@ public interface PemakaianAsuransiService { Map savePemakaianAsuransi(PemakaianAsuransiVO vo); - List findByNoSep(String noSep); + List findByNoSep(String noSep); } diff --git a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/PelatihanPaketVO.java b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/PelatihanPaketVO.java index edaeb3d8..fd92a9d6 100644 --- a/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/PelatihanPaketVO.java +++ b/jasamedika-domain/src/main/java/com/jasamedika/medifirst2000/vo/PelatihanPaketVO.java @@ -1,5 +1,6 @@ package com.jasamedika.medifirst2000.vo; +import com.jasamedika.medifirst2000.base.vo.BaseTransactionVO; import lombok.Getter; import lombok.Setter; @@ -9,7 +10,7 @@ import java.util.Set; @Getter @Setter -public class PelatihanPaketVO { +public class PelatihanPaketVO extends BaseTransactionVO { private JenisPelatihanVO jenisPelatihan; diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AdmisiRencanaPindahRuanganController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AdmisiRencanaPindahRuanganController.java index 010f699f..c58735e0 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AdmisiRencanaPindahRuanganController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AdmisiRencanaPindahRuanganController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.AdmisiRencanaPindahRuanganService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.AdmisiRencanaPindahRuanganVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class AdmisiRencanaPindahRuanganController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when add", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when add", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -66,11 +66,11 @@ public class AgamaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when update", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when update", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return RestUtil.getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -83,11 +83,11 @@ public class AgamaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when delete", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when delete", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return RestUtil.getJsonHttpStatus(NOT_ACCEPTABLE); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AlatController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AlatController.java index eacbe82a..603fd34d 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AlatController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AlatController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.AlatDto; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.AlatService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.AlatVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class AlatController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllAlat", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllAlat", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -63,7 +64,7 @@ public class AlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-mesin-cuci", method = GET, produces = APPLICATION_JSON_VALUE) @@ -73,7 +74,7 @@ public class AlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-mesin-aset", method = GET, produces = APPLICATION_JSON_VALUE) @@ -83,7 +84,7 @@ public class AlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-satuan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -93,7 +94,7 @@ public class AlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-departemen-laundry", method = GET, produces = APPLICATION_JSON_VALUE) @@ -103,7 +104,7 @@ public class AlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-max-no-mesin", method = GET, produces = APPLICATION_JSON_VALUE) @@ -113,7 +114,7 @@ public class AlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-produkasetid-alatid", method = GET, produces = APPLICATION_JSON_VALUE) @@ -125,7 +126,7 @@ public class AlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-asset-laundry", method = GET, produces = APPLICATION_JSON_VALUE) diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnamnesisController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnamnesisController.java index dd5941cf..d16b99fa 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnamnesisController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnamnesisController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.AnamnesisService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.AnamnesisVO; import com.jasamedika.medifirst2000.vo.RegistrasiPelayananVO; import org.slf4j.Logger; @@ -56,11 +57,11 @@ public class AnamnesisController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveAnamnesis", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveAnamnesis", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnggaranController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnggaranController.java index 6c649de5..fddf5103 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnggaranController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/AnggaranController.java @@ -7,6 +7,7 @@ import com.jasamedika.medifirst2000.entities.Ruangan; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.AnggaranService; import com.jasamedika.medifirst2000.service.DetailAnggaranService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.HeadAnggaranVO; import com.jasamedika.medifirst2000.vo.VerifikasiSpekAnggaranVO; import org.slf4j.Logger; @@ -67,11 +68,11 @@ public class AnggaranController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePengajuanUsulanAnggaranBaru", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePengajuanUsulanAnggaranBaru", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -94,11 +95,11 @@ public class AnggaranController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveVerifikasiSpekAnggaran", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveVerifikasiSpekAnggaran", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -113,11 +114,11 @@ public class AnggaranController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveUnVerifikasiSpekAnggaran", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveUnVerifikasiSpekAnggaran", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -130,11 +131,11 @@ public class AnggaranController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPengendaliByUserLogin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPengendaliByUserLogin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -147,11 +148,11 @@ public class AnggaranController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getRuanganByUserLogin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getRuanganByUserLogin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -167,11 +168,11 @@ public class AnggaranController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when editPengajuanUsulanAnggaran", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when editPengajuanUsulanAnggaran", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } // end add by Arya 2017-01-19 diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ApresiasiAtasLayananController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ApresiasiAtasLayananController.java index 3474d56a..63d828f7 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ApresiasiAtasLayananController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ApresiasiAtasLayananController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.ApresiasiAtasLayananService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.ApresiasiAtasLayananVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class ApresiasiAtasLayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/B3RuanganInputDataController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/B3RuanganInputDataController.java index fc541213..4c923db5 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/B3RuanganInputDataController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/B3RuanganInputDataController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.B3RuanganInputDataService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.B3RuanganInputDataVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -50,11 +51,11 @@ public class B3RuanganInputDataController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addBakuMutu", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addBakuMutu", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -65,11 +66,11 @@ public class BakuMutuController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllBakuMutu", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllBakuMutu", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -82,11 +83,11 @@ public class BakuMutuController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getBakuMutuParent", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getBakuMutuParent", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -100,11 +101,11 @@ public class BakuMutuController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getBakuMutuChild", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getBakuMutuChild", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -118,11 +119,11 @@ public class BakuMutuController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when bakuMutuById", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when bakuMutuById", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BatalRegistrasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BatalRegistrasiController.java index e355726e..abcdab4d 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BatalRegistrasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BatalRegistrasiController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.BatalRegistrasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.BatalRegistrasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -54,11 +55,11 @@ public class BatalRegistrasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BobotIndikatorController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BobotIndikatorController.java index e0ec8b54..b0a7e5da 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BobotIndikatorController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BobotIndikatorController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.BobotIndikator; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.BobotIndikatorService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.BobotIndikatorVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -64,11 +65,11 @@ public class BobotIndikatorController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BowidickController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BowidickController.java index 21de462a..47262be1 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BowidickController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BowidickController.java @@ -33,7 +33,7 @@ public class BowidickController extends LocaleController { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value="/get-bowidick", @@ -49,7 +49,7 @@ public class BowidickController extends LocaleController { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value="/get-bowidick-by-norec", @@ -63,7 +63,7 @@ public class BowidickController extends LocaleController { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BundleSetAlatController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BundleSetAlatController.java index 7c44d658..b3eb12e2 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BundleSetAlatController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/BundleSetAlatController.java @@ -3,6 +3,7 @@ package com.jasamedika.medifirst2000.controller; import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.service.BundleSetAlatService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.BundleSetAlatVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -42,7 +43,7 @@ public class BundleSetAlatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CekListGedungBangunanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CekListGedungBangunanController.java index d466f11f..9a548d2d 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CekListGedungBangunanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CekListGedungBangunanController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.CekListGedungBangunanHeaderService; import com.jasamedika.medifirst2000.service.CekListGedungBangunanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.CekListGedungBangunanHeaderVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -60,11 +61,11 @@ public class CekListGedungBangunanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addCheckIn", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addCheckIn", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -71,11 +72,11 @@ public class CheckInController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findByNoRec", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findByNoRec", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -95,12 +96,12 @@ public class CheckInController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getCheckInByNoRecAntrian", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getCheckInByNoRecAntrian", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdBmhpController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdBmhpController.java index 69fa3438..2be3b98a 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdBmhpController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdBmhpController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.CssdBmhpService; import com.jasamedika.medifirst2000.service.StokProdukGlobalService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.CssdBmhpHeaderVO; import com.jasamedika.medifirst2000.vo.CssdBmhpVO; import com.jasamedika.medifirst2000.vo.CssdProduksiBmhpHeaderVO; @@ -52,11 +53,11 @@ public class CssdBmhpController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveCssdBmhp", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveCssdBmhp", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -71,11 +72,11 @@ public class CssdBmhpController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when produksiBmhp", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when produksiBmhp", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdDecontaminasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdDecontaminasiController.java index ce259516..97b14282 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdDecontaminasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdDecontaminasiController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.CssdDecontaminasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.CssdDecontaminasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class CssdDecontaminasiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveDistribusi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveDistribusi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdMonitoringEoController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdMonitoringEoController.java index 6e47100f..06cc33bb 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdMonitoringEoController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdMonitoringEoController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.CssdMonitoringEoService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.CssdMonitoringEoVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class CssdMonitoringEoController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePengemasan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePengemasan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdPenyimpananController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdPenyimpananController.java index f5e15fa5..83fe1b60 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdPenyimpananController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdPenyimpananController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.CssdPenyimpananService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.CssdPenyimpananVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class CssdPenyimpananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveSteril", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveSteril", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdSterilisasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdSterilisasiController.java index 49550fd9..23f3313a 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdSterilisasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/CssdSterilisasiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.MapPaketToProdukDto; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.CssdSterilisasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.CssdSterilisasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class CssdSterilisasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveUjiSwap", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveUjiSwap", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKegiatanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKegiatanController.java index 60bd63d3..545aeafc 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKegiatanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKegiatanController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.UnitCost; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.UnitCostService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.UnitCostVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class DaftarKegiatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findDetailCostUnit", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findDetailCostUnit", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -66,11 +67,11 @@ public class DaftarKegiatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListJenisUnitCost", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListJenisUnitCost", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -85,11 +86,11 @@ public class DaftarKegiatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListDetailJenisUnitCost", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListDetailJenisUnitCost", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -105,11 +106,11 @@ public class DaftarKegiatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListUnitCost", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListUnitCost", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKendaraanDinasController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKendaraanDinasController.java index 54d2e3d8..2f0f475f 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKendaraanDinasController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarKendaraanDinasController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DaftarKendaraanDinasService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.OrderKendaraanDinasVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -78,11 +79,11 @@ public class DaftarKendaraanDinasController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveStatusSewaAsrama", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveStatusSewaAsrama", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -94,11 +95,11 @@ public class DaftarSewaAsramaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getAllSewaAsrama", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getAllSewaAsrama", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarSewaLahanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarSewaLahanController.java index de5e9db1..0cc5a009 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarSewaLahanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DaftarSewaLahanController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DaftarSewaLahanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SewaLahanVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -80,11 +81,11 @@ public class DaftarSewaLahanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveStatusSewaLahan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveStatusSewaLahan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -98,11 +99,11 @@ public class DaftarSewaLahanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getAllSewaLahan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getAllSewaLahan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DampakResikoController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DampakResikoController.java index 24bf70aa..458999ad 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DampakResikoController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DampakResikoController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.DampakResiko; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DampakResikoService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.DampakResikoVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -63,11 +64,11 @@ public class DampakResikoController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DataPerusahaanYangBekerjaSamaController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DataPerusahaanYangBekerjaSamaController.java index 966afc13..3ea24371 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DataPerusahaanYangBekerjaSamaController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DataPerusahaanYangBekerjaSamaController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DataPerusahaanYangBekerjaSamaService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.DataPerusahaanYangBekerjaSamaVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class DataPerusahaanYangBekerjaSamaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when add", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when add", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -63,11 +64,11 @@ public class DepartemenController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when update", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when update", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -80,11 +81,11 @@ public class DepartemenController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when delete", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when delete", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -98,11 +99,11 @@ public class DepartemenController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllDepartemeById5And6", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllDepartemeById5And6", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DetailRupController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DetailRupController.java index a4cdf562..73a30421 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DetailRupController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DetailRupController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DetailRupService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.DetailRupCustomVO; import com.jasamedika.medifirst2000.vo.HeadAnggaranVO; import org.slf4j.Logger; @@ -49,11 +50,11 @@ public class DetailRupController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveDetailLRup", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveDetailLRup", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DiagnosaKeperawatanTransaksiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DiagnosaKeperawatanTransaksiController.java index d8557175..140f4526 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DiagnosaKeperawatanTransaksiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/DiagnosaKeperawatanTransaksiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DiagnosaKeperawatanService; import com.jasamedika.medifirst2000.service.DiagnosaKeperawatanTransaksiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.DiagnosaKeperawatanTransaksiVO; import com.jasamedika.medifirst2000.vo.DiagnosaKeperawatanVO; import org.slf4j.Logger; @@ -50,11 +51,11 @@ public class DiagnosaKeperawatanTransaksiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addDraftSurat", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addDraftSurat", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -70,11 +71,11 @@ public class DraftSuratController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getNoSurat", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getNoSurat", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EdukasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EdukasiController.java index 0779292e..d1e8041b 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EdukasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EdukasiController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.EdukasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.EdukasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class EdukasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveEdukasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveEdukasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EkstensionNoTeleponController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EkstensionNoTeleponController.java index f9bb1c05..a2715fb4 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EkstensionNoTeleponController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/EkstensionNoTeleponController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.EkstensionNoTeleponService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.EkstensionNoTeleponVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class EkstensionNoTeleponController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveFasilitas", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveFasilitas", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -71,11 +72,11 @@ public class FasilitasMController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListFasilitasByKelasRuangan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListFasilitasByKelasRuangan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -93,11 +94,11 @@ public class FasilitasMController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListFasilitasByRuangan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListFasilitasByRuangan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -114,11 +115,11 @@ public class FasilitasMController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getAllDepartemen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getAllDepartemen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FeeForServiceController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FeeForServiceController.java index 726a0079..462eece9 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FeeForServiceController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FeeForServiceController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dao.custom.PelayananPasienDaoCustom; import com.jasamedika.medifirst2000.exception.ServiceVOException; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PelayananPasienVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -47,11 +48,11 @@ public class FeeForServiceController extends LocaleController } catch (ServiceVOException se) { LOG.error("ServiceVOException {} when getFeeForService", se.getMessage()); addHeaderMessage(ERROR_MESSAGE, se.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOG.error("JpaSystemException {} when getFeeForService", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FisisPemeriksaanDokterController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FisisPemeriksaanDokterController.java index 23e5b659..79de7a29 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FisisPemeriksaanDokterController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/FisisPemeriksaanDokterController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.FisisPemeriksaanDokterService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.FisisPemeriksaanDokterVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -59,11 +60,11 @@ public class FisisPemeriksaanDokterController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findByJenisPeriode", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findByJenisPeriode", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -71,11 +72,11 @@ public class HVAController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveHVA", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveHVA", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -93,11 +94,11 @@ public class HVAController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getSummaryAnalysis", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getSummaryAnalysis", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/HasilPemeriksaanSwaPantauLimbahCairController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/HasilPemeriksaanSwaPantauLimbahCairController.java index bcd41d5c..aa812042 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/HasilPemeriksaanSwaPantauLimbahCairController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/HasilPemeriksaanSwaPantauLimbahCairController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.HasilPemeriksaanSwaPantauLimbahCairService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.HasilPemeriksaanSwaPantauLimbahCairVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class HasilPemeriksaanSwaPantauLimbahCairController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addHasilPemeriksaanSwaPantauLimbahCair", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addHasilPemeriksaanSwaPantauLimbahCair", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -67,11 +68,11 @@ public class HasilPemeriksaanSwaPantauLimbahCairController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllhasilPemeriksaanSwaPantauLimbahCair", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllhasilPemeriksaanSwaPantauLimbahCair", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -83,11 +84,11 @@ public class HasilPemeriksaanSwaPantauLimbahCairController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteHasilPemeriksaanSwaPantauLimbahCair", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deleteHasilPemeriksaanSwaPantauLimbahCair", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IkiDanRemunerasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IkiDanRemunerasiController.java index 9f5ec145..5bcf947c 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IkiDanRemunerasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IkiDanRemunerasiController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.IkiDanRemunerasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.IkiDanRemunerasiVO; import com.jasamedika.medifirst2000.vo.SettingPirSdmVO; import com.jasamedika.medifirst2000.vo.StrukHistoriVO; @@ -51,11 +52,11 @@ public class IkiDanRemunerasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveInstruksi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveInstruksi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IntraOperasiAnestesiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IntraOperasiAnestesiController.java index 6491ea05..bb6e627c 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IntraOperasiAnestesiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IntraOperasiAnestesiController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.IntraOperasiAnestesiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.AsuhanKeperawatanPeriOperasiHeaderVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class IntraOperasiAnestesiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getAllRegistrasiAset", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getAllRegistrasiAset", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -69,11 +70,11 @@ public class IpsrsDataAlatController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getOneRegistrasiAset", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getOneRegistrasiAset", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -90,11 +91,11 @@ public class IpsrsDataAlatController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getAllJenisProdukByIpsrs", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getAllJenisProdukByIpsrs", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsMaintenanceController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsMaintenanceController.java index 4a0bcc92..fa9394f7 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsMaintenanceController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsMaintenanceController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.IpsrsMaintenanceService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.IpsrsPemeliharaanVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +47,11 @@ public class IpsrsMaintenanceController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePermintaanPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePermintaanPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -75,11 +76,11 @@ public class IpsrsPerbaikanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getRuanganPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getRuanganPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -97,11 +98,11 @@ public class IpsrsPerbaikanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getAsetPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getAsetPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -119,11 +120,11 @@ public class IpsrsPerbaikanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getOnePermintaanPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getOnePermintaanPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -138,11 +139,11 @@ public class IpsrsPerbaikanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePelaksanaanPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePelaksanaanPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -158,11 +159,11 @@ public class IpsrsPerbaikanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updatePermintaanPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updatePermintaanPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsPreventiveMaintenanceController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsPreventiveMaintenanceController.java index d41e60ca..cb56fda0 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsPreventiveMaintenanceController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/IpsrsPreventiveMaintenanceController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.IpsrsPreventiveMaintenanceService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.IpsrsPemeliharaanVO; import com.jasamedika.medifirst2000.vo.IpsrsPreventiveMaintenanceVO; import org.slf4j.Logger; @@ -51,11 +52,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getNoOrderTable", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getNoOrderTable", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -76,11 +77,11 @@ public class ItPerbaikanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePermintaanPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePermintaanPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -97,11 +98,11 @@ public class ItPerbaikanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getRuanganPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getRuanganPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -119,11 +120,11 @@ public class ItPerbaikanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getAsetPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getAsetPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -138,11 +139,11 @@ public class ItPerbaikanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePelaksanaanPerbaikanRev1", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePelaksanaanPerbaikanRev1", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -160,11 +161,11 @@ public class ItPerbaikanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteItPerbaikan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deleteItPerbaikan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JabatanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JabatanController.java index 93d48fb2..b06f870b 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JabatanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JabatanController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.JabatanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.JabatanVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class JabatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveJabatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveJabatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -66,11 +67,11 @@ public class JabatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when update", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when update", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -84,11 +85,11 @@ public class JabatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteJabatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deleteJabatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -101,11 +102,11 @@ public class JabatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when delete", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when delete", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JadwalDpjpRawatInapController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JadwalDpjpRawatInapController.java index 724a31db..94f30849 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JadwalDpjpRawatInapController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JadwalDpjpRawatInapController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.JadwalDpjpRawatInapService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.JadwalDpjpRawatInapVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -45,11 +46,11 @@ public class JadwalDpjpRawatInapController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveJenisBahan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveJenisBahan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisDietController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisDietController.java index 8b05c107..f12e8cd1 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisDietController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisDietController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.JenisDiet; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.JenisDietService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.JenisDietVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -51,11 +52,11 @@ public class JenisDietController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when generate", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when generate", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -80,11 +81,11 @@ public class JenisDietController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisLimbahB3MasukController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisLimbahB3MasukController.java index 860b9d82..cdc5e56d 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisLimbahB3MasukController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisLimbahB3MasukController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.JenisLimbahB3MasukService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.JenisLimbahB3MasukVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class JenisLimbahB3MasukController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveJenisLinen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveJenisLinen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -66,11 +67,11 @@ public class JenisLinenController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllJenisLinen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllJenisLinen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -82,11 +83,11 @@ public class JenisLinenController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteJenisLinen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deleteJenisLinen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisResponController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisResponController.java index a6013e32..afc8dc4f 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisResponController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisResponController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.JenisResponService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.JenisResponVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +47,11 @@ public class JenisResponController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveJenisRespon", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveJenisRespon", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisWaktuController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisWaktuController.java index 053109aa..590b57a6 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisWaktuController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/JenisWaktuController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.JenisWaktu; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.JenisWaktuService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.JenisWaktuVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -63,11 +64,11 @@ public class JenisWaktuController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/K3CheckListFacillitySefetyController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/K3CheckListFacillitySefetyController.java index c9f3d94c..7c6ea496 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/K3CheckListFacillitySefetyController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/K3CheckListFacillitySefetyController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.K3CheckListFacillitySefetyService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.K3CheckListFacillitySefetyVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -50,11 +51,11 @@ public class K3CheckListFacillitySefetyController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveKajian", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveKajian", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -111,11 +112,11 @@ public class KajianEvaluasiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updateKajian", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updateKajian", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -130,11 +131,11 @@ public class KajianEvaluasiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteKajian", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deleteKajian", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KamusIndikatorController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KamusIndikatorController.java index 8066540c..affca197 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KamusIndikatorController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KamusIndikatorController.java @@ -1,13 +1,17 @@ package com.jasamedika.medifirst2000.controller; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - +import com.jasamedika.medifirst2000.constants.Constants; +import com.jasamedika.medifirst2000.constants.MessageResource; +import com.jasamedika.medifirst2000.controller.base.IBaseRestController; +import com.jasamedika.medifirst2000.controller.base.LocaleController; +import com.jasamedika.medifirst2000.core.web.WebConstants; +import com.jasamedika.medifirst2000.entities.KamusIndikator; +import com.jasamedika.medifirst2000.exception.ServiceVOException; +import com.jasamedika.medifirst2000.service.KamusIndikatorService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; +import com.jasamedika.medifirst2000.vo.KamusIndikatorVO; +import net.kaczmarzyk.spring.data.jpa.domain.Equal; +import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -17,26 +21,14 @@ 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.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 org.springframework.web.bind.annotation.*; -import com.jasamedika.medifirst2000.constants.Constants; -import com.jasamedika.medifirst2000.constants.MessageResource; -import com.jasamedika.medifirst2000.controller.base.IBaseRestController; -import com.jasamedika.medifirst2000.controller.base.LocaleController; -import com.jasamedika.medifirst2000.core.web.WebConstants; -import com.jasamedika.medifirst2000.dto.DetailKamusIndikatorDto; -import com.jasamedika.medifirst2000.entities.KamusIndikator; -import com.jasamedika.medifirst2000.exception.ServiceVOException; -import com.jasamedika.medifirst2000.service.KamusIndikatorService; -import com.jasamedika.medifirst2000.util.rest.RestUtil; -import com.jasamedika.medifirst2000.vo.KamusIndikatorVO; - -import net.kaczmarzyk.spring.data.jpa.domain.Equal; -import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; @RestController @RequestMapping("/kamus-indikator") @@ -81,7 +73,7 @@ implements IBaseRestController{ } @RequestMapping(value="/find-all/", method= RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity> findAll( + public ResponseEntity> findAll( @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, @RequestParam(value = "take", required = false, defaultValue = "100") Integer take, @RequestParam(value = "sort", required = false, defaultValue = "id") String sort, @@ -96,7 +88,7 @@ implements IBaseRestController{ } @RequestMapping(value="/detail-indikator/", method= RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity> findAll( + public ResponseEntity> findAll( @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, @RequestParam(value = "take", required = false, defaultValue = "100") Integer take, @RequestParam(value = "sort", required = false, defaultValue = "id") String sort, @@ -120,14 +112,14 @@ implements IBaseRestController{ LOGGER.error("Got exception {} when add/update kamus IKU", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add/update kamus IKU", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KartuPengendaliController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KartuPengendaliController.java index b69e70db..c2715476 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KartuPengendaliController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KartuPengendaliController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DetailAnggaranService; import com.jasamedika.medifirst2000.service.KartuPengendaliService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.*; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -57,11 +58,11 @@ public class KartuPengendaliController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getKategoryProdukGizi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getKategoryProdukGizi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KebutuhanDasarController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KebutuhanDasarController.java index 3b43ffe3..3b255a20 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KebutuhanDasarController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KebutuhanDasarController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.KebutuhanDasarService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.KebutuhanDasarVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -61,11 +62,11 @@ public class KebutuhanDasarController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addKebutuhanDasar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addKebutuhanDasar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KelasController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KelasController.java index ef362fbe..df64378e 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KelasController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KelasController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.KelasService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.KelasVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class KelasController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when add", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when add", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -65,11 +66,11 @@ public class KelasController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when update", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when update", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -82,11 +83,11 @@ public class KelasController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when delete", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when delete", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } catch (DataIntegrityViolationException ex) { LOGGER.error("Got DataIntegrityViolationException {} when delete", ex.getMessage()); addHeaderMessage(ERROR_MESSAGE, ex.getMessage()); @@ -106,11 +107,11 @@ public class KelasController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findKelasByRuangan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findKelasByRuangan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KeluargaPegawaiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KeluargaPegawaiController.java index 7a1a97cd..ff75a257 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KeluargaPegawaiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KeluargaPegawaiController.java @@ -3,6 +3,7 @@ package com.jasamedika.medifirst2000.controller; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.KeluargaPegawaiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.KeluargaPegawaiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -55,11 +56,11 @@ public class KeluargaPegawaiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveKomunikasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveKomunikasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsepDiriController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsepDiriController.java index b9ccee40..4f914532 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsepDiriController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsepDiriController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.KonsepDiriService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.KonsepDiriVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -57,11 +58,11 @@ public class KonsepDiriController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addKonsepDiri", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addKonsepDiri", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsultasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsultasiController.java index 9eef8ea2..46f4f9dd 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsultasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KonsultasiController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.KonsultasiService; import com.jasamedika.medifirst2000.service.RegistrasiPelayananService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.AntrianPasienDiPeriksaVO; import com.jasamedika.medifirst2000.vo.KonsultasiVO; import com.jasamedika.medifirst2000.vo.RegistrasiPelayananVO; @@ -65,11 +66,11 @@ public class KonsultasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveKontrak", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveKontrak", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -67,11 +68,11 @@ public class KontrakController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveKontrakDetail", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveKontrakDetail", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KontrakKinerjaController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KontrakKinerjaController.java index 500fe01c..76db1a5e 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KontrakKinerjaController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KontrakKinerjaController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.KontrakKinerja; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.KontrakKinerjaService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.KontrakKinerjaVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -69,11 +70,11 @@ public class KontrakKinerjaController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KopingController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KopingController.java index f879407a..9023dc30 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KopingController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/KopingController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.KopingService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.KopingVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -58,11 +59,11 @@ public class KopingController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addKoping", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addKoping", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LapPembedahanDanInstruksiPascaBedahController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LapPembedahanDanInstruksiPascaBedahController.java index cf6d61ca..bd677cee 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LapPembedahanDanInstruksiPascaBedahController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LapPembedahanDanInstruksiPascaBedahController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.LapPembedahanDanInstruksiPascaBedahService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.AsuhanKeperawatanPeriOperasiHeaderVO; import com.jasamedika.medifirst2000.vo.AsuhanKeperawatanPeriOperatifVO; import org.slf4j.Logger; @@ -50,11 +51,11 @@ public class LapPembedahanDanInstruksiPascaBedahController extends LocaleControl } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveLapInstruksiPascaBedahHeader", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveLapInstruksiPascaBedahHeader", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -73,12 +74,12 @@ public class LapPembedahanDanInstruksiPascaBedahController extends LocaleControl } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListAsuhanByNoTrans", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListAsuhanByNoTrans", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -96,11 +97,11 @@ public class LapPembedahanDanInstruksiPascaBedahController extends LocaleControl } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPasienDaftarOperasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPasienDaftarOperasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -117,11 +118,11 @@ public class LapPembedahanDanInstruksiPascaBedahController extends LocaleControl } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getMacamInfus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getMacamInfus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LaporanUjiHasilController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LaporanUjiHasilController.java index 39186670..f78f50c7 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LaporanUjiHasilController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LaporanUjiHasilController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.LaporanUjiHasilService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.LaporanUjiHasilVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class LaporanUjiHasilController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-penerimaan-linen", method = POST, produces = APPLICATION_JSON_VALUE) @@ -57,7 +58,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/generate-no-struk", method = GET, produces = APPLICATION_JSON_VALUE) @@ -67,7 +68,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-satuan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -77,7 +78,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-penerimaan-linen-filter", method = GET, produces = APPLICATION_JSON_VALUE) @@ -91,7 +92,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } private String changeTimeEndPeriode(String endPeriode) { @@ -118,7 +119,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-bahan-from-mesin-proses", method = GET, produces = APPLICATION_JSON_VALUE) @@ -130,7 +131,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-proses-cuci", method = POST, produces = APPLICATION_JSON_VALUE) @@ -141,7 +142,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-pencucian", method = GET, produces = APPLICATION_JSON_VALUE) @@ -155,7 +156,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-proses-bilas", method = GET, produces = APPLICATION_JSON_VALUE) @@ -166,7 +167,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pembilasan", method = POST, produces = APPLICATION_JSON_VALUE) @@ -177,7 +178,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-pembilasan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -190,7 +191,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pengeringan", method = POST, produces = APPLICATION_JSON_VALUE) @@ -201,7 +202,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-produk-pelipatan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -211,7 +212,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pelipatan", method = POST, produces = APPLICATION_JSON_VALUE) @@ -222,7 +223,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-pelipatan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -235,7 +236,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/cek-stok-ruangan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -246,7 +247,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/cek-produk-pelipatan", method = POST, produces = APPLICATION_JSON_VALUE) @@ -257,7 +258,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-produk-penerimaan-linen-external", method = GET, produces = APPLICATION_JSON_VALUE) @@ -267,7 +268,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-penerimaan-linen-external", method = POST, produces = APPLICATION_JSON_VALUE) @@ -278,7 +279,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-satuan-potong", method = GET, produces = APPLICATION_JSON_VALUE) @@ -288,7 +289,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pembilasan-to-pengeringan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -301,7 +302,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pengeringan-to-pelipatan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -314,7 +315,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-pengambilan-eksternal", method = GET, produces = APPLICATION_JSON_VALUE) @@ -329,7 +330,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pengambilan", method = POST, produces = APPLICATION_JSON_VALUE) @@ -340,7 +341,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/retur-laundry", method = POST, produces = APPLICATION_JSON_VALUE) @@ -351,7 +352,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-retur-linen", method = GET, produces = APPLICATION_JSON_VALUE) @@ -364,7 +365,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-retur-linen", method = GET, produces = APPLICATION_JSON_VALUE) @@ -377,7 +378,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pengambilan-linen-internal", method = POST, produces = APPLICATION_JSON_VALUE) @@ -388,7 +389,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-penerimaan-linen-internal", method = POST, produces = APPLICATION_JSON_VALUE) @@ -399,7 +400,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-permintaan-linen-bersih-dari-ruangan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -430,7 +431,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-proses-cuci-external", method = POST, produces = APPLICATION_JSON_VALUE) @@ -441,7 +442,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-proses-cuci", method = GET, produces = APPLICATION_JSON_VALUE) @@ -475,7 +476,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-proses-pengeringan-external", method = POST, produces = APPLICATION_JSON_VALUE) @@ -486,7 +487,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-proses-pengeringan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -521,7 +522,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-proses-pelipatan-external", method = POST, produces = APPLICATION_JSON_VALUE) @@ -532,7 +533,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-proses-pelipatan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -567,7 +568,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-proses-rollpress-external", method = POST, produces = APPLICATION_JSON_VALUE) @@ -578,7 +579,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-proses-rollpress", method = GET, produces = APPLICATION_JSON_VALUE) @@ -623,7 +624,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-distribusi-linen-bersih", method = GET, produces = APPLICATION_JSON_VALUE) @@ -646,7 +647,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-distribusi-linen-bersih-detail", method = GET, produces = APPLICATION_JSON_VALUE) @@ -687,7 +688,7 @@ public class LaundryController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-jenis-linen", method = GET, produces = APPLICATION_JSON_VALUE) diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LevelTingkatController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LevelTingkatController.java index 60078534..2ea33ad0 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LevelTingkatController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LevelTingkatController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.LevelTingkatDto; import com.jasamedika.medifirst2000.service.LevelTingkatService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.LevelTingkatVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -38,7 +39,7 @@ public class LevelTingkatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-level-tingkat", method = GET, produces = APPLICATION_JSON_VALUE) @@ -48,7 +49,7 @@ public class LevelTingkatController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LimbahB3KeluarController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LimbahB3KeluarController.java index d4e9f7a2..44d48e46 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LimbahB3KeluarController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LimbahB3KeluarController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.LimbahB3KeluarService; import com.jasamedika.medifirst2000.service.LimbahB3MasukService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.LimbahB3KeluarVO; import com.jasamedika.medifirst2000.vo.LimbahB3MasukVO; import org.slf4j.Logger; @@ -53,11 +54,11 @@ public class LimbahB3KeluarController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addLimbahB3Keluar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addLimbahB3Keluar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -75,11 +76,11 @@ public class LimbahB3KeluarController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteLimbahB3Keluar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deleteLimbahB3Keluar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } @@ -109,11 +110,11 @@ public class LimbahB3KeluarController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getTotalBeratLimbah", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getTotalBeratLimbah", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -129,11 +130,11 @@ public class LimbahB3KeluarController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getTotalBeratLimbahList", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getTotalBeratLimbahList", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LoginUserController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LoginUserController.java index 179149e1..0cfbbb09 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LoginUserController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/LoginUserController.java @@ -1,27 +1,5 @@ package com.jasamedika.medifirst2000.controller; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -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.security.core.Authentication; -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; @@ -36,6 +14,22 @@ import com.jasamedika.medifirst2000.util.CommonUtil; import com.jasamedika.medifirst2000.util.PasswordUtil; import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.LoginUserVO; +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.security.core.Authentication; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; @RestController @RequestMapping("/user") @@ -86,33 +80,33 @@ public class LoginUserController extends LocaleController { } else { LOGGER.error("Got exception {} when update password User failed"); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "update password User failed"); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } }else{ LOGGER.error("Got exception {} when update Pegawai, password invalid"); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Invalid Password"); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } else { LOGGER.error("Got exception {} when update Pegawai"); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "User is unauthorized"); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got exception {} when update password User", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when update password User", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } catch (Exception ex) { LOGGER.error("Got exception {} when update password User", ex.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, ex.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } -// return RestUtil.getJsonHttptatus(HttpStatus.NOT_ACCEPTABLE); +// return RestUtil.getJsonHttpStatus(HttpStatus.NOT_ACCEPTABLE); } @@ -126,14 +120,14 @@ public class LoginUserController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when update User", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when update User", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.NOT_ACCEPTABLE); + return RestUtil.getJsonHttpStatus(HttpStatus.NOT_ACCEPTABLE); } @SuppressWarnings("unchecked") @@ -223,11 +217,11 @@ public class LoginUserController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -246,11 +240,11 @@ public class LoginUserController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when saveLoginUser", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when saveLoginUser", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ManagementController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ManagementController.java index 71a33b20..1bb8d081 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ManagementController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ManagementController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.ManagementDashboardService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.ManagementDashboardVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -50,11 +51,11 @@ public class ManagementController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Map Ruangan to Kelas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Map Ruangan to Kelas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -80,17 +73,17 @@ IBaseRestController { if (null != result) addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, ""); - RestUtil.getJsonHttptatus(HttpStatus.CREATED); + RestUtil.getJsonHttpStatus(HttpStatus.CREATED); return RestUtil.getJsonResponse("", HttpStatus.CREATED); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when update Map Ruangan to Kelas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when update Map Ruangan to Kelas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -118,17 +111,17 @@ IBaseRestController { LOGGER.error("Got exception {} when delete MapRuanganToKelas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when delete MapRuanganToKelas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.NOT_ACCEPTABLE); + return RestUtil.getJsonHttpStatus(HttpStatus.NOT_ACCEPTABLE); } @Override @@ -156,11 +149,11 @@ IBaseRestController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getRuanganByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getRuanganByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -178,11 +171,11 @@ IBaseRestController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getKelasByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getKelasByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -201,11 +194,11 @@ IBaseRestController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getKamarByKelas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getKamarByKelas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingAlatToBundleController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingAlatToBundleController.java index 01deb367..76dcb8e7 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingAlatToBundleController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingAlatToBundleController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.MappingAlatToBundleService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.MappingAlatToBundleVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class MappingAlatToBundleController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMappingCycle", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMappingCycle", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -68,11 +69,11 @@ public class MappingCycleController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findNamaBahan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findNamaBahan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -85,11 +86,11 @@ public class MappingCycleController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findMesinDenganKapasitas", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findMesinDenganKapasitas", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -102,11 +103,11 @@ public class MappingCycleController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getMappingCycle", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getMappingCycle", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -120,11 +121,11 @@ public class MappingCycleController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getMappingCycleByNoRec", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getMappingCycleByNoRec", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingJenisLinenToProdukController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingJenisLinenToProdukController.java index ff180922..c94d6e59 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingJenisLinenToProdukController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MappingJenisLinenToProdukController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.MappingJenisLinenToProdukDto; import com.jasamedika.medifirst2000.service.MappingJenisLinenToProdukService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.RegistrasiPelayananVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -39,7 +40,7 @@ public class MappingJenisLinenToProdukController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMasalahKeperawatanService", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMasalahKeperawatanService", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MasterProgramKerjaStrategisController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MasterProgramKerjaStrategisController.java index ce081e39..e4d22c2f 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MasterProgramKerjaStrategisController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MasterProgramKerjaStrategisController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.MasterProgramKerjaStrategis; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.MasterProgramKerjaStrategisService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.MasterProgramKerjaStrategisVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -64,11 +65,11 @@ public class MasterProgramKerjaStrategisController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMasukKamar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMasukKamar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuController.java index c9f78951..b8683809 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.MenuService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.ProdukVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -55,11 +56,11 @@ public class MenuController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMenu", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMenu", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuDinamicController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuDinamicController.java index da7bd4ef..788f97f9 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuDinamicController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MenuDinamicController.java @@ -86,7 +86,7 @@ public class MenuDinamicController extends LocaleController } catch (Exception e) { LOGGER.info("Got exception {} in get objek modul aplikasi", e); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Gagal pilih ruangan."); - return RestUtil.getJsonHttptatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); } } @@ -105,7 +105,7 @@ public class MenuDinamicController extends LocaleController } catch (Exception e) { LOGGER.info("Got exception {} in get objek modul aplikasi", e); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Gagal pilih ruangan."); - return RestUtil.getJsonHttptatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); } } @@ -139,7 +139,7 @@ public class MenuDinamicController extends LocaleController if (CommonUtil.isNullOrEmpty(lVO)) { addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Anda tidak punya izin akses"); - return RestUtil.getJsonHttptatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); } return RestUtil.defaultJsonResponse(objekModulAplikasiService.findAllModulAplikasi(kdModulAplikasi)); @@ -147,7 +147,7 @@ public class MenuDinamicController extends LocaleController } catch (Exception e) { LOGGER.info("Got exception {} in get objek modul aplikasi", e); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Anda tidak punya izin akses"); - return RestUtil.getJsonHttptatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); } } @@ -166,14 +166,14 @@ public class MenuDinamicController extends LocaleController if (CommonUtil.isNullOrEmpty(ruangannya)) { addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Anda tidak punya izin akses"); - return RestUtil.getJsonHttptatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); } return RestUtil.defaultJsonResponse(ruangannya); } catch (Exception e) { LOGGER.info("Got exception {} in get objek modul aplikasi", e); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Anda tidak punya izin akses"); - return RestUtil.getJsonHttptatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.UNAUTHORIZED, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MesinController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MesinController.java index e1358fda..587fb8ec 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MesinController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MesinController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.MesinDto; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.MesinService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.MesinVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class MesinController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMesin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMesin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -66,11 +67,11 @@ public class MesinController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllMesin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllMesin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -83,11 +84,11 @@ public class MesinController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findMesin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findMesin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -104,11 +105,11 @@ public class MesinController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllMesinLaundry", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllMesinLaundry", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringAlatSterilController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringAlatSterilController.java index 4e496652..0a105634 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringAlatSterilController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringAlatSterilController.java @@ -37,7 +37,7 @@ public class MonitoringAlatSterilController extends LocaleController { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value="/get-monitoringalatsteril", diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringEvaluasiPerundanganController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringEvaluasiPerundanganController.java index 22ec6c91..45297f29 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringEvaluasiPerundanganController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/MonitoringEvaluasiPerundanganController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.MonitoringEvaluasiPerundanganService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.UsulanEvaluasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -52,11 +53,11 @@ public class MonitoringEvaluasiPerundanganController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when add", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when add", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -64,11 +65,11 @@ public class NeracaLimbahController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when update", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when update", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -96,11 +97,11 @@ public class NeracaLimbahController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getJumlahJenisLimbahB3ByPeriode", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getJumlahJenisLimbahB3ByPeriode", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NilaiNilaiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NilaiNilaiController.java index 1239b307..6d506ae2 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NilaiNilaiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NilaiNilaiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.NilaiNilaiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.NilaiNilaiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -57,11 +58,11 @@ public class NilaiNilaiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addNilaiNilai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addNilaiNilai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NotaDinasController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NotaDinasController.java index 9e7a8315..95df451e 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NotaDinasController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/NotaDinasController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.NotaDinasService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.NotaDinasVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -47,11 +48,11 @@ public class NotaDinasController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addNotaDinas", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addNotaDinas", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -66,11 +67,11 @@ public class NotaDinasController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getNoSurat", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getNoSurat", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiController.java index 6628b719..caef6b80 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.ObservasiTransaksiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.ObservasiCustomVO; import com.jasamedika.medifirst2000.vo.ObservasiVO; import org.slf4j.Logger; @@ -50,11 +51,11 @@ public class ObservasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiIGDController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiIGDController.java index 67bb8a9a..e0b8b247 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiIGDController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ObservasiIGDController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.LayananService; import com.jasamedika.medifirst2000.service.ObservasiIGDService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.LayananVOCustom; import com.jasamedika.medifirst2000.vo.ObservasiIGDVO; import com.jasamedika.medifirst2000.vo.ObservasiIGDVOCustom; @@ -52,11 +53,11 @@ public class ObservasiIGDController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveObservasiIGD", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveObservasiIGD", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -71,11 +72,11 @@ public class ObservasiIGDController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveLayanan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveLayanan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OperationController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OperationController.java index 7e2f4e51..eb96068f 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OperationController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OperationController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.CheckOutOperationService; import com.jasamedika.medifirst2000.service.SignOutOperationService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.CheckOutOperationVO; import com.jasamedika.medifirst2000.vo.SignOutOperationVO; import org.slf4j.Logger; @@ -58,11 +59,11 @@ public class OperationController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveSignOutOperationService", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveSignOutOperationService", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -78,11 +79,11 @@ public class OperationController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveCheckOutOperationService", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveCheckOutOperationService", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -99,11 +100,11 @@ public class OperationController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getKesadaranCheckOut", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getKesadaranCheckOut", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -120,11 +121,11 @@ public class OperationController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getKelengkapanCheckOut", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getKelengkapanCheckOut", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -142,11 +143,11 @@ public class OperationController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getCheckOutByNoRec", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getCheckOutByNoRec", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -164,11 +165,11 @@ public class OperationController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getCheckOutByNoRecAntrian", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getCheckOutByNoRecAntrian", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderAmbulanceController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderAmbulanceController.java index 384f0c80..aa8cd12f 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderAmbulanceController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderAmbulanceController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.dto.AsetDto; import com.jasamedika.medifirst2000.dto.OrderAmbulanceDto; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.OrderAmbulanceService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.OrderAmbulanceVO; import com.jasamedika.medifirst2000.vo.PegawaiVO; import org.slf4j.Logger; @@ -52,11 +53,11 @@ public class OrderAmbulanceController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveOrderAmbulance", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveOrderAmbulance", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -69,11 +70,11 @@ public class OrderAmbulanceController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findProdukAmbulance", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findProdukAmbulance", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -86,11 +87,11 @@ public class OrderAmbulanceController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAssetAmbulance", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAssetAmbulance", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -103,11 +104,11 @@ public class OrderAmbulanceController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getSupirAmbulance", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getSupirAmbulance", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderGiziController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderGiziController.java index d75b3718..c2ae41d8 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderGiziController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/OrderGiziController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.OrderGiziService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.MapProdukMenuToBahanVO; import com.jasamedika.medifirst2000.vo.RequestBarangDariRuanganVO; import org.slf4j.Logger; @@ -61,11 +62,11 @@ public class OrderGiziController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addAlergi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addAlergi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapAnamesisController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapAnamesisController.java index 4eff3ec5..afadf7e2 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapAnamesisController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapAnamesisController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapAnamesisService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapAnamesisVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -53,11 +54,11 @@ public class PapAnamesisController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addAnamesis", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addAnamesis", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapBedahController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapBedahController.java index d62de9b1..4cdac30e 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapBedahController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapBedahController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapBedahService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapBedahVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -52,11 +53,11 @@ public class PapBedahController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addBedah", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addBedah", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapCatatanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapCatatanController.java index 645c4d53..462a93f8 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapCatatanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapCatatanController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapCatatanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapCatatanVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -60,11 +61,11 @@ public class PapCatatanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addCatatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addCatatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapEliminasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapEliminasiController.java index b9c2a12f..5cd652cb 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapEliminasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapEliminasiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapEliminasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapEliminasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -53,11 +54,11 @@ public class PapEliminasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addEliminasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addEliminasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGastrointestinalController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGastrointestinalController.java index 0344531d..71768cff 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGastrointestinalController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGastrointestinalController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapGastrointestinalService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapGastrointestinalVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -54,11 +55,11 @@ public class PapGastrointestinalController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addGenatalia", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addGenatalia", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -75,11 +76,11 @@ public class PapGenataliaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updateGenatalia", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updateGenatalia", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGigiMulutController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGigiMulutController.java index 933ca913..5334fc8e 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGigiMulutController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGigiMulutController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapGigiMulutService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapGigiMulutVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -53,11 +54,11 @@ public class PapGigiMulutController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addGigiMulut", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addGigiMulut", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGinekologiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGinekologiController.java index f8ce4b31..726d1c91 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGinekologiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapGinekologiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapGinekologiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapGinekologiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -56,11 +57,11 @@ public class PapGinekologiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addGinekologi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addGinekologi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapInstruksiPerjanjianController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapInstruksiPerjanjianController.java index b4d0322a..48fe83d7 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapInstruksiPerjanjianController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapInstruksiPerjanjianController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapInstruksiPerjanjianService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapInstruksiPerjanjianVO; import com.jasamedika.medifirst2000.vo.PasienInstruksiPerjanjianVO; import org.slf4j.Logger; @@ -57,11 +58,11 @@ public class PapInstruksiPerjanjianController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addIntegumen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addIntegumen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapKebutuhanEdukasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapKebutuhanEdukasiController.java index 6f767ea5..f9789aa8 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapKebutuhanEdukasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapKebutuhanEdukasiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapKebutuhanEdukasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapKebutuhanEdukasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class PapKebutuhanEdukasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addMata", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addMata", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapMuskuloskeletalController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapMuskuloskeletalController.java index 26399f47..193d437b 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapMuskuloskeletalController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapMuskuloskeletalController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapMuskuloskeletalService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapMuskuloskeletalVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -54,11 +55,11 @@ public class PapMuskuloskeletalController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addNeurologi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addNeurologi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapObstetriController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapObstetriController.java index 4f3305f9..41195f7c 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapObstetriController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapObstetriController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapObstetriService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapObstetriVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -58,11 +59,11 @@ public class PapObstetriController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePapObstetri", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePapObstetri", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapPengambilanSpesimenController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapPengambilanSpesimenController.java index 2e8145ea..5bb104ce 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapPengambilanSpesimenController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapPengambilanSpesimenController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapPengambilanSpesimenService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapPengambilanSpesimenCustomVO; import com.jasamedika.medifirst2000.vo.PapPengambilanSpesimenVO; import org.slf4j.Logger; @@ -46,11 +47,11 @@ public class PapPengambilanSpesimenController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addPernapasan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addPernapasan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapRiwayatImunisasiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapRiwayatImunisasiController.java index a477515d..d5e0a3ae 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapRiwayatImunisasiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapRiwayatImunisasiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapRiwayatImunisasiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapRiwayatImunisasiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -52,11 +53,11 @@ public class PapRiwayatImunisasiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addSirkulasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addSirkulasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapSkriningGiziController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapSkriningGiziController.java index 4b45ccaf..3b056e38 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapSkriningGiziController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapSkriningGiziController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapSkriningGiziService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapSkriningGiziVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -55,11 +56,11 @@ public class PapSkriningGiziController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addTandaVital", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addTandaVital", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapThtController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapThtController.java index d6019c6c..2c08166a 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapThtController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PapThtController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PapThtService; import com.jasamedika.medifirst2000.service.ThtService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PapThtVO; import com.jasamedika.medifirst2000.vo.ThtVO; import org.slf4j.Logger; @@ -62,11 +63,11 @@ public class PapThtController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addTht2", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addTht2", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ParameterController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ParameterController.java index 10b8cf60..a8d17fc3 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ParameterController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ParameterController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.ParameterService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.ParameterVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -45,11 +46,11 @@ public class ParameterController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addParameter", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addParameter", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -64,11 +65,11 @@ public class ParameterController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updateParameter", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updateParameter", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PasienMeninggalController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PasienMeninggalController.java index c93f1af8..ec10a31a 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PasienMeninggalController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PasienMeninggalController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PasienMeninggalService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PasienMeninggalVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -53,11 +54,11 @@ public class PasienMeninggalController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updatepasienPulang", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updatepasienPulang", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PayRollPegawaiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PayRollPegawaiController.java index b13353b5..d9790889 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PayRollPegawaiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PayRollPegawaiController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.dto.FileUploadExcelDto; import com.jasamedika.medifirst2000.dto.PayRollDto; import com.jasamedika.medifirst2000.dto.PayRollUangMakanDto; import com.jasamedika.medifirst2000.service.PayRollPegawaiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.StrukHistoriVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -47,7 +48,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pegawai-blu-pkwt", method = POST, produces = APPLICATION_JSON_VALUE) @@ -58,7 +59,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/find-status-pegawai-blu-pkwt", method = GET, produces = APPLICATION_JSON_VALUE) @@ -71,7 +72,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/find-jenis-gaji", method = GET, produces = APPLICATION_JSON_VALUE) @@ -81,7 +82,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-uang-makan-pegawai", method = GET, produces = APPLICATION_JSON_VALUE) @@ -95,7 +96,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/find-status-pegawai-uang-makan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -110,7 +111,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pegawai-uang-makan", method = POST, produces = APPLICATION_JSON_VALUE) @@ -121,7 +122,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/import-uang-makan", method = POST, produces = APPLICATION_JSON_VALUE) @@ -140,10 +141,10 @@ public class PayRollPegawaiController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } else { - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -156,7 +157,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-harian-lepas-pegawai", method = GET, produces = APPLICATION_JSON_VALUE) @@ -170,7 +171,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pegawai-harian-lepas", method = POST, produces = APPLICATION_JSON_VALUE) @@ -181,7 +182,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/find-status-pegawai-pkwt", method = GET, produces = APPLICATION_JSON_VALUE) @@ -193,7 +194,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-dokter-psikologi-pkwt", method = GET, produces = APPLICATION_JSON_VALUE) @@ -207,7 +208,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-dokter-psikologi-pkwt", method = POST, produces = APPLICATION_JSON_VALUE) @@ -218,7 +219,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/find-rekanan-penjamin-pasien", method = GET, produces = APPLICATION_JSON_VALUE) @@ -228,7 +229,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/find-umr", method = GET, produces = APPLICATION_JSON_VALUE) @@ -239,7 +240,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-premi-asuransi", method = GET, produces = APPLICATION_JSON_VALUE) @@ -253,7 +254,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-premi-asuransi", method = POST, produces = APPLICATION_JSON_VALUE) @@ -264,7 +265,7 @@ public class PayRollPegawaiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiController.java index d2d919f7..ab3d4197 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiController.java @@ -1,29 +1,5 @@ package com.jasamedika.medifirst2000.controller; -import java.text.SimpleDateFormat; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -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.security.core.Authentication; -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.IBaseRestController; @@ -38,27 +14,30 @@ import com.jasamedika.medifirst2000.entities.Pegawai; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.security.model.AppPermission; import com.jasamedika.medifirst2000.security.service.TokenAuthenticationService; -import com.jasamedika.medifirst2000.service.KeluargaPegawaiService; -import com.jasamedika.medifirst2000.service.LoginUserService; -import com.jasamedika.medifirst2000.service.PegawaiJadwalKerjaService; -import com.jasamedika.medifirst2000.service.PegawaiService; -import com.jasamedika.medifirst2000.service.RiwayatJabatanService; -import com.jasamedika.medifirst2000.service.RiwayatPekerjaanService; -import com.jasamedika.medifirst2000.service.RiwayatPelatihanService; -import com.jasamedika.medifirst2000.service.RiwayatPendidikanService; +import com.jasamedika.medifirst2000.service.*; import com.jasamedika.medifirst2000.util.CommonUtil; import com.jasamedika.medifirst2000.util.DateUtil; import com.jasamedika.medifirst2000.util.JsonUtil; import com.jasamedika.medifirst2000.util.PasswordUtil; import com.jasamedika.medifirst2000.util.rest.RestUtil; -import com.jasamedika.medifirst2000.vo.PegawaiJadwalKerjaVO; -import com.jasamedika.medifirst2000.vo.PegawaiVO; -import com.jasamedika.medifirst2000.vo.RegistrasiPegawaiMobileVO; -import com.jasamedika.medifirst2000.vo.RekamDataPegawaiVO; -import com.jasamedika.medifirst2000.vo.RiwayatJabatanVO; -import com.jasamedika.medifirst2000.vo.RiwayatPekerjaanVO; -import com.jasamedika.medifirst2000.vo.RiwayatPelatihanVO; -import com.jasamedika.medifirst2000.vo.RiwayatPendidikanVO; +import com.jasamedika.medifirst2000.vo.*; +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.security.core.Authentication; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import java.text.SimpleDateFormat; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * Controller class for Pasien Business @@ -165,11 +144,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -208,17 +187,17 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-all-pegawai", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity */Collection> getAllPegawai(/* + public ResponseEntity */Collection> getAllPegawai(/* * HttpServletRequest * request */ @@ -246,11 +225,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -268,11 +247,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -292,11 +271,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -309,17 +288,17 @@ public class PegawaiController extends LocaleController implements IB if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - RestUtil.getJsonHttptatus(HttpStatus.CREATED); + RestUtil.getJsonHttpStatus(HttpStatus.CREATED); return RestUtil.getJsonResponse("Status Sukses", HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Riwayat Pekerjaan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Riwayat Pekerjaan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -332,17 +311,17 @@ public class PegawaiController extends LocaleController implements IB if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - RestUtil.getJsonHttptatus(HttpStatus.CREATED); + RestUtil.getJsonHttpStatus(HttpStatus.CREATED); return RestUtil.getJsonResponse("Status Sukses", HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Riwayat Pelatihan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Riwayat Pelatihan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -355,17 +334,17 @@ public class PegawaiController extends LocaleController implements IB if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - RestUtil.getJsonHttptatus(HttpStatus.CREATED); + RestUtil.getJsonHttpStatus(HttpStatus.CREATED); return RestUtil.getJsonResponse("Status Sukses", HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Riwayat Pendidikan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Riwayat Pendidikan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -378,17 +357,17 @@ public class PegawaiController extends LocaleController implements IB if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - RestUtil.getJsonHttptatus(HttpStatus.CREATED); + RestUtil.getJsonHttpStatus(HttpStatus.CREATED); return RestUtil.getJsonResponse("Status Sukses", HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Riwayat Jabatan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Riwayat Jabatan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -404,14 +383,14 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Pegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.NOT_ACCEPTABLE); + return RestUtil.getJsonHttpStatus(HttpStatus.NOT_ACCEPTABLE); } /// Alter by Syamsu untuk edit data pegawai @@ -438,18 +417,18 @@ public class PegawaiController extends LocaleController implements IB }else{ LOGGER.error("Got exception {} when update Pegawai, password invalid"); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "Invalid Password"); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } else { LOGGER.error("Got exception {} when update Pegawai"); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, "User is unauthorized"); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } }catch(Exception e){ e.printStackTrace(); LOGGER.error("Got exception {} when update Pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -467,15 +446,15 @@ public class PegawaiController extends LocaleController implements IB e.printStackTrace(); LOGGER.error("Got exception {} when update Pegawai", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { jse.printStackTrace(); LOGGER.error("Got exception {} when update Pegawai", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.NOT_ACCEPTABLE); + return RestUtil.getJsonHttpStatus(HttpStatus.NOT_ACCEPTABLE); } public ResponseEntity getVO(@PathVariable("id") Integer id) { @@ -495,11 +474,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Asal Rujukan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Asal Rujukan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -654,11 +633,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getPegawaiByPelaksana", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getPegawaiByPelaksana", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -675,11 +654,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -696,11 +675,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -718,11 +697,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -738,11 +717,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -791,11 +770,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add Catatan Perkembangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add Catatan Perkembangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -829,11 +808,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -850,11 +829,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -870,11 +849,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getPegawaiWithNamaUserById", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getPegawaiWithNamaUserById", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -893,11 +872,11 @@ public class PegawaiController extends LocaleController implements IB } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -915,11 +894,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -957,11 +936,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @RequestMapping(value = "/get-pegawai-by-sub-Unit-kerja/{idSubUnitKerja}", method = RequestMethod.GET) @@ -977,11 +956,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -997,11 +976,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1017,11 +996,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1037,11 +1016,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1057,11 +1036,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1077,11 +1056,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1097,11 +1076,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllPegawaiAktifByRuangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1118,11 +1097,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1140,11 +1119,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1161,11 +1140,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1182,11 +1161,11 @@ public class PegawaiController extends LocaleController implements IB } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiJadwalKerjaDokterDController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiJadwalKerjaDokterDController.java index 77c10d3e..f6a97b30 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiJadwalKerjaDokterDController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiJadwalKerjaDokterDController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PegawaiJadwalKerjaDokterdService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PegawaiJadwalKerjaDokterDVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +47,11 @@ public class PegawaiJadwalKerjaDokterDController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pegawai-sk-gaji", method = GET, produces = APPLICATION_JSON_VALUE) @@ -47,7 +48,7 @@ public class PegawaiSkGajiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pegawai-sk-gaji-by-pegawai-id", method = GET, produces = APPLICATION_JSON_VALUE) @@ -58,7 +59,7 @@ public class PegawaiSkGajiController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiSkPajakController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiSkPajakController.java index 3ca1bb5b..9a0f60ea 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiSkPajakController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PegawaiSkPajakController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.PegawaiSkPajakDto; import com.jasamedika.medifirst2000.service.PegawaiSKPajakService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PegawaiSKAsuransiVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -38,7 +39,7 @@ public class PegawaiSkPajakController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pekerjaan", method = GET, produces = APPLICATION_JSON_VALUE) diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelaksanaController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelaksanaController.java index a07d9f66..cdda365f 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelaksanaController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelaksanaController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PelaksanaService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PelaksanaVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +47,11 @@ public class PelaksanaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getJenisPetugasPelaksana", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getJenisPetugasPelaksana", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelatihanBiayaDiklatController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelatihanBiayaDiklatController.java index 9a89b6da..6cc2f632 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelatihanBiayaDiklatController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelatihanBiayaDiklatController.java @@ -4,6 +4,8 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PelatihanBiayaDiklatService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; +import com.jasamedika.medifirst2000.vo.HargaNettoProdukByKelasVO; import com.jasamedika.medifirst2000.vo.PelatihanBiayaDiklatVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -18,7 +20,6 @@ import java.util.Map; import static com.jasamedika.medifirst2000.constants.Constants.MessageInfo.ERROR_MESSAGE; import static com.jasamedika.medifirst2000.core.web.WebConstants.HttpHeaderInfo.LABEL_SUCCESS; -import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonHttpStatus; import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonResponse; import static org.slf4j.LoggerFactory.getLogger; import static org.springframework.http.HttpStatus.*; @@ -27,7 +28,7 @@ import static org.springframework.web.bind.annotation.RequestMethod.POST; @RestController @RequestMapping("/pelatihan-biaya-diklat") -public class PelatihanBiayaDiklatController extends LocaleController { +public class PelatihanBiayaDiklatController extends LocaleController { private static final Logger LOGGER = getLogger(PelatihanBiayaDiklatController.class); @@ -45,11 +46,11 @@ public class PelatihanBiayaDiklatController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePelatihanPaket", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePelatihanPaket", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelayananAdmixtureController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelayananAdmixtureController.java index abc1f2c8..67fe241d 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelayananAdmixtureController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PelayananAdmixtureController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PelayananAdmixtureService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PelayananProduksiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +47,11 @@ public class PelayananAdmixtureController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addPelayananTpn", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addPelayananTpn", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianAirBersihController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianAirBersihController.java index 330b9a25..c149e880 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianAirBersihController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianAirBersihController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.PemakaianAirBersih; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PemakaianAirBersihService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PemakaianAirBersihVO; import net.kaczmarzyk.spring.data.jpa.domain.DateBetween; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -50,11 +51,11 @@ public class PemakaianAirBersihController extends LocaleController { +public class PemakaianBarangHabisPakaiController extends LocaleController { private static final Logger LOGGER = getLogger(PemakaianBarangHabisPakaiController.class); @@ -45,11 +45,11 @@ public class PemakaianBarangHabisPakaiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addPemakaianMesin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addPemakaianMesin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -68,11 +69,11 @@ public class PemakaianMesinController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllPemakaianMesin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllPemakaianMesin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -84,11 +85,11 @@ public class PemakaianMesinController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deletePemakaianMesin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deletePemakaianMesin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianRuangRapatController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianRuangRapatController.java index 92c50199..d058fca2 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianRuangRapatController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PemakaianRuangRapatController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dao.PemakaianRuangRapatService; import com.jasamedika.medifirst2000.exception.ServiceVOException; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PemakaianRuangRapatVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -47,11 +48,11 @@ public class PemakaianRuangRapatController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePencucianLinen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePencucianLinen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -66,11 +67,11 @@ public class PencucianLinenController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findMappingCycleDenganBahan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findMappingCycleDenganBahan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenerimaanBarangController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenerimaanBarangController.java index fb5c8706..76de668c 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenerimaanBarangController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenerimaanBarangController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.StrukPelayananDetailService; import com.jasamedika.medifirst2000.service.StrukPelayananService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PenerimaanBarangDetailVO; import com.jasamedika.medifirst2000.vo.PenerimaanBarangVO; import com.jasamedika.medifirst2000.vo.StrukPelayananVO; @@ -52,11 +53,11 @@ public class PenerimaanBarangController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when pengkajianAwalTransaksiService.save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when pengkajianAwalTransaksiService.save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -64,11 +65,11 @@ public class PengkajianAwalController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when pengkajianAwalTransaksiService.update", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when pengkajianAwalTransaksiService.update", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PengkajianKebutuhanDasarController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PengkajianKebutuhanDasarController.java index d290658c..973f8126 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PengkajianKebutuhanDasarController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PengkajianKebutuhanDasarController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PengkajianKebutuhanDasarService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PengkajianKebutuhanDasarVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class PengkajianKebutuhanDasarController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveStrukPlanning", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveStrukPlanning", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -72,11 +73,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListPlanningDHM", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListPlanningDHM", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -97,11 +98,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getInformasiRencanaPenyuluhan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getInformasiRencanaPenyuluhan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -116,11 +117,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when noPlanning", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when noPlanning", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -135,11 +136,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePesertaPenyuluhan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePesertaPenyuluhan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -153,11 +154,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPesertaPenyuluhanByNoPlanning", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPesertaPenyuluhanByNoPlanning", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -172,11 +173,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePelaksanaanPenyuluhan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePelaksanaanPenyuluhan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -197,11 +198,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListPlannDHMHukorByNoPlanningAndDate", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListPlannDHMHukorByNoPlanningAndDate", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -219,11 +220,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPlanningDHMHukorByNoPlanning", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPlanningDHMHukorByNoPlanning", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -237,11 +238,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPesertaRegistrasiByNoPlanning", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPesertaRegistrasiByNoPlanning", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -256,11 +257,11 @@ public class PenyuluhanController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveRegistrasiPesertaPenyuluhan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveRegistrasiPesertaPenyuluhan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenyusunanTRPNBPController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenyusunanTRPNBPController.java index 4e15b826..aa26ca09 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenyusunanTRPNBPController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PenyusunanTRPNBPController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PenyusunanTRPNBPService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PenyusunanTRPNPBVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -59,11 +60,11 @@ public class PenyusunanTRPNBPController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when peranService.save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when peranService.save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeranHubunganController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeranHubunganController.java index 3e2d5f82..9c8f36e3 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeranHubunganController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeranHubunganController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PeranHubunganService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PeranHubunganVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -58,11 +59,11 @@ public class PeranHubunganController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addPeranHubungan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addPeranHubungan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeriodePelaporanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeriodePelaporanController.java index 742756eb..3f1a7537 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeriodePelaporanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PeriodePelaporanController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.PeriodePelaporan; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PeriodePelaporanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PeriodePelaporanVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -64,11 +65,11 @@ public class PeriodePelaporanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePerlakuan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePerlakuan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -65,11 +66,11 @@ public class PerlakuanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPerlakuanAll", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPerlakuanAll", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PersepsiKognisiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PersepsiKognisiController.java index dbf6b513..019224c0 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PersepsiKognisiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PersepsiKognisiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PersepsiKognisiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PersepsiKognisiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -58,11 +59,11 @@ public class PersepsiKognisiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addPersepsiPasien", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addPersepsiPasien", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PerspektifController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PerspektifController.java index dc6ea384..d5d1e793 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PerspektifController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PerspektifController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.Perspektif; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PerspektifService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PerspektifVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -66,11 +67,11 @@ public class PerspektifController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when perspektifService.save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when perspektifService.save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PertanyaanSurveyController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PertanyaanSurveyController.java index 11c3fc58..25a5d344 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PertanyaanSurveyController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PertanyaanSurveyController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PertanyaanSurveyService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PertanyaanSurveyVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class PertanyaanSurveyController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when inputMouPKS", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when inputMouPKS", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PioController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PioController.java index 2c7e7c75..a03208ee 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PioController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PioController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PioService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PioVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -45,11 +46,11 @@ public class PioController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePio", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePio", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PlanningDiklatHumasMarketBiayaController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PlanningDiklatHumasMarketBiayaController.java index 5c17d5dc..4ae7658d 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PlanningDiklatHumasMarketBiayaController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PlanningDiklatHumasMarketBiayaController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PlanningDiklatHumasMarketBiayaService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PlanningDiklatHumasMarketBiayaVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class PlanningDiklatHumasMarketBiayaController extends LocaleController

{ } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePphp", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePphp", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiController.java index 339d9471..b305e932 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PraAnestesiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PraAnestesiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +47,11 @@ public class PraAnestesiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPasienByRencanaOperasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPasienByRencanaOperasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiDokterBedahController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiDokterBedahController.java index 18f5f48e..a24d62fe 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiDokterBedahController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PraAnestesiDokterBedahController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PraAnestesiDokterBedahService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PraAnestesiDokterBedahHeaderVO; import com.jasamedika.medifirst2000.vo.PraAnestesiDokterBedahVO; import org.slf4j.Logger; @@ -50,11 +51,11 @@ public class PraAnestesiDokterBedahController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findProdukByDetailJenisProdukAndNamaProduk", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findProdukByDetailJenisProdukAndNamaProduk", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -232,11 +233,11 @@ public class ProductController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when detailJenisProduk", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when detailJenisProduk", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProdukDetailLabAnatomiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProdukDetailLabAnatomiController.java index b1f42460..e9cd1039 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProdukDetailLabAnatomiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProdukDetailLabAnatomiController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.ProdukDetailLabAnatomiService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.ProdukDetailLabAnatomiVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -62,11 +63,11 @@ public class ProdukDetailLabAnatomiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addProgram", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addProgram", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProgramKerjaStrategisController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProgramKerjaStrategisController.java index 95bce316..7ab3a3e8 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProgramKerjaStrategisController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ProgramKerjaStrategisController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.ProgramKerjaStrategis; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.ProgramKerjaStrategisService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.ProgramKerjaStrategisVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -64,11 +65,11 @@ public class ProgramKerjaStrategisController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveProsesCuci", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveProsesCuci", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -65,11 +66,11 @@ public class ProsesCuciController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllProsesCuci", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllProsesCuci", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PsrsPermintaanPerbaikanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PsrsPermintaanPerbaikanController.java index b9282211..f905ab3e 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PsrsPermintaanPerbaikanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/PsrsPermintaanPerbaikanController.java @@ -8,6 +8,7 @@ import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.PsrsPermintaanPerbaikanService; import com.jasamedika.medifirst2000.service.StokProdukGlobalService; import com.jasamedika.medifirst2000.service.StrukOrderService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.*; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -61,11 +62,11 @@ public class PsrsPermintaanPerbaikanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveOrderRadiologi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveOrderRadiologi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -73,11 +74,11 @@ public class RadiologiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updateOrderRadiologi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updateOrderRadiologi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -96,11 +97,11 @@ public class RadiologiController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getReportByTglCreate", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getReportByTglCreate", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiAsetController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiAsetController.java index fc289da9..e0028abd 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiAsetController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiAsetController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.RegistrasiAsetService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.DistribusiBarangInvestasiVO; import com.jasamedika.medifirst2000.vo.HistoryAlatVO; import com.jasamedika.medifirst2000.vo.RegistrasiAsetVO; @@ -52,11 +53,11 @@ public class RegistrasiAsetController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveDistribusiBarang", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveDistribusiBarang", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -71,11 +72,11 @@ public class RegistrasiAsetController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveDokumen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveDokumen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -108,11 +109,11 @@ public class RegistrasiAsetController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updateAset", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updateAset", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiPasienController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiPasienController.java index 7775adfd..2f75082e 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiPasienController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RegistrasiPasienController.java @@ -11,6 +11,7 @@ import com.jasamedika.medifirst2000.service.HasilTriaseService; import com.jasamedika.medifirst2000.service.RegistrasiPasienRawatInapService; import com.jasamedika.medifirst2000.service.RegistrasiPasienService; import com.jasamedika.medifirst2000.service.RegistrasiPelayananService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PasienVO; import com.jasamedika.medifirst2000.vo.RegistrasiPasienPenunjangVO; import com.jasamedika.medifirst2000.vo.RegistrasiPasienVO; @@ -71,11 +72,11 @@ public class RegistrasiPasienController extends LocaleController result = orderProdukService.saveOrderLaboratoriumForDevice(vo); - BroadcastMessage("ResultLabDevice", result.get("message")); + BroadcastMessage("ResultLabDevice", result.get("message").toString()); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); @@ -443,11 +339,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -463,7 +359,7 @@ public class RegistrasiPelayananController extends LocaleController { Date from = DateUtil.toDate(dateStart); Date until = DateUtil.toDate(dateEnd); Map result = orderProdukService.getOrderFromSirs(from, until); - BroadcastMessage("ResultLabDevice", result.get("message")); + BroadcastMessage("ResultLabDevice", result.get("message").toString()); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); @@ -472,11 +368,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -492,7 +388,7 @@ public class RegistrasiPelayananController extends LocaleController { Map result = orderProdukService.saveOrderLaboratoriumForDevice(noOrder, noSample, noDetailPemeriksaan, hasil, komen); - BroadcastMessage("ResultLabDevice", result.get("message")); + BroadcastMessage("ResultLabDevice", result.get("message").toString()); if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); @@ -501,11 +397,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -524,11 +420,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -551,11 +447,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -578,11 +474,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -606,11 +502,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -636,11 +532,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when saveVerifikasiPelayananObat", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when saveVerifikasiPelayananObat", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -658,11 +554,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -680,11 +576,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -700,17 +596,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Farmasi", "Permintaan", request); + SaveLog("Order Farmasi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -814,11 +710,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -909,11 +805,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when deleteOrderPelayanan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when deleteOrderPelayanan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -997,11 +893,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1045,11 +941,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1095,11 +991,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1122,11 +1018,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1153,11 +1049,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when save Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1180,11 +1076,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1332,11 +1228,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1365,11 +1261,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1384,11 +1280,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Asal Rujukan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Asal Rujukan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1408,11 +1304,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Ruangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Ruangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1440,11 +1336,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Ruangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Ruangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1459,11 +1355,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Ruangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Ruangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1483,11 +1379,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Ruangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Ruangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1503,11 +1399,11 @@ public class RegistrasiPelayananController extends LocaleController { LOGGER.error("Got exception {} when get KelompokPasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get KelompokPasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1523,11 +1419,11 @@ public class RegistrasiPelayananController extends LocaleController { LOGGER.error("Got exception {} when get Alamat", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Alamat", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1543,11 +1439,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Ruangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Ruangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1563,11 +1459,11 @@ public class RegistrasiPelayananController extends LocaleController { LOGGER.error("Got exception {} when get Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1646,11 +1542,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllVOWithQueryString", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllVOWithQueryString", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1675,11 +1571,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllAntrianPasienGizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllAntrianPasienGizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1765,11 +1661,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1837,11 +1733,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1875,11 +1771,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Ruangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Ruangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -1895,11 +1791,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get Ruangan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get Ruangan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2155,11 +2051,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2179,11 +2075,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2200,16 +2096,16 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Informasi Ibu", "Pemeriksaan", request); + SaveLog("Informasi Ibu", "Pemeriksaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2227,11 +2123,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get all dokter", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get all dokter", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2316,11 +2212,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getHistoryPelayanan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getHistoryPelayanan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2339,11 +2235,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when updateHistoryPelayanan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when updateHistoryPelayanan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2361,11 +2257,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getRekananPelayanan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getRekananPelayanan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2384,11 +2280,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when registrasiPelayananService", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when registrasiPelayananService", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2408,11 +2304,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2431,11 +2327,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAsuransiPasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAsuransiPasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2467,7 +2363,7 @@ public class RegistrasiPelayananController extends LocaleController { // has // been // created - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); @@ -2477,7 +2373,7 @@ public class RegistrasiPelayananController extends LocaleController { // has // been // created - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2494,11 +2390,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when savePelayananObatLuar", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when savePelayananObatLuar", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2518,11 +2414,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when saveReturPenjualanBebas", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when saveReturPenjualanBebas", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2540,11 +2436,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2565,11 +2461,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAsuransiPasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAsuransiPasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2589,11 +2485,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAsuransiPasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAsuransiPasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2606,17 +2502,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Farmasi", "Permintaan", request); + SaveLog("Order Farmasi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2634,17 +2530,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Farmasi", "Permintaan", request); + SaveLog("Order Farmasi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2660,7 +2556,7 @@ public class RegistrasiPelayananController extends LocaleController { if (dataFound) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Farmasi", "Permintaan", request); + SaveLog("Order Farmasi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.ERROR_MESSAGE, @@ -2670,11 +2566,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2694,11 +2590,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getSiklusGizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getSiklusGizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2711,7 +2607,7 @@ public class RegistrasiPelayananController extends LocaleController { if (dataFound) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Gizi", "Permintaan", request); + SaveLog("Order Gizi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.ERROR_MESSAGE, @@ -2721,11 +2617,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when order gizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when order gizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2741,17 +2637,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Farmasi", "Permintaan", request); + SaveLog("Order Farmasi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2769,17 +2665,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Gizi", "Permintaan", request); + SaveLog("Order Gizi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2797,17 +2693,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Gizi", "Permintaan", request); + SaveLog("Order Gizi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2824,11 +2720,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2848,11 +2744,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2872,11 +2768,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2896,11 +2792,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2924,11 +2820,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2952,11 +2848,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2980,11 +2876,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -2998,17 +2894,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Tindakan", "Permintaan", request); + SaveLog("Order Tindakan", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} getTindakanPelayanan", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} getTindakanPelayanan", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3040,11 +2936,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3080,11 +2976,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3097,7 +2993,7 @@ public class RegistrasiPelayananController extends LocaleController { if (result != null) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Produk Gizi", "Permintaan", request); + SaveLog("Produk Gizi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.ERROR_MESSAGE, @@ -3107,11 +3003,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when order gizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when order gizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3127,7 +3023,7 @@ public class RegistrasiPelayananController extends LocaleController { if (dataFound) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Produk Gizi", "Permintaan", request); + SaveLog("Produk Gizi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.ERROR_MESSAGE, @@ -3137,11 +3033,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when order gizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when order gizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3154,7 +3050,7 @@ public class RegistrasiPelayananController extends LocaleController { if (result != null) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Cek Produk Gizi", "Permintaan", request); + SaveLog("Cek Produk Gizi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.ERROR_MESSAGE, @@ -3164,11 +3060,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when order gizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when order gizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3182,7 +3078,7 @@ public class RegistrasiPelayananController extends LocaleController { if (dataFound) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Produk Gizi", "Permintaan", request); + SaveLog("Produk Gizi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.ERROR_MESSAGE, @@ -3192,11 +3088,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when order gizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when order gizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3210,7 +3106,7 @@ public class RegistrasiPelayananController extends LocaleController { if (dataFound) { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Kirim Menu Gizi", "Permintaan", request); + SaveLog("Kirim Menu Gizi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.ERROR_MESSAGE, @@ -3220,11 +3116,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when order gizi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when order gizi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3238,17 +3134,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Gizi", "Permintaan", request); + SaveLog("Order Gizi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3262,17 +3158,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Gizi", "Permintaan", request); + SaveLog("Order Gizi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3286,17 +3182,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Gizi", "Permintaan", request); + SaveLog("Order Gizi", "Permintaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when get order", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when get order", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3333,17 +3229,17 @@ public class RegistrasiPelayananController extends LocaleController { } } - SaveLog("Order " + permintaan, "Permintaaan", request); + SaveLog("Order " + permintaan, "Permintaaan"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when add order lab", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when add order lab", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3365,11 +3261,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when deleting order", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when deleting order", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3384,16 +3280,16 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order ", "Ubah order laboratorium", request); + SaveLog("Order ", "Ubah order laboratorium"); return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage); } catch (ServiceVOException e) { LOGGER.error("Got exception {} when order", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when order", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3407,17 +3303,17 @@ public class RegistrasiPelayananController extends LocaleController { if (null != result) mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); - SaveLog("Order Gizi", "Permintaan", request); + SaveLog("Order Gizi", "Permintaan"); 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3435,11 +3331,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getAllAntrianPasienRadiologi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getAllAntrianPasienRadiologi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3485,11 +3381,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3527,11 +3423,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3640,11 +3536,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3660,11 +3556,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3695,11 +3591,11 @@ public class RegistrasiPelayananController extends LocaleController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3753,11 +3649,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAsuransiPasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAsuransiPasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3783,11 +3679,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when save Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3813,11 +3709,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when save Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3871,11 +3767,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAsuransiPasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAsuransiPasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3896,11 +3792,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when save kendali dokumen rekam medis", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save kendali dokumen rekam medis", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3922,11 +3818,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3950,11 +3846,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -3978,11 +3874,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -4002,11 +3898,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when getDataAntriankendaliDokumenRM", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -4032,11 +3928,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when save Pasien", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save Pasien", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -4058,11 +3954,11 @@ public class RegistrasiPelayananController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got exception {} when save akomodasi", e.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got exception {} when save akomodasi", jse.getMessage()); addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage()); - return RestUtil.getJsonHttptatus(HttpStatus.CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RehabilitasiAsesmenController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RehabilitasiAsesmenController.java index 07831c69..e61f67c6 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RehabilitasiAsesmenController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RehabilitasiAsesmenController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.RehabilitasiAsesmenService; import com.jasamedika.medifirst2000.service.RehabilitasiKlaimFormulirService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.RehabilitasiAsesmenVO; import com.jasamedika.medifirst2000.vo.RehabilitasiFormulirKlaimVO; import org.slf4j.Logger; @@ -55,11 +56,11 @@ public class RehabilitasiAsesmenController extends LocaleController return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } else { - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenController.java index ba223ffb..581c3d07 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenController.java @@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.dto.JadwalSeleksiDto; import com.jasamedika.medifirst2000.dto.TerimaBerkasLamaranDto; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.RekrutmenService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PegawaiVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -47,7 +48,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pns-nonpns", method = GET, produces = APPLICATION_JSON_VALUE) @@ -57,7 +58,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/generate-no-planning", method = GET, produces = APPLICATION_JSON_VALUE) @@ -67,7 +68,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-terima-berkas-lamaran", method = POST, produces = APPLICATION_JSON_VALUE) @@ -78,7 +79,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-jenis-test", method = GET, produces = APPLICATION_JSON_VALUE) @@ -88,7 +89,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-all-ruangan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -98,7 +99,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-petugas-sdm", method = GET, produces = APPLICATION_JSON_VALUE) @@ -108,7 +109,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-jadwal-seleksi", method = POST, produces = APPLICATION_JSON_VALUE) @@ -119,7 +120,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-jadwal-seleksi", method = GET, produces = APPLICATION_JSON_VALUE) @@ -131,7 +132,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pelaksana-pelamar-by-jenis-test-periode", method = GET, produces = APPLICATION_JSON_VALUE) @@ -143,7 +144,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-pelaksana-seleksi", method = POST, produces = APPLICATION_JSON_VALUE) @@ -154,7 +155,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pelaksana-seleksi", method = GET, produces = APPLICATION_JSON_VALUE) @@ -166,7 +167,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-pelaksana-seleksi-by-no-rec-struk-planning", method = GET, produces = APPLICATION_JSON_VALUE) @@ -178,7 +179,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-inputnilai-pelamar-by-jenis-test-periode", method = GET, produces = APPLICATION_JSON_VALUE) @@ -190,7 +191,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-nilai-seleksi", method = POST, produces = APPLICATION_JSON_VALUE) @@ -201,7 +202,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-download-dokumen", method = GET, produces = APPLICATION_JSON_VALUE) @@ -241,7 +242,7 @@ public class RekrutmenController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenOnlineController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenOnlineController.java index 7534c531..72658082 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenOnlineController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RekrutmenOnlineController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.RegistrasiPelamarDto; import com.jasamedika.medifirst2000.service.RekrutmenService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.PegawaiVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -38,7 +39,7 @@ public class RekrutmenOnlineController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-agama", method = GET, produces = APPLICATION_JSON_VALUE) @@ -48,7 +49,7 @@ public class RekrutmenOnlineController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-status-perkawinan", method = GET, produces = APPLICATION_JSON_VALUE) @@ -58,7 +59,7 @@ public class RekrutmenOnlineController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-posisi-lamar", method = GET, produces = APPLICATION_JSON_VALUE) @@ -68,7 +69,7 @@ public class RekrutmenOnlineController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-degree", method = GET, produces = APPLICATION_JSON_VALUE) @@ -78,7 +79,7 @@ public class RekrutmenOnlineController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/get-jenis-organisasi", method = GET, produces = APPLICATION_JSON_VALUE) @@ -88,7 +89,7 @@ public class RekrutmenOnlineController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save-registrasi-pelamar", method = RequestMethod.POST, produces = APPLICATION_JSON_VALUE) @@ -99,7 +100,7 @@ public class RekrutmenOnlineController extends LocaleController { mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaController.java index 4752f067..d3e30f51 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.RencanaService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.RencanaCustomVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class RencanaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveRencana", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveRencana", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaKinerjaTahunanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaKinerjaTahunanController.java index b38042f5..9d193888 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaKinerjaTahunanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RencanaKinerjaTahunanController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.RencanaKinerjaTahunan; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.RencanaKinerjaTahunanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.RencanaKinerjaOperasionalVO; import com.jasamedika.medifirst2000.vo.RencanaKinerjaTahunanVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; @@ -52,11 +53,11 @@ public class RencanaKinerjaTahunanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when detailReturResep", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when detailReturResep", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ReturRuanganController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ReturRuanganController.java index 568ef7db..e32da1f6 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ReturRuanganController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/ReturRuanganController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.ReturRuanganService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.RequestBarangDariRuanganVO; import com.jasamedika.medifirst2000.vo.ReturRuanganVO; import org.slf4j.Logger; @@ -61,11 +62,11 @@ public class ReturRuanganController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveReturSupplier", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveReturSupplier", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoController.java index 19748b2a..ca2bc267 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.Risiko; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.RisikoService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.RisikoVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; @@ -59,11 +60,11 @@ public class RisikoController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when risikoService.save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when risikoService.save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoKerjaRuanganController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoKerjaRuanganController.java index 8438649b..81040b83 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoKerjaRuanganController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/RisikoKerjaRuanganController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.RisikoKerjaRuanganService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.RisikoKerjaRuanganVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -55,11 +56,11 @@ public class RisikoKerjaRuanganController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when ruanganService.add", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when ruanganService.add", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -65,11 +66,11 @@ public class RuanganController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when ruanganService.update", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when ruanganService.update", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } return getJsonHttpStatus(NOT_ACCEPTABLE); } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SWOTController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SWOTController.java index 118fbd77..d451223a 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SWOTController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SWOTController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.DetailSWOT; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.DetailSWOTService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.DetailSWOTVO; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.domain.GreaterThanOrEqual; @@ -72,11 +73,11 @@ public class SWOTController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when totalSkor", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when totalSkor", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -91,11 +92,11 @@ public class SWOTController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveDetailFaktor", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveDetailFaktor", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SanitasiKesehatanLingkunganController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SanitasiKesehatanLingkunganController.java index 0301d682..6cb4b2a9 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SanitasiKesehatanLingkunganController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SanitasiKesehatanLingkunganController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.SanitasiKesehatanLingkunganService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SanitasiKesehatanLingkunganVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -50,11 +51,11 @@ public class SanitasiKesehatanLingkunganController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addSatuanStandar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addSatuanStandar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SdmController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SdmController.java index 45879c34..e0793c70 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SdmController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SdmController.java @@ -10,6 +10,7 @@ import com.jasamedika.medifirst2000.entities.Pegawai; import com.jasamedika.medifirst2000.entities.UnitKerjaPegawai; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.*; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.*; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -175,11 +176,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveCustomIndexKerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveCustomIndexKerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -206,11 +207,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveBerkasLamaran", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveBerkasLamaran", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -239,11 +240,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveReservasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveReservasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -258,11 +259,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when uploadAbsensi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when uploadAbsensi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -277,11 +278,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveAbsensiPegawai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveAbsensiPegawai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -308,11 +309,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveKedudukan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveKedudukan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -327,11 +328,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveShiftKerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveShiftKerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -346,11 +347,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteShiftKerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deleteShiftKerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -364,11 +365,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when shiftKerjaService.findAll", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when shiftKerjaService.findAll", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -383,11 +384,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveAturanPeminjaman", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveAturanPeminjaman", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -402,11 +403,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveBibliography", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveBibliography", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -433,11 +434,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveDaftarKeanggotaan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveDaftarKeanggotaan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -452,11 +453,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveDataKeluarga", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveDataKeluarga", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -471,11 +472,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMutasiPegawai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMutasiPegawai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -490,11 +491,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePerhitunganPremiBPJSKesehatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePerhitunganPremiBPJSKesehatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -510,12 +511,12 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePerhitunganSantunanPegawaiMeninggalDunia", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePerhitunganSantunanPegawaiMeninggalDunia", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -530,11 +531,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePermohonanCutiPegawai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePermohonanCutiPegawai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -549,11 +550,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveRegistrasiKeanggotaan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveRegistrasiKeanggotaan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -580,11 +581,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveRekamDataPegawai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveRekamDataPegawai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -599,11 +600,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveIsianPelamar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveIsianPelamar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -629,11 +630,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveAsuransiNaker", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveAsuransiNaker", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -648,11 +649,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMasterHonorTim", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMasterHonorTim", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -673,11 +674,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveGolongan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveGolongan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -692,11 +693,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveIndekKinerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveIndekKinerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -743,11 +744,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveNilaiKelompokJabatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveNilaiKelompokJabatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -762,11 +763,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMasterEvaluasiJabatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMasterEvaluasiJabatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -782,12 +783,12 @@ public class SdmController extends LocaleController { LOGGER.error("Got ServiceVOException {} when MasterEvaluasiJabatanService.hitungPoinEvaluasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when MasterEvaluasiJabatanService.hitungPoinEvaluasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -802,11 +803,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when EvaluasiJabatanService.hitungPoinEvaluasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when EvaluasiJabatanService.hitungPoinEvaluasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -844,11 +845,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveEvaluasiJabatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveEvaluasiJabatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -901,11 +902,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveSimulasiPendapatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveSimulasiPendapatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -932,11 +933,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePerhitunganAbk", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePerhitunganAbk", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -963,11 +964,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveJadwalOrientasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveJadwalOrientasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1054,11 +1055,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveUraianTugas", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveUraianTugas", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1133,11 +1134,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveTargetBobotUraianTugas", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveTargetBobotUraianTugas", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1152,11 +1153,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveAllIndekKinerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveAllIndekKinerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1197,11 +1198,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMonitoring", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMonitoring", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1294,11 +1295,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePenilaianKompetensiPegawai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePenilaianKompetensiPegawai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1315,11 +1316,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when serviceMusare.getUserLogin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when serviceMusare.getUserLogin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1337,11 +1338,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getDataMuSaReByPegawai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getDataMuSaReByPegawai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1359,11 +1360,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when loadPagePengajuanMutasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when loadPagePengajuanMutasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1378,11 +1379,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePengajuanMutasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePengajuanMutasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1400,11 +1401,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListPengajuanMutasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListPengajuanMutasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1422,11 +1423,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when loadPagePengajuanSanksi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when loadPagePengajuanSanksi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1441,11 +1442,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePengajuanSanksi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePengajuanSanksi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1463,11 +1464,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListPengajuanSanksi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListPengajuanSanksi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1485,11 +1486,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when loadPagePengajuanResign", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when loadPagePengajuanResign", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1504,11 +1505,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePengajuanResign", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePengajuanResign", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1526,11 +1527,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListPengajuanResign", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListPengajuanResign", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1548,11 +1549,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getListDaftarMuSaRe", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getListDaftarMuSaRe", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1567,11 +1568,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when ApprovalMusare", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when ApprovalMusare", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1586,11 +1587,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when unVerifMusare", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when unVerifMusare", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1608,11 +1609,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getUserLogin", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getUserLogin", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1630,11 +1631,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getLoadData", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getLoadData", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1653,11 +1654,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getDataCuti", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getDataCuti", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1675,11 +1676,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getDataPermohonanStatus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getDataPermohonanStatus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1697,11 +1698,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getApprovalStatus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getApprovalStatus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1716,11 +1717,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when savePlanningPegawaiStatus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when savePlanningPegawaiStatus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1735,11 +1736,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updatePlanningPegawaiStatus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updatePlanningPegawaiStatus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1754,11 +1755,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deletePlanningPegawaiStatus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when deletePlanningPegawaiStatus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1773,11 +1774,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when approvalPermohonanStatus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when approvalPermohonanStatus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1792,11 +1793,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when unVerifPermohonanStatus", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when unVerifPermohonanStatus", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1813,11 +1814,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getPeriodeGolongan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getPeriodeGolongan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1835,11 +1836,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getDaftarGajiPns", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getDaftarGajiPns", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1858,11 +1859,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getDtailGajiPns", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getDtailGajiPns", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1903,11 +1904,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveRekapKomponen", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveRekapKomponen", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1922,11 +1923,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveTotalIndexRekapitulasiKehadiran", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveTotalIndexRekapitulasiKehadiran", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -1941,11 +1942,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveFactorRate", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveFactorRate", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2048,11 +2049,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveLemburVerifikasiSdm", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveLemburVerifikasiSdm", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2066,11 +2067,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findPegawaiAktifAndVerifiedByUnitKerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findPegawaiAktifAndVerifiedByUnitKerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2083,11 +2084,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getRunningNumberStrukHistori", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getRunningNumberStrukHistori", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2101,11 +2102,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findJumlahLembur", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findJumlahLembur", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2120,11 +2121,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveUangLembur", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveUangLembur", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2152,11 +2153,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when penangguhanPerubahanStatusKehadiran", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when penangguhanPerubahanStatusKehadiran", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2171,11 +2172,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when setJatahCuti", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when setJatahCuti", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2190,11 +2191,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when setJatahCutiPegawai", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when setJatahCutiPegawai", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2209,11 +2210,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMappingPegawaiToAtasan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMappingPegawaiToAtasan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2263,11 +2264,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveRincianKegiatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveRincianKegiatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2282,11 +2283,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveUraianTugasNew", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveUraianTugasNew", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2335,11 +2336,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveUnitkerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveUnitkerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2377,11 +2378,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveAbsenManual", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveAbsenManual", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2396,11 +2397,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveSubUnitkerja", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveSubUnitkerja", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2475,11 +2476,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveKelompokJabatan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveKelompokJabatan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2538,11 +2539,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveMapKalenderToHariLibur", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveMapKalenderToHariLibur", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -2592,11 +2593,11 @@ public class SdmController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when add saveUraianTugasFlexible", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when add saveUraianTugasFlexible", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SettingDataFixedController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SettingDataFixedController.java index 3070e6e0..bb4b6b99 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SettingDataFixedController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SettingDataFixedController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.SettingDataFixedService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SettingDataFixedVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -47,7 +48,7 @@ public class SettingDataFixedController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveSewaAsrama", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveSewaAsrama", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -67,11 +68,11 @@ public class SewaAsramaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findStatusKamar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findStatusKamar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -85,11 +86,11 @@ public class SewaAsramaController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findKamar", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findKamar", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SewaLahanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SewaLahanController.java index 016f0c42..80b12869 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SewaLahanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SewaLahanController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.dto.SewaLahanDto; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.SewaLahanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SewaLahanVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -49,11 +50,11 @@ public class SewaLahanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveSewaLahan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveSewaLahan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -66,11 +67,11 @@ public class SewaLahanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findProdukSewaLahan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findProdukSewaLahan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SignInOperationController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SignInOperationController.java index 59ebe089..d2a494a9 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SignInOperationController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SignInOperationController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.SignInOperationService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SignInOperationVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -53,11 +54,11 @@ public class SignInOperationController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, getMessage(MessageResource.LABEL_ERROR, request)); - return getJsonHttpStatus(ACCEPTED, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(ACCEPTED, mapHeaderMessage); } } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addSoap", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addSoap", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SppbController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SppbController.java index 8b0a29d1..d0353480 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SppbController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SppbController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.SppbService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SppbVO; import com.jasamedika.medifirst2000.vo.VerifikasiSppbVO; import org.slf4j.Logger; @@ -83,11 +84,11 @@ public class SppbController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveSppb", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveSppb", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -102,11 +103,11 @@ public class SppbController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when verifikasiSppb", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when verifikasiSppb", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -121,11 +122,11 @@ public class SppbController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when unverifikasiSppb", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when unverifikasiSppb", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -140,11 +141,11 @@ public class SppbController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updateSppb", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updateSppb", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StandarPelayananMakananController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StandarPelayananMakananController.java index 0d8c0754..91a95f77 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StandarPelayananMakananController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StandarPelayananMakananController.java @@ -34,7 +34,7 @@ public class StandarPelayananMakananController extends LocaleController { mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage); } - return RestUtil.getJsonHttptatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value="/get-all/", diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StokOpNameController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StokOpNameController.java index 9c111eba..e44eb32d 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StokOpNameController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StokOpNameController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.StokOpNameService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.StokOpNameVO; import com.jasamedika.medifirst2000.vo.StrukClosingVO; import org.slf4j.Logger; @@ -55,11 +56,11 @@ public class StokOpNameController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveStokOpName", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveStokOpName", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StrukBuktiPengeluaranController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StrukBuktiPengeluaranController.java index fe4023f4..2d451590 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StrukBuktiPengeluaranController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/StrukBuktiPengeluaranController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.StrukBuktiPengeluaranService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.StrukPengeluaranVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; @@ -40,7 +41,7 @@ public class StrukBuktiPengeluaranController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when kirimProdukKeRuangan", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when kirimProdukKeRuangan", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -80,11 +81,11 @@ public class StrukPelayananController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveInputKantongDarah", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveInputKantongDarah", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -99,11 +100,11 @@ public class StrukPelayananController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveLimbahB3Masuk", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveLimbahB3Masuk", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -118,11 +119,11 @@ public class StrukPelayananController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when updateLimbahB3Masuk", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when updateLimbahB3Masuk", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -137,11 +138,11 @@ public class StrukPelayananController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when deleteLimbahB3Masuk", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException | IllegalAccessException e) { LOGGER.error("Got exception {} when deleteLimbahB3Masuk", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -173,11 +174,11 @@ public class StrukPelayananController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when returPelayananPasien", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when returPelayananPasien", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratController.java index dc7426cd..c6a6db98 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.SuratService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SuratVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -43,11 +44,11 @@ public class SuratController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findAllSurat", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findAllSurat", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratMasukController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratMasukController.java index badee1fe..4b9d74eb 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratMasukController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SuratMasukController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.entities.DokumenTemplate; import com.jasamedika.medifirst2000.service.SuratMasukService; import com.jasamedika.medifirst2000.util.StringUtil; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.*; import org.apache.commons.io.FilenameUtils; import org.slf4j.Logger; @@ -51,7 +52,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -139,7 +140,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -183,7 +184,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -203,7 +204,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -222,7 +223,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -258,7 +259,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -270,7 +271,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -283,7 +284,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -338,7 +339,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } @@ -351,7 +352,7 @@ public class SuratMasukController extends LocaleController { return getJsonResponse(result, CREATED, mapHeaderMessage); } else { mapHeaderMessage.put(LABEL_ERROR, "Processing data error returns empty data"); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SurveiController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SurveiController.java index 57476ea4..a030acba 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SurveiController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SurveiController.java @@ -63,11 +63,11 @@ implements IBaseRestController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -110,11 +110,11 @@ implements IBaseRestController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -151,11 +151,11 @@ implements IBaseRestController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -191,11 +191,11 @@ implements IBaseRestController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } @@ -214,11 +214,11 @@ implements IBaseRestController { } 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); + return RestUtil.getJsonHttpStatus(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); + return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SwabAlatPermukaanController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SwabAlatPermukaanController.java index 53d68f35..139fc4a5 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SwabAlatPermukaanController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/SwabAlatPermukaanController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.SwabAlatPermukaanService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.SwabAlatPermukaanVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -50,11 +51,11 @@ public class SwabAlatPermukaanController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when detailTOWSService.save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when detailTOWSService.save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TagihanRekananController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TagihanRekananController.java index 5fc1fe62..87b58a6a 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TagihanRekananController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TagihanRekananController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.TagihanRekananService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.StrukBuktiPengeluaranCaraBayarVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class TagihanRekananController extends LocaleController mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, OK, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } @RequestMapping(value = "/save", method = POST, produces = APPLICATION_JSON_VALUE) @@ -47,7 +48,7 @@ public class TahapanRekrutmenTestController extends LocaleController mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request)); return getJsonResponse(result, CREATED, mapHeaderMessage); } - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TargetIndikatorController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TargetIndikatorController.java index 13bb5796..c82200fe 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TargetIndikatorController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TargetIndikatorController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.TargetIndikatorService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.TargetIndikatorVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -47,11 +48,11 @@ public class TargetIndikatorController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when addTidurIstirahat", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when addTidurIstirahat", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TimeOutControlController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TimeOutControlController.java index 9a4f51af..3c37ff24 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TimeOutControlController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TimeOutControlController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.TimeOutControlService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.TimeOutControlVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class TimeOutControlController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveTimeOutControl", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveTimeOutControl", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -70,11 +71,11 @@ public class TimeOutControlController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when findByNoRec", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when findByNoRec", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -92,11 +93,11 @@ public class TimeOutControlController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when getTimeOutByNoRecAntrian", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when getTimeOutByNoRecAntrian", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TingkatResikoController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TingkatResikoController.java index f5a771a6..31fcdf74 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TingkatResikoController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TingkatResikoController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.TingkatResikoService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.TingkatResikoVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -46,11 +47,11 @@ public class TingkatResikoController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when tingkatResikoService.save", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when tingkatResikoService.save", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TorController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TorController.java index a667edd2..7d7c628a 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TorController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TorController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.TorService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.TorVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -44,11 +45,11 @@ public class TorController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when torService.add", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when torService.add", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TransferPasienInternalController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TransferPasienInternalController.java index baa25954..27167da5 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TransferPasienInternalController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/TransferPasienInternalController.java @@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.*; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.*; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -70,11 +71,11 @@ public class TransferPasienInternalController extends LocaleController { } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveHasilTriaseService", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveHasilTriaseService", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } diff --git a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/UploadDownloadmageController.java b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/UploadDownloadmageController.java index ceb5eacf..2a863974 100644 --- a/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/UploadDownloadmageController.java +++ b/jasamedika-web/src/main/java/com/jasamedika/medifirst2000/controller/UploadDownloadmageController.java @@ -4,6 +4,7 @@ import com.jasamedika.medifirst2000.constants.MessageResource; import com.jasamedika.medifirst2000.controller.base.LocaleController; import com.jasamedika.medifirst2000.exception.ServiceVOException; import com.jasamedika.medifirst2000.service.UploadDownloadImageService; +import com.jasamedika.medifirst2000.util.rest.RestUtil; import com.jasamedika.medifirst2000.vo.UploadImageVO; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; @@ -48,11 +49,11 @@ public class UploadDownloadmageController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveUsulanEvaluasiDanKahianOrganisasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveUsulanEvaluasiDanKahianOrganisasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -73,11 +74,11 @@ public class UsulanEvaluasiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when noUsulanDanKajianOrganisasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when noUsulanDanKajianOrganisasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -94,11 +95,11 @@ public class UsulanEvaluasiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when listUsulanEvaluasiByRuanganPembuat", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when listUsulanEvaluasiByRuanganPembuat", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } } @@ -120,11 +121,11 @@ public class UsulanEvaluasiController extends LocaleController } catch (ServiceVOException e) { LOGGER.error("Got ServiceVOException {} when saveRekomendasiUsulanEvaluasi", e.getMessage()); addHeaderMessage(ERROR_MESSAGE, e.getMessage()); - return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage); } catch (JpaSystemException jse) { LOGGER.error("Got JpaSystemException {} when saveRekomendasiUsulanEvaluasi", jse.getMessage()); addHeaderMessage(ERROR_MESSAGE, jse.getMessage()); - return getJsonHttpStatus(CONFLICT, mapHeaderMessage); + return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage); } }