package com.jasamedika.medifirst2000.service;

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

import com.jasamedika.medifirst2000.dto.MappingJenisLinenToProdukDto;
import com.jasamedika.medifirst2000.dto.PelipatanDto;
import com.jasamedika.medifirst2000.dto.PenerimaanLinenDto;
import com.jasamedika.medifirst2000.dto.PenerimaanLinenExternalDto;
import com.jasamedika.medifirst2000.dto.PengeringanDto;
import com.jasamedika.medifirst2000.dto.PengeringanExternalDto;
import com.jasamedika.medifirst2000.dto.ProsesCuciLinenDto;
import com.jasamedika.medifirst2000.dto.ProsesReturDto;
import com.jasamedika.medifirst2000.entities.PenerimaanLinen;

public interface LaundryService extends BaseAnggaranService{
	
	List<Map<String,Object>> getAllRuangan();
	List<Map<String,Object>> getAllSatuan();
	Map<String, Object> getGenerateNoStruk();
	List<Map<String, Object>> savePenerimaanLinen(List<PenerimaanLinenDto> dtos);
	List<Map<String,Object>> getAllPenerimaanLinen(Date startPeriode,Date endPeriode);
	List<Map<String, Object>> prosesCuci(ProsesCuciLinenDto dto);
	Map<String, Object> sendPenerimaanToPencucian(List<PenerimaanLinenDto> dtos);
	List<Map<String, Object>> getKapasitasMesin(Integer mesinId);
	List<Map<String, Object>> getAllBahanFromMesinAndProses(Integer mesinId,Integer prosesCuciId);
	List<ProsesCuciLinenDto> getAllPencucianLinen(Date startPeriode, Date endPeriode);
	List<Map<String, Object>> prosesBilas(ProsesCuciLinenDto dto);
	Map<String, Object> sendPencucianToPembilasan(ProsesCuciLinenDto dto);
	List<ProsesCuciLinenDto> getAllPembilasan(Date startPeriode, Date endPeriode);
	List<Map<String, Object>> getProsesBilas(String prosesCuci);
	List<Map<String, Object>> prosesPengeringan(PengeringanDto dto);
	List<PengeringanDto> getAllPengeringan(Date startPeriode, Date endPeriode);
	Map<String, Object> sendPengeringanToPelipatanExternal(PengeringanExternalDto dto);
	List<Map<String, Object>> prosesPelipatan(PelipatanDto dto);
	List<PengeringanDto> getAllPelipatan(Date startPeriode, Date endPeriode);
	List<Map<String, Object>> getProdukPelipatan();
	List<Map<String, Object>> cekStokRuangan(ProsesCuciLinenDto dto);
	Map<String, Object> cekProdukLipat(PelipatanDto dto);
	List<Map<String, Object>> getProdukPenerimaanLinenExternal();
	List<Map<String, Object>> getDetailPenerimaanLinenExternal(String noRecStrukPelayanan);
	List<Map<String, Object>> savePenerimaanLinenExternal(PenerimaanLinenExternalDto dtos);
	List<Map<String,Object>> getAllSatuanPotong();
	List<Map<String, Object>> prosesCuci2(ProsesCuciLinenDto dto);
	ProsesCuciLinenDto sendPembilasanToPengeringan(ProsesCuciLinenDto dto);
	Map<String, Object> getStrukOrderExternal(String noRecStrukPelayanan);
	List<PengeringanDto> getAllPengambilanLinenEksternal(String namaPelanggan,Date startPeriode, Date endPeriode);
	Map<String, Object> prosesPengambilan(ProsesCuciLinenDto dto);
	ProsesCuciLinenDto sendPengeringanToPelipatan(ProsesCuciLinenDto dto);
	Map<String, Object> prosesReturLaundry(ProsesReturDto dto);
	PengeringanDto sendPengambilanLinenToReturLinen(PengeringanDto dto);
	List<ProsesReturDto> getAllRetur(Date startPeriode, Date endPeriode);
	List<Map<String, Object>> prosesPelipatan2(PelipatanDto dto);
	Map<String, Object> cekProdukLipat2(PelipatanDto dto);
	List<ProsesCuciLinenDto> getAllPembilasan2(Date startPeriode, Date endPeriode);
	
	//permintaan laundry external
	Map<String, Object> savePermintaanLaundryExternal(PenerimaanLinenExternalDto dto);
	Map<String, Object> savePenerimaanLaundryExternal(PenerimaanLinenExternalDto dto);
	
	//penerimaan linen dari order
	Map<String, Object> savePenerimaanLaundryInternal(PenerimaanLinenExternalDto dto);
	Map<String, Object> getOrderLaundrySebelumDiTerima(String startDate, String endDate);
	Map<String, Object> getOrderLaundrySebelumDiTerimaByRuangan(String startDate, String endDate, Integer idRuanganAsal);
	Map<String, Object> getOrderLaundrySebelumDiTerimaDetail(String noRec);
	Map<String, Object> getOrderLaundryDiterima();
	Map<String, Object> getOrderLaundryDiterimaDetail(String noRec);
	Map<String, Object> getMonitoringPermintaanLaundryDariRuangan(String startDate, String endDate);
	Map<String, Object> getMonitoringPermintaanLaundryDariRuanganDetail(String noRec);
	
