TextbookWarehouseRecordMapper.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.textbook.mapper.TextbookWarehouseRecordMapper">
  6. <select id="getPage" parameterType="com.xjrsoft.module.textbook.dto.TextbookWarehouseRecordPageDto" resultType="com.xjrsoft.module.textbook.vo.TextbookWarehouseRecordPageVo">
  7. SELECT t1.id, t1.sort_code, t3.issn,t3.book_name,t3.publishing_house,t3.editor_in_chief,t4.group_name,
  8. t5.name AS course_name,t6.name AS textbook_type_cn,t3.specifications_models,t1.create_date,t2.name AS warehouse_user,t1.warehouse_number FROM textbook_warehouse_record t1
  9. LEFT JOIN xjr_user t2 ON t1.create_user_id = t2.id
  10. LEFT JOIN textbook t3 ON t1.textbook_id = t3.id
  11. LEFT JOIN subject_group t4 ON t3.subject_group_id = t4.id
  12. LEFT JOIN base_course_subject t5 ON t3.course_subject_id = t5.id
  13. LEFT JOIN xjr_dictionary_detail t6 ON t3.textbook_type = t6.code AND t6.item_id = 1739209191193636865
  14. WHERE t1.delete_mark = 0
  15. <if test="dto.textbookType != null and dto.textbookType != ''">
  16. and t3.textbook_type = #{dto.textbookType}
  17. </if>
  18. <if test="dto.baseSemesterId != null">
  19. and t3.base_semester_id = #{dto.baseSemesterId}
  20. </if>
  21. <if test="dto.publishingHouse != null">
  22. and t3.publishing_house = like concat('%',#{dto.publishingHouse}, '%')
  23. </if>
  24. <if test="dto.subjectGroupId != null">
  25. and t3.subject_group_id = #{dto.subjectGroupId}
  26. </if>
  27. <if test="dto.courseSubjectId != null">
  28. and t3.course_subject_id = #{dto.courseSubjectId}
  29. </if>
  30. <if test="dto.classId != null">
  31. and t3.class_id = #{dto.classId}
  32. </if>
  33. <if test="dto.bookName != null and dto.bookName != ''">
  34. and t3.book_name like concat('%',#{dto.bookName}, '%')
  35. </if>
  36. <if test="dto.issn != null and dto.issn != ''">
  37. and t3.issn like concat('%',#{dto.issn}, '%')
  38. </if>
  39. <if test="dto.specificationsModels != null and dto.specificationsModels != ''">
  40. and t3.specifications_models like concat('%',#{dto.specificationsModels}, '%')
  41. </if>
  42. <if test="dto.isTextbookPlan != null and dto.isTextbookPlan != ''">
  43. and t3.is_textbook_plan = #{dto.isTextbookPlan}
  44. </if>
  45. ORDER BY t1.create_date
  46. </select>
  47. </mapper>