package com.gz.service.borrow;

import com.github.pagehelper.PageInfo;
import com.gz.dto.archive.ArchiveDTO;
import com.gz.dto.borrow.ArchiveBorrowDTO;
import com.gz.rvo.archive.ArchiveRVO;
import com.gz.rvo.borrow.ArchiveBorrowHistoryRVO;
import com.gz.rvo.borrow.ArchiveBorrowListRVO;
import com.gz.rvo.borrow.AuditInfoRVO;
import com.gz.vo.PageVO;
import com.gz.vo.archive.InsertArchiveVO;
import com.gz.vo.archive.SearchArchiveVO;
import com.gz.vo.borrow.BorrowVO;
import com.gz.vo.borrow.SearchBorrowVO;

import java.util.List;

/**
 * @author LiuchangLan
 * @date 2021/2/27 14:51
 */
public interface ArchiveBorrowService {

    /**
     * @param dto
     * @description 增
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    Integer insert(ArchiveBorrowDTO dto) throws Exception;

    /**
     * @description 根据主键查询
     * @author LiuChangLan
     * @since 2020/9/4 16:36
     */
    ArchiveBorrowDTO selectByPrimaryKey(Integer id);

    /**
     * @description 预约借阅
     * @author LiuChangLan
     * @since 2021/2/27 14:57
     */
    Integer borrow(BorrowVO dto) throws Exception;


    /**
     * @description 查询当前用户的借阅记录
     * @author LiuChangLan
     * @since 2021/2/27 16:32
     */
    PageInfo<ArchiveBorrowHistoryRVO> selectCurrAdminArchiveBorrowHistory(SearchBorrowVO vo);

    /**
     * @description 查询所有提交的审核列表
     * @author LiuChangLan
     * @since 2021/2/27 17:04
     */
    PageInfo<ArchiveBorrowHistoryRVO> selectArchiveBorrowHistory(SearchBorrowVO vo);

    /**
     * @description 审核
     * @author LiuChangLan
     * @since 2021/2/27 17:16
     */
    void audit(ArchiveBorrowDTO dto);

    /**
     * @description 删
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    Integer delete(Integer id);

    /**
     * @description 查询借阅申请信息
     * @author LiuChangLan
     * @since 2021/2/28 15:31
     */
    AuditInfoRVO selectBorrowInfo(Integer id);

    /**
     * @description 归还
     * @author LiuChangLan
     * @since 2021/2/28 20:07
     */
    void returnBorrow(Integer id);

}
