Update merging controllers vo dan dto

Clean code
This commit is contained in:
Salman Manoe 2025-03-12 14:52:27 +07:00
parent d636453506
commit 7b75cfba5f
323 changed files with 2379 additions and 2228 deletions

View File

@ -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<String, Object> savePemakaianAsuransi(PemakaianAsuransiVO vo);
List<SuratEligibilitasAsuransi> findByNoSep(String noSep);
List<SuratEligibilitasAsuransiDto> findByNoSep(String noSep);
}

View File

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

View File

@ -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<Admis
} 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);
}
}
@ -71,11 +72,11 @@ public class AdmisiRencanaPindahRuanganController extends LocaleController<Admis
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getDataGrid", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getDataGrid", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -95,11 +96,11 @@ public class AdmisiRencanaPindahRuanganController extends LocaleController<Admis
} 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 exception {} when update", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.AdvokasiHukumMedicolegalService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.UsulanEvaluasiVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -48,11 +49,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveEvaluasiRekanan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveEvaluasiRekanan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -67,11 +68,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when noAdvokasiHukumMedicolegal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got exception {} when noAdvokasiHukumMedicolegal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -88,12 +89,12 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when listAdvokasiHukumMedicolegalByRuanganTujuan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when listAdvokasiHukumMedicolegalByRuanganTujuan",
jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -110,11 +111,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when listAdvokasiHukumMedicolegalByRuanganPembuat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got exception {} when listAdvokasiHukumMedicolegalByRuanganPembuat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -137,11 +138,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveRekomendasiEvaluasiRekanan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveRekomendasiEvaluasiRekanan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -49,11 +49,11 @@ public class AgamaController extends LocaleController<AgamaVO> {
} 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<AgamaVO> {
} 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<AgamaVO> {
} 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);
}

View File

@ -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<AlatVO> {
} 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<AlatVO> {
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<AlatVO> {
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<AlatVO> {
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<AlatVO> {
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<AlatVO> {
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<AlatVO> {
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<AlatVO> {
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)

View File

@ -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<RegistrasiPelayananVO>
} 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);
}
}

View File

@ -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<HeadAnggaranVO> {
} 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<HeadAnggaranVO> {
} 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<HeadAnggaranVO> {
} 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<HeadAnggaranVO> {
} 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<HeadAnggaranVO> {
} 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<HeadAnggaranVO> {
} 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

View File

@ -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<ApresiasiAt
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when addApresiasiAtasLayanan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when addApresiasiAtasLayanan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.AsesmenGiziAwalService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.AsesmenGiziAwalVO;
import com.jasamedika.medifirst2000.vo.RegistrasiPelayananVO;
import org.slf4j.Logger;
@ -53,11 +54,11 @@ public class AsesmenGiziAwalController extends LocaleController<RegistrasiPelaya
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveAsesmenGiziAwal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveAsesmenGiziAwal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.AsesmenGiziLanjutService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.AsesmenGiziLanjutVO;
import com.jasamedika.medifirst2000.vo.RegistrasiPelayananVO;
import org.slf4j.Logger;
@ -48,11 +49,11 @@ public class AsesmenGiziLanjutController extends LocaleController<RegistrasiPela
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveAsesmenGiziLanjut", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveAsesmenGiziLanjut", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.AsuhanKeperawatanPeriOperatifService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.AsuhanKeperawatanPeriOperatifVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -46,11 +47,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllAsuhan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllAsuhan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -67,11 +68,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllIntraOperasiPerawatBedah", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllIntraOperasiPerawatBedah", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -88,11 +89,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllPostOperasiPerawatBedah", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllPostOperasiPerawatBedah", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -109,11 +110,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllIntraOperasiAnestesi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllIntraOperasiAnestesi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -130,11 +131,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllPostOperasiAnestesi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllPostOperasiAnestesi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -151,11 +152,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllIntraOperasiPerawatBedahV1", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllIntraOperasiPerawatBedahV1", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.AsuhanKeperawatanPeriOperasiHeaderService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.AsuhanKeperawatanPeriOperasiHeaderVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class AsuhanKeperawatanPeriOperasiHeaderController
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveAsuhanHeader", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveAsuhanHeader", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -71,11 +72,11 @@ public class AsuhanKeperawatanPeriOperasiHeaderController
} 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);
}
}
@ -93,11 +94,11 @@ public class AsuhanKeperawatanPeriOperasiHeaderController
} 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);
}
}

