package com.jasamedika.medifirst2000.dao;

import java.util.List;

import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.jasamedika.medifirst2000.dto.DaftarMappingCycleDto;
import com.jasamedika.medifirst2000.entities.MappingCycleLaundry;

@Repository("DaftarMappingCycleDao")
public interface DaftarMappingCycleDao extends PagingAndSortingRepository<MappingCycleLaundry, Integer> {

//	@Query("select NEW com.jasamedika.medifirst2000.dto.DaftarMappingCycleDto(m.noMesin, mc.kapasitas, ss.satuanStandar as satuanKapasitas, sst.satuanStandar as satuanBahan, jl.jenisLinen, pc.prosesCuci, bp.namaBahanProduk, mcl.jumlah, m.id) from MappingCycle mc, MappingCycleLaundry mcl, Mesin m, SatuanStandar ss, SatuanStandar sst,JenisLinen jl, ProsesCuci pc, Produk p, BahanProduk bp where mc.noRec=mcl.mappingCycleId and m.id=mc.mesinId and ss.id=mc.unitId and sst.id=mcl.satuanBahanId and jl.id=mc.jenisLinenId and pc.id=mc.prosesCuciId and p.id=mcl.namaBahanId and bp.id=p.bahanProdukId order by bp.id")
	List<DaftarMappingCycleDto> findMappingCycleLaundry();

}
