GdbhMapper.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.onemap.apply.mapper.gdbh.GdbhMapper">
  6. <select id="selectGdbhList" resultType="com.onemap.apply.domain.gdbh.GdbhDto">
  7. select bsm, xmmc, xzfw, xzmj, status,rwcjsj,rwzt
  8. from t_gdbh t
  9. where t.status = 1
  10. <if test="xmmc != null and xmmc != ''">
  11. and t.xmmc like concat('%',#{xmmc},'%')
  12. </if>
  13. <if test="kssj != null and kssj != ''">
  14. and t.rwcjsj &gt;= to_date(#{kssj}, 'yyyy-MM-dd hh24:mi:ss')
  15. </if>
  16. <if test="jssj != null and jssj != ''">
  17. and t.rwcjsj &lt;= to_date(#{jssj}, 'yyyy-MM-dd hh24:mi:ss')
  18. </if>
  19. <if test="cjUserId != null and cjUserId != ''">
  20. and t.cj_user_id = #{cjUserId}
  21. </if>
  22. order by t.rwcjsj desc
  23. </select>
  24. <select id="selectGdbhXzfw" parameterType="java.lang.String" resultType="map">
  25. SELECT id,
  26. public.st_asewkt(geom) AS geom,
  27. area,
  28. create_time
  29. FROM t_fzss_zhxz_file
  30. WHERE id = #{id}
  31. </select>
  32. <select id="getGdbhFlightTb" resultType="map">
  33. SELECT DISTINCT
  34. gdbhm.ID,
  35. PUBLIC.st_asewkt ( gdbhm.geom )
  36. FROM
  37. base.t_gdbh_flight AS flight,
  38. vector."TB_GDBHMB" AS gdbhm
  39. WHERE
  40. PUBLIC.st_intersects ( flight.geom, gdbhm.geom );
  41. </select>
  42. </mapper>