View File

@ -1,29 +1,5 @@
package com.jasamedika.medifirst2000.controller;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
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.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.servlet.ModelAndView;
import com.jasamedika.medifirst2000.constants.Constants;
import com.jasamedika.medifirst2000.constants.MessageResource;
import com.jasamedika.medifirst2000.controller.base.LocaleController;
@ -36,6 +12,24 @@ import com.jasamedika.medifirst2000.service.RegistrasiPelayananPasienService;
import com.jasamedika.medifirst2000.service.RegistrasiPelayananService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.PemakaianAsuransiVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.orm.jpa.JpaSystemException;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/asuransi")
@ -76,11 +70,11 @@ public class AsuransiController extends LocaleController<PemakaianAsuransiVO> {
} 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);
}
}

View File

@ -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<B3RuanganInpu
} 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);
}
}
@ -71,11 +72,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -92,11 +93,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getB3StokGlobal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getB3StokGlobal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -111,11 +112,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveB3RuanganInputData", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveB3RuanganInputData", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -133,11 +134,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getB3RuanganInput", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getB3RuanganInput", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -152,11 +153,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when deleteB3DaftarBahanBerbahaya", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when deleteB3DaftarBahanBerbahaya", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.BakuMutuService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.BakuMutuVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -47,11 +48,11 @@ public class BakuMutuController extends LocaleController<BakuMutuVO> {
} 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<BakuMutuVO> {
} 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<BakuMutuVO> {
} 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<BakuMutuVO> {
} 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<BakuMutuVO> {
} 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);
}
}

View File

@ -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<BatalRegistrasiV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveBatalRegistrasi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveBatalRegistrasi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.BentukProdukService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.BentukProdukVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -47,12 +48,12 @@ public class BentukProdukController extends LocaleController<BentukProdukVO> {
} 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);
}
}

View File

@ -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<BobotIndikatorVO>
} 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);
}
}

View File

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

View File

@ -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<BundleSetAlatVO> {
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);
}
}

View File

@ -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<BaseModelV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePemeliharaanGedung", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePemeliharaanGedung", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -80,11 +81,11 @@ public class CekListGedungBangunanController extends LocaleController<BaseModelV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveCekListMasterToJadwalGedung", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveCekListMasterToJadwalGedung", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -100,11 +101,11 @@ public class CekListGedungBangunanController extends LocaleController<BaseModelV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePenjadwalanGedung", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePenjadwalanGedung", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.CetakPengantarSuratService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.CetakPengantarSuratVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -46,11 +47,11 @@ public class CetakPengantarSuratController extends LocaleController<CetakPengant
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when addPengantarSurat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when addPengantarSurat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.CheckInService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.CheckInVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class CheckInController extends LocaleController<CheckInVO> {
} 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<CheckInVO> {
} 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<CheckInVO> {
} 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);
}
}

View File

@ -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<CssdBmhpVO> {
} 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<CssdBmhpVO> {
} 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);
}
}

View File

@ -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<CssdDecontamin
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveDecontaminasi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveDecontaminasi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.CssdDistribusiService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.CssdDistribusiVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -50,11 +51,11 @@ public class CssdDistribusiController extends LocaleController<CssdDistribusiVO>
} 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);
}
}

View File

@ -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<CssdMonitoringE
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveMonitoringEo", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveMonitoringEo", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.CssdMonitoringSteamService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.CssdMonitoringSteamVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class CssdMonitoringSteamController extends LocaleController<CssdMonitori
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveMonitoringSteam", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveMonitoringSteam", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.CssdPengemasanService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.CssdPengemasanVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class CssdPengemasanController extends LocaleController<CssdPengemasanVO>
} 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);
}
}

View File

@ -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<CssdPenyimpananV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePenyimpanan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePenyimpanan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.CssdReturService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.ReturCssdVO;
import com.jasamedika.medifirst2000.vo.StrukPelayananDetailVO;
import org.slf4j.Logger;
@ -46,11 +47,11 @@ public class CssdReturController extends LocaleController<StrukPelayananDetailVO
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveReturCssd", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveReturCssd", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.CssdSterilService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.CssdSterilVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class CssdSterilController extends LocaleController<CssdSterilVO> {
} 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);
}
}

View File

