Newer
Older
huludao / src / main / java / com / newfiber / api / pc / dao / EventsManage / DivisionOrgDao.java
package com.newfiber.api.pc.dao.EventsManage;

import com.newfiber.api.pc.model.EventsManage.AdministrativeDivision;
import com.newfiber.api.pc.model.EventsManage.DivisionOrg;
import com.newfiber.api.pc.model.EventsManage.DivisionOrgQuery;
import com.newfiber.api.pc.model.UserManager.SysUserInfo;
import com.newfiber.api.pc.model.UserManager.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DivisionOrgDao {
    int countByExample(DivisionOrgQuery example);

    int deleteByExample(DivisionOrgQuery example);


    int insertSelective(DivisionOrg record);

    List<DivisionOrg> selectByExample(DivisionOrgQuery example);

    int updateByExampleSelective(@Param("record") DivisionOrg record, @Param("example") DivisionOrgQuery example);

    //根据用户编号获取用户所属区域
    List<AdministrativeDivision> getDivisionNoByUserNo(@Param("userNo") String userNo);
    //根据区划编号获取用户编号
    List<String> getUserNoByDivisionNo(@Param("divisions") List<String> divisions);

    //根据区域编号以及角色编号获取机构信息
    List<DivisionOrg> getOrgByDivisionNoAndRoleNo(@Param("divisionNo") String divisionNo, @Param("roleNo") String roleNo);

    //根据区域编号查询管理处机构信息----type 1:治水办机构;2:管理处机构
    DivisionOrg selectChiefOrgByDivisionNo(@Param("divisionNo") String divisionNo, @Param("type") Integer type);

    List<UserInfo> getUsersByDivisionNo(@Param("divisionNo") String divisionNo);


    List<String> getChildDivisionNos(@Param("divisionNo")String divisionNo);

    List<String> getChildDivisionNoByUser(@Param("userNo")String userNo);
}