RemoteDegreeLogMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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.remote.RemoteDegreeLogMapper">
  4. <sql id="Base_Column_List">
  5. degree_log
  6. .
  7. id
  8. ,
  9. degree_log.sb_id,
  10. degree_log.sb_name,
  11. degree_log.position_num,
  12. degree_log.type,
  13. degree_log.description,
  14. degree_log.result,
  15. degree_log.ratio,
  16. degree_log.unit,
  17. degree_log.remark,
  18. degree_log.year,
  19. degree_log.month,
  20. degree_log.day,
  21. degree_log.hour,
  22. degree_log.minute,
  23. degree_log.info,
  24. degree_log.created_user_id,
  25. degree_log.update_user_id,
  26. degree_log.created_time,
  27. degree_log.update_time
  28. </sql>
  29. <sql id="Ref_Column_List">
  30. degree_log
  31. .
  32. sb_id
  33. ,
  34. degree_log.sb_name,
  35. degree_log.position_num,
  36. degree_log.type,
  37. degree_log.description,
  38. degree_log.result,
  39. degree_log.year,
  40. degree_log.month,
  41. degree_log.day,
  42. degree_log.hour,
  43. degree_log.minute,
  44. degree_log.info,
  45. degree_log.ratio,
  46. degree_log.unit,
  47. degree_log.remark,
  48. </sql>
  49. <sql id="List_Condition">
  50. <if test="id != null and id != ''">
  51. and degree_log.id = #{id}
  52. </if>
  53. <if test="sbId != null and sbId != ''">
  54. and degree_log.sb_id = #{sbId}
  55. </if>
  56. <if test="year != null">
  57. and degree_log.year = #{year}
  58. </if>
  59. <if test="month != null">
  60. and degree_log.month = #{month}
  61. </if>
  62. <if test="day != null">
  63. and degree_log.day = #{day}
  64. </if>
  65. <if test="hour != null">
  66. and degree_log.hour = #{hour}
  67. </if>
  68. <if test="minute != null">
  69. and degree_log.minute = #{minute}
  70. </if>
  71. <if test="positionNum != null">
  72. and degree_log.position_num = #{positionNum}
  73. </if>
  74. <if test="type != null">
  75. and degree_log.type = #{type}
  76. </if>
  77. <if test="description != null and description != ''">
  78. and degree_log.description = #{description}
  79. </if>
  80. <if test="result != null and result != ''">
  81. and degree_log.result = #{result}
  82. </if>
  83. <if test="ratio != null">
  84. and degree_log.ratio = #{ratio}
  85. </if>
  86. <if test="unit != null and unit != ''">
  87. and degree_log.unit = #{unit}
  88. </if>
  89. <if test="remark != null and remark != ''">
  90. and degree_log.remark = #{remark}
  91. </if>
  92. <if test="createdUserId != null and createdUserId != ''">
  93. and degree_log.created_user_id = #{createdUserId}
  94. </if>
  95. <if test="updateUserId != null and updateUserId != ''">
  96. and degree_log.update_user_id = #{updateUserId}
  97. </if>
  98. <if test="createdTimeStart != null">
  99. and degree_log.created_time <![CDATA[>=]]>; #{createdTimeStart}
  100. </if>
  101. <if test="createdTimeEnd != null">
  102. and degree_log.created_time <![CDATA[<=]]> #{createdTimeEnd}
  103. </if>
  104. <if test="createdTime != null">
  105. and degree_log.created_time = #{createdTime}
  106. </if>
  107. <if test="updateTimeStart != null">
  108. and degree_log.update_time <![CDATA[>=]]>; #{updateTimeStart}
  109. </if>
  110. <if test="updateTimeEnd != null">
  111. and degree_log.update_time <![CDATA[<=]]> #{updateTimeEnd}
  112. </if>
  113. <if test="updateTime != null">
  114. and degree_log.update_time = #{updateTime}
  115. </if>
  116. <if test="keyword != null and keyword != ''">
  117. and (
  118. degree.sb_name like concat(concat('%',#{keyword}),'%')
  119. or degree_log.position_num like concat(concat('%',#{keyword}),'%')
  120. )
  121. </if>
  122. <if test="sbName != null and sbName != ''">
  123. and degree.sb_name like concat(concat('%',#{sbName}),'%')
  124. </if>
  125. <if test="line != null">
  126. and degree.line = #{line}
  127. </if>
  128. </sql>
  129. <select id="selectList" parameterType="com.platform.dao.dto.remote.RemoteDegreeLogDTO"
  130. resultType="com.platform.dao.vo.query.remote.RemoteDegreeLogVO">
  131. select degree_log.*, degree.sb_name sbName, degree.line line, degree.type
  132. from t_remote_degree_log as degree_log
  133. left join t_remote_degree degree on degree_log.position_num = degree.position_num
  134. <where>
  135. <include refid="List_Condition"/>
  136. <if test="line != null">
  137. and degree.line = #{line}
  138. </if>
  139. </where>
  140. </select>
  141. </mapper>