|
|
|
<?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.epmet.plugin.power.modules.axis.dao.PowerAxisStructDao">
|
|
|
|
|
|
|
|
<resultMap type="com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity" id="powerAxisStructMap">
|
|
|
|
<result property="id" column="ID"/>
|
|
|
|
<result property="customerId" column="CUSTOMER_ID"/>
|
|
|
|
<result property="name" column="NAME"/>
|
|
|
|
<result property="agencyId" column="AGENCY_ID"/>
|
|
|
|
<result property="agencyName" column="AGENCY_NAME"/>
|
|
|
|
<result property="agencyType" column="AGENCY_TYPE"/>
|
|
|
|
<result property="pid" column="PID"/>
|
|
|
|
<result property="pids" column="PIDS"/>
|
|
|
|
<result property="categoryCode" column="CATEGORY_CODE"/>
|
|
|
|
<result property="sort" column="SORT"/>
|
|
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
|
|
<result property="revision" column="REVISION"/>
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="selectAllForTree"
|
|
|
|
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisStructLeaderResultDTO">
|
|
|
|
select
|
|
|
|
s.ID,
|
|
|
|
s.NAME,
|
|
|
|
s.PID,
|
|
|
|
s.PIDS,
|
|
|
|
s.CATEGORY_CODE,
|
|
|
|
s.SORT,
|
|
|
|
s.CREATED_TIME,
|
|
|
|
sl.LEADER_ID,
|
|
|
|
l.NAME as LEADER_NAME,
|
|
|
|
l.MOBILE as LEADER_MOBILE
|
|
|
|
from pli_power_axis_struct s
|
|
|
|
left join pli_power_axis_struct_leader sl on s.ID = sl.STRUCT_REFERENCE_ID
|
|
|
|
left join pli_power_axis_leader l on l.ID = sl.LEADER_ID
|
|
|
|
where s.DEL_FLAG = '0'
|
|
|
|
<if test="agencyId != null and agencyId != ''">
|
|
|
|
and s.AGENCY_ID = #{agencyId}
|
|
|
|
</if>
|
|
|
|
<if test="axisName != null and axisName != ''">
|
|
|
|
and s.NAME like '%${axisName}%'
|
|
|
|
</if>
|
|
|
|
<if test="leaderName != null and leaderName != ''">
|
|
|
|
and l.NAME like '%${leaderName}%'
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|