package thyyxxk.webserver.dao.his.reports;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import thyyxxk.webserver.entity.clockin.Clockin;

import java.util.Date;

@Mapper
public interface ClockinDao {
    @Select("select a.*, rtrim(b.name) name, rtrim(c.name) dept " +
            "from clock_in a with(nolock), a_employee_mi b with(nolock), zd_unit_code c with(nolock) " +
            "where a.checkin_time>=#{start} and a.checkin_time<=#{end} " +
            "and a.userid = b.code_rs and isnull(b.del_flag, 0)!=1 " +
            "and c.code=b.dept_code order by checkin_date,userid")
    IPage<Clockin> getAllClockInDataFromDb(IPage<Clockin> iPage, @Param("start") Date start, @Param("end") Date end);
}
