package com.tofly.project.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tofly.project.entity.ProjectRegistration;
import com.tofly.project.entity.dto.ProjectRegistrationDto;

import com.tofly.project.entity.dto.ProjectSearchDto;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;
import java.util.List;

/**
 * 工程登记(ProjectRegistration)表服务接口
 *
 * @author HaiQiu
 * @since 2022-11-14 11:56:46
 */
public interface ProjectRegistrationService extends IService<ProjectRegistration> {

    /**
     * 根据ID查询
     *
     * @param id id
     * @return 数据
     */
    ProjectRegistration get(Serializable id);

    /**
     * 新增
     *
     * @param projectRegistrationDto 实体
     * @param files
     */
    void insert(ProjectRegistrationDto projectRegistrationDto, List<MultipartFile> files);

    /**
     * 修改
     *
     * @param projectRegistrationDto 实体
     * @param files
     */
    void edit(ProjectRegistrationDto projectRegistrationDto, List<MultipartFile> files);

    /**
     * 批量删除
     *
     * @param idList 数据ID集合
     */
    void delete(List<Long> idList);

    /**
     * 生成模板下载
     */
    void template();

    /**
     * 数据导入
     *
     * @param file 文件
     */
    void importData(MultipartFile file);

    /**
     * 分页查询
     *
     * @param page                分页
     * @param projectRegistration 查询wrapper
     * @param projectSearchDto
     * @return 数据集合
     */
    Page<ProjectRegistration> pageList(Page page, ProjectRegistration projectRegistration, ProjectSearchDto projectSearchDto);

    /**
     * 数据导出
     *
     * @param page                分页
     * @param projectRegistration 查询模型
     * @param isAll               是否导出全部数据，true是，false否
     */
    void export(Page page, ProjectRegistration projectRegistration, Boolean isAll);

    /**
     * 查询所有数据
     *
     * @param projectRegistration 查询条件
     * @return 查询所有数据
     */
    List<ProjectRegistration> allList(ProjectRegistration projectRegistration);
}

