package com.jasamedika.medifirst2000.service.impl;

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

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

import com.jasamedika.medifirst2000.dao.custom.StrukPelayananDetailDaoCustom;
import com.jasamedika.medifirst2000.service.ReportLogistikService;


@Service("reportLogistikService")
public class ReportLogistikServiceImpl extends BaseVoServiceImpl implements ReportLogistikService {
	
	@Autowired
	private StrukPelayananDetailDaoCustom strukPelayananDetailDaoCustom;

	@Override
	public Map<String, Object> reportPenerimaanBarang(String noRec) {
		Map<String, Object> data = new HashMap<String, Object>();
		data.put("header", strukPelayananDetailDaoCustom.findStrukKirimHeaderByNoRecReport(noRec));
		data.put("detail", strukPelayananDetailDaoCustom.findStrukKirimDetailByNoRecReport(noRec));
		data.put("total", strukPelayananDetailDaoCustom.totalPenerimaanSupplier(noRec));
		data.put("yangMenerima", "-");
		data.put("yangMennyerahkan", "-");
		data.put("nipYangMennyerahkan", "-");
		data.put("nipYangMenerima", "-");
		data.put("mengetahui", "-");
		data.put("nipMengetahui", "-");
		return data;
	}

	@Override
	public Map<String, Object> reportMutasiBarang(String noRec) {
		Map<String, Object> data = new HashMap<String, Object>();
		data.put("header", strukPelayananDetailDaoCustom.reportMutasiBarangHeader(noRec));
		data.put("detail", strukPelayananDetailDaoCustom.reportMutasiBarangDetail(noRec));
		data.put("total", strukPelayananDetailDaoCustom.totalMutasiBarang(noRec));
		data.put("yangMenerima", "-");
		data.put("yangMennyerahkan", "-");
		data.put("nipYangMennyerahkan", "-");
		data.put("nipYangMenerima", "-");
		data.put("mengetahui", "-");
		data.put("nipMengetahui", "-");
		return data;
	}

	@Override
	public Map<String, Object> cetakQrCode(String noRec,Boolean isPersediaan) {
		Map<String, Object> data = new HashMap<String, Object>();
		if(isPersediaan){
			data.put("header", strukPelayananDetailDaoCustom.cetakQrCodePersediaan(noRec));
		}else{
			data.put("header", strukPelayananDetailDaoCustom.cetakQrCodeAset(noRec));
		}
		
		return data;
	}


	
}
