初始化项目
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
<?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.njcn.mapper.configuration.TreeMapper'>
|
||||
<resultMap type="Tree" id="proResultMap" autoMapping="true">
|
||||
<id column="province_index" property="nodeIndex"/>
|
||||
</resultMap>
|
||||
<select id='getTreeProInfo' resultMap='proResultMap' >
|
||||
select province_index, name
|
||||
from pq_province
|
||||
where province_index in
|
||||
(select province_index
|
||||
from pq_gdinformation
|
||||
where gd_index in
|
||||
(select gd_index
|
||||
from pq_line
|
||||
where line_index in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close="))) order by province_index">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<resultMap type="Tree" id="gdResultMap" autoMapping="true">
|
||||
<id column="Gd_index" property="nodeIndex"/>
|
||||
<result column="province_index" property="pId"/>
|
||||
</resultMap>
|
||||
<select id='getTreeGdInfo' resultMap='gdResultMap' >
|
||||
select
|
||||
gd_index,name,province_index
|
||||
from pq_gdinformation
|
||||
where
|
||||
gd_index in
|
||||
(select gd_index
|
||||
from pq_line
|
||||
where line_index in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")) order by gd_index">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<resultMap type="Tree" id="subResultMap" autoMapping="true">
|
||||
<id column="Sub_index" property="nodeIndex"/>
|
||||
<result column="gd_index" property="pId"/>
|
||||
</resultMap>
|
||||
<select id='getTreeSubInfo' resultMap='subResultMap'>
|
||||
select
|
||||
gd_index, name,sub_index
|
||||
from pq_substation
|
||||
where
|
||||
sub_index in
|
||||
(select sub_index
|
||||
from pq_line
|
||||
where line_index in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")) order by sub_index">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<resultMap type="Tree" id="nodesubvResultMap" autoMapping="true">
|
||||
<id column="subv_index" property="nodeIndex"/>
|
||||
<result column="Sub_index" property="pId"/>
|
||||
</resultMap>
|
||||
<select id='getNodeTreeSubvInfo' resultMap='nodesubvResultMap'>
|
||||
select
|
||||
sub_index, name,subv_index,sub_index
|
||||
from pq_subvoltage
|
||||
where
|
||||
subv_index in
|
||||
(select subv_index
|
||||
from pq_line
|
||||
where line_index in
|
||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")) order by subv_index">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<resultMap type="Tree" id="lineResultMap" autoMapping="true">
|
||||
<id column="line_index" property="nodeIndex"/>
|
||||
<result column="subv_index" property="pId"/>
|
||||
</resultMap>
|
||||
<select id='getLineInfo' resultMap='lineResultMap'>
|
||||
select
|
||||
a.subv_index, a.name,a.line_index,b.devflag as state,b.status
|
||||
from pq_line a,pq_device b
|
||||
where
|
||||
a.dev_index = b.dev_index and a.gd_index in
|
||||
<foreach collection="list" index="index" item="item" open="("
|
||||
separator="," close=") order by a.line_index">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id='getTreeBySubv' resultMap='lineResultMap'>
|
||||
select
|
||||
a.subv_index, a.name,a.line_index,b.devflag as state,b.status,d.pttype
|
||||
from pq_line a,pq_device b ,pq_subvoltage c,pq_linedetail d
|
||||
where
|
||||
a.dev_index = b.dev_index
|
||||
and a.line_index = d.line_index
|
||||
and a.subv_index = c.subv_index
|
||||
and c.subv_index = #{subvIndex}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user