<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chinaweal.aiccs.aiccs.abnormal.mapper.RegulatoryMapper">
    <resultMap id="BaseResultMap" type="com.chinaweal.aiccs.aiccs.abnormal.entity.vo.RegulatoryVO">
        <result column="orgNUmber" property="orgNUmber" />
        <result column="orgUnitName" property="orgUnitName" />
    </resultMap>

    <select id="queryParentRegulatory" resultMap="BaseResultMap">
        select orgNUmber,orgUnitName from cxaicorg.t_orgunits to2 where
        orgNumber like '15%'
    </select>

    <select id="querySonRegulatory" parameterType="String" resultMap="BaseResultMap">
        select orgNUmber,orgUnitName from cxaicorg.t_orgunits to2 where orgNumber like CONCAT(#{orgNumber},'%')
    </select>

    <select id="queryAllRegulatory" parameterType="String" resultMap="BaseResultMap">
        select orgNUmber,orgUnitName from cxaicorg.t_orgunits to2 where orgNumber like '15%'
    </select>

    <select id="selectOrgUnitNameByOrgNumber" parameterType="String" resultMap="BaseResultMap">
        select orgNUmber,orgUnitName from cxaicorg.t_orgunits to2 where orgNumber=#{orgNumber}
    </select>
</mapper>
