123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351 |
- <?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.onemap.apply.mapper.yzt.ZymlMapper">
- <select id="GetList" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlDTO">
- select
- (select count(1) from t_yzt_zyml cou where cou.parent = 0
- <if test="resources != null and resources != ''">
- and cou.bsm in (
- with temp as
- (select #{resources} value from dual t)
- select regexp_substr(replace(value, ' ,', ','), '[^,]+', 1, level)
- from temp
- connect by regexp_count(value, ',') + 1 >= level
- )
- </if>
- start with cou.bsm = t.bsm
- connect by prior cou.bsm = cou.pbsm ) as "count",
- t.bsm as "bsm",
- t.name as "name",
- --case when t.sde is null then t.type else to_char(dblayer.servicetype) end as "type",
- t.type as "type",
- t.pbsm as "pbsm",
- t.icon as "icon",
- --case when t.sde is null then t.url else to_char(dblayer.address) end as "url",
- t.url as "url",
- t.lev as "lev",
- t.sort as "sort",
- t.state as "state",
- t.parent as "parent",
- --case when t.sde is null then t.server_type else 'Arcgis' end as "server_type",
- t.server_type as "server_type",
- t.sflssj as "sflssj",
- t.sfdbfx as "sfdbfx",
- t.sfjl as "sfjl",
- t.sfcx as "sfcx",
- t.sftj as "sftj",
- t.epsg as "epsg",
- t.year as "year",
- t.sjlx as "sjlx",
- t.sde as "sde",
- t.gltj as "gltj",
- t.sjly as "sjly",
- t.legend as "legend",
- t.ywlx as "ywlx",
- (select distinct(uhbm) from t_yzt_zyml_my my where my.zy_bsm = t.bsm and my.uhbm = #{username}) as "my",
- (select fzbsm from T_YZT_ZYML_LSSJ ls where ls.zybsm = t.bsm) as "fzbsm",
- to_char(res.datetime ,'yyyy-MM-dd hh24:mi:ss') as "datetime",
- (select usertable.nick_name from sys_user usertable where usertable.user_name = res.createperson) as
- "createperson"
- from t_yzt_zyml t left join t_yzt_db_layer dblayer on dblayer.id = t.sde
- left join tb_resourcehooktb res on res.name = replace(dblayer.source, 'SDE.','')
- where 1 = 1
- <if test="param != null and param != ''">
- and t.bsm in (select bsm
- from t_yzt_zyml ml
- start with ml.bsm = #{param}
- connect by prior ml.bsm = ml.pbsm)
- </if>
- <if test="resources != null and resources != ''">
- and (t.parent = 1 or t.bsm in (
- with temp as
- (select #{resources} value from dual t)
- select regexp_substr(replace(value, ' ,', ','), '[^,]+', 1, level)
- from temp
- connect by regexp_count(value, ',') + 1 >= level
- ) )
- </if>
- order by t.lev,t.pbsm , t.sort
- </select>
- <select id="GetList4XZQH" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlDTO">
- select
- (select count(1) from ( select * from t_yzt_zyml ml left join t_yzt_db_layer dblayer2 on dblayer2.id = ml.sde
- where dblayer2.source
- like '%'||#{xzqh}||'%' or ml.sjly = #{xzqh} or ml.parent = 1)cou where cou.parent = 0
- start with cou.bsm = t.bsm
- connect by prior cou.bsm = cou.pbsm ) as "count",
- t.bsm as "bsm",
- t.name as "name",
- case when t.sde is null then t.type else to_char(dblayer.servicetype) end as "type",
- t.pbsm as "pbsm",
- t.icon as "icon",
- case when t.sde is null then t.url else to_char(dblayer.address) end as "url",
- t.lev as "lev",
- t.sort as "sort",
- t.state as "state",
- t.parent as "parent",
- case when t.sde is null then t.server_type else 'Arcgis' end as "server_type",
- t.sflssj as "sflssj",
- t.sfdbfx as "sfdbfx",
- t.sfjl as "sfjl",
- t.sfcx as "sfcx",
- t.sftj as "sftj",
- t.epsg as "epsg",
- t.year as "year",
- t.sjlx as "sjlx",
- t.sde as "sde",
- t.gltj as "gltj",
- t.sjly as "sjly",
- t.legend as "legend",
- t.ywlx as "ywlx",
- (select distinct(uhbm) from t_yzt_zyml_my my where my.zy_bsm = t.bsm and my.uhbm = #{username}) as "my",
- (select fzbsm from T_YZT_ZYML_LSSJ ls where ls.zybsm = t.bsm) as "fzbsm",
- to_char(res.datetime ,'yyyy-MM-dd hh24:mi:ss') as "datetime",
- (select usertable.nick_name from sys_user usertable where usertable.user_name = res.createperson) as
- "createperson"
- from t_yzt_zyml t left join t_yzt_db_layer dblayer on dblayer.id = t.sde
- left join tb_resourcehooktb res on res.name = replace(dblayer.source, 'SDE.','')
- where 1 = 1
- <if test="param != null and param != ''">
- and t.bsm in (select bsm
- from t_yzt_zyml ml
- start with ml.bsm = #{param}
- connect by prior ml.bsm = ml.pbsm)
- </if>
- and (dblayer.id in ( select id from T_YZT_DB_LAYER where source
- like '%'||#{xzqh}||'%' ) or PARENT = 1 or t.sjly = #{xzqh})
- order by t.lev, t.sort
- </select>
- <select id="GetTree" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlTreeDTO">
- select
- t.bsm as "id",
- t.name as "name",
- t.pbsm as "pid",
- null as "url",
- t.state as "state",
- case when t.parent = 0 then 1 else 0 end as "type"
- from t_yzt_zyml t left join t_yzt_db_layer dblayer on dblayer.id = t.sde order by t.lev,t.pbsm , t.sort
- </select>
- <select id="GetMyCollect" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlDTO">
- select
- 0 as "count",
- t.bsm as "bsm",
- t.name as "name",
- case when t.sde is null then t.type else to_char(dblayer.servicetype) end as "type",
- t.pbsm as "pbsm",
- t.icon as "icon",
- case when t.sde is null then t.url else to_char(dblayer.address) end as "url",
- t.lev as "lev",
- t.sort as "sort",
- t.state as "state",
- t.parent as "parent",
- t.server_type as "server_type",
- t.sflssj as "sflssj",
- t.sfdbfx as "sfdbfx",
- t.sfjl as "sfjl",
- t.sfcx as "sfcx",
- t.sftj as "sftj",
- t.epsg as "epsg",
- t.year as "year",
- t.sjlx as "sjlx",
- t.sde as "sde",
- t.gltj as "gltj",
- t.sjly as "sjly",
- t.legend as "legend",
- t.ywlx as "ywlx",
- #{username} as "my",
- null as "fzbsm",
- to_char(res.datetime ,'yyyy-MM-dd hh24:mi:ss') as "datetime",
- (select usertable.nick_name from sys_user usertable where usertable.user_name = res.createperson) as "createperson"
- from T_YZT_ZYML t left join t_yzt_db_layer dblayer on dblayer.id = t.sde
- left join tb_resourcehooktb res on res.name = replace(dblayer.source, 'SDE.','')
- where t.bsm in ((select distinct(my.zy_bsm) from T_YZT_ZYML_MY my where my.uhbm = #{username})) order by t.bsm
- </select>
- <select id="GetMyCollect4XZQH" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlDTO">
- select
- 0 as "count",
- t.bsm as "bsm",
- t.name as "name",
- case when t.sde is null then t.type else to_char(dblayer.servicetype) end as "type",
- t.pbsm as "pbsm",
- t.icon as "icon",
- case when t.sde is null then t.url else to_char(dblayer.address) end as "url",
- t.lev as "lev",
- t.sort as "sort",
- t.state as "state",
- t.parent as "parent",
- t.server_type as "server_type",
- t.sflssj as "sflssj",
- t.sfdbfx as "sfdbfx",
- t.sfjl as "sfjl",
- t.sfcx as "sfcx",
- t.sftj as "sftj",
- t.epsg as "epsg",
- t.year as "year",
- t.sjlx as "sjlx",
- t.sde as "sde",
- t.gltj as "gltj",
- t.sjly as "sjly",
- t.legend as "legend",
- t.ywlx as "ywlx",
- #{username} as "my",
- null as "fzbsm",
- to_char(res.datetime ,'yyyy-MM-dd hh24:mi:ss') as "datetime",
- (select usertable.nick_name from sys_user usertable where usertable.user_name = res.createperson) as "createperson"
- from T_YZT_ZYML t left join t_yzt_db_layer dblayer on dblayer.id = t.sde
- left join tb_resourcehooktb res on res.name = replace(dblayer.source, 'SDE.','')
- where t.bsm in ((select distinct(my.zy_bsm) from T_YZT_ZYML_MY my where my.uhbm = #{username}))
- order by t.bsm
- </select>
- <select id="GetByBsms" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlDTO">
- select
- 0 as "count",
- t.bsm as "bsm",
- t.name as "name",
- case when t.sde is null then t.type else to_char(dblayer.servicetype) end as "type",
- t.pbsm as "pbsm",
- t.icon as "icon",
- case when t.sde is null then t.url else to_char(dblayer.address) end as "url",
- t.lev as "lev",
- t.sort as "sort",
- t.state as "state",
- t.parent as "parent",
- t.server_type as "server_type",
- t.sflssj as "sflssj",
- t.sfdbfx as "sfdbfx",
- t.sfjl as "sfjl",
- t.sfcx as "sfcx",
- t.sftj as "sftj",
- t.epsg as "epsg",
- t.year as "year",
- t.sjlx as "sjlx",
- t.sde as "sde",
- t.gltj as "gltj",
- t.sjly as "sjly",
- t.legend as "legend",
- t.ywlx as "ywlx",
- null as "my",
- null as "fzbsm"
- from T_YZT_ZYML t left join t_yzt_db_layer dblayer on dblayer.id = t.sde where t.bsm in
- <foreach collection="array" item="bsm" open="(" separator="," close=")">
- #{bsm}
- </foreach>
- order by t.bsm
- </select>
- <select id="GetByBsm" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlDTO">
- select
- 0 as "count",
- t.bsm as "bsm",
- t.name as "name",
- case when t.sde is null then t.type else to_char(dblayer.servicetype) end as "type",
- t.pbsm as "pbsm",
- t.icon as "icon",
- case when t.sde is null then t.url else to_char(dblayer.address) end as "url",
- t.lev as "lev",
- t.sort as "sort",
- t.state as "state",
- t.parent as "parent",
- t.server_type as "server_type",
- t.sflssj as "sflssj",
- t.sfdbfx as "sfdbfx",
- t.sfjl as "sfjl",
- t.sfcx as "sfcx",
- t.sftj as "sftj",
- t.epsg as "epsg",
- t.year as "year",
- t.sjlx as "sjlx",
- t.sde as "sde",
- t.gltj as "gltj",
- t.sjly as "sjly",
- t.legend as "legend",
- t.ywlx as "ywlx",
- null as "my",
- null as "fzbsm"
- from T_YZT_ZYML t
- left join t_yzt_db_layer dblayer on dblayer.id = t.sde
- where t.bsm = #{bsm}
- </select>
- <select id="GetAttrs" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ResourceAttrsDTO">
- select t.sxmc as "sxmc",
- t.sxbm as "sxbm",
- t.sxlx as "sxlx",
- t.xssx as "xssx",
- t.sfcx as "sfcx",
- t.sftj as "sftj",
- t.dw as "dw",
- t.zdcx as "zdcx" from T_YZT_ZYSX t where t.zy_bsm = #{bsm}
- </select>
- <select id="GetCollectCount" parameterType="com.onemap.apply.domain.yzt.ZymlBsmDTO" resultType="java.lang.Integer">
- select count(1) from T_YZT_ZYML_MY t where t.uhbm = #{username} and t.zy_bsm = #{bsm}
- </select>
- <delete id="DeleteCollect" parameterType="com.onemap.apply.domain.yzt.ZymlBsmDTO">
- delete from T_YZT_ZYML_MY t where t.uhbm = #{username} and t.zy_bsm = #{bsm}
- </delete>
- <insert id="AddCollect" parameterType="com.onemap.apply.domain.yzt.ZymlBsmDTO">
- insert into T_YZT_ZYML_MY (uhbm,zy_bsm) values(#{username},#{bsm})
- </insert>
- <select id="GetDbfxList" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.DbfxResourceDTO">
- select t.bsm as "bsm",
- case when zy.sde is null then zy.type else to_char(dblayer.servicetype) end as "type",
- case when zy.sde is null then zy.url else to_char(dblayer.address) end as "url",
- t.name as "name",
- t.zybsm "zybsm",
- t.lxfz as "lxfz",
- t.sort as "sort",
- t.tjname as "tjname",
- t.xzq as "xzq" ,
- zy.server_type as "server_type",
- zy.epsg as "epsg",
- zy.year as "year",
- zy.legend as "legend",
- zy.ywlx as "ywlx",
- ls.fzbsm as "fzbsm"
- from T_YZT_DBFX t
- left join t_yzt_zyml zy on zy.bsm = t.zybsm
- left join t_yzt_db_layer dblayer on dblayer.id = zy.sde
- left join T_YZT_ZYML_LSSJ ls on ls.zybsm = t.zybsm
- </select>
- <select id="GetLssjList" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.DbfxLssjDTO">
- select
- t.fzbsm as "fzbsm",
- t.zybsm as "zybsm",
- zy.epsg as "epsg",
- zy.type as "type",
- zy.server_type as "server_type",
- zy.year as "year",
- zy.url as "url"
- from T_YZT_ZYML_LSSJ t
- left join t_yzt_zyml zy on zy.bsm = t.zybsm
- where t.fzbsm = #{param} order by zy.year desc
- </select>
- <select id="GetLegend" parameterType="java.lang.String" resultType="com.onemap.apply.domain.yzt.ZymlLegendDTO">
- select t.bsm as "bsm",
- t.zybsm as "zybsm",
- t.zymc as "zymc",
- t.tldm as "tldm",
- t.tlmc as "tlmc",
- t.tllx as "tllx",
- t.tlys as "tlys" from t_yzt_zyml_tl t where t.zybsm = #{zybsm} order by t.tldm
- </select>
- <select id="getXzqCode" parameterType="java.lang.String" resultType="java.lang.String">
- SELECT FD_CODE FROM "TB_DICT_XZQHDM" WHERE FD_NAME = #{deptName}
- </select>
- <select id="GetLegendAttr" parameterType="java.lang.String" resultType="java.util.Map">
- select t.name "name",t.value "value" from bs_dic t where t.type = #{ywlx}
- </select>
- </mapper>
|