package com.nantian.cloud.jljc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nantian.cloud.jljc.entity.TSupervisionPerson;
import com.nantian.cloud.jljc.vo.RegionPersonTreeVo;
import com.nantian.sc.cloud.common.data.datascope.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TSupervisionPersonMapper extends BaseMapper<TSupervisionPerson> {

    IPage<TSupervisionPerson> selectall(@Param("page")Page page, @Param("param") TSupervisionPerson tSupervisionPerson, DataScope dataScope);

    int updateall(TSupervisionPerson tSupervisionPerson);

    int deleteall(TSupervisionPerson tSupervisionPerson);

    int insertall(TSupervisionPerson tSupervisionPerson);

    List<TSupervisionPerson> getJCPerson(@Param("deptId") Integer deptId);

    List<TSupervisionPerson> getByOrg(@Param("organizationIds")String[] organizationIds);

    //获取区域、监察人员树形结构
    List<RegionPersonTreeVo> regionTree();
    List<RegionPersonTreeVo> personTree(@Param("param") TSupervisionPerson tSupervisionPerson);
    String getRegionStr(@Param("param") TSupervisionPerson tSupervisionPerson);

    boolean insertbyexcel(List<TSupervisionPerson> list);

    List<String> selectallname();

    int  updatebyexcel(List<TSupervisionPerson> uplist);

    String getOrgRegion(@Param("organizationid") String organizationid);

    List<TSupervisionPerson> selectListByOrgRegion(@Param("areaCode") String areaCode);
}
