package com.nantian.cloud.jljc.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nantian.cloud.jljc.entity.TSupervisionPerson;
import com.nantian.cloud.jljc.vo.RegionPersonTreeVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface TSupervisionPersonService extends IService<TSupervisionPerson> {

    IPage<TSupervisionPerson> selectall(Page page, TSupervisionPerson tSupervisionPerson);

    boolean updateall(TSupervisionPerson tSupervisionPerson);

    boolean deleteall(TSupervisionPerson tSupervisionPerson);

    boolean insertall(TSupervisionPerson tSupervisionPerson);

    //根据本级机构获取人员
    List<TSupervisionPerson> getJCPerson(Integer deptId);

    //根据本级机构获取人员
    List<TSupervisionPerson> getByOrg(String[] organizationIds);

    //获取区域、监察人员树形结构
    List<RegionPersonTreeVo> regionPersonTree(TSupervisionPerson tSupervisionPerson);

    //不覆盖导入
    boolean importbyexcel(MultipartFile file, TSupervisionPersonService tSupervisionPersonService) throws IOException;

    //监察人员模板导出
    void outpute(HttpServletRequest request, HttpServletResponse response) throws IOException;

    //监察 重复名称
    List<String> checke_allname(MultipartFile file, TSupervisionPersonService tSupervisionPersonService) throws IOException;

    //覆盖导入
    boolean importbyexcelf(MultipartFile file, TSupervisionPersonService tSupervisionPersonService) throws IOException;

    //根据监察机构所属区域获取监察人员信息
    List<TSupervisionPerson> getListByOrgRegion(String organizationid);
}