@ -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<CssdSterilisasiV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveSterilisasi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveSterilisasi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -130,7 +131,7 @@ public class CssdSterilisasiController extends LocaleController<CssdSterilisasiV
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 = "/unmapping-paket-to-produk", method = POST, produces = APPLICATION_JSON_VALUE)
@ -141,7 +142,7 @@ public class CssdSterilisasiController extends LocaleController<CssdSterilisasiV
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);
}
}

View File

@ -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.CssdUjiSwapService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.CssdUjiSwapVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class CssdUjiSwapController extends LocaleController<CssdUjiSwapVO> {
} 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);
}
}

View File

@ -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<UnitCostVO> {
} 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<UnitCostVO> {
} 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<UnitCostVO> {
} 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<UnitCostVO> {
} 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);
}
}

View File

@ -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<OrderKendar
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllKendaraanDinasDanPejabat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllKendaraanDinasDanPejabat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DaftarOrderAmbulanceService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.OrderPelayananVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -73,11 +74,11 @@ public class DaftarOrderAmbulanceController extends LocaleController<OrderPelaya
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllDaftarOrderAmbulance", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllDaftarOrderAmbulance", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DaftarOrderPemakaianRuangRapatService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.OrderPemakaianRuangRapatVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -57,11 +58,11 @@ public class DaftarOrderPemakaianRuangRapatController extends LocaleController<O
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveStatusRuangRapat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveStatusRuangRapat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -75,11 +76,11 @@ public class DaftarOrderPemakaianRuangRapatController extends LocaleController<O
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllOrderRuangRapat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllOrderRuangRapat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DaftarPemakaianRumahDukaService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.PemakaianRumahDukaVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -64,11 +65,11 @@ public class DaftarPemakaianRumahDukaController extends LocaleController<Pemakai
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveStatusRumahDuka", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveStatusRumahDuka", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -82,11 +83,11 @@ public class DaftarPemakaianRumahDukaController extends LocaleController<Pemakai
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllDaftarPemakaianRumahDuka", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllDaftarPemakaianRumahDuka", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DaftarPemulasaraanJenazahService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.OrderPelayananVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -58,11 +59,11 @@ public class DaftarPemulasaraanJenazahController extends LocaleController<OrderP
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllDaftarPemulasaraanJenazah", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllDaftarPemulasaraanJenazah", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -79,11 +80,11 @@ public class DaftarPemulasaraanJenazahController extends LocaleController<OrderP
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getDaftarPemulasaranJenazahExternal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getDaftarPemulasaranJenazahExternal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DaftarPenerimaanService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.MappingKirimDokumenPasienVO;
import com.jasamedika.medifirst2000.vo.StrukBuktiPenerimaanCaraBayarVO;
import org.slf4j.Logger;
@ -67,11 +68,11 @@ public class DaftarPenerimaanController extends LocaleController<StrukBuktiPener
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveVerifikasiSetoran", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveVerifikasiSetoran", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -86,11 +87,11 @@ public class DaftarPenerimaanController extends LocaleController<StrukBuktiPener
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveClosingVerifikasiSetoran", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveClosingVerifikasiSetoran", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DaftarPesanAmbulanceService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.OrderAmbulanceVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -75,11 +76,11 @@ public class DaftarPesanAmbulanceController extends LocaleController<OrderAmbula
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveStatusAmbulance", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveStatusAmbulance", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DaftarSewaAsramaService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.SewaAsramaVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -76,11 +77,11 @@ public class DaftarSewaAsramaController extends LocaleController<SewaAsramaVO> {
} 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<SewaAsramaVO> {
} 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);
}
}

View File

@ -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<SewaLahanVO> {
} 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<SewaLahanVO> {
} 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);
}
}

View File

@ -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<DampakResikoVO> {
} 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);
}
}

View File

