package com.jasamedika.medifirst2000.service.impl;

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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.jpa.JpaSystemException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


	

import com.jasamedika.medifirst2000.exception.ServiceVOException;
import com.jasamedika.medifirst2000.service.PerhitunganUangLemburPegawaiService;
import com.jasamedika.medifirst2000.util.CommonUtil;
import com.jasamedika.medifirst2000.entities.PerhitunganUangLemburPegawai;
import com.jasamedika.medifirst2000.vo.PerhitunganUangLemburPegawaiVO;
import com.jasamedika.medifirst2000.converter.BaseConverterImpl;
import com.jasamedika.medifirst2000.dao.PerhitunganUangLemburPegawaiDao;

/**
 * Implement class for PerhitunganUangLemburPegawaiService
 * 
 * @author Generator
 * @param <T>
 */
@Service("perhitunganUangLemburPegawaiService")
public class PerhitunganUangLemburPegawaiServiceImpl extends BaseVoServiceImpl implements PerhitunganUangLemburPegawaiService 
{	
	@Autowired
	private BaseConverterImpl<PerhitunganUangLemburPegawaiVO,PerhitunganUangLemburPegawai>perhitunganUangLemburPegawaiConverter;
	
	@Autowired
	private PerhitunganUangLemburPegawaiDao perhitunganUangLemburPegawaiDao;


	@Override
	public Map<String, Object> savePerhitunganUangLemburPegawai(PerhitunganUangLemburPegawaiVO vo) {
		Map<String, Object> result = new HashMap<String, Object>();
		PerhitunganUangLemburPegawai model = new PerhitunganUangLemburPegawai();
		model = perhitunganUangLemburPegawaiConverter.transferVOToModel(vo,model);
	
		PerhitunganUangLemburPegawai resultDomain = perhitunganUangLemburPegawaiDao.save(model);
		if (CommonUtil.isNotNullOrEmpty(resultDomain)) {
			result.put("noRec", resultDomain.getNoRec());
		}

		return result;
	}
}