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.TSupervisionOrganization;
import com.nantian.cloud.jljc.vo.RegionOrganizationTreeVo;
import com.nantian.cloud.jljc.vo.TreeVo;
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 TSupervisionOrganizationMapper extends BaseMapper<TSupervisionOrganization> {


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

    int updateall(TSupervisionOrganization tSupervisionOrganization);

    int deleteall(TSupervisionOrganization tSupervisionOrganization);

    int insertall(TSupervisionOrganization tSupervisionOrganization);

    List<TSupervisionOrganization> getList(@Param("param") TSupervisionOrganization tSupervisionOrganization, DataScope dataScope);

    //获取监察机构树形结构
    List<TreeVo> getTree(@Param("deptId") String deptId,@Param("regionCode") String regionCode);

    //获取区域、监察机构树形结构
    List<RegionOrganizationTreeVo> regionTree();
    List<RegionOrganizationTreeVo> organizationTree( @Param("param")  TSupervisionOrganization tSupervisionOrganization);
    String getRegionStr(@Param("param") TSupervisionOrganization tSupervisionOrganization);
}
