package com.gz.service.archive;

import com.github.pagehelper.PageInfo;
import com.gz.dto.archive.ArchiveDTO;
import com.gz.rvo.archive.ArchiveRVO;
import com.gz.rvo.borrow.ArchiveBorrowListRVO;
import com.gz.vo.PageVO;
import com.gz.vo.archive.GenerateDhVO;
import com.gz.vo.archive.InsertArchiveVO;
import com.gz.vo.archive.SearchArchiveVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface ArchiveService {
    /**
     * @description 增
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     * @param vo
     */
    Integer insert(InsertArchiveVO vo) throws Exception;

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

    /**
     * @description 改
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    Integer update(ArchiveDTO dto);

    /**
     * @description 查
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    List<ArchiveDTO> selectAll();

    /**
     * @description 分页查询
     * @author LiuChangLan
     * @since 2020/9/4 14:46
     */
    PageInfo<ArchiveRVO> selectByPage(SearchArchiveVO vo);

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

    /**
     * @description 查询借阅列表
     * @author LiuChangLan
     * @since 2021/2/27 15:45
     * @return
     */
    PageInfo<ArchiveBorrowListRVO> selectBorrowList(PageVO vo);

    /**
     * @description 获取当前门类的最大件号
     * @author LiuChangLan
     * @since 2021/3/1 15:28
     */
    Integer getJH(String mlCode);

    /**
     * @description 生成档号
     * @author LiuChangLan
     * @since 2021/3/1 15:55
     */
    String generateDh(GenerateDhVO generateDhVO);

    /**
     * @description 导入Excel
     * @author LiuChangLan
     * @since 2021/3/4 14:44
     */
    List<ArchiveDTO> importExcel(MultipartFile file) throws IOException;

    /**
     * @description 根据主键查询
     * @author LiuChangLan
     * @since 2021/3/13 11:16
     */
    ArchiveRVO selectByPrimaryKeyText(Integer id);

    /**
     * @description 确定导入
     * @author LiuChangLan
     * @since 2021/3/15 13:59
     */
    Integer confirmImport();
}
