SbMeasureLogMapper.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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.SbMeasureLogMapper">
  4. <sql id="Base_Column_List">
  5. checkstandard.id,
  6. checkstandard.sb_id,
  7. checkstandard.standard_hours,
  8. checkstandard.real_hours,
  9. checkstandard.last_date,
  10. checkstandard.check_user_id,
  11. checkstandard.name,
  12. checkstandard.no,
  13. checkstandard.type,
  14. checkstandard.period,
  15. checkstandard.periodType,
  16. checkstandard.actionType,
  17. checkstandard.enable,
  18. checkstandard.part,
  19. checkstandard.requirement,
  20. checkstandard.remark,
  21. checkstandard.created_user_id,
  22. checkstandard.update_user_id,
  23. checkstandard.created_user_name,
  24. checkstandard.update_user_name,
  25. checkstandard.created_time,
  26. checkstandard.update_time
  27. </sql>
  28. <sql id="Ref_Column_List">
  29. checkstandard.sb_id,
  30. checkstandard.standard_hours,
  31. checkstandard.real_hours,
  32. checkstandard.check_user_id,
  33. checkstandard.last_date,
  34. checkstandard.name,
  35. checkstandard.no,
  36. checkstandard.type,
  37. checkstandard.period,
  38. checkstandard.part,
  39. checkstandard.periodType,
  40. checkstandard.actionType,
  41. checkstandard.enable,
  42. checkstandard.requirement,
  43. checkstandard.remark,
  44. </sql>
  45. <sql id="List_Condition">
  46. <if test="id != null and id != ''">
  47. and checkstandard.id = #{id}
  48. </if>
  49. <if test="sbId != null and sbId != ''">
  50. and checkstandard.sb_id = #{sbId}
  51. </if>
  52. <if test="name != null and name != ''">
  53. and checkstandard.name = #{name}
  54. </if>
  55. <if test="part != null and part != ''">
  56. and checkstandard.part = #{part}
  57. </if>
  58. <if test="checkUserId != null and checkUserId != ''">
  59. and checkstandard.check_user_id = #{checkUserId}
  60. </if>
  61. <if test="no != null and no != ''">
  62. and checkstandard.no = #{no}
  63. </if>
  64. <if test="type != null">
  65. and checkstandard.type = #{type}
  66. </if>
  67. <if test="period != null">
  68. and checkstandard.period = #{period}
  69. </if>
  70. <if test="periodType != null">
  71. and checkstandard.period_type = #{periodType}
  72. </if>
  73. <if test="actionType != null">
  74. and checkstandard.action_type = #{actionType}
  75. </if>
  76. <if test="enable != null">
  77. and checkstandard.enable = #{enable}
  78. </if>
  79. <if test="requirement != null and requirement != ''">
  80. and checkstandard.requirement = #{requirement}
  81. </if>
  82. <if test="remark != null and remark != ''">
  83. and checkstandard.remark = #{remark}
  84. </if>
  85. <if test="createdUserId != null and createdUserId != ''">
  86. and checkstandard.created_user_id = #{createdUserId}
  87. </if>
  88. <if test="updateUserId != null and updateUserId != ''">
  89. and checkstandard.update_user_id = #{updateUserId}
  90. </if>
  91. <if test="createdUserName != null and createdUserName != ''">
  92. and checkstandard.created_user_name = #{createdUserName}
  93. </if>
  94. <if test="updateUserName != null and updateUserName != ''">
  95. and checkstandard.update_user_name = #{updateUserName}
  96. </if>
  97. <if test="createdTimeStart != null">
  98. and checkstandard.created_time <![CDATA[>=]]>; #{createdTimeStart}
  99. </if>
  100. <if test="createdTimeEnd != null">
  101. and checkstandard.created_time <![CDATA[<=]]> #{createdTimeEnd}
  102. </if>
  103. <if test="createdTime != null">
  104. and checkstandard.created_time = #{createdTime}
  105. </if>
  106. <if test="updateTimeStart != null">
  107. and checkstandard.update_time <![CDATA[>=]]>; #{updateTimeStart}
  108. </if>
  109. <if test="updateTimeEnd != null">
  110. and checkstandard.update_time <![CDATA[<=]]> #{updateTimeEnd}
  111. </if>
  112. <if test="updateTime != null">
  113. and checkstandard.update_time = #{updateTime}
  114. </if>
  115. <if test="keyword != null and keyword != ''">
  116. and checkstandard.name like concat('%',#{keyword},'%')
  117. </if>
  118. <if test="searchStartTime != null">
  119. and checkstandard.last_date <![CDATA[ >= ]]> #{searchStartTime}
  120. </if>
  121. <if test="searchEndTime != null">
  122. and checkstandard.last_date <![CDATA[ <= ]]> #{searchEndTime}
  123. </if>
  124. <if test="keyword != null and keyword != ''">
  125. and (
  126. sb.name like concat('%',#{keyword},'%')
  127. or
  128. sb.no like concat('%',#{keyword},'%')
  129. or
  130. sb.card_no like concat('%',#{keyword},'%')
  131. )
  132. </if>
  133. </sql>
  134. <select id="selectList" parameterType="com.platform.dao.dto.sb.SbMeasureLogDTO"
  135. resultType="com.platform.dao.vo.query.sb.SbMeasureLogVO">
  136. select checkstandard.*,
  137. sb.position_no positionNo, sb.zzh, sb.name sbName, sb.model sbModel, sb.no sbNo, sb.zzh sbZzh, sb.card_no cardNo
  138. from t_sb_measure_log as checkstandard
  139. LEFT JOIN t_sb_info sb on checkstandard.sb_id = sb.id
  140. <where>
  141. <include refid="List_Condition"/>
  142. </where>
  143. order by checkstandard.created_time desc
  144. </select>
  145. </mapper>