package com.jasamedika.medifirst2000.dao.custom.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.jasamedika.medifirst2000.dao.custom.PlanningDiklatHumasMarketDaoCustom;
import com.jasamedika.medifirst2000.dao.custom.base.impl.CoreDaoImpl;
import com.jasamedika.medifirst2000.entities.Dokumen;
import com.jasamedika.medifirst2000.entities.PlanningDiklatHumasMarket;
import com.jasamedika.medifirst2000.util.CommonUtil;

@Repository
public class PlanningDiklatHumasMarketDaoCustomImpl extends CoreDaoImpl<PlanningDiklatHumasMarket> implements PlanningDiklatHumasMarketDaoCustom {

	public PlanningDiklatHumasMarketDaoCustomImpl() {
		super(Dokumen.class);
	}

	@Override
	public List<Map<String, Object>> getDaftarRegistrasiPesertaDiseminasi(String noPlanning, String startDate,
			String endDate) {
		StringBuffer buffer = new StringBuffer();
		buffer.append(
				"select count(dm.noRec) from DokumenMasuk dm left join dm.kddokumen dok left join dok.surat surat where dok.surat is not null ");

		if (CommonUtil.isNotNullOrEmpty(startDate) && CommonUtil.isNotNullOrEmpty(endDate)) {
			buffer.append("and date(dok.tglDokumen) between date(:dateStart) and date(:dateEnd) ");
		}
		return null;
	}

	@Override
	public List<Map<String, Object>> getDaftarPelakasanaanDiseminasi(String noPlanning, String startDate,
			String endDate) {
		return null;
	}

	 
}