	Map<String, Object> getPenerimaanLinenInternal(String startDate, String endDate);
	Map<String, Object> getPenerimaanLinenExternal(String startDate, String endDate);
	
	//method saveProsesLaundry internal
	Map<String, Object> saveProsesPencucianInternal(ProsesCuciLinenDto dto);
	Map<String, Object> getProsesCucianInternal(String startDate, String endDate);
	Map<String, Object> getProsesCuciianInternalByNoRec(String noRec);
	
	//external
	Map<String, Object> saveProsesPencucianExternal(ProsesCuciLinenDto dto);
	Map<String, Object> getProsesCucianExternal(String starDate, String endDate);
	Map<String, Object> getProsesCucianExternalByNoRec(String noRec);
	
	//proses pengeringan internal
	Map<String, Object> savePengeringanInternal(PengeringanDto dto);
	Map<String, Object> getProsesPengeringanInternal(String startDate, String endDate);
	Map<String, Object> getProsesPengeringanInternalByNoRec(String noRec);
	
	//proses pengeringan external
	Map<String, Object> savePengeringanExternal(PengeringanDto dto);
	Map<String, Object> getProsesPengeringanExternal(String startDate, String endDate);
	Map<String, Object> getProsesPengeringanExternalByNoRec(String noRec);
	
	//proses pelipatan
	Map<String, Object> savePelipatanInternal(PelipatanDto dto);
	Map<String, Object> getProsesPelipatan(String startDate, String endDate);
	Map<String, Object> getProsesPelipatanByNoRec(String noRec);
	
	//proses pelipatan external
	Map<String, Object> savePelipatanExternal(PelipatanDto dto);
	Map<String, Object> getProsesPelipatanExternal(String startDate, String endDate);
	Map<String, Object> getProsesPelipatanExternalByNoRec(String noRec);
	
	//rollpress
	Map<String, Object> saveRollPressInternal(PelipatanDto dto);
	Map<String, Object> getProsesRollPress(String startDate, String endDate);
	Map<String, Object> getProsesRollPressByNoRec(String  noRec);
	
	//rollpress external
	Map<String, Object> saveRollPressExternal(PelipatanDto dto);
	Map<String, Object> getProsesRollPressExternal(String startDate, String endDate);
	Map<String, Object> getProsesRollPressExternalByNoRec(String  noRec);
	
	//get bahan laundry
	Map<String, Object> getBahanLaundry();
	Map<String, Object> getStockLaundryLinenBersih();
	Map<String, Object> getStockBahanLaundry();
	
	//pendistribusian linen ke ruangan
	Map<String, Object> savePenditribusianLinenInternal(PenerimaanLinenExternalDto dto);
	Map<String, Object> getDistribusiLinen(String startDate, String endDate);
	Map<String, Object> getDistribusiLinenByRuangan(String startDate, String endDate);
	Map<String, Object> updateTanggalTerimaLinenBersihByRuangan(PenerimaanLinenDto dto);
	Map<String, Object> getDistribusiLinenBersihDetailByNoRec(String noRec);
	
	//distribusi linen external
	Map<String, Object> savePenditribusianLinenExternal(PenerimaanLinenExternalDto dto);
	Map<String, Object> getDistribusiLinenExternal(String startDate, String endDate);
	Map<String, Object> getDistribusiLinenExternalByNoRec(String noRec);
	
	//pengambilan linen kotor dari ruangan
	Map<String, Object> savePengambilanLaundryInternal(PenerimaanLinenExternalDto dto);
	Map<String, Object> getPengambilanLinenKotor(String startDate, String endDate);
	Map<String, Object> getPengambilanLinenKotorByNoRec(String  noRec);
	
	//update untuk pencucian berdasarkan jenislinen (infeksius & noninfeksius)
	Map<String, Object> getJenisLinen();
	Map<String, Object> getMesinByJenisLinen(Integer idJenis);
	Map<String, Object> getMappingProdukByJenisLinen(Integer idJenis, Integer idMesin);
	
	//Reporting Rekap Layanan Laundry
	Map<String, Object> findGrandTarifQtyLaundry(String startDate, String endDate);
	List<Map<String, Object>> findRuanganTarifQtyLaundry(String startDate, String endDate);
	List<Map<String, Object>> findDetailRuanganTarifQtyLaundry(String startDate, String endDate);
	
	//Laporan Pengiriman Linen Laundry Per Layanan
	Map<String, Object> findRawLapLinenPerLayanan(String startDate, String endDate);
	
	//Reporting Rekap Cuci Linen
	Map<String, Object> findGrandTarifQtyCuciLinen(String startDate, String endDate);
	List<Map<String, Object>> findDepartemenTarifQtyCuciLinen(String startDate, String endDate);
	List<Map<String, Object>> findRuanganTarifQtyCuciLinen(String startDate, String endDate);
	
	//hitung angka to terbilang
	String angkaToTerbilang(Double angka);
	
}
