YhXzbgLogMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.tofly.feesapi.yhgl.mapper.YhXzbgLogMapper">
  4. <resultMap id="yhxzbgLogMap" type="com.tofly.feesapi.yhgl.entity.YhXzbgLog">
  5. <id property="bh" column="BH"/>
  6. <result property="oldSjmc" column="OLD_SJMC"/>
  7. <result property="newSjmc" column="NEW_SJMC"/>
  8. <result property="oldSjmc1" column="OLD_SJMC1"/>
  9. <result property="oldSjmc2" column="OLD_SJMC2"/>
  10. <result property="newSjmc1" column="NEW_SJMC1"/>
  11. <result property="newSjmc2" column="NEW_SJMC2"/>
  12. <result property="lxdh" column="LXDH"/>
  13. <result property="oldSj" column="OLD_SJ"/>
  14. <result property="oldYslx" column="OLD_YSLX"/>
  15. <result property="oldYslxmc" column="OLD_YSLXMC"/>
  16. <result property="newSj" column="NEW_SJ"/>
  17. <result property="oldSj1" column="OLD_SJ1"/>
  18. <result property="oldSj2" column="OLD_SJ2"/>
  19. <result property="newSj1" column="NEW_SJ1"/>
  20. <result property="newSj2" column="NEW_SJ2"/>
  21. <result property="newYslx" column="NEW_YSLX"/>
  22. <result property="newYslxmc" column="NEW_YSLXMC"/>
  23. <result property="source" column="SOURCE"/>
  24. <result property="wxid" column="WXID"/>
  25. <result property="newYbdjbz" column="NEW_YBDJBZ"/>
  26. <result property="yhxm" column="YHXM"/>
  27. <result property="yhdz" column="YHDZ"/>
  28. <result property="bgfx" column="BGFX"/>
  29. <result property="cbkid" column="CBKID"/>
  30. <result property="bgyy" column="BGYY"/>
  31. <result property="oldYbdjbz" column="OLD_YBDJBZ"/>
  32. <result property="ssgs" column="SSGS"/>
  33. <result property="sscbpq" column="SSCBPQ"/>
  34. <result property="sscbb" column="SSCBB"/>
  35. <result property="yhbh" column="YHBH"/>
  36. <result property="oldSjbm" column="OLD_SJBM"/>
  37. <result property="newSjbm" column="NEW_SJBM"/>
  38. <result property="bgsj" column="BGSJ"/>
  39. <result property="czrybm" column="CZRYBM"/>
  40. <result property="czryxm" column="CZRYXM"/>
  41. <result property="bz" column="BZ"/>
  42. <result property="gdbh" column="GDBH"/>
  43. <result property="gdzt" column="GDZT"/>
  44. <result property="oldSjbm1" column="OLD_SJBM1"/>
  45. <result property="oldSjbm2" column="OLD_SJBM2"/>
  46. <result property="newSjbm1" column="NEW_SJBM1"/>
  47. <result property="newSjbm2" column="NEW_SJBM2"/>
  48. <result property="scds" column="SCDS"/>
  49. <result property="bcds" column="BCDS"/>
  50. <result property="bgnr" column="BGNR"/>
  51. <result property="newSlbl" column="NEW_SLBL"/>
  52. <result property="newSlbl1" column="NEW_SLBL1"/>
  53. <result property="newSlbl2" column="NEW_SLBL2"/>
  54. </resultMap>
  55. <select id="selectYhSj" resultType="com.tofly.feesapi.yhgl.entity.vo.YhXzbhSjVo">
  56. select a.yhbh, a.cbkid, b.name sjmc, b.code sjbm, c.name yslxmc, c.code yslx
  57. from yh_cbkxx a
  58. left join bm_sj b on a.sjbm = b.code
  59. left join bm_yslx c on b.yslx = c.code
  60. WHERE a.yhbh = #{yhbh}
  61. </select>
  62. <select id="getYhxzbgLogtj" resultType="com.tofly.feesapi.yhgl.entity.vo.YhXzbgLogSelect">
  63. SELECT
  64. yhbh,
  65. yhxm,
  66. yhdz,
  67. (case
  68. when old_ybdjbz='0' then '普通'
  69. when old_ybdjbz='1' then '每月混合'
  70. else '未知'
  71. end )oldHhlxmc,
  72. (case
  73. when new_ybdjbz='0' then '普通'
  74. when new_ybdjbz='1' then '每月混合'
  75. else '未知'
  76. end)newHhlxmc,
  77. old_yslxmc oldYslxmc,
  78. new_yslxmc newYslxmc,
  79. (case
  80. when bgfx = '0' then '不变'
  81. when bgfx = '1' then '低改高'
  82. when bgfx = '2' then '高改低'
  83. else '未知'
  84. end) bgfx,
  85. bgnr,
  86. bgyy,
  87. bz,
  88. bgsj,
  89. czryxm
  90. FROM
  91. yh_xzbg_log
  92. <where>
  93. <if test="filter.ssgs != null and filter.ssgs != ''">
  94. and ssgs = #{filter.ssgs}
  95. </if>
  96. <if test="filter.sscbpq != null and filter.sscbpq != ''">
  97. and sscbpq = #{filter.sscbpq}
  98. </if>
  99. <if test="filter.sscbb != null and filter.sscbb != ''">
  100. and sscbb = #{filter.sscbb}
  101. </if>
  102. <if test="filter.oldYslx != null and filter.oldYslx != ''">
  103. and old_yslx = #{filter.oldYslx}
  104. </if>
  105. <if test="filter.newYslx != null and filter.newYslx != ''">
  106. and new_yslx = #{filter.newYslx}
  107. </if>
  108. <if test="filter.czrybm != null and filter.czrybm != ''">
  109. and czrybm = #{filter.czrybm}
  110. </if>
  111. <if test="filter.bgfx != null and filter.bgfx != ''">
  112. and bgfx = #{filter.bgfx}
  113. </if>
  114. <if test="filter.searchText != null and filter.searchText != ''">
  115. and (
  116. yhbh like '%${filter.searchText}%'
  117. or yhxm like '%${filter.searchText}%'
  118. or yhdz like '%${filter.searchText}%'
  119. or old_yslxmc like '%${filter.searchText}%'
  120. or new_yslxmc like '%${filter.searchText}%'
  121. )
  122. </if>
  123. <if test="filter.czsjStart != null and filter.czsjEnd != null">
  124. and bgsj between #{filter.czsjStart} and #{filter.czsjEnd}
  125. </if>
  126. <if test="filter.gdzt != null and filter.gdzt != ''">
  127. and gdzt = #{filter.gdzt}
  128. </if>
  129. </where>
  130. </select>
  131. </mapper>