@ -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<Da
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when addDataPerusahaanYangBekerjaSama", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when addDataPerusahaanYangBekerjaSama", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -71,11 +72,11 @@ public class DataPerusahaanYangBekerjaSamaController extends LocaleController<Da
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findAllDataPerusahaanYangBekerjaSama", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findAllDataPerusahaanYangBekerjaSama", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DataPesertaPerusahanYangBekerjaSamaService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DataPesertaPerusahanYangBekerjaSamaVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -50,11 +51,11 @@ public class DataPesertaPerusahanYangBekerjaSamaController
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when addDataPesertaPerusahanYangBekerjaSama", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when addDataPesertaPerusahanYangBekerjaSama", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -68,11 +69,11 @@ public class DataPesertaPerusahanYangBekerjaSamaController
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findAllDataPesertaPerusahanYangBekerjaSama", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findAllDataPesertaPerusahanYangBekerjaSama", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -86,12 +87,12 @@ public class DataPesertaPerusahanYangBekerjaSamaController
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findAllDataPesertaRumahSakitYangBekerjaSama", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findAllDataPesertaRumahSakitYangBekerjaSama",
jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -105,11 +106,11 @@ public class DataPesertaPerusahanYangBekerjaSamaController
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findAllDataRumahSakitYangBekerjaSama", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findAllDataRumahSakitYangBekerjaSama", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DepartemenService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DepartemenVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -46,11 +47,11 @@ public class DepartemenController extends LocaleController<DepartemenVO> {
} 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<DepartemenVO> {
} 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<DepartemenVO> {
} 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<DepartemenVO> {
} 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);
}
}

View File

@ -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<HeadAnggaranVO> {
} 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);
}
}

View File

@ -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<Dia
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveDiagnosaKeperawatan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveDiagnosaKeperawatan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DiagnosaPasienService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DiagnosaPasienVO;
import com.jasamedika.medifirst2000.vo.RegistrasiPelayananVO;
import org.slf4j.Logger;
@ -55,11 +56,11 @@ public class DiagnosaPasienController extends LocaleController<RegistrasiPelayan
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveDiagnosaPasien", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveDiagnosaPasien", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -73,11 +74,11 @@ public class DiagnosaPasienController extends LocaleController<RegistrasiPelayan
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findByNoCm", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findByNoCm", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -97,11 +98,11 @@ public class DiagnosaPasienController extends LocaleController<RegistrasiPelayan
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findDiagnosaPasienByAntrian", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findDiagnosaPasienByAntrian", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -7,6 +7,7 @@ import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.security.model.UserAuthentication;
import com.jasamedika.medifirst2000.service.ActivityPegawaiService;
import com.jasamedika.medifirst2000.service.DiagnosaTindakanPasienService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DiagnosaTindakanPasienVO;
import com.jasamedika.medifirst2000.vo.PegawaiVO;
import org.slf4j.Logger;
@ -77,11 +78,11 @@ public class DiagnosaTindakanPasienController extends LocaleController<DiagnosaT
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveDiagnosaTindakanPasien", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveDiagnosaTindakanPasien", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -101,11 +102,11 @@ public class DiagnosaTindakanPasienController extends LocaleController<DiagnosaT
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findDiagnosaTindakanPasienByAntrian", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findDiagnosaTindakanPasienByAntrian", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.DistribusiAsetService;
import com.jasamedika.medifirst2000.service.ProdukService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DistribusiAsetVO;
import com.jasamedika.medifirst2000.vo.KonfirmasiAsetVO;
import com.jasamedika.medifirst2000.vo.PenerimaanBarangVO;
@ -91,11 +92,11 @@ public class DistribusiAsetController extends LocaleController<PenerimaanBarangV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveRequestDistribusi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveRequestDistribusi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -121,11 +122,11 @@ public class DistribusiAsetController extends LocaleController<PenerimaanBarangV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveKonfirmasiAset", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveKonfirmasiAset", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.DokumenInternalService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DokumenInternalVO;
import com.jasamedika.medifirst2000.vo.SuratMasukInternalVO;
import org.slf4j.Logger;
@ -47,11 +48,11 @@ public class DokumenInternalController extends LocaleController<DokumenInternalV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when addSuratMasukInternal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when addSuratMasukInternal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -66,11 +67,11 @@ public class DokumenInternalController extends LocaleController<DokumenInternalV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when setDistribusiKirimSuratInternalEksternal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when setDistribusiKirimSuratInternalEksternal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController;
import com.jasamedika.medifirst2000.entities.DraftSuratRuangan;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.DraftSuratService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DraftSuratRuanganVO;
import com.jasamedika.medifirst2000.vo.DraftSuratVO;
import net.kaczmarzyk.spring.data.jpa.domain.DateBetween;
@ -51,11 +52,11 @@ public class DraftSuratController extends LocaleController<DraftSuratRuanganVO>
} 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<DraftSuratRuanganVO>
} 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);
}
}

