package com.nantian.cloud.jljc.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nantian.cloud.jljc.dto.AuditorDto;
import com.nantian.cloud.jljc.entity.RecordPersonManager;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nantian.sc.cloud.common.core.util.R;
import org.apache.xmlbeans.impl.piccolo.io.FileFormatException;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 备案管理-能源管理人员 服务类
 * @since 2020-09-03
 */
public interface RecordPersonManagerService extends IService<RecordPersonManager> {

    //企业端根据查询条件获取能源管理人员信息
    IPage getCompInfoByCodeAndYear(Page page, String epc, String year);

    //政府端根据查询条件获取能源管理人员信息 增加数据权限
    IPage getGovInfoByCodeAndYear(Page page,String name, String enterpriseStr, String year, String area, String trade);

    //根据id获取能源管理人员信息
    RecordPersonManager getPersonById(Long id);

    //根据id删除能源管理人员信息
    boolean removeByPersonId(RecordPersonManager recordPersonManager);

    //根据id审核能源管理人员信息
    boolean updateByAudit(AuditorDto auditorDto);

    //编码转为字符
    RecordPersonManager getTypeName(RecordPersonManager recordPersonManager);
    List<RecordPersonManager> getTypeNameList(List<RecordPersonManager> recordPersonManager);

    //导出excel
    R excelExport(HttpServletResponse response, String enterpriseStr, String enterpriseCode, String year, String area, String trade) throws Exception ;

    //导入excel
    R excelImport(MultipartFile file) throws FileFormatException;
}
