SbInfoStopDetailMapper.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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.platform.dao.mapper.sb.SbInfoStopDetailMapper">
  4. <sql id="Base_Column_List">
  5. stopDetail.id,
  6. stopDetail.no,
  7. stopDetail.sb_id,
  8. stopDetail.repair_id,
  9. stopDetail.user_id,
  10. stopDetail.type,
  11. stopDetail.apply_date,
  12. stopDetail.start_date,
  13. stopDetail.stop_date,
  14. stopDetail.content,
  15. stopDetail.status,
  16. stopDetail.remark,
  17. stopDetail.created_time,
  18. stopDetail.update_time,
  19. stopDetail.created_user_id,
  20. stopDetail.created_user_name,
  21. stopDetail.update_user_id,
  22. stopDetail.update_user_name
  23. </sql>
  24. <sql id="Ref_Column_List">
  25. stopDetail.no,
  26. stopDetail.sb_id,
  27. stopDetail.repair_id,
  28. stopDetail.user_id,
  29. stopDetail.type,
  30. stopDetail.apply_date,
  31. stopDetail.start_date,
  32. stopDetail.stop_date,
  33. stopDetail.content,
  34. stopDetail.status,
  35. stopDetail.remark,
  36. </sql>
  37. <sql id="List_Condition">
  38. <if test="id != null and id != ''">
  39. and stopDetail.id = #{id}
  40. </if>
  41. <if test="no != null and no != ''">
  42. and stopDetail.no = #{no}
  43. </if>
  44. <if test="sbId != null and sbId != ''">
  45. and stopDetail.sb_id = #{sbId}
  46. </if>
  47. <if test="repairId != null">
  48. and stopDetail.repair_id = #{repairId}
  49. </if>
  50. <if test="userId != null and userId != ''">
  51. and stopDetail.user_id = #{userId}
  52. </if>
  53. <if test="type != null">
  54. and stopDetail.type = #{type}
  55. </if>
  56. <if test="applyDateStart != null">
  57. and stopDetail.apply_date <![CDATA[>=]]>; #{applyDateStart}
  58. </if>
  59. <if test="applyDateEnd != null">
  60. and stopDetail.apply_date <![CDATA[<=]]> #{applyDateEnd}
  61. </if>
  62. <if test="applyDate != null">
  63. and stopDetail.apply_date = #{applyDate}
  64. </if>
  65. <if test="startDateStart != null">
  66. and stopDetail.start_date <![CDATA[>=]]>; #{startDateStart}
  67. </if>
  68. <if test="startDateEnd != null">
  69. and stopDetail.start_date <![CDATA[<=]]> #{startDateEnd}
  70. </if>
  71. <if test="startDate != null">
  72. and stopDetail.start_date = #{startDate}
  73. </if>
  74. <if test="stopDateStart != null">
  75. and stopDetail.stop_date <![CDATA[>=]]>; #{stopDateStart}
  76. </if>
  77. <if test="stopDateEnd != null">
  78. and stopDetail.stop_date <![CDATA[<=]]> #{stopDateEnd}
  79. </if>
  80. <if test="stopDate != null">
  81. and stopDetail.stop_date = #{stopDate}
  82. </if>
  83. <if test="content != null and content != ''">
  84. and stopDetail.content = #{content}
  85. </if>
  86. <if test="status != null">
  87. and stopDetail.status = #{status}
  88. </if>
  89. <if test="remark != null and remark != ''">
  90. and stopDetail.remark = #{remark}
  91. </if>
  92. <if test="createdTimeStart != null">
  93. and stopDetail.created_time <![CDATA[>=]]>; #{createdTimeStart}
  94. </if>
  95. <if test="createdTimeEnd != null">
  96. and stopDetail.created_time <![CDATA[<=]]> #{createdTimeEnd}
  97. </if>
  98. <if test="createdTime != null">
  99. and stopDetail.created_time = #{createdTime}
  100. </if>
  101. <if test="updateTimeStart != null">
  102. and stopDetail.update_time <![CDATA[>=]]>; #{updateTimeStart}
  103. </if>
  104. <if test="updateTimeEnd != null">
  105. and stopDetail.update_time <![CDATA[<=]]> #{updateTimeEnd}
  106. </if>
  107. <if test="updateTime != null">
  108. and stopDetail.update_time = #{updateTime}
  109. </if>
  110. <if test="createdUserId != null and createdUserId != ''">
  111. and stopDetail.created_user_id = #{createdUserId}
  112. </if>
  113. <if test="createdUserName != null and createdUserName != ''">
  114. and stopDetail.created_user_name = #{createdUserName}
  115. </if>
  116. <if test="updateUserId != null and updateUserId != ''">
  117. and stopDetail.update_user_id = #{updateUserId}
  118. </if>
  119. <if test="updateUserName != null and updateUserName != ''">
  120. and stopDetail.update_user_name = #{updateUserName}
  121. </if>
  122. <if test="keyword != null and keyword != ''">
  123. and (stopDetail.id like concat(concat('%',#{keyword}),'%')
  124. or t1.no like concat(concat('%',#{keyword}),'%')
  125. or t1.name like concat(concat('%',#{keyword}),'%')
  126. )
  127. </if>
  128. </sql>
  129. <select id="selectList" parameterType="com.platform.dao.dto.sb.SbInfoStopDetailDTO"
  130. resultType="com.platform.dao.vo.query.sb.SbInfoStopDetailVO">
  131. select stopDetail.*
  132. ,t1.name as sbInfoName
  133. from t_sb_info_stop_detail as stopDetail
  134. LEFT JOIN t_sb_info t1 on stopDetail.sb_id = t1.id
  135. <where>
  136. <include refid="List_Condition"/>
  137. </where>
  138. </select>
  139. </mapper>