View File

@ -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<EdukasiVO> {
} 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);
}
}

View File

@ -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<EkstensionNo
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when addEkstension", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when addEkstension", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.EvaluasiRekananService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.UsulanEvaluasiVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -53,11 +54,11 @@ public class EvaluasiRekananController extends LocaleController<UsulanEvaluasiVO
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveEvaluasiRekanan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveEvaluasiRekanan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -72,11 +73,11 @@ public class EvaluasiRekananController extends LocaleController<UsulanEvaluasiVO
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when noEvaluasiRekanan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when noEvaluasiRekanan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -93,11 +94,11 @@ public class EvaluasiRekananController extends LocaleController<UsulanEvaluasiVO
} 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);
}
}

View File

@ -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.FasilitasMService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.FasilitasMVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -48,11 +49,11 @@ public class FasilitasMController extends LocaleController<FasilitasMVO> {
} 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<FasilitasMVO> {
} 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<FasilitasMVO> {
} 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<FasilitasMVO> {
} 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);
}
}

View File

@ -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<PelayananPasienVO>
} 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);
}
}

View File

@ -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<FisisPeme
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when addFisisPemeriksaanDokter", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when addFisisPemeriksaanDokter", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.GajiPegawaiService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.PegawaiHistoriRekapGajiVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -93,11 +94,11 @@ public class GajiPegawaiController extends LocaleController<PegawaiHistoriRekapG
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveVerifikasiGajiPegawai", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveVerifikasiGajiPegawai", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.GawatDaruratService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.GawatDaruratVO;
import com.jasamedika.medifirst2000.vo.RegistrasiPelayananVO;
import org.slf4j.Logger;
@ -54,11 +55,11 @@ public class GawatDaruratController extends LocaleController<RegistrasiPelayanan
} 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);
}
}
@ -76,11 +77,11 @@ public class GawatDaruratController extends LocaleController<RegistrasiPelayanan
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when get", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when get", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.security.model.AppPermission;
import com.jasamedika.medifirst2000.service.GeneratedMasterService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.IpsrsPemeliharaanVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -52,11 +53,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getClassMaster", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getClassMaster", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -74,11 +75,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getFieldMaster", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getFieldMaster", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -94,11 +95,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
} 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);
}
}
@ -114,11 +115,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
} 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);
}
}
@ -140,11 +141,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when deleteFromStatus", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when deleteFromStatus", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -162,11 +163,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getDataMaster", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getDataMaster", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.HVAService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.HVAVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -52,11 +53,11 @@ public class HVAController extends LocaleController<HVAVO> {
} 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<HVAVO> {
} 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<HVAVO> {
} 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);
}
}

View File

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

View File

@ -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<IkiDanRemuneras
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getKalkulasiDataRemunerasi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getKalkulasiDataRemunerasi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -70,11 +71,11 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveIkiRemunerasi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveIkiRemunerasi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -92,11 +93,11 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getKalkulasiDataRemunerasiPegawai", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getKalkulasiDataRemunerasiPegawai", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -146,11 +147,11 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePirDanIku", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePirDanIku", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -5,6 +5,7 @@ import com.jasamedika.medifirst2000.controller.base.LocaleController;
import com.jasamedika.medifirst2000.entities.IndikatorRensar;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.IndikatorRensarService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.IndikatorRensarVO;
import net.kaczmarzyk.spring.data.jpa.domain.Equal;
import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec;
@ -67,11 +68,11 @@ public class IndikatorRensarController extends LocaleController<IndikatorRensarV
} 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);
}
}

View File

@ -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.InstruksiService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.InstruksiCustomVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class InstruksiController extends LocaleController<InstruksiCustomVO> {
} 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);
}
}

View File

@ -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<AsuhanKeper
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveInteraOperasiAnestesi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveInteraOperasiAnestesi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -70,11 +71,11 @@ public class IntraOperasiAnestesiController extends LocaleController<AsuhanKeper
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getInteraOperasiAnestesi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getInteraOperasiAnestesi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -92,11 +93,11 @@ public class IntraOperasiAnestesiController extends LocaleController<AsuhanKeper
} 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);
}
}

View File

