FzxzMapper.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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.analyse.mapper.FzxzMapper">
  6. <select id="GetFzxzList" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.FzxzEntityDTO">
  7. select t.bsm as "bsm",
  8. t.sjy as "sjy",
  9. sjy.sjymc "sjymc",
  10. t.fwlx as "fwlx",
  11. t.ydxz_bsm as "ydbsm",
  12. (select dict.mc from t_fzss_fzxz_dict dict where dict.dm = t.ydxz_bsm and dict.fzbs = sjy.fzbs) as "ydmc",
  13. t.ydmjbegin as "ydmjbegin",
  14. t.ydmjend as "ydmjend",
  15. t.xmmc as "xmmc",
  16. t.jsdw as "jsdw",
  17. t.fxbg as "fxbg",
  18. t.rwzt as "rwzt",
  19. t.xzfw as "xzfw",
  20. t.zip as "zip" from t_fzss_fzxz t left join t_fzss_fzxz_sjy sjy on sjy.bsm = t.sjy
  21. where 1 = 1
  22. <if test="kssj != null and kssj != ''">
  23. and t.cjsj &gt;= to_date(#{kssj}, 'YYYY-MM-DD')
  24. </if>
  25. <if test="jssj != null and jssj != ''">
  26. and t.cjsj &lt;= to_date(#{jssj}, 'YYYY-MM-DD')
  27. </if>
  28. <if test="xmmc != null and xmmc != ''">
  29. and t.xmmc like '%'||#{xmmc}||'%'
  30. </if>
  31. order by t.cjsj desc
  32. </select>
  33. <select id="GetFzxzByBsm" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.FzxzEntityDTO">
  34. select t.bsm as "bsm",
  35. t.sjy as "sjy",
  36. sjy.sjymc "sjymc",
  37. t.ydxz_bsm as "ydbsm",
  38. (select dict.mc
  39. from t_fzss_fzxz_dict dict
  40. where dict.dm = t.ydxz_bsm
  41. and dict.fzbs = sjy.fzbs) as "ydmc",
  42. t.ydmjbegin as "ydmjbegin",
  43. t.ydmjend as "ydmjend",
  44. t.xmmc as "xmmc",
  45. t.jsdw as "jsdw",
  46. t.fxbg as "fxbg",
  47. t.rwzt as "rwzt"
  48. from t_fzss_fzxz t
  49. left join t_fzss_fzxz_sjy sjy on sjy.bsm = t.sjy
  50. where t.bsm = #{bsm}
  51. order by t.cjsj desc
  52. </select>
  53. <select id="GetOneByBsm" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.FzxzGeomInfoDTO1">
  54. select t.OBJECTID as "objectid",
  55. t.RWBSM as "rwbsm",
  56. t.YDYHFLDM as "ydyhfldm",
  57. t.YDYHFLMC as "ydyhflmc",
  58. t.FREQUENCY as "frequency",
  59. t.SUM_MJ as "sum_mj"
  60. from T_FZSS_FZXZ_TB
  61. where t.RWBSM = #{rwbsm}
  62. </select>
  63. <select id="getList" parameterType="java.lang.String" resultType="com.onemap.analyse.domain.res.FzxzResultDTO">
  64. select *
  65. from t_fzss_fzxz
  66. where 1=1
  67. <if test="userId != null and userId != ''">
  68. and user_id = #{userId}
  69. </if>
  70. <if test="xmmc != null and xmmc != ''">
  71. and xmmc like '%'||#{xmmc}||'%'
  72. </if>
  73. <if test="startTime != null and startTime != ''">
  74. and cjsj &gt;= TO_DATE(#{startTime}, 'YYYY-MM-DD')
  75. </if>
  76. <if test="endTime != null and endTime != ''">
  77. and cjsj &lt;= TO_DATE(#{endTime}, 'YYYY-MM-DD')+ INTERVAL '1 day'
  78. </if>
  79. order by cjsj desc
  80. LIMIT #{limit} OFFSET #{offset}
  81. </select>
  82. <select id="getCount" parameterType="map" resultType="Integer">
  83. select count(1)
  84. from t_fzss_fzxz
  85. where 1=1
  86. <if test="userId != null and userId != ''">
  87. and user_id = #{userId}
  88. </if>
  89. <if test="xmmc != null and xmmc != ''">
  90. and xmmc like '%'||#{xmmc}||'%'
  91. </if>
  92. <if test="startTime != null and startTime != ''">
  93. and cjsj &gt;= TO_TIMESTAMP(#{startTime}, 'YYYY-MM-DD HH24:MI:SS')
  94. </if>
  95. <if test="endTime != null and endTime != ''">
  96. and cjsj &lt;= TO_TIMESTAMP(#{endTime}, 'YYYY-MM-DD HH24:MI:SS')
  97. </if>
  98. </select>
  99. </mapper>