<?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.yifu.cloud.plus.v1.ekp.mapper.EkpShenhepeizhiMapper">


	<!--查询事业部信息：目前是生产环境的表名-->
	<select id="getDivisionLoginNameList" resultType="string">
		select du.fd_login_name as loginName from ekp_shenhepeizhi_table a
        LEFT JOIN ekporg_192dc6529f546b9f2008 d on d.fd_parent_id = a.fd_id
        LEFT JOIN sys_org_person du on du.fd_id = d.sys_org_person_id
        where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
	</select>

	<!--查询副总信息-->
	<select id="getFuLoginNameList" resultType="string">
		select fu.fd_login_name as loginName from ekp_shenhepeizhi_table a
		LEFT JOIN ekporg_192dc6529f5576856a70 f on f.fd_parent_id = a.fd_id
		LEFT JOIN sys_org_person fu on fu.fd_id = f.sys_org_person_id
		where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
	</select>

	<!--查询事业部条线负责人-->
	<select id="getLineLoginNameList" resultType="string">
		select lu.fd_login_name as loginName from ekp_shenhepeizhi_table a
		LEFT JOIN ekporg_192dc6529f5b1d699c39 l on l.fd_parent_id = a.fd_id
		LEFT JOIN sys_org_person lu on lu.fd_id = l.sys_org_person_id
		where a.fd_tiaoxian = #{line} and a.fd_shiyebu = #{division}
	</select>

</mapper>
