package com.kcim.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kcim.common.util.PageUtils;
import com.kcim.dao.model.CostIncomeFile;
import com.kcim.vo.IncomeErrorMessage;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 文件上传记录
 *
 * @author KCYG
 * @email KCYG@xinxicom
 * @date 2021-08-10 14:42:20
 */
public interface CostIncomeFileService extends IService<CostIncomeFile> {

    /**
     * 保存文件上传记录
     *
     * @param list                   文件数据
     * @param file                   上传文件
     * @param hospId                 医院Id
     * @param incomeErrorMessageList 错误信息
     * @param uploadFile             文件路径
     * @return
     */
    CostIncomeFile saveCostIncomeFile(List<List<Object>> list, MultipartFile file, Long hospId, List<IncomeErrorMessage> incomeErrorMessageList, String uploadFile, Integer fileType, Integer year, Integer month);

    CostIncomeFile saveFile(Integer fileSize, MultipartFile file, Long hospId, List<IncomeErrorMessage> incomeErrorMessageList, String uploadFile, Integer fileType, Integer year, Integer month);
    /**
     * 分页查询查询记录数据
     *
     * @param current
     * @param pageSize
     * @param fileName
     * @param dateTime
     * @param hospId
     * @param filter
     * @return
     */
    PageUtils queryList(Integer current, Integer pageSize, String fileName, String dateTime, Long hospId, String filter);

    /**
     * 撤销导入
     *
     * @param id
     * @param hospId
     * @param computeDate
     */
    void deleteImport(Long id, Long hospId, String computeDate);

    /**
     * 错误详情
     * @param id
     * @param hospId
     * @return
     */
    List<IncomeErrorMessage> getErrorList(Long id, Long hospId);

    /**
     *  文件记录删除
     * @param idList
     */
    void deleteByIds(@Param("idList") List<Long> idList);

    void reducingImport(Long id, Long hospId, String computeDate);

    void removeByComputeAndFileType(String computeDate,Integer fileType);
}

