123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?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.analyse.mapper.FzxzMapper">
- <select id="GetFzxzList" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.FzxzEntityDTO">
- select t.bsm as "bsm",
- t.sjy as "sjy",
- sjy.sjymc "sjymc",
- t.fwlx as "fwlx",
- t.ydxz_bsm as "ydbsm",
- (select dict.mc from t_fzss_fzxz_dict dict where dict.dm = t.ydxz_bsm and dict.fzbs = sjy.fzbs) as "ydmc",
- t.ydmjbegin as "ydmjbegin",
- t.ydmjend as "ydmjend",
- t.xmmc as "xmmc",
- t.jsdw as "jsdw",
- t.fxbg as "fxbg",
- t.rwzt as "rwzt",
- t.xzfw as "xzfw",
- t.zip as "zip" from t_fzss_fzxz t left join t_fzss_fzxz_sjy sjy on sjy.bsm = t.sjy
- where 1 = 1
- <if test="kssj != null and kssj != ''">
- and t.cjsj >= to_date(#{kssj}, 'YYYY-MM-DD')
- </if>
- <if test="jssj != null and jssj != ''">
- and t.cjsj <= to_date(#{jssj}, 'YYYY-MM-DD')
- </if>
- <if test="xmmc != null and xmmc != ''">
- and t.xmmc like '%'||#{xmmc}||'%'
- </if>
- order by t.cjsj desc
- </select>
- <select id="GetFzxzByBsm" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.FzxzEntityDTO">
- select t.bsm as "bsm",
- t.sjy as "sjy",
- sjy.sjymc "sjymc",
- t.ydxz_bsm as "ydbsm",
- (select dict.mc
- from t_fzss_fzxz_dict dict
- where dict.dm = t.ydxz_bsm
- and dict.fzbs = sjy.fzbs) as "ydmc",
- t.ydmjbegin as "ydmjbegin",
- t.ydmjend as "ydmjend",
- t.xmmc as "xmmc",
- t.jsdw as "jsdw",
- t.fxbg as "fxbg",
- t.rwzt as "rwzt"
- from t_fzss_fzxz t
- left join t_fzss_fzxz_sjy sjy on sjy.bsm = t.sjy
- where t.bsm = #{bsm}
- order by t.cjsj desc
- </select>
- <select id="GetOneByBsm" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.FzxzGeomInfoDTO1">
- select t.OBJECTID as "objectid",
- t.RWBSM as "rwbsm",
- t.YDYHFLDM as "ydyhfldm",
- t.YDYHFLMC as "ydyhflmc",
- t.FREQUENCY as "frequency",
- t.SUM_MJ as "sum_mj"
- from T_FZSS_FZXZ_TB
- where t.RWBSM = #{rwbsm}
- </select>
- <select id="getList" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.res.FzxzResultDTO">
- select *
- from t_fzss_fzxz
- where 1=1
- <if test="userId != null and userId != ''">
- and user_id = #{userId}
- </if>
- <if test="xmmc != null and xmmc != ''">
- and xmmc like '%'||#{xmmc}||'%'
- </if>
- <if test="startTime != null and startTime != ''">
- and cjsj >= TO_DATE(#{startTime}, 'YYYY-MM-DD')
- </if>
- <if test="endTime != null and endTime != ''">
- and cjsj <= TO_DATE(#{endTime}, 'YYYY-MM-DD')+ INTERVAL '1 day'
- </if>
- order by cjsj desc
- LIMIT #{limit} OFFSET #{offset}
- </select>
- <select id="getCount" parameterType="map" resultType="Integer">
- select count(1)
- from t_fzss_fzxz
- where 1=1
- <if test="userId != null and userId != ''">
- and user_id = #{userId}
- </if>
- <if test="xmmc != null and xmmc != ''">
- and xmmc like '%'||#{xmmc}||'%'
- </if>
- <if test="startTime != null and startTime != ''">
- and cjsj >= TO_TIMESTAMP(#{startTime}, 'YYYY-MM-DD HH24:MI:SS')
- </if>
- <if test="endTime != null and endTime != ''">
- and cjsj <= TO_TIMESTAMP(#{endTime}, 'YYYY-MM-DD HH24:MI:SS')
- </if>
- </select>
- </mapper>
|