package cn.gyee.tamplate.mapper.auto;

import cn.gyee.tamplate.model.auto.Benchmarkingbetween;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

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

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 谢生杰
 * @since 2021-02-25
 */
public interface BenchmarkingbetweenMapper extends BaseMapper<Benchmarkingbetween> {
    @Select("select dutyname,sum(theoreticalgeneratity) theoreticalgeneratity,sum(generatity) generatity,sum(faultloss) faultloss,sum(mainloss) mainloss,sum(performanceloss) performanceloss,sum(rationingloss) rationingloss,sum(involvesloss) involvesloss from benchmarkingbetween where theday>=#{begin} and theday <=#{end} group by dutyname ")
    public List<Benchmarkingbetween> findByBeginAndEnd(@Param(value = "begin")Date begin, @Param(value = "end")Date end);

}
