HiddenDangerMapper.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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.hidden.HiddenDangerMapper">
  4. <sql id="Base_Column_List">
  5. hidden.id,
  6. hidden.sb_id,
  7. hidden.position_no,
  8. hidden.position_id,
  9. hidden.exists_question,
  10. hidden.hidden_risk,
  11. hidden.opition,
  12. hidden.duty_user,
  13. hidden.area_user,
  14. hidden.remark,
  15. hidden.created_user_id,
  16. hidden.created_user_name,
  17. hidden.update_user_id,
  18. hidden.update_user_name,
  19. hidden.status,
  20. hidden.professor_type,
  21. hidden.check_level,
  22. hidden.require_time,
  23. hidden.update_time,
  24. hidden.created_time
  25. </sql>
  26. <sql id="Ref_Column_List">
  27. hidden.sb_id,
  28. hidden.position_no,
  29. hidden.position_id,
  30. hidden.exists_question,
  31. hidden.hidden_risk,
  32. hidden.opition,
  33. hidden.duty_user,
  34. hidden.area_user,
  35. hidden.remark,
  36. hidden.status,
  37. hidden.professor_type,
  38. hidden.check_level,
  39. hidden.require_time,
  40. </sql>
  41. <sql id="List_Condition">
  42. <if test="id != null and id != ''">
  43. and hidden.id = #{id}
  44. </if>
  45. <if test="sbId != null and sbId != ''">
  46. and hidden.sb_id = #{sbId}
  47. </if>
  48. <if test="positionNo != null and positionNo != ''">
  49. and hidden.position_no = #{positionNo}
  50. </if>
  51. <if test="positionId != null and positionId != ''">
  52. and hidden.position_id = #{positionId}
  53. </if>
  54. <if test="existsQuestion != null">
  55. and hidden.exists_question = #{existsQuestion}
  56. </if>
  57. <if test="hiddenRisk != null">
  58. and hidden.hidden_risk = #{hiddenRisk}
  59. </if>
  60. <if test="opition != null">
  61. and hidden.opition = #{opition}
  62. </if>
  63. <if test="dutyUser != null and dutyUser != ''">
  64. and hidden.duty_user = #{dutyUser}
  65. </if>
  66. <if test="areaUser != null and areaUser != ''">
  67. and hidden.area_user = #{areaUser}
  68. </if>
  69. <if test="remark != null and remark != ''">
  70. and hidden.remark = #{remark}
  71. </if>
  72. <if test="createdUserId != null and createdUserId != ''">
  73. and hidden.created_user_id = #{createdUserId}
  74. </if>
  75. <if test="createdUserName != null and createdUserName != ''">
  76. and hidden.created_user_name = #{createdUserName}
  77. </if>
  78. <if test="updateUserId != null and updateUserId != ''">
  79. and hidden.update_user_id = #{updateUserId}
  80. </if>
  81. <if test="updateUserName != null and updateUserName != ''">
  82. and hidden.update_user_name = #{updateUserName}
  83. </if>
  84. <if test="status != null">
  85. and hidden.status = #{status}
  86. </if>
  87. <if test="professorType != null">
  88. and hidden.professor_type = #{professorType}
  89. </if>
  90. <if test="checkLevel != null">
  91. and hidden.check_level = #{checkLevel}
  92. </if>
  93. <if test="requireTimeStart != null">
  94. and hidden.require_time <![CDATA[>=]]>; #{requireTimeStart}
  95. </if>
  96. <if test="requireTimeEnd != null">
  97. and hidden.require_time <![CDATA[<=]]> #{requireTimeEnd}
  98. </if>
  99. <if test="requireTime != null">
  100. and hidden.require_time = #{requireTime}
  101. </if>
  102. <if test="updateTimeStart != null">
  103. and hidden.update_time <![CDATA[>=]]>; #{updateTimeStart}
  104. </if>
  105. <if test="updateTimeEnd != null">
  106. and hidden.update_time <![CDATA[<=]]> #{updateTimeEnd}
  107. </if>
  108. <if test="updateTime != null">
  109. and hidden.update_time = #{updateTime}
  110. </if>
  111. <if test="createdTimeStart != null">
  112. and hidden.created_time <![CDATA[>=]]>; #{createdTimeStart}
  113. </if>
  114. <if test="createdTimeEnd != null">
  115. and hidden.created_time <![CDATA[<=]]> #{createdTimeEnd}
  116. </if>
  117. <if test="createdTime != null">
  118. and hidden.created_time = #{createdTime}
  119. </if>
  120. <if test="keyword != null and keyword != ''">
  121. and hidden.id like concat(concat('%',#{keyword}),'%')
  122. </if>
  123. <if test="statusList != null and statusList.size > 0">
  124. AND hidden.status in
  125. <foreach item="item" index="index" collection="statusList" open="(" close=")" separator=",">
  126. #{item}
  127. </foreach>
  128. </if>
  129. </sql>
  130. <select id="selectList" parameterType="com.platform.dao.dto.hidden.HiddenDangerDTO"
  131. resultType="com.platform.dao.vo.query.hidden.HiddenDangerVO">
  132. select hidden.*,sb.name as sbName,sp.name as positionName,area.real_name as areaUserName,duty.real_name as dutyUserName
  133. from t_hidden_danger as hidden join t_sb_info sb on hidden.sb_id = sb.id
  134. join t_sb_position sp on hidden.position_id = sp.id join t_sys_user duty on hidden.duty_user = duty.user_id
  135. join t_sys_user area on hidden.area_user = area.user_id
  136. <where>
  137. <include refid="List_Condition"/>
  138. </where>
  139. </select>
  140. </mapper>