Update controller
This commit is contained in:
parent
e6eeee47a2
commit
6bfb5d9052
@ -5,7 +5,7 @@ import com.jasamedika.medifirst2000.vo.BowidickVO;
|
||||
import java.util.Map;
|
||||
|
||||
public interface BowidickService {
|
||||
Map<String, Object> saveBowidick(BowidickVO dto);
|
||||
Map<String, Object> saveBowidick(BowidickVO vo);
|
||||
Map<String, Object> getBowidick(String startDate, String endDate);
|
||||
Map<String, Object> getBowidickbyNorec(String noRec);
|
||||
|
||||
|
||||
@ -5,6 +5,6 @@ import com.jasamedika.medifirst2000.vo.MonitoringTestEthylenOxideVO;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MonitoringTestEntylenOxideService {
|
||||
Map<String, Object> saveMonitoringTestEntylenOxideService(MonitoringTestEthylenOxideVO dto);
|
||||
Map<String, Object> saveMonitoringTestEntylenOxideService(MonitoringTestEthylenOxideVO vo);
|
||||
Map<String, Object> getMonitoringTestEntylenOxideService(String startDate, String endDate);
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import com.jasamedika.medifirst2000.vo.MonitoringTestMesinAutoclaveVO;
|
||||
import java.util.Map;
|
||||
|
||||
public interface MonitoringTestmesinAutoClaveService {
|
||||
Map<String, Object> saveMonitoringTestMesinAutoClave(MonitoringTestMesinAutoclaveVO dto);
|
||||
Map<String, Object> saveMonitoringTestMesinAutoClave(MonitoringTestMesinAutoclaveVO vo);
|
||||
Map<String, Object> getMonitoringTestMesinAutoClave(String startDate, String endDate);
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface StandarPelayananMakananService {
|
||||
List<Map<String, Object>> save(List<StandarPelayananMakananVO> dtos);
|
||||
List<Map<String, Object>> save(List<StandarPelayananMakananVO> vos);
|
||||
Map<String, Object> getStandarPelayananMakanan();
|
||||
Map<String, Object> getRuangan();
|
||||
}
|
||||
|
||||
@ -30,65 +30,65 @@ public class BowidickServiceImpl implements BowidickService {
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> saveBowidick(BowidickVO dto) {
|
||||
public Map<String, Object> saveBowidick(BowidickVO vo) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
PencatatanSuhuMesin pencatatanSuhuMesin = new PencatatanSuhuMesin();
|
||||
pencatatanSuhuMesin.setNoRec(dto.getPencatatanMesinNoRec());
|
||||
Mesin mesin = this.mesinDao.findOne(dto.getMesinId());
|
||||
pencatatanSuhuMesin.setNoRec(vo.getPencatatanMesinNoRec());
|
||||
Mesin mesin = this.mesinDao.findOne(vo.getMesinId());
|
||||
pencatatanSuhuMesin.setMesin(mesin);
|
||||
Pegawai petugas = this.pegawaiDao.findById(dto.getPetugasId());
|
||||
Pegawai petugas = this.pegawaiDao.findById(vo.getPetugasId());
|
||||
pencatatanSuhuMesin.setPetugas(petugas);
|
||||
pencatatanSuhuMesin.setTanggal(dto.getTanggal());
|
||||
pencatatanSuhuMesin.setProgramMesin(dto.getProgramMesin());
|
||||
pencatatanSuhuMesin.setSuhu(dto.getSuhu());
|
||||
pencatatanSuhuMesin.setTekanan(dto.getTekanan());
|
||||
pencatatanSuhuMesin.setWaktuMulai(dto.getWaktuMulai());
|
||||
pencatatanSuhuMesin.setWaktuSelesai(dto.getWaktuSelesai());
|
||||
pencatatanSuhuMesin.setLamaProses(dto.getLamaProses());
|
||||
pencatatanSuhuMesin.setTanggal(vo.getTanggal());
|
||||
pencatatanSuhuMesin.setProgramMesin(vo.getProgramMesin());
|
||||
pencatatanSuhuMesin.setSuhu(vo.getSuhu());
|
||||
pencatatanSuhuMesin.setTekanan(vo.getTekanan());
|
||||
pencatatanSuhuMesin.setWaktuMulai(vo.getWaktuMulai());
|
||||
pencatatanSuhuMesin.setWaktuSelesai(vo.getWaktuSelesai());
|
||||
pencatatanSuhuMesin.setLamaProses(vo.getLamaProses());
|
||||
pencatatanSuhuMesin.setKeterangan("Bowidick");
|
||||
pencatatanSuhuMesin.setStatusEnabled(true);
|
||||
PencatatanSuhuMesin PencatatanSuhuMesinResult = this.pencatatanSuhuMesinDao.save(pencatatanSuhuMesin);
|
||||
if(CommonUtil.isNotNullOrEmpty(PencatatanSuhuMesinResult)) {
|
||||
Bowidick bowidick = new Bowidick();
|
||||
bowidick.setNoRec(dto.getBowidickNoRec());
|
||||
bowidick.setNoRec(vo.getBowidickNoRec());
|
||||
bowidick.setPencatatanSuhuMesin(pencatatanSuhuMesin);
|
||||
bowidick.setMesin(mesin);
|
||||
bowidick.setProgramMesin(dto.getProgramMesin());
|
||||
bowidick.setHasil(dto.getHasil());
|
||||
bowidick.setSuhu(dto.getSuhu());
|
||||
bowidick.setTanggal(dto.getTanggalBowidick());
|
||||
Pegawai operator = this.pegawaiDao.findById(dto.getOperatorId());
|
||||
bowidick.setProgramMesin(vo.getProgramMesin());
|
||||
bowidick.setHasil(vo.getHasil());
|
||||
bowidick.setSuhu(vo.getSuhu());
|
||||
bowidick.setTanggal(vo.getTanggalBowidick());
|
||||
Pegawai operator = this.pegawaiDao.findById(vo.getOperatorId());
|
||||
bowidick.setOperator(operator);
|
||||
Pegawai supervisor = this.pegawaiDao.findById(dto.getSupervisorId());
|
||||
Pegawai supervisor = this.pegawaiDao.findById(vo.getSupervisorId());
|
||||
bowidick.setSupervisor(supervisor);
|
||||
bowidick = this.bowidickDao.save(bowidick);
|
||||
|
||||
BiologicalSudahDisterile biologicalSudahDisterile = new BiologicalSudahDisterile();
|
||||
biologicalSudahDisterile.setNoRec(dto.getBiologicalNoRec());
|
||||
biologicalSudahDisterile.setNoRec(vo.getBiologicalNoRec());
|
||||
biologicalSudahDisterile.setPencatatanSuhuMesin(pencatatanSuhuMesin);
|
||||
biologicalSudahDisterile.setTanggal(dto.getTanggalBiological());
|
||||
Pegawai operatorBiological = this.pegawaiDao.findById(dto.getOperatorBiologicalId());
|
||||
biologicalSudahDisterile.setTanggal(vo.getTanggalBiological());
|
||||
Pegawai operatorBiological = this.pegawaiDao.findById(vo.getOperatorBiologicalId());
|
||||
biologicalSudahDisterile.setOperator(operatorBiological);
|
||||
biologicalSudahDisterile.setSuhuPensterilan(dto.getSuhuPensterilan());
|
||||
biologicalSudahDisterile.setSuhuIncubator(dto.getSuhuIncubator());
|
||||
biologicalSudahDisterile.setHasil(dto.getHasilBiological());
|
||||
biologicalSudahDisterile.setJamMasuk(dto.getJamMasukBiological());
|
||||
biologicalSudahDisterile.setJamKeluar(dto.getJamKeluarBiological());
|
||||
biologicalSudahDisterile.setSuhuPensterilan(vo.getSuhuPensterilan());
|
||||
biologicalSudahDisterile.setSuhuIncubator(vo.getSuhuIncubator());
|
||||
biologicalSudahDisterile.setHasil(vo.getHasilBiological());
|
||||
biologicalSudahDisterile.setJamMasuk(vo.getJamMasukBiological());
|
||||
biologicalSudahDisterile.setJamKeluar(vo.getJamKeluarBiological());
|
||||
biologicalSudahDisterile.setKeterangan("Biological");
|
||||
biologicalSudahDisterile = this.biologicalSudahDisterileDao.save(biologicalSudahDisterile);
|
||||
|
||||
BiologicalSudahDisterile attestPembanding = new BiologicalSudahDisterile();
|
||||
attestPembanding.setNoRec(dto.getAttestPembandingNoRec());
|
||||
attestPembanding.setNoRec(vo.getAttestPembandingNoRec());
|
||||
attestPembanding.setPencatatanSuhuMesin(pencatatanSuhuMesin);
|
||||
attestPembanding.setTanggal(dto.getTanggalAttest());
|
||||
Pegawai operatorAttest = this.pegawaiDao.findById(dto.getOperatorAttestId());
|
||||
attestPembanding.setTanggal(vo.getTanggalAttest());
|
||||
Pegawai operatorAttest = this.pegawaiDao.findById(vo.getOperatorAttestId());
|
||||
attestPembanding.setOperator(operatorAttest);
|
||||
attestPembanding.setSuhuPensterilan(dto.getSuhuPensterilanAttest());
|
||||
attestPembanding.setSuhuIncubator(dto.getSuhuIncubatorAttest());
|
||||
attestPembanding.setHasil(dto.getHasilAttest());
|
||||
attestPembanding.setJamMasuk(dto.getJamMasukAttest());
|
||||
attestPembanding.setJamKeluar(dto.getJamKeluarAttest());
|
||||
attestPembanding.setSuhuPensterilan(vo.getSuhuPensterilanAttest());
|
||||
attestPembanding.setSuhuIncubator(vo.getSuhuIncubatorAttest());
|
||||
attestPembanding.setHasil(vo.getHasilAttest());
|
||||
attestPembanding.setJamMasuk(vo.getJamMasukAttest());
|
||||
attestPembanding.setJamKeluar(vo.getJamKeluarAttest());
|
||||
attestPembanding.setKeterangan("Attest");
|
||||
attestPembanding = this.biologicalSudahDisterileDao.save(attestPembanding);
|
||||
|
||||
|
||||
@ -21,18 +21,18 @@ public class MonitoringTestEntylenOxideServiceImpl implements MonitoringTestEnty
|
||||
private PegawaiDao pegawaiDao;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> saveMonitoringTestEntylenOxideService(MonitoringTestEthylenOxideVO dto) {
|
||||
public Map<String, Object> saveMonitoringTestEntylenOxideService(MonitoringTestEthylenOxideVO vo) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
MonitoringTestEthylenOxide monitoringTestEthylenOxide = new MonitoringTestEthylenOxide();
|
||||
monitoringTestEthylenOxide.setNoRec(dto.getNoRec());
|
||||
monitoringTestEthylenOxide.setTanggalMulai(dto.getTanggalMulai());
|
||||
monitoringTestEthylenOxide.setTanggalSelesai(dto.getTanggalSelesai());
|
||||
monitoringTestEthylenOxide.setJamMulai(dto.getJamMulai());
|
||||
monitoringTestEthylenOxide.setJamSelesai(dto.getJamSelesai());
|
||||
monitoringTestEthylenOxide.setPemeriksaan(dto.getPemeriksaan());
|
||||
monitoringTestEthylenOxide.setStatusEnabled(dto.getStatusEnabled());
|
||||
Pegawai petugas = this.pegawaiDao.findById(dto.getPetugasId());
|
||||
monitoringTestEthylenOxide.setNoRec(vo.getNoRec());
|
||||
monitoringTestEthylenOxide.setTanggalMulai(vo.getTanggalMulai());
|
||||
monitoringTestEthylenOxide.setTanggalSelesai(vo.getTanggalSelesai());
|
||||
monitoringTestEthylenOxide.setJamMulai(vo.getJamMulai());
|
||||
monitoringTestEthylenOxide.setJamSelesai(vo.getJamSelesai());
|
||||
monitoringTestEthylenOxide.setPemeriksaan(vo.getPemeriksaan());
|
||||
monitoringTestEthylenOxide.setStatusEnabled(vo.getStatusEnabled());
|
||||
Pegawai petugas = this.pegawaiDao.findById(vo.getPetugasId());
|
||||
monitoringTestEthylenOxide.setPetugas(petugas);
|
||||
MonitoringTestEthylenOxide monitoringTestEthylenOxideResult = this.monitoringTestEntylenOxideDao.save(monitoringTestEthylenOxide);
|
||||
|
||||
|
||||
@ -26,20 +26,20 @@ public class MonitoringTestmesinAutoClaveServiceImpl implements MonitoringTestme
|
||||
private PegawaiDao pegawaiDao;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> saveMonitoringTestMesinAutoClave(MonitoringTestMesinAutoclaveVO dto) {
|
||||
public Map<String, Object> saveMonitoringTestMesinAutoClave(MonitoringTestMesinAutoclaveVO vo) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
MonitoringTestMesinAutoclave monitoringTestMesinAutoclave = new MonitoringTestMesinAutoclave();
|
||||
monitoringTestMesinAutoclave.setNoRec(dto.getNoRec());
|
||||
monitoringTestMesinAutoclave.setTanggal(dto.getTanggal());
|
||||
monitoringTestMesinAutoclave.setJamMasuk(dto.getJamMasuk());
|
||||
monitoringTestMesinAutoclave.setJamKeluar(dto.getJamKeluar());
|
||||
monitoringTestMesinAutoclave.setPemeriksaan(dto.getPemeriksaan());
|
||||
monitoringTestMesinAutoclave.setKeterangan(dto.getKeterangan());
|
||||
monitoringTestMesinAutoclave.setSuhu(dto.getSuhu());
|
||||
monitoringTestMesinAutoclave.setStatusEnabled(dto.getStatusEnabled());
|
||||
Mesin mesin = this.mesinDao.findOne(dto.getMesinId());
|
||||
monitoringTestMesinAutoclave.setNoRec(vo.getNoRec());
|
||||
monitoringTestMesinAutoclave.setTanggal(vo.getTanggal());
|
||||
monitoringTestMesinAutoclave.setJamMasuk(vo.getJamMasuk());
|
||||
monitoringTestMesinAutoclave.setJamKeluar(vo.getJamKeluar());
|
||||
monitoringTestMesinAutoclave.setPemeriksaan(vo.getPemeriksaan());
|
||||
monitoringTestMesinAutoclave.setKeterangan(vo.getKeterangan());
|
||||
monitoringTestMesinAutoclave.setSuhu(vo.getSuhu());
|
||||
monitoringTestMesinAutoclave.setStatusEnabled(vo.getStatusEnabled());
|
||||
Mesin mesin = this.mesinDao.findOne(vo.getMesinId());
|
||||
monitoringTestMesinAutoclave.setMesin(mesin);
|
||||
Pegawai petugas = this.pegawaiDao.findById(dto.getPetugasId());
|
||||
Pegawai petugas = this.pegawaiDao.findById(vo.getPetugasId());
|
||||
monitoringTestMesinAutoclave.setPetugas(petugas);
|
||||
MonitoringTestMesinAutoclave monitoringTestMesinAutoclaveResult = this.monitoringTestMesinAutoclaveDao.save(monitoringTestMesinAutoclave);
|
||||
|
||||
|
||||
@ -32,10 +32,10 @@ public class StandarPelayananMakananServiceImpl implements StandarPelayananMakan
|
||||
private SatuanStandarDao satuanStandarDao;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> save(List<StandarPelayananMakananVO> dtos) {
|
||||
public List<Map<String, Object>> save(List<StandarPelayananMakananVO> vos) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
List<Map<String, Object>> listMap = new ArrayList<>();
|
||||
for(StandarPelayananMakananVO dto:dtos){
|
||||
for(StandarPelayananMakananVO dto: vos){
|
||||
StandarPelayananMakanan standarPelayananMakanan = new StandarPelayananMakanan();
|
||||
standarPelayananMakanan.setId(dto.getId());
|
||||
Ruangan ruangan = this.ruanganDao.findById(dto.getRuanganId());
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class AdmisiRencanaPindahRuanganController extends LocaleController<Admis
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class AdmisiRencanaPindahRuanganController extends LocaleController<Admis
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getDataGrid", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getDataGrid", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,11 +95,11 @@ public class AdmisiRencanaPindahRuanganController extends LocaleController<Admis
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when update", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when update", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveEvaluasiRekanan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveEvaluasiRekanan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,11 +67,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when noAdvokasiHukumMedicolegal", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when noAdvokasiHukumMedicolegal", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,12 +88,12 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when listAdvokasiHukumMedicolegalByRuanganTujuan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when listAdvokasiHukumMedicolegalByRuanganTujuan",
|
||||
jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,11 +110,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when listAdvokasiHukumMedicolegalByRuanganPembuat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when listAdvokasiHukumMedicolegalByRuanganPembuat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,11 +137,11 @@ public class AdvokasiHukumMedicolegalController extends LocaleController<UsulanE
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveRekomendasiEvaluasiRekanan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveRekomendasiEvaluasiRekanan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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 RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when add", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return 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 RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when update", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return 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 RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when delete", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +63,7 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-all-mesin-cuci", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
@ -74,7 +73,7 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-mesin-aset", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
@ -84,7 +83,7 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-satuan", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
@ -94,7 +93,7 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-departemen-laundry", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
@ -104,7 +103,7 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-max-no-mesin", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
@ -114,7 +113,7 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-produkasetid-alatid", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
@ -126,7 +125,7 @@ public class AlatController extends LocaleController<AlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-asset-laundry", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -57,11 +56,11 @@ public class AnamnesisController extends LocaleController<RegistrasiPelayananVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveAnamnesis", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveAnamnesis", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ 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;
|
||||
@ -68,11 +67,11 @@ public class AnggaranController extends LocaleController<HeadAnggaranVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePengajuanUsulanAnggaranBaru", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePengajuanUsulanAnggaranBaru", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,11 +94,11 @@ public class AnggaranController extends LocaleController<HeadAnggaranVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveVerifikasiSpekAnggaran", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveVerifikasiSpekAnggaran", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,11 +113,11 @@ public class AnggaranController extends LocaleController<HeadAnggaranVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveUnVerifikasiSpekAnggaran", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveUnVerifikasiSpekAnggaran", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,11 +130,11 @@ public class AnggaranController extends LocaleController<HeadAnggaranVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getPengendaliByUserLogin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getPengendaliByUserLogin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,11 +147,11 @@ public class AnggaranController extends LocaleController<HeadAnggaranVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuanganByUserLogin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuanganByUserLogin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,11 +167,11 @@ public class AnggaranController extends LocaleController<HeadAnggaranVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when editPengajuanUsulanAnggaran", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when editPengajuanUsulanAnggaran", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
// end add by Arya 2017-01-19
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class ApresiasiAtasLayananController extends LocaleController<ApresiasiAt
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addApresiasiAtasLayanan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addApresiasiAtasLayanan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -54,11 +53,11 @@ public class AsesmenGiziAwalController extends LocaleController<RegistrasiPelaya
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveAsesmenGiziAwal", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveAsesmenGiziAwal", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class AsesmenGiziLanjutController extends LocaleController<RegistrasiPela
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveAsesmenGiziLanjut", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveAsesmenGiziLanjut", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -47,11 +46,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllAsuhan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllAsuhan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,11 +67,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllIntraOperasiPerawatBedah", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllIntraOperasiPerawatBedah", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,11 +88,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllPostOperasiPerawatBedah", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllPostOperasiPerawatBedah", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,11 +109,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllIntraOperasiAnestesi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllIntraOperasiAnestesi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,11 +130,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllPostOperasiAnestesi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllPostOperasiAnestesi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,11 +151,11 @@ public class AsuhanKeperawatanPeriOperasiController extends LocaleController<Asu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllIntraOperasiPerawatBedahV1", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllIntraOperasiPerawatBedahV1", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class AsuhanKeperawatanPeriOperasiHeaderController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveAsuhanHeader", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveAsuhanHeader", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class AsuhanKeperawatanPeriOperasiHeaderController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getListAsuhanByNoTrans", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getListAsuhanByNoTrans", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,11 +93,11 @@ public class AsuhanKeperawatanPeriOperasiHeaderController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getPasienDaftarOperasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getPasienDaftarOperasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,25 +1,20 @@
|
||||
package com.jasamedika.medifirst2000.controller;
|
||||
|
||||
import com.jasamedika.medifirst2000.constants.Constants;
|
||||
import com.jasamedika.medifirst2000.constants.MessageResource;
|
||||
import com.jasamedika.medifirst2000.controller.base.LocaleController;
|
||||
import com.jasamedika.medifirst2000.core.web.WebConstants;
|
||||
import com.jasamedika.medifirst2000.dao.PemakaianAsuransiDao;
|
||||
import com.jasamedika.medifirst2000.dto.SuratEligibilitasAsuransiDto;
|
||||
import com.jasamedika.medifirst2000.exception.ServiceVOException;
|
||||
import com.jasamedika.medifirst2000.service.BridgingBpjs;
|
||||
import com.jasamedika.medifirst2000.service.PemakaianAsuransiService;
|
||||
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.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@ -31,253 +26,169 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.jasamedika.medifirst2000.constants.Constants.MessageInfo.ERROR_MESSAGE;
|
||||
import static com.jasamedika.medifirst2000.core.web.WebConstants.HttpHeaderInfo.LABEL_SUCCESS;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonHttpStatus;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonResponse;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
import static org.springframework.http.HttpStatus.*;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.GET;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/asuransi")
|
||||
public class AsuransiController extends LocaleController<PemakaianAsuransiVO> {
|
||||
|
||||
|
||||
private static final Logger LOGGER = getLogger(AsuransiController.class);
|
||||
|
||||
@Autowired
|
||||
private BridgingBpjs bridgingBpjs;
|
||||
|
||||
@Autowired
|
||||
private PemakaianAsuransiDao pemakaianAsuransiDao;
|
||||
|
||||
private BridgingBpjs bridgingBpjs;
|
||||
|
||||
@Autowired
|
||||
private PemakaianAsuransiService pemakaianAsuransiService;
|
||||
|
||||
@Autowired
|
||||
private RegistrasiPelayananPasienService registrasiPelayananPasienService;
|
||||
|
||||
@Autowired
|
||||
private RegistrasiPelayananService registrasiPelayananService;
|
||||
|
||||
public AsuransiController() {
|
||||
}
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(RegistrasiPelayananController.class);
|
||||
|
||||
@RequestMapping(value = "/save-pemakaian-asuransi", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/save-pemakaian-asuransi", method = POST, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> savePemakaianAsuransi(@Valid @RequestBody PemakaianAsuransiVO vo,
|
||||
HttpServletRequest request) throws ParseException {
|
||||
try {
|
||||
Map<String, String> mapHeaderMessage = new HashMap<String, String>();
|
||||
Map<String, String> mapHeaderMessage = new HashMap<>();
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||
vo.setTglRegistrasi(format.parse(vo.getTanggalPendaftaran()));
|
||||
Map<String, Object> result = pemakaianAsuransiService.savePemakaianAsuransi(vo);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, CREATED, mapHeaderMessage);
|
||||
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add Pasien", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
LOGGER.error("Got ServiceVOException {} when savePemakaianAsuransi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(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.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
LOGGER.error("Got JpaSystemException {} when savePemakaianAsuransi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/check-kepesertaan/{id}", method = RequestMethod.GET)
|
||||
@RequestMapping(value = "/check-kepesertaan/{id}", method = GET)
|
||||
public ResponseEntity<Object> checkKepesertaaan(@RequestParam(value = "id", required = false) String id) {
|
||||
Object peserta = bridgingBpjs.CekKepesertaan(id);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/detail-sep-peserta/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> getDetailSEPPeserta(@RequestParam(value = "noSep", required = true) String noSep) {
|
||||
|
||||
@RequestMapping(value = "/detail-sep-peserta/", method = GET)
|
||||
public ResponseEntity<Object> getDetailSEPPeserta(@RequestParam(value = "noSep") String noSep) {
|
||||
Object peserta = bridgingBpjs.getDetailSEP(noSep);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/data-kunjungan-peserta/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> getDataKunjunganPeserta(@RequestParam(value = "noSep", required = true) String noSep) {
|
||||
|
||||
@RequestMapping(value = "/data-kunjungan-peserta/", method = GET)
|
||||
public ResponseEntity<Object> getDataKunjunganPeserta(@RequestParam(value = "noSep") String noSep) {
|
||||
Object peserta = bridgingBpjs.getDataKunjunganPeserta(noSep);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/data-riwayat-pelayanan-peserta/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> getDataRiwayatPelayananPeserta(@RequestParam(value = "noKartu", required = true) String noKartu) {
|
||||
|
||||
@RequestMapping(value = "/data-riwayat-pelayanan-peserta/", method = GET)
|
||||
public ResponseEntity<Object> getDataRiwayatPelayananPeserta(@RequestParam(value = "noKartu") String noKartu) {
|
||||
Object peserta = bridgingBpjs.getDataRiwayatPelayananPeserta(noKartu);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/check-rujukan/{id}", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> cekRujukan(@RequestParam(value = "noRujukan", required = false) String noRujukan) {
|
||||
Object rujukan = bridgingBpjs.CekNoRujukan(noRujukan);
|
||||
|
||||
return RestUtil.getJsonResponse(rujukan, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/generate-sep", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> generateSep(
|
||||
|
||||
@RequestParam(value = "noBpjs", required = false) String noBpjs,
|
||||
@RequestParam(value = "tanggalRujukan", required = false) String tanggalRujuakn,
|
||||
@RequestParam(value = "tanggalSep", required = false) String tanggalSep,
|
||||
@RequestParam(value = "noRujukan", required = false) String noRujukan,
|
||||
@RequestMapping(value = "/generate-sep", method = GET)
|
||||
public ResponseEntity<Object> generateSep(@RequestParam(value = "noBpjs", required = false) String noBpjs,
|
||||
@RequestParam(value = "tanggalRujukan", required = false) String tanggalRujuakn,
|
||||
@RequestParam(value = "tanggalSep", required = false) String tanggalSep,
|
||||
@RequestParam(value = "noRujukan", required = false) String noRujukan,
|
||||
@RequestParam(value = "ppkRujukan", required = false) String ppkRujukan,
|
||||
@RequestParam(value = "isRawatJalan", required = false) String isRawatJalan,
|
||||
@RequestParam(value = "catatan", required = false) String catatan,
|
||||
@RequestParam(value = "kodeDiagnosa", required = false) String kodeDiagnosa,
|
||||
@RequestParam(value = "poliTujuan", required = false) String poliTujuan,
|
||||
@RequestParam(value = "isRawatJalan", required = false) String isRawatJalan,
|
||||
@RequestParam(value = "catatan", required = false) String catatan,
|
||||
@RequestParam(value = "kodeDiagnosa", required = false) String kodeDiagnosa,
|
||||
@RequestParam(value = "poliTujuan", required = false) String poliTujuan,
|
||||
@RequestParam(value = "kelasRawat", required = false) String kelasRawat,
|
||||
@RequestParam(value = "lakaLantas", required = false) String lakaLantas,
|
||||
@RequestParam(value = "lokasiLaka", required = false) String lokasiLaka,
|
||||
@RequestParam(value = "lakaLantas", required = false) String lakaLantas,
|
||||
@RequestParam(value = "lokasiLaka", required = false) String lokasiLaka,
|
||||
@RequestParam(value = "noCm", required = false) String noCm) {
|
||||
Object rujukan = bridgingBpjs.GenerateSep(noBpjs, tanggalRujuakn, tanggalSep,noRujukan, ppkRujukan, isRawatJalan.equals("T"), catatan, kodeDiagnosa, poliTujuan, kelasRawat, lakaLantas,lokasiLaka, noCm);
|
||||
|
||||
return RestUtil.getJsonResponse(rujukan, HttpStatus.OK);
|
||||
Object rujukan = bridgingBpjs.GenerateSep(noBpjs, tanggalRujuakn, tanggalSep, noRujukan, ppkRujukan,
|
||||
isRawatJalan.equals("T"), catatan, kodeDiagnosa, poliTujuan, kelasRawat, lakaLantas, lokasiLaka, noCm);
|
||||
return getJsonResponse(rujukan, OK);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/asuransiBPJS")
|
||||
public ModelAndView generateAsuransiBPJS(ModelAndView m,
|
||||
@RequestParam(value = "format", required = false) String format,
|
||||
@RequestParam(value = "noSep", required = true) String noSep) {
|
||||
|
||||
List list = pemakaianAsuransiService.findByNoSep(noSep);
|
||||
@RequestParam(value = "noSep") String noSep) {
|
||||
List<SuratEligibilitasAsuransiDto> list = pemakaianAsuransiService.findByNoSep(noSep);
|
||||
m.addObject("dataSource", list);
|
||||
m.addObject("tanggalReport", new Date());
|
||||
m.addObject("title", "SURAT ELIGIBILITAS PESERTA");
|
||||
m.addObject("format", "pdf");
|
||||
|
||||
if (format != null && !format.isEmpty()) {
|
||||
if (format != null && !format.isEmpty())
|
||||
m.addObject("format", format);
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/update-tanggal-pulang-sep", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> generateSep(@Valid @RequestBody Map<String, Object> vo, HttpServletRequest request){
|
||||
Map<String, Object> result = bridgingBpjs.UpdateTanggalPulang(
|
||||
(String)vo.get("noSep"), (String)vo.get("tglPlg"), (String)vo.get("ppkPelayanan"));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/mapping-sep", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> mappingSep(
|
||||
|
||||
@RequestParam(value = "noSep", required = false) String noSep,
|
||||
@RequestParam(value = "noTrans", required = false) String noTrans) {
|
||||
Object rujukan = bridgingBpjs.mappingTransaksiSep(noSep, noTrans);
|
||||
|
||||
return RestUtil.getJsonResponse(rujukan, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/update-tglPulang", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> updateTglPulang(
|
||||
|
||||
@RequestParam(value = "noSep", required = false) String noSep,
|
||||
@RequestMapping(value = "/update-tglPulang", method = GET)
|
||||
public ResponseEntity<Object> updateTglPulang(@RequestParam(value = "noSep", required = false) String noSep,
|
||||
@RequestParam(value = "tglPulang", required = false) String tglPulang) {
|
||||
Object rujukan = bridgingBpjs.updateTglPulang(noSep, tglPulang);
|
||||
|
||||
return RestUtil.getJsonResponse(rujukan, HttpStatus.OK);
|
||||
return getJsonResponse(rujukan, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/update-sep", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> generateSep(
|
||||
@RequestParam(value = "noSep", required = false) String noSep,
|
||||
@RequestParam(value = "noBpjs", required = false) String noBpjs,
|
||||
@RequestParam(value = "tanggalRujukan", required = false) String tanggalRujukan,
|
||||
@RequestParam(value = "tanggalSep", required = false) String tanggalSep,
|
||||
@RequestParam(value = "noRujukan", required = false) String noRujukan,
|
||||
|
||||
@RequestMapping(value = "/update-sep", method = GET)
|
||||
public ResponseEntity<Map<String, Object>> generateSep(
|
||||
@RequestParam(value = "noSep", required = false) String noSep,
|
||||
@RequestParam(value = "noBpjs", required = false) String noBpjs,
|
||||
@RequestParam(value = "tanggalRujukan", required = false) String tanggalRujukan,
|
||||
@RequestParam(value = "tanggalSep", required = false) String tanggalSep,
|
||||
@RequestParam(value = "noRujukan", required = false) String noRujukan,
|
||||
@RequestParam(value = "ppkRujukan", required = false) String ppkRujukan,
|
||||
@RequestParam(value = "isRawatJalan", required = false) String isRawatJalan,
|
||||
@RequestParam(value = "catatan", required = false) String catatan,
|
||||
@RequestParam(value = "kodeDiagnosa", required = false) String kodeDiagnosa,
|
||||
@RequestParam(value = "poliTujuan", required = false) String poliTujuan,
|
||||
@RequestParam(value = "isRawatJalan", required = false) String isRawatJalan,
|
||||
@RequestParam(value = "catatan", required = false) String catatan,
|
||||
@RequestParam(value = "kodeDiagnosa", required = false) String kodeDiagnosa,
|
||||
@RequestParam(value = "poliTujuan", required = false) String poliTujuan,
|
||||
@RequestParam(value = "kelasRawat", required = false) String kelasRawat,
|
||||
@RequestParam(value = "lakaLantas", required = false) String lakaLantas,
|
||||
@RequestParam(value = "lokasiLaka", required = false) String lokasiLaka,
|
||||
@RequestParam(value = "lakaLantas", required = false) String lakaLantas,
|
||||
@RequestParam(value = "lokasiLaka", required = false) String lokasiLaka,
|
||||
@RequestParam(value = "noCm", required = false) String noCm) {
|
||||
|
||||
Map<String,Object> updateSep = bridgingBpjs.updateSep(noSep, noBpjs, tanggalRujukan, tanggalSep, noRujukan, ppkRujukan, isRawatJalan.equals("T"), catatan, kodeDiagnosa, poliTujuan, kelasRawat, lakaLantas, lokasiLaka, noCm);
|
||||
return RestUtil.getJsonResponse(updateSep, HttpStatus.OK);
|
||||
Map<String, Object> updateSep = bridgingBpjs.updateSep(noSep, noBpjs, tanggalRujukan, tanggalSep, noRujukan,
|
||||
ppkRujukan, isRawatJalan.equals("T"), catatan, kodeDiagnosa, poliTujuan, kelasRawat, lakaLantas,
|
||||
lokasiLaka, noCm);
|
||||
return getJsonResponse(updateSep, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/data-rujukan-rs/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> getDataRujukanRS(@RequestParam(value = "noRujukan", required = true) String noRujukan) {
|
||||
|
||||
@RequestMapping(value = "/data-rujukan-rs/", method = GET)
|
||||
public ResponseEntity<Object> getDataRujukanRS(@RequestParam(value = "noRujukan") String noRujukan) {
|
||||
Object peserta = bridgingBpjs.getDataRujukanByNoRujukanRS(noRujukan);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/data-rujukan-pcare/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> getDataRujukanPCare(@RequestParam(value = "noRujukan", required = true) String noRujukan) {
|
||||
Object peserta = bridgingBpjs.getDataRujukanByNoRujukanPcare(noRujukan);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/data-rujukan-byNoKartu-rs/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> getDataRujukanByNoKartuRS(@RequestParam(value = "noKartu", required = true) String noKartu) {
|
||||
@RequestMapping(value = "/data-rujukan-byNoKartu-rs/", method = GET)
|
||||
public ResponseEntity<Object> getDataRujukanByNoKartuRS(@RequestParam(value = "noKartu") String noKartu) {
|
||||
Object peserta = bridgingBpjs.getDataRujukanByNoKartuRS(noKartu);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
@RequestMapping(value = "/check-kepesertaan-by-nik/", method = GET)
|
||||
public ResponseEntity<Map<String, Object>> checkKepesertaanByNIK(@RequestParam(value = "nik") String nik) {
|
||||
Map<String, Object> peserta = bridgingBpjs.checkKepesertaanByNIK(nik);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/data-rujukan-byNoKartu-pcare/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Object> getDataRujukanByNoKartuPCare(@RequestParam(value = "noKartu", required = true) String noKartu) {
|
||||
Object peserta = bridgingBpjs.getDataRujukanByKartuPcare(noKartu);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
@RequestMapping(value = "/get-monitor-klaim/", method = GET)
|
||||
public ResponseEntity<Map<String, Object>> getMonitorKlaim(@RequestParam(value = "tglMasuk") String tglMasuk,
|
||||
@RequestParam(value = "tglKeluar") String tglKeluar, @RequestParam(value = "kelasRawat") String kelasRawat,
|
||||
@RequestParam(value = "jnsPelayanan") String jnsPelayanan, @RequestParam(value = "cari") String cari,
|
||||
@RequestParam(value = "status") String status) {
|
||||
Map<String, Object> peserta = bridgingBpjs.getMonitoringVerifikasiKlaim(tglMasuk, tglKeluar, kelasRawat,
|
||||
jnsPelayanan, cari, status);
|
||||
return getJsonResponse(peserta, OK);
|
||||
}
|
||||
@RequestMapping(value = "/check-kepesertaan-by-nik/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> checkKepesertaanByNIK(@RequestParam(value = "nik", required = true) String nik) {
|
||||
Map<String,Object> peserta = bridgingBpjs.checkKepesertaanByNIK(nik);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
@RequestMapping(value = "/delete-sep/", method = GET)
|
||||
public ResponseEntity<Map<String, Object>> deleteSep(@RequestParam(value = "noSep") String noSep) {
|
||||
Map<String, Object> dataIntegrasi = bridgingBpjs.deleteSep(noSep);
|
||||
return getJsonResponse(dataIntegrasi, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-referensi-diagnosa/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> getReferensiDiagnosa(@RequestParam(value = "nama", required = true) String nama) {
|
||||
Map<String,Object> peserta = bridgingBpjs.getReferensiDiagnosa(nama);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-referensi-faskes/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> getReferensiFaskes(@RequestParam(value = "nama", required = true) String nama,
|
||||
@RequestParam(value = "start", required = true) Integer start,
|
||||
@RequestParam(value = "limit", required = true) Integer limit) {
|
||||
Map<String,Object> peserta = bridgingBpjs.getReferensiFaskes(nama, start, limit);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
}
|
||||
@RequestMapping(value = "/get-monitor-klaim/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> getMonitorKlaim(@RequestParam(value = "tglMasuk", required = true) String tglMasuk,
|
||||
@RequestParam(value = "tglKeluar", required = true) String tglKeluar,
|
||||
@RequestParam(value = "kelasRawat", required = true) String kelasRawat,
|
||||
@RequestParam(value = "jnsPelayanan", required = true) String jnsPelayanan,
|
||||
@RequestParam(value = "cari", required = true) String cari,
|
||||
@RequestParam(value = "status", required = true) String status) {
|
||||
Map<String,Object> peserta = bridgingBpjs.getMonitoringVerifikasiKlaim(tglMasuk, tglKeluar, kelasRawat, jnsPelayanan, cari, status);
|
||||
|
||||
return RestUtil.getJsonResponse(peserta, HttpStatus.OK);
|
||||
}
|
||||
@RequestMapping(value = "/get-integrasi-inacbg/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> getIntegrasiSepInacbg(@RequestParam(value = "noSep", required = true) String noSep) {
|
||||
Map<String,Object> dataIntegrasi = bridgingBpjs.getDataIntegrasiSepInacbg(noSep);
|
||||
|
||||
return RestUtil.getJsonResponse(dataIntegrasi, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/delete-sep/", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> deleteSep(@RequestParam(value = "noSep", required = true) String noSep) {
|
||||
Map<String,Object> dataIntegrasi = bridgingBpjs.deleteSep(noSep);
|
||||
|
||||
return RestUtil.getJsonResponse(dataIntegrasi, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-poli", method = RequestMethod.GET)
|
||||
public ResponseEntity<Map<String,Object>> getPoli() {
|
||||
Map<String,Object> dataIntegrasi = bridgingBpjs.pencarianDataPoli();
|
||||
return RestUtil.getJsonResponse(dataIntegrasi, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -51,11 +50,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getUserLogin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getUserLogin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,11 +92,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getB3StokGlobal", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getB3StokGlobal", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,11 +111,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveB3RuanganInputData", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveB3RuanganInputData", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,11 +133,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getB3RuanganInput", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getB3RuanganInput", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,11 +152,11 @@ public class B3RuanganInputDataController extends LocaleController<B3RuanganInpu
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deleteB3DaftarBahanBerbahaya", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deleteB3DaftarBahanBerbahaya", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -48,11 +47,11 @@ public class BakuMutuController extends LocaleController<BakuMutuVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addBakuMutu", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addBakuMutu", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,11 +65,11 @@ public class BakuMutuController extends LocaleController<BakuMutuVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllBakuMutu", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllBakuMutu", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,11 +82,11 @@ public class BakuMutuController extends LocaleController<BakuMutuVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getBakuMutuParent", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getBakuMutuParent", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
|
||||
}
|
||||
@ -101,11 +100,11 @@ public class BakuMutuController extends LocaleController<BakuMutuVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getBakuMutuChild", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getBakuMutuChild", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,11 +118,11 @@ public class BakuMutuController extends LocaleController<BakuMutuVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when bakuMutuById", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when bakuMutuById", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -55,11 +54,11 @@ public class BatalRegistrasiController extends LocaleController<BatalRegistrasiV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveBatalRegistrasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveBatalRegistrasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -48,12 +47,12 @@ public class BentukProdukController extends LocaleController<BentukProdukVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -65,11 +64,11 @@ public class BobotIndikatorController extends LocaleController<BobotIndikatorVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,69 +2,67 @@ package com.jasamedika.medifirst2000.controller;
|
||||
|
||||
import com.jasamedika.medifirst2000.constants.MessageResource;
|
||||
import com.jasamedika.medifirst2000.controller.base.LocaleController;
|
||||
import com.jasamedika.medifirst2000.core.web.WebConstants;
|
||||
import com.jasamedika.medifirst2000.service.BowidickService;
|
||||
import com.jasamedika.medifirst2000.util.rest.RestUtil;
|
||||
import com.jasamedika.medifirst2000.vo.BowidickVO;
|
||||
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.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.jasamedika.medifirst2000.core.web.WebConstants.HttpHeaderInfo.LABEL_SUCCESS;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonHttpStatus;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonResponse;
|
||||
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.GET;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bowidick")
|
||||
public class BowidickController extends LocaleController {
|
||||
public class BowidickController extends LocaleController<BowidickVO> {
|
||||
|
||||
@Autowired
|
||||
private BowidickService bowidickService;
|
||||
|
||||
@RequestMapping(value="/save-bowidick",
|
||||
method = RequestMethod.POST,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<List<Map<String, Object>>> saveBowidick(
|
||||
@RequestBody BowidickVO dto,
|
||||
|
||||
@RequestMapping(value = "/save-bowidick", method = POST, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<List<Map<String, Object>>> saveBowidick(@RequestBody BowidickVO vo,
|
||||
HttpServletRequest request) {
|
||||
Map<String, Object> result = this.bowidickService.saveBowidick(dto);
|
||||
Map<String, Object> result = this.bowidickService.saveBowidick(vo);
|
||||
if (!result.isEmpty()) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(Collections.singletonList(result), OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/get-bowidick",
|
||||
method = RequestMethod.GET,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getBowidick(
|
||||
@RequestParam(value="startDate") String startDate,
|
||||
@RequestParam(value="endDate") String endDate,
|
||||
HttpServletRequest request) {
|
||||
Map<String, Object> result = this.bowidickService.getBowidick(startDate, endDate);
|
||||
|
||||
if (!result.isEmpty()) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/get-bowidick-by-norec",
|
||||
method = RequestMethod.GET,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getBowidickByNoRec(
|
||||
@RequestParam("noRec")String noRec, HttpServletRequest request) {
|
||||
Map<String, Object> result = this.bowidickService.getBowidickbyNorec(noRec);
|
||||
|
||||
if (!result.isEmpty()) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-bowidick", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getBowidick(@RequestParam(value = "startDate") String startDate,
|
||||
@RequestParam(value = "endDate") String endDate, HttpServletRequest request) {
|
||||
Map<String, Object> result = this.bowidickService.getBowidick(startDate, endDate);
|
||||
if (!result.isEmpty()) {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-bowidick-by-norec", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getBowidickByNoRec(@RequestParam("noRec") String noRec,
|
||||
HttpServletRequest request) {
|
||||
Map<String, Object> result = this.bowidickService.getBowidickbyNorec(noRec);
|
||||
if (!result.isEmpty()) {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -3,7 +3,6 @@ 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;
|
||||
@ -32,7 +31,7 @@ public class BundleSetAlatController extends LocaleController<BundleSetAlatVO> {
|
||||
|
||||
@RequestMapping(value = "/get-bundle-set-alat", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> getBundleSetAlat(HttpServletRequest request) {
|
||||
return this.bundleSetAlatService.getBundleSetAlat();
|
||||
return this.bundleSetAlatService.getBundleSetAlat();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/save-bundle-set-alat", method = POST, produces = APPLICATION_JSON_VALUE)
|
||||
@ -43,7 +42,7 @@ public class BundleSetAlatController extends LocaleController<BundleSetAlatVO> {
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ 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;
|
||||
@ -61,11 +60,11 @@ public class CekListGedungBangunanController extends LocaleController<BaseModelV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePemeliharaanGedung", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePemeliharaanGedung", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,11 +80,11 @@ public class CekListGedungBangunanController extends LocaleController<BaseModelV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveCekListMasterToJadwalGedung", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveCekListMasterToJadwalGedung", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,17 +100,17 @@ public class CekListGedungBangunanController extends LocaleController<BaseModelV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePenjadwalanGedung", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePenjadwalanGedung", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-cek-list-jadwal-pemeliharan-gedung", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> getCekListPemeliharaanGedung(@RequestParam("noRec") String noRec) {
|
||||
return this.cekListGedungBangunanHeaderService.getCekListPemeliharanGedungByNoRec(noRec);
|
||||
return this.cekListGedungBangunanHeaderService.getCekListPemeliharanGedungByNoRec(noRec);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -47,11 +46,11 @@ public class CetakPengantarSuratController extends LocaleController<CetakPengant
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addPengantarSurat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addPengantarSurat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CheckInController extends LocaleController<CheckInVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addCheckIn", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addCheckIn", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class CheckInController extends LocaleController<CheckInVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findByNoRec", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findByNoRec", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,12 +95,12 @@ public class CheckInController extends LocaleController<CheckInVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getCheckInByNoRecAntrian", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getCheckInByNoRecAntrian", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -53,11 +52,11 @@ public class CssdBmhpController extends LocaleController<CssdBmhpVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveCssdBmhp", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveCssdBmhp", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class CssdBmhpController extends LocaleController<CssdBmhpVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when produksiBmhp", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when produksiBmhp", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdDecontaminasiController extends LocaleController<CssdDecontamin
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveDecontaminasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveDecontaminasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -51,11 +50,11 @@ public class CssdDistribusiController extends LocaleController<CssdDistribusiVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveDistribusi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveDistribusi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdMonitoringEoController extends LocaleController<CssdMonitoringE
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveMonitoringEo", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveMonitoringEo", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdMonitoringSteamController extends LocaleController<CssdMonitori
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveMonitoringSteam", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveMonitoringSteam", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdPengemasanController extends LocaleController<CssdPengemasanVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePengemasan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePengemasan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdPenyimpananController extends LocaleController<CssdPenyimpananV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePenyimpanan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePenyimpanan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -47,11 +46,11 @@ public class CssdReturController extends LocaleController<StrukPelayananDetailVO
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveReturCssd", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveReturCssd", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdSterilController extends LocaleController<CssdSterilVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveSteril", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveSteril", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdSterilisasiController extends LocaleController<CssdSterilisasiV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveSterilisasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveSterilisasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,7 +130,7 @@ public class CssdSterilisasiController extends LocaleController<CssdSterilisasiV
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/unmapping-paket-to-produk", method = POST, produces = APPLICATION_JSON_VALUE)
|
||||
@ -142,7 +141,7 @@ public class CssdSterilisasiController extends LocaleController<CssdSterilisasiV
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class CssdUjiSwapController extends LocaleController<CssdUjiSwapVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveUjiSwap", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveUjiSwap", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class DaftarKegiatanController extends LocaleController<UnitCostVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findDetailCostUnit", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findDetailCostUnit", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,11 +66,11 @@ public class DaftarKegiatanController extends LocaleController<UnitCostVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getListJenisUnitCost", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getListJenisUnitCost", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,11 +85,11 @@ public class DaftarKegiatanController extends LocaleController<UnitCostVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getListDetailJenisUnitCost", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getListDetailJenisUnitCost", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,11 +105,11 @@ public class DaftarKegiatanController extends LocaleController<UnitCostVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getListUnitCost", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getListUnitCost", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -79,11 +78,11 @@ public class DaftarKendaraanDinasController extends LocaleController<OrderKendar
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllKendaraanDinasDanPejabat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllKendaraanDinasDanPejabat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,7 +97,7 @@ public class DaftarKendaraanDinasController extends LocaleController<OrderKendar
|
||||
|
||||
@RequestMapping(value = "/get-detail-pengembalian-kendaraan-dinas-by-norec/", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getDetailPengembalianKendaraanDinasByNoRec(
|
||||
@RequestParam(value = "noRec") String noRec, HttpServletRequest request) {
|
||||
@RequestParam(value = "noRec") String noRec, HttpServletRequest request) {
|
||||
Map<String, Object> result = this.daftarKendaraanDinasService.getPengembalianKendaraanDetailByNoRec(noRec);
|
||||
return getJsonResponse(result, OK);
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -74,11 +73,11 @@ public class DaftarOrderAmbulanceController extends LocaleController<OrderPelaya
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllDaftarOrderAmbulance", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllDaftarOrderAmbulance", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -58,11 +57,11 @@ public class DaftarOrderPemakaianRuangRapatController extends LocaleController<O
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveStatusRuangRapat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveStatusRuangRapat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,11 +75,11 @@ public class DaftarOrderPemakaianRuangRapatController extends LocaleController<O
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllOrderRuangRapat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllOrderRuangRapat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -65,11 +64,11 @@ public class DaftarPemakaianRumahDukaController extends LocaleController<Pemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveStatusRumahDuka", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveStatusRumahDuka", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,11 +82,11 @@ public class DaftarPemakaianRumahDukaController extends LocaleController<Pemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllDaftarPemakaianRumahDuka", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllDaftarPemakaianRumahDuka", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -59,11 +58,11 @@ public class DaftarPemulasaraanJenazahController extends LocaleController<OrderP
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllDaftarPemulasaraanJenazah", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllDaftarPemulasaraanJenazah", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,11 +79,11 @@ public class DaftarPemulasaraanJenazahController extends LocaleController<OrderP
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getDaftarPemulasaranJenazahExternal", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getDaftarPemulasaranJenazahExternal", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -68,11 +67,11 @@ public class DaftarPenerimaanController extends LocaleController<StrukBuktiPener
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveVerifikasiSetoran", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveVerifikasiSetoran", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,11 +86,11 @@ public class DaftarPenerimaanController extends LocaleController<StrukBuktiPener
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveClosingVerifikasiSetoran", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveClosingVerifikasiSetoran", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -76,11 +75,11 @@ public class DaftarPesanAmbulanceController extends LocaleController<OrderAmbula
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveStatusAmbulance", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveStatusAmbulance", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -77,11 +76,11 @@ public class DaftarSewaAsramaController extends LocaleController<SewaAsramaVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveStatusSewaAsrama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveStatusSewaAsrama", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,11 +94,11 @@ public class DaftarSewaAsramaController extends LocaleController<SewaAsramaVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllSewaAsrama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllSewaAsrama", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -81,11 +80,11 @@ public class DaftarSewaLahanController extends LocaleController<SewaLahanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveStatusSewaLahan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveStatusSewaLahan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,11 +98,11 @@ public class DaftarSewaLahanController extends LocaleController<SewaLahanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllSewaLahan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllSewaLahan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -64,11 +63,11 @@ public class DampakResikoController extends LocaleController<DampakResikoVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class DataPerusahaanYangBekerjaSamaController extends LocaleController<Da
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addDataPerusahaanYangBekerjaSama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addDataPerusahaanYangBekerjaSama", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class DataPerusahaanYangBekerjaSamaController extends LocaleController<Da
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllDataPerusahaanYangBekerjaSama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllDataPerusahaanYangBekerjaSama", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -51,11 +50,11 @@ public class DataPesertaPerusahanYangBekerjaSamaController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addDataPesertaPerusahanYangBekerjaSama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addDataPesertaPerusahanYangBekerjaSama", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,11 +68,11 @@ public class DataPesertaPerusahanYangBekerjaSamaController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllDataPesertaPerusahanYangBekerjaSama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllDataPesertaPerusahanYangBekerjaSama", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,12 +86,12 @@ public class DataPesertaPerusahanYangBekerjaSamaController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllDataPesertaRumahSakitYangBekerjaSama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllDataPesertaRumahSakitYangBekerjaSama",
|
||||
jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,11 +105,11 @@ public class DataPesertaPerusahanYangBekerjaSamaController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllDataRumahSakitYangBekerjaSama", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllDataRumahSakitYangBekerjaSama", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -47,11 +46,11 @@ public class DepartemenController extends LocaleController<DepartemenVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when add", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when add", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,11 +63,11 @@ public class DepartemenController extends LocaleController<DepartemenVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when update", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when update", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
@ -81,11 +80,11 @@ public class DepartemenController extends LocaleController<DepartemenVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when delete", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when delete", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
@ -99,11 +98,11 @@ public class DepartemenController extends LocaleController<DepartemenVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllDepartemeById5And6", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllDepartemeById5And6", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class DetailRupController extends LocaleController<HeadAnggaranVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveDetailLRup", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveDetailLRup", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -51,11 +50,11 @@ public class DiagnosaKeperawatanTransaksiController extends LocaleController<Dia
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveDiagnosaKeperawatan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveDiagnosaKeperawatan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -56,11 +55,11 @@ public class DiagnosaPasienController extends LocaleController<RegistrasiPelayan
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveDiagnosaPasien", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveDiagnosaPasien", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,11 +73,11 @@ public class DiagnosaPasienController extends LocaleController<RegistrasiPelayan
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findByNoCm", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findByNoCm", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,11 +97,11 @@ public class DiagnosaPasienController extends LocaleController<RegistrasiPelayan
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findDiagnosaPasienByAntrian", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findDiagnosaPasienByAntrian", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@ 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;
|
||||
@ -78,11 +77,11 @@ public class DiagnosaTindakanPasienController extends LocaleController<DiagnosaT
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveDiagnosaTindakanPasien", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveDiagnosaTindakanPasien", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,11 +101,11 @@ public class DiagnosaTindakanPasienController extends LocaleController<DiagnosaT
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findDiagnosaTindakanPasienByAntrian", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findDiagnosaTindakanPasienByAntrian", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -92,11 +91,11 @@ public class DistribusiAsetController extends LocaleController<PenerimaanBarangV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveRequestDistribusi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveRequestDistribusi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,11 +121,11 @@ public class DistribusiAsetController extends LocaleController<PenerimaanBarangV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveKonfirmasiAset", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveKonfirmasiAset", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -48,11 +47,11 @@ public class DokumenInternalController extends LocaleController<DokumenInternalV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addSuratMasukInternal", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addSuratMasukInternal", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,11 +66,11 @@ public class DokumenInternalController extends LocaleController<DokumenInternalV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when setDistribusiKirimSuratInternalEksternal", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when setDistribusiKirimSuratInternalEksternal", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
package com.jasamedika.medifirst2000.controller;
|
||||
|
||||
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.exception.ServiceVOException;
|
||||
import com.jasamedika.medifirst2000.service.DokumenKeluarService;
|
||||
import com.jasamedika.medifirst2000.util.rest.RestUtil;
|
||||
import com.jasamedika.medifirst2000.vo.DokumenKeluarVO;
|
||||
import com.jasamedika.medifirst2000.vo.SuratKeluarVO;
|
||||
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.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/dokumenKeluar")
|
||||
public class DokumenKeluarController extends LocaleController<DokumenKeluarVO>
|
||||
implements IBaseRestController<DokumenKeluarVO> {
|
||||
|
||||
@Autowired
|
||||
private DokumenKeluarService dokumenKeluarService;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DokumenKeluarController.class);
|
||||
|
||||
@RequestMapping(value = "/save-surat-keluar/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> addVO(@Valid @RequestBody SuratKeluarVO vo, HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = dokumenKeluarService.addSuratKeluar(vo);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Collection<DokumenKeluarVO>> getAllVOWithQueryString(HttpServletRequest request, Integer page,
|
||||
Integer limit, String sort, String dir) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<DokumenKeluarVO> getVO(Integer id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> addVO(DokumenKeluarVO vo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> editVO(DokumenKeluarVO vo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> deleteVO(Integer id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<List<DokumenKeluarVO>> getAllVO() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -52,11 +51,11 @@ public class DraftSuratController extends LocaleController<DraftSuratRuanganVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addDraftSurat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addDraftSurat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,11 +70,11 @@ public class DraftSuratController extends LocaleController<DraftSuratRuanganVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getNoSurat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getNoSurat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class EdukasiController extends LocaleController<EdukasiVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveEdukasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveEdukasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class EkstensionNoTeleponController extends LocaleController<EkstensionNo
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addEkstension", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addEkstension", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -54,11 +53,11 @@ public class EvaluasiRekananController extends LocaleController<UsulanEvaluasiVO
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveEvaluasiRekanan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveEvaluasiRekanan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,11 +72,11 @@ public class EvaluasiRekananController extends LocaleController<UsulanEvaluasiVO
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when noEvaluasiRekanan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when noEvaluasiRekanan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,11 +93,11 @@ public class EvaluasiRekananController extends LocaleController<UsulanEvaluasiVO
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when listUsulanEvaluasiByRuanganPembuat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when listUsulanEvaluasiByRuanganPembuat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class FasilitasMController extends LocaleController<FasilitasMVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveFasilitas", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveFasilitas", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class FasilitasMController extends LocaleController<FasilitasMVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getListFasilitasByKelasRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getListFasilitasByKelasRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,11 +93,11 @@ public class FasilitasMController extends LocaleController<FasilitasMVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getListFasilitasByRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getListFasilitasByRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,11 +114,11 @@ public class FasilitasMController extends LocaleController<FasilitasMVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllDepartemen", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllDepartemen", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -48,11 +47,11 @@ public class FeeForServiceController extends LocaleController<PelayananPasienVO>
|
||||
} catch (ServiceVOException se) {
|
||||
LOG.error("ServiceVOException {} when getFeeForService", se.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, se.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOG.error("JpaSystemException {} when getFeeForService", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -60,11 +59,11 @@ public class FisisPemeriksaanDokterController extends LocaleController<FisisPeme
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addFisisPemeriksaanDokter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addFisisPemeriksaanDokter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -94,11 +93,11 @@ public class GajiPegawaiController extends LocaleController<PegawaiHistoriRekapG
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveVerifikasiGajiPegawai", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveVerifikasiGajiPegawai", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -55,11 +54,11 @@ public class GawatDaruratController extends LocaleController<RegistrasiPelayanan
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,11 +76,11 @@ public class GawatDaruratController extends LocaleController<RegistrasiPelayanan
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when get", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when get", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -53,11 +52,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getClassMaster", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getClassMaster", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,11 +74,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getFieldMaster", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getFieldMaster", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,11 +94,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,11 +114,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when update", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when update", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,11 +140,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deleteFromStatus", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deleteFromStatus", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,11 +162,11 @@ public class GeneratedMasterController extends LocaleController<IpsrsPemeliharaa
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getDataMaster", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getDataMaster", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -53,11 +52,11 @@ public class HVAController extends LocaleController<HVAVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findByJenisPeriode", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findByJenisPeriode", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class HVAController extends LocaleController<HVAVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveHVA", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveHVA", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,11 +93,11 @@ public class HVAController extends LocaleController<HVAVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getSummaryAnalysis", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getSummaryAnalysis", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class HasilPemeriksaanSwaPantauLimbahCairController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when addHasilPemeriksaanSwaPantauLimbahCair", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when addHasilPemeriksaanSwaPantauLimbahCair", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,11 +67,11 @@ public class HasilPemeriksaanSwaPantauLimbahCairController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllhasilPemeriksaanSwaPantauLimbahCair", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllhasilPemeriksaanSwaPantauLimbahCair", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,11 +83,11 @@ public class HasilPemeriksaanSwaPantauLimbahCairController
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deleteHasilPemeriksaanSwaPantauLimbahCair", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deleteHasilPemeriksaanSwaPantauLimbahCair", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
|
||||
@ -1,18 +1,12 @@
|
||||
package com.jasamedika.medifirst2000.controller;
|
||||
|
||||
import com.jasamedika.medifirst2000.constants.Constants;
|
||||
import com.jasamedika.medifirst2000.constants.MessageResource;
|
||||
import com.jasamedika.medifirst2000.controller.base.LocaleController;
|
||||
import com.jasamedika.medifirst2000.core.web.WebConstants;
|
||||
import com.jasamedika.medifirst2000.exception.ServiceVOException;
|
||||
import com.jasamedika.medifirst2000.service.HistoriPelayananCsService;
|
||||
import com.jasamedika.medifirst2000.util.rest.RestUtil;
|
||||
import com.jasamedika.medifirst2000.vo.HistoriPelayananCsVO;
|
||||
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.*;
|
||||
@ -21,176 +15,150 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.jasamedika.medifirst2000.constants.Constants.MessageInfo.ERROR_MESSAGE;
|
||||
import static com.jasamedika.medifirst2000.core.web.WebConstants.HttpHeaderInfo.LABEL_SUCCESS;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonHttpStatus;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonResponse;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
import static org.springframework.http.HttpStatus.*;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.GET;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/historiPelayananCs")
|
||||
public class HistoriPelayananCsController extends LocaleController<HistoriPelayananCsVO> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(HistoriPelayananCsController.class);
|
||||
|
||||
private static final Logger LOGGER = getLogger(HistoriPelayananCsController.class);
|
||||
|
||||
@Autowired
|
||||
private HistoriPelayananCsService historiPelayananCsService;
|
||||
|
||||
@RequestMapping(value = "/save-histori-pelayanancs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/save-histori-pelayanancs", method = POST, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> saveHistoriPelayananCs(@Valid @RequestBody HistoriPelayananCsVO hpcsvo,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = this.historiPelayananCsService.saveHistriPelayananCs(hpcsvo);
|
||||
if (result != null)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
|
||||
LOGGER.error("Got exception {} when saveHistoriPelayananCs", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got ServiceVOException {} when saveHistriPelayananCs", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
|
||||
LOGGER.error("Got exception {} when saveHistoriPelayananCs", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
LOGGER.error("Got JpaSystemException {} when saveHistriPelayananCs", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-list-histori-pelayanan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/get-list-histori-pelayanan", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getListHistoriPelayanan(
|
||||
@RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) {
|
||||
|
||||
@RequestParam(value = "ruanganId") Integer ruanganId, HttpServletRequest request) {
|
||||
try {
|
||||
Map<String, Object> result = this.historiPelayananCsService.getListHistoriPelayananCs(ruanganId);
|
||||
|
||||
if (null != result) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
} else {
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage);
|
||||
|
||||
return getJsonResponse(null, NOT_FOUND, mapHeaderMessage);
|
||||
}
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when getListHistoriPelayanan", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got ServiceVOException {} when getListHistoriPelayananCs", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when getListHistoriPelayanan", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got JpaSystemException {} when getListHistoriPelayananCs", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-load-histori-pelayanan", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getLoadData(
|
||||
@RequestParam(value = "ruanganId", required = true) Integer ruanganId, HttpServletRequest request) {
|
||||
|
||||
@RequestMapping(value = "/get-load-histori-pelayanan", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getLoadData(@RequestParam(value = "ruanganId") Integer ruanganId,
|
||||
HttpServletRequest request) {
|
||||
try {
|
||||
Map<String, Object> result = this.historiPelayananCsService.getLoadData(ruanganId);
|
||||
|
||||
if (null != result) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
} else {
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage);
|
||||
return getJsonResponse(null, NOT_FOUND, mapHeaderMessage);
|
||||
}
|
||||
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when getLoadData", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got ServiceVOException {} when getLoadData", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when getLoadData", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got JpaSystemException {} when getLoadData", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-load-pasien-bynocm", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getDataPasienByNoCm(
|
||||
@RequestParam(value = "noCm", required = true) String noCm, HttpServletRequest request) {
|
||||
|
||||
@RequestMapping(value = "/get-load-pasien-bynocm", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getDataPasienByNoCm(@RequestParam(value = "noCm") String noCm,
|
||||
HttpServletRequest request) {
|
||||
try {
|
||||
Map<String, Object> result = this.historiPelayananCsService.getListPasienByNoCm(noCm);
|
||||
|
||||
if (null != result) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
} else {
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage);
|
||||
return getJsonResponse(null, NOT_FOUND, mapHeaderMessage);
|
||||
}
|
||||
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when getLoadData", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got ServiceVOException {} when getListPasienByNoCm", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when getLoadData", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got JpaSystemException {} when getListPasienByNoCm", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-load-produk-informasi", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/get-load-produk-informasi", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getDataProdukInformasi(HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = this.historiPelayananCsService.getListProdukInformasi();
|
||||
|
||||
if (null != result) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
} else {
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage);
|
||||
return getJsonResponse(null, NOT_FOUND, mapHeaderMessage);
|
||||
}
|
||||
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when getLoadData", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got ServiceVOException {} when getListProdukInformasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when getLoadData", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got JpaSystemException {} when getListProdukInformasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-histori-pelayanan-norec/{norec}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/get-histori-pelayanan-norec/{norec}", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getDataHistoriCsByNoRec(@PathVariable(value = "norec") String norec,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = this.historiPelayananCsService.getListHistoriCsByNorec(norec);
|
||||
|
||||
if (null != result) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
} else {
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.NOT_FOUND, mapHeaderMessage);
|
||||
return getJsonResponse(null, NOT_FOUND, mapHeaderMessage);
|
||||
}
|
||||
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when getLoadData", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got ServiceVOException {} when getListHistoriCsByNorec", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when getLoadData", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
|
||||
LOGGER.error("Got JpaSystemException {} when getListHistoriCsByNorec", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -52,11 +51,11 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getKalkulasiDataRemunerasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getKalkulasiDataRemunerasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,11 +70,11 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveIkiRemunerasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveIkiRemunerasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,11 +92,11 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getKalkulasiDataRemunerasiPegawai", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getKalkulasiDataRemunerasiPegawai", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,11 +146,11 @@ public class IkiDanRemunerasiController extends LocaleController<IkiDanRemuneras
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePirDanIku", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePirDanIku", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -68,11 +67,11 @@ public class IndikatorRensarController extends LocaleController<IndikatorRensarV
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class InstruksiController extends LocaleController<InstruksiCustomVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveInstruksi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveInstruksi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class IntraOperasiAnestesiController extends LocaleController<AsuhanKeper
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveInteraOperasiAnestesi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveInteraOperasiAnestesi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,11 +70,11 @@ public class IntraOperasiAnestesiController extends LocaleController<AsuhanKeper
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getInteraOperasiAnestesi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getInteraOperasiAnestesi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,11 +92,11 @@ public class IntraOperasiAnestesiController extends LocaleController<AsuhanKeper
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getPasienDaftarOperasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getPasienDaftarOperasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -50,11 +49,11 @@ public class IntraOperasiPerawatBedahController extends LocaleController<AsuhanK
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveInteraOperasiPerawatBedah", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveInteraOperasiPerawatBedah", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class IntraOperasiPerawatBedahController extends LocaleController<AsuhanK
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getInteraOperasiPerwatanBedah", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getInteraOperasiPerwatanBedah", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,11 +93,11 @@ public class IntraOperasiPerawatBedahController extends LocaleController<AsuhanK
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getPasienDaftarOperasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getPasienDaftarOperasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -48,11 +47,11 @@ public class IpsrsDataAlatController extends LocaleController<RegistrasiAsetVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllRegistrasiAset", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllRegistrasiAset", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,11 +69,11 @@ public class IpsrsDataAlatController extends LocaleController<RegistrasiAsetVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getOneRegistrasiAset", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getOneRegistrasiAset", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,11 +90,11 @@ public class IpsrsDataAlatController extends LocaleController<RegistrasiAsetVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllJenisProdukByIpsrs", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllJenisProdukByIpsrs", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -47,11 +46,11 @@ public class IpsrsMaintenanceController extends LocaleController<IpsrsPemelihara
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuanganMaintenance", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuanganMaintenance", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,11 +67,11 @@ public class IpsrsMaintenanceController extends LocaleController<IpsrsPemelihara
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRekananMaintenance", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRekananMaintenance", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -51,11 +50,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getUserLogin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getUserLogin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getJenisMesin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getJenisMesin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,11 +93,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getDataMesin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getDataMesin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,11 +114,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllPemakaianBoiler", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllPemakaianBoiler", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,11 +135,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllPemakaianGenset", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllPemakaianGenset", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,11 +154,11 @@ public class IpsrsPemakaianMesinController extends LocaleController<IpsrsPemakai
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePemakaianMesin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePemakaianMesin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -52,11 +51,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuanganPemakaianRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuanganPemakaianRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,11 +72,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getJenisPemakaianRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getJenisPemakaianRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,11 +94,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getKapasitasJenisPemakaianRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getKapasitasJenisPemakaianRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,11 +113,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePemakaianRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePemakaianRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,11 +134,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllPemakaianRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllPemakaianRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,11 +156,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deletePemakaianRuangan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deletePemakaianRuangan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,11 +180,11 @@ public class IpsrsPemakaianRuanganController extends LocaleController<IpsrsPemak
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findDaftarPemakaianRuanganByPeriode", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findDaftarPemakaianRuanganByPeriode", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -51,11 +50,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getUserLogin", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemExceptions {} when getUserLogin", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getNoPeminjamanAlatTable", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getNoPeminjamanAlatTable", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,11 +92,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuanganPeminjamanAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuanganPeminjamanAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,11 +114,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAsetPeminjamanAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAsetPeminjamanAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,11 +135,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getPetugasPeminjamanAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getPetugasPeminjamanAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,11 +154,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePeminjamanAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePeminjamanAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,11 +176,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllPeminjamanAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllPeminjamanAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,11 +195,11 @@ public class IpsrsPeminjamanAlatController extends LocaleController<IpsrsPeminja
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when updateStatusPeminjaman", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when updateStatusPeminjaman", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -55,11 +54,11 @@ public class IpsrsPerbaikanController extends LocaleController<IpsrsPerbaikanVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePermintaanPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePermintaanPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,11 +75,11 @@ public class IpsrsPerbaikanController extends LocaleController<IpsrsPerbaikanVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuanganPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuanganPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,11 +97,11 @@ public class IpsrsPerbaikanController extends LocaleController<IpsrsPerbaikanVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAsetPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAsetPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,11 +119,11 @@ public class IpsrsPerbaikanController extends LocaleController<IpsrsPerbaikanVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getOnePermintaanPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getOnePermintaanPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,11 +138,11 @@ public class IpsrsPerbaikanController extends LocaleController<IpsrsPerbaikanVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePelaksanaanPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePelaksanaanPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,11 +158,11 @@ public class IpsrsPerbaikanController extends LocaleController<IpsrsPerbaikanVO>
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when updatePermintaanPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when updatePermintaanPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -52,11 +51,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAsetPreventiveMaintenance", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAsetPreventiveMaintenance", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,11 +73,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getBagianAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getBagianAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,11 +92,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePreventiveMaintenance", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePreventiveMaintenance", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,11 +113,11 @@ public class IpsrsPreventiveMaintenanceController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getUserVerifikasi", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getUserVerifikasi", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -51,11 +50,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuanganTagihanBusinessCenter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuanganTagihanBusinessCenter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,11 +71,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getJenisPemakaianBusinessCenter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getJenisPemakaianBusinessCenter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,11 +93,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getKapasitasJenisPemakaianBusinessCenter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getKapasitasJenisPemakaianBusinessCenter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,11 +112,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveTagihanBusinessCenter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveTagihanBusinessCenter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,11 +133,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAllTagihanBusinessCenter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAllTagihanBusinessCenter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,11 +155,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deleteTagihanBusinessCenter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deleteTagihanBusinessCenter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,11 +179,11 @@ public class IpsrsTagihanBusinessCenterController extends LocaleController<Ipsrs
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findTagihanBusinessCenterByPeriode", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findTagihanBusinessCenterByPeriode", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,65 +2,59 @@ package com.jasamedika.medifirst2000.controller;
|
||||
|
||||
import com.jasamedika.medifirst2000.constants.MessageResource;
|
||||
import com.jasamedika.medifirst2000.controller.base.LocaleController;
|
||||
import com.jasamedika.medifirst2000.core.web.WebConstants;
|
||||
import com.jasamedika.medifirst2000.service.ItJadwalPerawatanService;
|
||||
import com.jasamedika.medifirst2000.util.rest.RestUtil;
|
||||
import com.jasamedika.medifirst2000.vo.ItJadwalPerawatanVO;
|
||||
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.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.jasamedika.medifirst2000.core.web.WebConstants.HttpHeaderInfo.LABEL_SUCCESS;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonHttpStatus;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonResponse;
|
||||
import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.GET;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/it-jadwal-perawatan")
|
||||
public class ItJadwalPerawatanController extends LocaleController{
|
||||
public class ItJadwalPerawatanController extends LocaleController<ItJadwalPerawatanVO> {
|
||||
|
||||
@Autowired
|
||||
private ItJadwalPerawatanService itJadwalPerawatanService;
|
||||
|
||||
@RequestMapping(value="/save-jadwal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> saveJadwalPerawatan(
|
||||
@RequestBody ItJadwalPerawatanVO dto, HttpServletRequest request) {
|
||||
Map<String, Object> result = this.itJadwalPerawatanService.saveJadwalPerawatan(dto);
|
||||
|
||||
@RequestMapping(value = "/save-jadwal", method = POST, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> saveJadwalPerawatan(@RequestBody ItJadwalPerawatanVO vo,
|
||||
HttpServletRequest request) {
|
||||
Map<String, Object> result = this.itJadwalPerawatanService.saveJadwalPerawatan(vo);
|
||||
if (!result.isEmpty()) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
// @RequestMapping(value = "/get-jadwal-perawatan",
|
||||
// method = RequestMethod.GET,
|
||||
// produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
// public Map<String, Object> getJadwalPerawatanIt(
|
||||
// @RequestParam(value = "startDate") String startDate,
|
||||
// @RequestParam(value = "endDate") String endDate
|
||||
// ) {
|
||||
// Map<String, Object> result = this.itJadwalPerawatanService.getJadwalPerawatanAll(startDate, endDate);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
@RequestMapping(value = "/get-jadwal-perawatan-by-norec",
|
||||
method = RequestMethod.GET,
|
||||
produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> getJadwalPerawatanByNoRec(
|
||||
@RequestParam(value = "noRec") String noRec) {
|
||||
Map<String, Object> result = this.itJadwalPerawatanService.getJadwalPerawatanbyNoRec(noRec);
|
||||
return result;
|
||||
|
||||
@RequestMapping(value = "/get-jadwal-perawatan-by-norec", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> getJadwalPerawatanByNoRec(@RequestParam(value = "noRec") String noRec) {
|
||||
return this.itJadwalPerawatanService.getJadwalPerawatanbyNoRec(noRec);
|
||||
}
|
||||
|
||||
@RequestMapping(value="/save-realisasi-jadwal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> saveRealisasiJadwalPerawatan(
|
||||
@RequestBody ItJadwalPerawatanVO dto, HttpServletRequest request) {
|
||||
Map<String, Object> result = this.itJadwalPerawatanService.saveRealisasiJadwalPerawatan(dto);
|
||||
|
||||
@RequestMapping(value = "/save-realisasi-jadwal", method = POST, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> saveRealisasiJadwalPerawatan(@RequestBody ItJadwalPerawatanVO vo,
|
||||
HttpServletRequest request) {
|
||||
Map<String, Object> result = this.itJadwalPerawatanService.saveRealisasiJadwalPerawatan(vo);
|
||||
if (!result.isEmpty()) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, OK, mapHeaderMessage);
|
||||
}
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -53,11 +52,11 @@ public class ItPerbaikanController extends LocaleController<ItPerbaikanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getNoOrderTable", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getNoOrderTable", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,11 +76,11 @@ public class ItPerbaikanController extends LocaleController<ItPerbaikanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePermintaanPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePermintaanPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,11 +97,11 @@ public class ItPerbaikanController extends LocaleController<ItPerbaikanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getRuanganPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getRuanganPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,11 +119,11 @@ public class ItPerbaikanController extends LocaleController<ItPerbaikanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getAsetPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getAsetPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,11 +138,11 @@ public class ItPerbaikanController extends LocaleController<ItPerbaikanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when savePelaksanaanPerbaikanRev1", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when savePelaksanaanPerbaikanRev1", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,11 +160,11 @@ public class ItPerbaikanController extends LocaleController<ItPerbaikanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deleteItPerbaikan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deleteItPerbaikan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class JabatanController extends LocaleController<JabatanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveJabatan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveJabatan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
@ -67,11 +66,11 @@ public class JabatanController extends LocaleController<JabatanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when update", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when update", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
@ -85,11 +84,11 @@ public class JabatanController extends LocaleController<JabatanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deleteJabatan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deleteJabatan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
@ -102,11 +101,11 @@ public class JabatanController extends LocaleController<JabatanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when delete", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when delete", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,426 +1,182 @@
|
||||
package com.jasamedika.medifirst2000.controller;
|
||||
|
||||
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.exception.ServiceVOException;
|
||||
import com.jasamedika.medifirst2000.service.JadwalDokterService;
|
||||
import com.jasamedika.medifirst2000.service.PegawaiService;
|
||||
import com.jasamedika.medifirst2000.service.RuanganService;
|
||||
import com.jasamedika.medifirst2000.util.DateUtil;
|
||||
import com.jasamedika.medifirst2000.util.rest.RestUtil;
|
||||
import com.jasamedika.medifirst2000.vo.JadwalDokterVO;
|
||||
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 javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.jasamedika.medifirst2000.constants.Constants.MessageInfo.ERROR_MESSAGE;
|
||||
import static com.jasamedika.medifirst2000.core.web.WebConstants.HttpHeaderInfo.LABEL_ERROR;
|
||||
import static com.jasamedika.medifirst2000.core.web.WebConstants.HttpHeaderInfo.LABEL_SUCCESS;
|
||||
import static com.jasamedika.medifirst2000.util.DateUtil.toDate;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonHttpStatus;
|
||||
import static com.jasamedika.medifirst2000.util.rest.RestUtil.getJsonResponse;
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
import static org.springframework.http.HttpStatus.*;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.GET;
|
||||
import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/jadwalDokter")
|
||||
public class JadwalDokterController extends LocaleController<JadwalDokterVO>
|
||||
implements IBaseRestController<JadwalDokterVO> {
|
||||
public class JadwalDokterController extends LocaleController<JadwalDokterVO> {
|
||||
|
||||
private static final Logger LOGGER = getLogger(JadwalDokterController.class);
|
||||
|
||||
@Autowired
|
||||
private JadwalDokterService jadwalDokterService;
|
||||
|
||||
@Autowired
|
||||
private RuanganService ruanganService;
|
||||
@Autowired
|
||||
private PegawaiService pegawaiService;
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(JadwalDokterController.class);
|
||||
|
||||
@Override
|
||||
public ResponseEntity<Collection<JadwalDokterVO>> getAllVOWithQueryString(HttpServletRequest request, Integer page,
|
||||
Integer limit, String sort, String dir) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<JadwalDokterVO> getVO(Integer id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> addVO(JadwalDokterVO vo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> editVO(JadwalDokterVO vo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> deleteVO(Integer id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseEntity<List<JadwalDokterVO>> getAllVO() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/save-jadwal-dokter/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/save-jadwal-dokter/", method = POST, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> addVO(@Valid @RequestBody JadwalDokterVO vo,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = jadwalDokterService.saveJadwalDokter(vo);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
LOGGER.error("Got ServiceVOException {} when saveJadwalDokter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
LOGGER.error("Got JpaSystemException {} when saveJadwalDokter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/delete-jadwal-dokter/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> deleteVO(@Valid @RequestBody JadwalDokterVO vo,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = jadwalDokterService.deleteJadwalDokter(vo);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/save-all-jadwal-dokter/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/save-all-jadwal-dokter/", method = POST, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> addAllVO(@Valid @RequestBody List<JadwalDokterVO> vos,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = jadwalDokterService.saveListJadwalDokter(vos);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
LOGGER.error("Got ServiceVOException {} when saveListJadwalDokter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
LOGGER.error("Got JpaSystemException {} when saveListJadwalDokter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/update-all-jadwal-dokter/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/update-all-jadwal-dokter/", method = POST, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> updateAllVo(@Valid @RequestBody List<JadwalDokterVO> vos,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = jadwalDokterService.updateListJadwalDokter(vos);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return getJsonResponse(result, CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
LOGGER.error("Got ServiceVOException {} when updateListJadwalDokter", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when add Catatan Perkembangan", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
LOGGER.error("Got JpaSystemException {} when updateListJadwalDokter", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/update-jadwal-dokter/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> editVO(@Valid @RequestBody JadwalDokterVO vo,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = jadwalDokterService.updateJadwalDokter(vo);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when update Catatan Perkembangan", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when update Catatan Perkembangan", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/save-list-jadwal-dokter/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> addListVO(@Valid @RequestBody List<JadwalDokterVO> vos,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = jadwalDokterService.saveListJadwalDokter(vos);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add jadwal-dokter", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when add jadwal-dokter", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/save-jadwal-supir/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> addJadwalSupirVO(@Valid @RequestBody JadwalDokterVO vo,
|
||||
HttpServletRequest request) {
|
||||
|
||||
try {
|
||||
Map<String, Object> result = jadwalDokterService.saveJadwalSupirAmbulance(vo);
|
||||
if (null != result)
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got exception {} when add jadwal-dokter", e.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got exception {} when add jadwal-dokter", jse.getMessage());
|
||||
addHeaderMessage(Constants.MessageInfo.ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(HttpStatus.CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/find-by-tanggal/{tglJadwal}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> findByTanggal(@PathVariable("tglJadwal") String tanggalJadwal,
|
||||
HttpServletRequest request) {
|
||||
Map<String, Object> result = jadwalDokterService.findByTanggal(DateUtil.toDate(tanggalJadwal));
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_ERROR,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/find-by-ruangan/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/find-by-ruangan/{id}", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> findByNoCm(@PathVariable("id") Integer id, HttpServletRequest request) {
|
||||
Map<String, Object> result = jadwalDokterService.findByRuangan(id);
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
boolean dataFound = (boolean) result.get("dataFound");
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_ERROR,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
mapHeaderMessage.put(LABEL_ERROR, getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
return getJsonResponse(result, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/find-by-ruangan-tanggal/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/find-by-ruangan-tanggal/", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> findByNoCmtglJadwal(
|
||||
@RequestParam(value = "id", required = false) Integer id,
|
||||
@RequestParam(value = "tglJadwal", required = false) String tanggalJadwal, HttpServletRequest request) {
|
||||
|
||||
Map<String, Object> result = jadwalDokterService.findJadwalByTanggalRuangan(DateUtil.toDate(tanggalJadwal), id);
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
Map<String, Object> result = jadwalDokterService.findJadwalByTanggalRuangan(toDate(tanggalJadwal), id);
|
||||
boolean dataFound = (boolean) result.get("dataFound");
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_ERROR,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
mapHeaderMessage.put(LABEL_ERROR, getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
return getJsonResponse(result, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/find-by-antrian-tanggal/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/find-by-antrian-tanggal/", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> findByNoCmtglJadwal(
|
||||
@RequestParam(value = "noRec", required = false) String noRec,
|
||||
@RequestParam(value = "tglJadwal", required = false) String tanggalJadwal, HttpServletRequest request) {
|
||||
|
||||
Map<String, Object> result = jadwalDokterService.findJadwalByTanggalRuangan(DateUtil.toDate(tanggalJadwal),
|
||||
noRec);
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
Map<String, Object> result = jadwalDokterService.findJadwalByTanggalRuangan(toDate(tanggalJadwal), noRec);
|
||||
boolean dataFound = (boolean) result.get("dataFound");
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_ERROR,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
mapHeaderMessage.put(LABEL_ERROR, getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
return getJsonResponse(result, OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* create by iwan date : 21.04.2017
|
||||
*/
|
||||
@RequestMapping(value = "/find-by-periode-ruangan-dokter", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/find-by-periode-ruangan-dokter", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> findJadwalDokterByPeriodRuangan(
|
||||
@RequestParam(value = "iddok", required = false) final int iddok,
|
||||
@RequestParam(value = "id", required = false) final int id,
|
||||
@RequestParam(value = "from", required = false) final String from,
|
||||
@RequestParam(value = "to", required = false) final String to, final HttpServletRequest request) {
|
||||
|
||||
Map<String, Object> result = this.jadwalDokterService.findJadwalDokterByKisaranTglRuangan(iddok, id,
|
||||
DateUtil.toDate(from), DateUtil.toDate(to));
|
||||
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
|
||||
toDate(from), toDate(to));
|
||||
boolean dataFound = (boolean) result.get("dataFound");
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
return getJsonResponse(result, OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* create by iwan date : 21.04.2017
|
||||
*/
|
||||
@RequestMapping(value = "/find-by-periode-ruangan-all-dokter", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> findJadwalDokterByPeriodRuangan(
|
||||
@RequestParam(value = "iddok", required = false) final int iddok,
|
||||
@RequestParam(value = "from", required = false) final String from,
|
||||
@RequestParam(value = "to", required = false) final String to, final HttpServletRequest request) {
|
||||
|
||||
Map<String, Object> result = this.jadwalDokterService.findJadwalDokterByKisaranTglRuanganAll(iddok,
|
||||
DateUtil.toDate(from), DateUtil.toDate(to));
|
||||
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-jadwal-dokter-by-id", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/get-jadwal-dokter-by-id", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getJadwalDokterByIdDokter(
|
||||
@RequestParam(value = "id", required = false) Integer id, HttpServletRequest request) {
|
||||
Map<String, Object> result = jadwalDokterService.getJadwalDokterByIdDokter(id);
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
boolean dataFound = (boolean) result.get("dataFound");
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
mapHeaderMessage.put(LABEL_SUCCESS, getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_ERROR,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
mapHeaderMessage.put(LABEL_ERROR, getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
return getJsonResponse(result, OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-jadwal-dokter-mingguan-by-id/", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getJadwalDokterMingguanByIdDokter(
|
||||
@RequestParam(value = "id", required = false) Integer id, HttpServletRequest request) {
|
||||
Map<String, Object> result = jadwalDokterService.getJadwalDokterMingguanByIdDokter(id);
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_ERROR,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-jadwal-supir-ambulance/{bulan}/{tahun}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/get-jadwal-supir-ambulance/{bulan}/{tahun}", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public List<Map<String, Object>> getAllInformasi(@PathVariable("bulan") Integer bulan,
|
||||
@PathVariable("tahun") Integer tahun, HttpServletRequest request) {
|
||||
List<Map<String, Object>> result = null;
|
||||
result = jadwalDokterService.getJadwalSupirAmbulanceByPeriode(bulan, tahun);
|
||||
return result;
|
||||
return jadwalDokterService.getJadwalSupirAmbulanceByPeriode(bulan, tahun);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-jadwal-supir-ambulance/{id}/{bulan}/{tahun}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@RequestMapping(value = "/get-jadwal-supir-ambulance/{id}/{bulan}/{tahun}", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public List<Map<String, Object>> getJadwalByIdAndPeriode(@PathVariable("id") Integer id,
|
||||
@PathVariable("bulan") Integer bulan, @PathVariable("tahun") Integer tahun, HttpServletRequest request) {
|
||||
List<Map<String, Object>> result = null;
|
||||
result = jadwalDokterService.getJadwalSupirAmbulanByIdAndPeriode(id, bulan, tahun);
|
||||
return result;
|
||||
return jadwalDokterService.getJadwalSupirAmbulanByIdAndPeriode(id, bulan, tahun);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-jadwal-by-date/{tanggal}/{bulan}/{tahun}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getJadwalByDate(@PathVariable("tanggal") Integer tanggal,
|
||||
@PathVariable("bulan") Integer bulan, @PathVariable("tahun") Integer tahun, HttpServletRequest request) {
|
||||
Map<String, Object> result = null;
|
||||
try {
|
||||
result = jadwalDokterService.getJadwalSupirByDate(tanggal, bulan, tahun);
|
||||
Boolean dataFound = new Boolean((boolean) result.get("dataFound"));
|
||||
|
||||
if (dataFound) {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
} else {
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_ERROR,
|
||||
getMessage(MessageResource.LABEL_ERROR, request));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Author : Lukman Hakim
|
||||
*/
|
||||
@RequestMapping(value = "/get-pegawai-by-ruangan/{ruangan}/{tahun}/{bulan}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<Map<String, Object>> getPegawaiByRuangan(@PathVariable("ruangan") Integer ruangan,
|
||||
@PathVariable("tahun") Integer tahun, @PathVariable("bulan") Integer bulan, HttpServletRequest request) {
|
||||
Map<String, Object> result = null;
|
||||
try {
|
||||
result = pegawaiService.findPegawaiByRuanganRev(ruangan, tahun, bulan);
|
||||
|
||||
mapHeaderMessage.put(WebConstants.HttpHeaderInfo.LABEL_SUCCESS,
|
||||
getMessage(MessageResource.LABEL_SUCCESS, request));
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return RestUtil.getJsonResponse(result, HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -46,11 +45,11 @@ public class JadwalDpjpRawatInapController extends LocaleController<JadwalDpjpRa
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class JadwalRencanaPemeriksaanController extends LocaleController<JadwalR
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findByDateSatuanKerjaId", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findByDateSatuanKerjaId", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,11 +67,11 @@ public class JadwalRencanaPemeriksaanController extends LocaleController<JadwalR
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveJadwal", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveJadwal", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -48,17 +47,17 @@ public class JenisBahanController extends LocaleController<JenisBahanVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveJenisBahan", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveJenisBahan", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-jenis-bahan/", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> getAll(HttpServletRequest request) {
|
||||
return this.jenisBahanService.getJenisBahan();
|
||||
return this.jenisBahanService.getJenisBahan();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -52,11 +51,11 @@ public class JenisDietController extends LocaleController<JenisDietVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when generate", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when generate", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,11 +80,11 @@ public class JenisDietController extends LocaleController<JenisDietVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,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 RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when add addJenisLimbahB3", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,11 +66,11 @@ public class JenisLimbahB3MasukController extends LocaleController<JenisLimbahB3
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllAlat", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllAlat", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,11 +84,11 @@ public class JenisLimbahB3MasukController extends LocaleController<JenisLimbahB3
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when getJenisLimbahB3Masuk", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when getJenisLimbahB3Masuk", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -49,11 +48,11 @@ public class JenisLinenController extends LocaleController<JenisLinenVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveJenisLinen", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveJenisLinen", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,11 +66,11 @@ public class JenisLinenController extends LocaleController<JenisLinenVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when findAllJenisLinen", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when findAllJenisLinen", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,11 +82,11 @@ public class JenisLinenController extends LocaleController<JenisLinenVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when deleteJenisLinen", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when deleteJenisLinen", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
return getJsonHttpStatus(NOT_ACCEPTABLE);
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ 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;
|
||||
@ -47,11 +46,11 @@ public class JenisResponController extends LocaleController<JenisResponVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when saveJenisRespon", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when saveJenisRespon", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@ 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;
|
||||
@ -64,17 +63,17 @@ public class JenisWaktuController extends LocaleController<JenisWaktuVO> {
|
||||
} catch (ServiceVOException e) {
|
||||
LOGGER.error("Got ServiceVOException {} when save", e.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, e.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
return getJsonHttpStatus(INTERNAL_SERVER_ERROR, mapHeaderMessage);
|
||||
} catch (JpaSystemException jse) {
|
||||
LOGGER.error("Got JpaSystemException {} when save", jse.getMessage());
|
||||
addHeaderMessage(ERROR_MESSAGE, jse.getMessage());
|
||||
return RestUtil.getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
return getJsonHttpStatus(CONFLICT, mapHeaderMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/get-jenis-waktu/", method = GET, produces = APPLICATION_JSON_VALUE)
|
||||
public Map<String, Object> getJenisWaktu(HttpServletRequest request) {
|
||||
return this.jenisWaktuService.getJenisWaktu();
|
||||
return this.jenisWaktuService.getJenisWaktu();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user