/*
 * Author: Zev
 * 生成Service
 */
package com.tofly.gpsboot.service.build;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.pojo.build.dto.BuildDto;
import com.tofly.pojo.build.vo.BuildVo;
import com.tofly.pojo.build.vo.detail.BuildDetailVo;
import com.tofly.gpsboot.exception.BusinessException;
import com.tofly.gpsboot.service.IBaseService;
import com.tofly.pojo.build.Build;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


/**
 * 工地监护上报信息表
 *
 * @author admin
 * @date Thu Mar 18 00:00:00 CST 2021
 */
public interface BuildService extends IBaseService<Build, BuildVo>  {

    /**
     * 新增基本和详情信息
     * @param fileList
     * @param parDto
     */
    void savaBuildInfo(List<MultipartFile> fileList, BuildDto parDto);

    /**
     * 根据工地监护上报id获取工地监护所有明细
     * @param id
     * @return
     */
    BuildDetailVo getBuildInfoDetail(Long id,String flag);

    /**
     * 自定义分页查询
     * @param page
     * @param parDto
     * @return
     */
    Page<BuildVo> getBuildPage(Page page,BuildDto parDto);

    /**
     * 修改基本和详情信息
     * @param fileList
     * @param parDto
     * @throws BusinessException 抛出更新当前数据不存在
     */
    void updateBuildInfo(List<MultipartFile> fileList, BuildDto parDto) throws BusinessException;

    /**
     * 单个删除或批量删除信息
     * @param idList
     * @throws BusinessException 抛出删除对象不存在
     */
    void deleteBuildInfo(List<Long> idList)throws BusinessException;


}
