
package org.sky.scientific.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import jakarta.servlet.http.HttpServletResponse;
import org.sky.core.mp.base.BaseService;
import org.sky.scientific.pojo.dto.AttendanceDto;
import org.sky.scientific.pojo.entity.AttendanceEntity;
import org.sky.scientific.pojo.vo.AttendanceVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 考勤管理 服务类
 *
 * @author Kd
 * @since 2025-06-29
 */
public interface IAttendanceService extends BaseService<AttendanceEntity> {

	/**
	 * 研发人员考勤表-分页查询
	 * @param attendance
	 * @param page
	 * @return
	 */
	IPage<AttendanceVO> selectAttendancePage(AttendanceDto attendance, IPage<AttendanceVO> page);

	/**
	 * 研发人员考勤表-新增或修改
	 * @param attendance
	 * @return
	 */
	boolean submit(AttendanceEntity attendance);

	/**
	 * 研发人员考勤表-导入
	 * @param file
	 * @param yearAndMonth 年月
	 */
	void importAttendance(MultipartFile file, String yearAndMonth);

	/**
	 * 研发人员考勤表-导出
	 * @param response
	 * @param dto
	 */
	void exportAttendance(HttpServletResponse response, AttendanceDto dto);

	/**
	 * 研发人员考勤表-批量新增或修改
	 * @param attendance
	 * @return
	 */
	boolean batchSubmit(AttendanceDto attendance);

	/**
	 * 研发人员考勤表-清除考勤数据
	 * @param attendanceList
	 * @return
	 */
	boolean clearAttendance(List<AttendanceDto> attendanceList);

}
