package com.jasamedika.medifirst2000.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.jasamedika.medifirst2000.controller.base.LocaleController;
import com.jasamedika.medifirst2000.service.SchedulerService;
import com.jasamedika.medifirst2000.util.rest.RestUtil;
import com.jasamedika.medifirst2000.vo.AssetVO;

@RestController
@RequestMapping("/scheduler")
public class SchedulerController extends LocaleController<AssetVO>{
	@Autowired
	private SchedulerService schedulerService;

	@RequestMapping(value = "/get-akomodasi-rawat-inap", method = RequestMethod.GET)
	public ResponseEntity<Map<String,Object>> getAkomodasiRawatInap() {
		Map<String,Object> result = new HashMap<String,Object>();
		schedulerService.runAkomodasiRawatInap();
		return RestUtil.getJsonResponse(result, HttpStatus.CREATED, mapHeaderMessage);
	}
}