@ -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.IntraOperasiPerawatBedahService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.AsuhanKeperawatanPeriOperasiHeaderVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -49,11 +50,11 @@ public class IntraOperasiPerawatBedahController extends LocaleController<AsuhanK
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveInteraOperasiPerawatBedah", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveInteraOperasiPerawatBedah", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -71,11 +72,11 @@ public class IntraOperasiPerawatBedahController extends LocaleController<AsuhanK
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getInteraOperasiPerwatanBedah", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getInteraOperasiPerwatanBedah", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -93,11 +94,11 @@ public class IntraOperasiPerawatBedahController extends LocaleController<AsuhanK
} 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);
}
}

View File

@ -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.IpsrsDataAlatService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.RegistrasiAsetVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -47,11 +48,11 @@ public class IpsrsDataAlatController extends LocaleController<RegistrasiAsetVO>
} 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<RegistrasiAsetVO>
} 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<RegistrasiAsetVO>
} 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);
}
}

View File

@ -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<IpsrsPemelihara
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getRuanganMaintenance", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getRuanganMaintenance", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -67,11 +68,11 @@ public class IpsrsMaintenanceController extends LocaleController<IpsrsPemelihara
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getRekananMaintenance", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getRekananMaintenance", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.IpsrsPemakaianMesinService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.IpsrsPemakaianMesinVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -50,11 +51,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
} 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);
}
}
@ -71,11 +72,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getJenisMesin", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getJenisMesin", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -93,11 +94,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getDataMesin", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getDataMesin", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -114,11 +115,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllPemakaianBoiler", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllPemakaianBoiler", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -135,11 +136,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllPemakaianGenset", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllPemakaianGenset", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -154,11 +155,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePemakaianMesin", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePemakaianMesin", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.IpsrsPemakaianRuanganService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.IpsrsPemakaianRuanganVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -51,11 +52,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getRuanganPemakaianRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getRuanganPemakaianRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -72,11 +73,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getJenisPemakaianRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getJenisPemakaianRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -94,11 +95,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getKapasitasJenisPemakaianRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getKapasitasJenisPemakaianRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -113,11 +114,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePemakaianRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePemakaianRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -134,11 +135,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllPemakaianRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllPemakaianRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -156,11 +157,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when deletePemakaianRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when deletePemakaianRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -180,11 +181,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findDaftarPemakaianRuanganByPeriode", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findDaftarPemakaianRuanganByPeriode", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.IpsrsPeminjamanAlatService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.IpsrsPeminjamanAlatVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -50,11 +51,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} 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 JpaSystemExceptions {} when getUserLogin", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -71,11 +72,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getNoPeminjamanAlatTable", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getNoPeminjamanAlatTable", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -92,11 +93,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getRuanganPeminjamanAlat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getRuanganPeminjamanAlat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -114,11 +115,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAsetPeminjamanAlat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAsetPeminjamanAlat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -135,11 +136,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getPetugasPeminjamanAlat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getPetugasPeminjamanAlat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -154,11 +155,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePeminjamanAlat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePeminjamanAlat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -176,11 +177,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllPeminjamanAlat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllPeminjamanAlat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -195,11 +196,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when updateStatusPeminjaman", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when updateStatusPeminjaman", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.IpsrsPerbaikanService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.IpsrsPelaksanaanPerbaikanVO;
import com.jasamedika.medifirst2000.vo.IpsrsPerbaikanVO;
import org.slf4j.Logger;
@ -54,11 +55,11 @@ public class IpsrsPerbaikanController extends LocaleController<IpsrsPerbaikanVO>
} 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<IpsrsPerbaikanVO>
} 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<IpsrsPerbaikanVO>
} 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<IpsrsPerbaikanVO>
} 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<IpsrsPerbaikanVO>
} 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<IpsrsPerbaikanVO>
} 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);
}

View File

