PbVXssfdetailMapper.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.xjrsoft.module.student.mapper.PbVXssfdetailMapper">
  6. <select id="getPage" parameterType="com.xjrsoft.module.student.dto.PbVXssfdetailPageDto" resultType="com.xjrsoft.module.student.vo.PbVXssfdetailPageVo">
  7. SELECT t2.user_id,t2.student_id,t1.name,t4.name AS gender_cn,t6.name AS semester_name,t3.feeitemname,t3.paytype,t3.paydate,t3.payorder,t3.mny FROM xjr_user t1
  8. INNER JOIN base_student t2 ON t1.id = t2.user_id
  9. INNER JOIN pb_v_xssfdetail t3 ON t1.credential_number = t3.personalid
  10. LEFT JOIN xjr_dictionary_detail t4 ON t1.gender = t4.code AND t4.item_id = 2023000000000000004
  11. LEFT JOIN pb_semester_config t5 ON t3.beltcode = t5.beltcode AND t5.delete_mark = 0
  12. LEFT JOIN base_semester t6 ON t6.id = t5.base_semester_id
  13. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
  14. <if test="dto.name != null and dto.name != ''">
  15. and t1.name like concat('%', #{dto.name},'%')
  16. </if>
  17. <if test="dto.semesterId != null">
  18. and t6.id = #{dto.semesterId}
  19. </if>
  20. <if test="dto.feeitemname != null and dto.feeitemname != ''">
  21. and t3.feeitemname like concat('%', #{dto.feeitemname},'%')
  22. </if>
  23. <if test="dto.studentId != null and dto.studentId != ''">
  24. and t2.student_id like concat('%', #{dto.studentId},'%')
  25. </if>
  26. <if test="dto.payorder != null and dto.payorder != ''">
  27. and t3.payorder like concat('%', #{dto.payorder},'%')
  28. </if>
  29. <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
  30. and t3.paydate between #{dto.startDate} and #{dto.endDate}
  31. </if>
  32. <if test="dto.category != null">
  33. <if test="dto.category == 1">
  34. and t3.mny > 0
  35. </if>
  36. <if test="dto.category == -1">
  37. and 0 > t3.mny
  38. </if>
  39. </if>
  40. </select>
  41. <select id="getList" parameterType="com.xjrsoft.module.student.dto.PbVXssfdetailExcelDto" resultType="com.xjrsoft.module.student.vo.PbVXssfdetailExcelVo">
  42. SELECT t2.user_id,t2.student_id,t1.name,t4.name AS gender_cn,t6.name AS semester_name,t3.feeitemname,t3.paytype,t3.paydate,t3.payorder,t3.mny FROM xjr_user t1
  43. INNER JOIN base_student t2 ON t1.id = t2.user_id
  44. INNER JOIN pb_v_xssfdetail t3 ON t1.credential_number = t3.personalid
  45. LEFT JOIN xjr_dictionary_detail t4 ON t1.gender = t4.code AND t4.item_id = 2023000000000000004
  46. LEFT JOIN pb_semester_config t5 ON t3.beltcode = t5.beltcode AND t5.delete_mark = 0
  47. LEFT JOIN base_semester t6 ON t6.id = t5.base_semester_id
  48. WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
  49. <if test="dto.payorders == null">
  50. <if test="dto.name != null and dto.name != ''">
  51. and t1.name like concat('%', #{dto.name},'%')
  52. </if>
  53. <if test="dto.semesterId != null">
  54. and t6.id = #{dto.semesterId}
  55. </if>
  56. <if test="dto.feeitemname != null and dto.feeitemname != ''">
  57. and t3.feeitemname like concat('%', #{dto.feeitemname},'%')
  58. </if>
  59. <if test="dto.studentId != null and dto.studentId != ''">
  60. and t2.student_id like concat('%', #{dto.studentId},'%')
  61. </if>
  62. <if test="dto.payorder != null and dto.payorder != ''">
  63. and t3.payorder like concat('%', #{dto.payorder},'%')
  64. </if>
  65. <if test="dto.startDate != null and dto.startDate != '' and dto.endDate != null and dto.endDate != ''">
  66. and t3.paydate between #{dto.startDate} and #{dto.endDate}
  67. </if>
  68. <if test="dto.category != null">
  69. <if test="dto.category == 1">
  70. and t3.mny > 0
  71. </if>
  72. <if test="dto.category == -1">
  73. and 0 > t3.mny
  74. </if>
  75. </if>
  76. </if>
  77. <if test="dto.payorders != null">
  78. and t3.payorder in
  79. <foreach item="payorder" index="index" collection="dto.payorders" open="(" close=")" separator=",">
  80. #{payorder}
  81. </foreach>
  82. </if>
  83. </select>
  84. </mapper>