YhHfysLogMapper.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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.YhHfysLogMapper">
  4. <!--获取用户最大ID -->
  5. <select id="selectMaxId" resultType="int">
  6. select nvl(max(to_number(bh)), 0) bh
  7. from yh_hfys_log
  8. </select>
  9. <select id="selectDaCustomerBtPage" resultType="com.tofly.feesapi.yhgl.entity.vo.YhHfysLogSelect">
  10. select * from (
  11. select a.*,
  12. cbpq.cbpqmc as sscbpqname,
  13. cbb.cbbmc as sscbbname
  14. from yh_hfys_log a
  15. left join bm_cbpq cbpq on a.sscbpq=cbpq.cbpqbm
  16. left join bm_cbb cbb on a.sscbb=cbb.cbbbm
  17. where 1=1
  18. <!--模糊查询 -->
  19. <if test="filter.searchText != null and filter.searchText != ''">
  20. and ( a.yhbh like '%${filter.searchText}%' or
  21. a.yhxm like '%${filter.searchText}%' or
  22. a.yhdz like '%${filter.searchText}%' or
  23. a.lxdh like '%${filter.searchText}%' )
  24. </if>
  25. <!--公司 -->
  26. <if test="filter.ssgs !=null and filter.ssgs!='' and filter.ssgs!='all'">
  27. and a.ssgs=#{filter.ssgs}
  28. </if>
  29. <!--片区 -->
  30. <if test="filter.sscbpq !=null and filter.sscbpq!='' and filter.sscbpq!='all' ">
  31. and a.sscbpq=#{filter.sscbpq}
  32. </if>
  33. <!--抄表本 -->
  34. <if test="filter.sscbb !=null and filter.sscbb!='' and filter.sscbb!='all'">
  35. and a.sscbb=#{filter.sscbb}
  36. </if>
  37. <if test="filter.qyfzr!=null">
  38. and a.sscbb in(select cbbbm from bm_cbb where qyfzr=#{filter.qyfzr})
  39. </if>
  40. <!--申请日期-->
  41. <if test="filter.ksrq!=null and filter.ksrq!='' and filter.jsrq!=null and filter.jsrq!='' ">
  42. and a.sqrq between to_date(#{filter.ksrq},'yyyy-mm-dd hh24:mi:ss') and
  43. to_date(#{filter.jsrq},'yyyy-mm-dd hh24:mi:ss')
  44. </if>
  45. <if test="filter.czry!=null and filter.czry!=''">
  46. and a.czrybm=#{filter.czry}
  47. </if>
  48. )
  49. </select>
  50. <resultMap id="yhHfysLogMap" type="com.tofly.feesapi.yhgl.entity.YhHfysLog">
  51. <id property="bh" column="BH"/>
  52. <result property="ssgs" column="SSGS"/>
  53. <result property="sscbpq" column="SSCBPQ"/>
  54. <result property="sscbb" column="SSCBB"/>
  55. <result property="czrq" column="CZRQ"/>
  56. <result property="yhbh" column="YHBH"/>
  57. <result property="yhxm" column="YHXM"/>
  58. <result property="yhdz" column="YHDZ"/>
  59. <result property="lxdh" column="LXDH"/>
  60. <result property="sqrq" column="SQRQ"/>
  61. <result property="fyje" column="FYJE"/>
  62. <result property="fpz" column="FPZ"/>
  63. <result property="fph" column="FPH"/>
  64. <result property="dycs" column="DYCS"/>
  65. <result property="bz" column="BZ"/>
  66. <result property="sfryxm" column="SFRYXM"/>
  67. <result property="czrybm" column="CZRYBM"/>
  68. <result property="czryxm" column="CZRYXM"/>
  69. </resultMap>
  70. </mapper>