/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.security.trans.applyAndReport.service;

import org.security.trans.applyAndReport.dto.DutyRecordsDTO;
import org.security.trans.applyAndReport.entity.DutyRecords;
import org.security.trans.applyAndReport.vo.DutyRecordsVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.security.trans.common.service.FlowableService;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 值班记录表 服务类
 *
 * @author BladeX
 * @since 2022-07-13
 */
public interface IDutyRecordsService extends FlowableService<DutyRecords> {

	/**
	 * 自定义分页
	 *
	 * @param query
	 * @param dutyRecordsDTO
	 * @return
	 */
	IPage<DutyRecordsVO> selectDutyRecordsPage(DutyRecordsDTO dutyRecordsDTO, Query query);

	/**
	 * 新增或修改暂存
	 * @param dutyRecords
	 * @return
	 */
	boolean saveOrUpdateDutyRecords(DutyRecordsDTO dutyRecords);

	/**
	 * 查询详情
	 * @param id
	 * @return
	 */
	DutyRecordsVO getDetailById(String id);

	/**
	 * 提交
	 * @param dutyRecords
	 * @return
	 */
	boolean handin(DutyRecordsDTO dutyRecords);

	/**
	 * 导出值班记录
	 *
	 * @param httpServletResponse
	 * @param idList 导出目标数据
	 */
	void exportData(HttpServletResponse httpServletResponse, List<String> idList);
}