@ -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<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAsetPreventiveMaintenance", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAsetPreventiveMaintenance", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -73,11 +74,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getBagianAlat", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getBagianAlat", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -92,11 +93,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePreventiveMaintenance", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePreventiveMaintenance", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -113,11 +114,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getUserVerifikasi", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getUserVerifikasi", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.IpsrsTagihanBusinessCenterService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.IpsrsTagihanBusinessCenterVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -50,11 +51,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getRuanganTagihanBusinessCenter", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getRuanganTagihanBusinessCenter", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -71,11 +72,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getJenisPemakaianBusinessCenter", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getJenisPemakaianBusinessCenter", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -93,11 +94,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getKapasitasJenisPemakaianBusinessCenter", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getKapasitasJenisPemakaianBusinessCenter", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -112,11 +113,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveTagihanBusinessCenter", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveTagihanBusinessCenter", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -133,11 +134,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getAllTagihanBusinessCenter", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getAllTagihanBusinessCenter", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -155,11 +156,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when deleteTagihanBusinessCenter", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when deleteTagihanBusinessCenter", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -179,11 +180,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findTagihanBusinessCenterByPeriode", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findTagihanBusinessCenterByPeriode", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -29,7 +29,7 @@ public class ItJadwalPerawatanController 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-jadwal-perawatan",
@ -60,7 +60,7 @@ public class ItJadwalPerawatanController 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);
}
}

View File

@ -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.ItPerbaikanService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.ItPelaksanaanPerbaikanVO;
import com.jasamedika.medifirst2000.vo.ItPerbaikanVO;
import org.slf4j.Logger;
@ -52,11 +53,11 @@ public class ItPerbaikanController extends LocaleController<ItPerbaikanVO> {
} 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<ItPerbaikanVO> {
} 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<ItPerbaikanVO> {
} 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<ItPerbaikanVO> {
} 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<ItPerbaikanVO> {
} 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<ItPerbaikanVO> {
} 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);
}
}

View File

@ -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<JabatanVO> {
} 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<JabatanVO> {
} 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<JabatanVO> {
} 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<JabatanVO> {
} 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);
}
}

View File

@ -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<JadwalDpjpRa
} 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);
}
}

View File

@ -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.JadwalRencanaPemeriksaanService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.JadwalRencanaPemeriksaanVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -48,11 +49,11 @@ public class JadwalRencanaPemeriksaanController extends LocaleController<JadwalR
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when findByDateSatuanKerjaId", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when findByDateSatuanKerjaId", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -67,11 +68,11 @@ public class JadwalRencanaPemeriksaanController extends LocaleController<JadwalR
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveJadwal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveJadwal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.JenisBahanService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.JenisBahanVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -47,11 +48,11 @@ public class JenisBahanController extends LocaleController<JenisBahanVO> {
} 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);
}
}

View File

@ -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<JenisDietVO> {
} 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<JenisDietVO> {
} 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);
}
}

View File

@ -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<JenisLimbahB3
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when add addJenisLimbahB3", e.getMessage());
addHeaderMessage(ERROR_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 addJenisLimbahB3", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -66,11 +67,11 @@ public class JenisLimbahB3MasukController extends LocaleController<JenisLimbahB3
} 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);
}
}
@ -84,11 +85,11 @@ public class JenisLimbahB3MasukController extends LocaleController<JenisLimbahB3
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getJenisLimbahB3Masuk", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getJenisLimbahB3Masuk", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.JenisLinenService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.JenisLinenVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -48,11 +49,11 @@ public class JenisLinenController extends LocaleController<JenisLinenVO> {
} 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<JenisLinenVO> {
} 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<JenisLinenVO> {
} 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);
}

View File

@ -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<JenisResponVO> {
} 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);
}
}

View File

@ -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<JenisWaktuVO> {
} 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);
}
}

View File

