package com.jasamedika.medifirst2000.service.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jasamedika.medifirst2000.dao.KategoriPegawaiDao;
import com.jasamedika.medifirst2000.service.KategoriPegawaiService;

/**
 * Implement class for AbsensiPegawaiService
 * 
 * @author Generator
 * @param <T>
 */
@Service("kategoriPegawaiService")
public class KategoriPegawaiServiceImpl extends BaseVoServiceImpl implements KategoriPegawaiService {

	@Autowired
	private KategoriPegawaiDao kategoriPegawaiDao;
	
	List<Integer> getListStatus() {
		String meninggalPensiunPindah = GetSettingDataFixed("outsourcingListStatusPegawai");
		String arr[] = meninggalPensiunPindah.split(",");
		List<Integer> listKedudukan = new ArrayList<Integer>();
		for (String ar : arr) {
			listKedudukan.add(Integer.valueOf(ar));
		}
		return listKedudukan;
	}
	
	@Override
	public Map<String, Object> findAlls() {
		Map<String, Object> result = new HashMap<>();
		result.put("data", kategoriPegawaiDao.findAllWithOut(getListStatus()));	 
		return result;
	}
	 
}