@ -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<K3Che
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getK3Ruangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getK3Ruangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -72,11 +73,11 @@ public class K3CheckListFacillitySefetyController extends LocaleController<K3Che
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getK3KelompokLpjGedung", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getK3KelompokLpjGedung", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -91,11 +92,11 @@ public class K3CheckListFacillitySefetyController extends LocaleController<K3Che
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveK3CheckListFacillitySefety", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveK3CheckListFacillitySefety", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -112,11 +113,11 @@ public class K3CheckListFacillitySefetyController extends LocaleController<K3Che
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getCheckListFasilitasdanKeamanan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getCheckListFasilitasdanKeamanan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -135,11 +136,11 @@ public class K3CheckListFacillitySefetyController extends LocaleController<K3Che
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getCheckListFasilitasdanKeamananHeader", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getCheckListFasilitasdanKeamananHeader", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.K3LaporanKecelakaanKerjaService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.K3LaporanKecelakaanKerjaVO;
import com.jasamedika.medifirst2000.vo.LkkIdentifikasiKejadianVO;
import com.jasamedika.medifirst2000.vo.LkkIdentifikasiKorbanVO;
@ -53,11 +54,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} 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);
}
}
@ -74,11 +75,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getUnitRuangan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getUnitRuangan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -93,11 +94,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveDataLkk", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveDataLkk", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -115,11 +116,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getIdentifikasiKejadian", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getIdentifikasiKejadian", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -137,11 +138,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when getDataLkkByNoRec", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when getDataLkkByNoRec", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -156,11 +157,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when updateIdentifikasiKejadian", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when updateIdentifikasiKejadian", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -175,11 +176,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when updateIdentifikasiKorban", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when updateIdentifikasiKorban", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -194,11 +195,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when updateSaksiKejadian", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when updateSaksiKejadian", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -213,11 +214,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when deleteIdentifikasiKejadian", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when deleteIdentifikasiKejadian", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -232,11 +233,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when deleteIdentifikasiKorban", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when deleteIdentifikasiKorban", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -251,11 +252,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when deleteSaksiKejadian", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when deleteSaksiKejadian", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -270,11 +271,11 @@ public class K3LaporanKecelakaanKerjaController extends LocaleController<K3Lapor
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when verifLaporanKecelakaan", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when verifLaporanKecelakaan", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -7,6 +7,7 @@ import com.jasamedika.medifirst2000.entities.KajianEvaluasi;
import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.DetailKajianEvaluasiService;
import com.jasamedika.medifirst2000.service.KajianEvaluasiService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.DetailKajianEvaluasiVO;
import com.jasamedika.medifirst2000.vo.KajianEvaluasiVO;
import net.kaczmarzyk.spring.data.jpa.domain.DateBetween;
@ -92,11 +93,11 @@ public class KajianEvaluasiController extends LocaleController<KajianEvaluasiVO>
} 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<KajianEvaluasiVO>
} 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<KajianEvaluasiVO>
} 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);
}
}

View File

@ -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<KamusIndikatorVO>{
}
@RequestMapping(value="/find-all/", method= RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Collection<KamusIndikator>> findAll(
public ResponseEntity<Collection<KamusIndikatorVO>> 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<KamusIndikatorVO>{
}
@RequestMapping(value="/detail-indikator/", method= RequestMethod.GET,produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Collection<DetailKamusIndikatorDto>> findAll(
public ResponseEntity<Collection<KamusIndikatorVO>> 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<KamusIndikatorVO>{
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);
}

View File

@ -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<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when saveKartuPengendali", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when saveKartuPengendali", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -146,11 +147,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when verifikasiPpk", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when verifikasiPpk", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -165,11 +166,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when rekapPemenang", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when rekapPemenang", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -184,11 +185,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when rekapPemenangFromUlp", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when rekapPemenangFromUlp", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -203,11 +204,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when verifikasiKartuPengendaliDetailByAnggaran", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when verifikasiKartuPengendaliDetailByAnggaran", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -222,11 +223,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when verifikasiAnggaran", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when verifikasiAnggaran", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -241,11 +242,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when verfikasiDirekturTerkait", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when verfikasiDirekturTerkait", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -260,11 +261,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when verfikasiPp", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when verfikasiPp", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -279,11 +280,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when verfikasiULP", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when verfikasiULP", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -298,11 +299,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when updateJadwal", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when updateJadwal", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -347,11 +348,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when uploadExel", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when uploadExel", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}
@ -366,11 +367,11 @@ public class KartuPengendaliController extends LocaleController<KartuPengendaliV
} catch (ServiceVOException e) {
LOGGER.error("Got ServiceVOException {} when savePenawaranHargaSupplier", e.getMessage());
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
} catch (JpaSystemException jse) {
LOGGER.error("Got JpaSystemException {} when savePenawaranHargaSupplier", jse.getMessage());
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
}
}

View File

@ -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.KategoryProdukService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.KategoryProdukVO;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -43,11 +44,11 @@ public class KategoryProdukController extends LocaleController<KategoryProdukVO>
} 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);
}
}

View File

@ -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<KebutuhanDasarVO>
} 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);
}
}

View File

@ -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<KelasVO> {
} 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<KelasVO> {
} 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<KelasVO> {
} 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<KelasVO> {
} 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);
}
}

View File

@ -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<KeluargaPegawaiV
} 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);
}
return getJsonHttpStatus(NOT_ACCEPTABLE);
}

Some files were not shown because too many files have changed in this diff Show More