ExamineStaffValueV1ServiceDaoImplMapper.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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="examineStaffValueV1ServiceDaoImpl">
  6. <!-- 保存考核评分信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveExamineStaffValueInfo" parameterType="Map">
  8. insert into examine_staff_value(
  9. owner_name,esv_id,es_id,staff_name,owner_id,community_id,project_id,examine_value,staff_id,room_id,room_name
  10. ) values (
  11. #{ownerName},#{esvId},#{esId},#{staffName},#{ownerId},#{communityId},#{projectId},#{examineValue},#{staffId},#{roomId},#{roomName}
  12. )
  13. </insert>
  14. <!-- 查询考核评分信息 add by wuxw 2018-07-03 -->
  15. <select id="getExamineStaffValueInfo" parameterType="Map" resultType="Map">
  16. select t.owner_name,t.owner_name ownerName,t.esv_id,t.esv_id esvId,t.es_id,t.es_id
  17. esId,t.staff_name,t.staff_name staffName,t.status_cd,t.status_cd statusCd,t.owner_id,t.owner_id
  18. ownerId,t.community_id,t.community_id communityId,t.project_id,t.project_id
  19. projectId,t.examine_value,t.examine_value examineValue,t.staff_id,t.staff_id staffId,t.room_id,t.room_id
  20. roomId,t.room_name,t.room_name roomName,t.es_year esYear
  21. from examine_staff_value t
  22. where 1 =1
  23. <if test="ownerName !=null and ownerName != ''">
  24. and t.owner_name= #{ownerName}
  25. </if>
  26. <if test="esvId !=null and esvId != ''">
  27. and t.esv_id= #{esvId}
  28. </if>
  29. <if test="esId !=null and esId != ''">
  30. and t.es_id= #{esId}
  31. </if>
  32. <if test="staffName !=null and staffName != ''">
  33. and t.staff_name= #{staffName}
  34. </if>
  35. <if test="statusCd !=null and statusCd != ''">
  36. and t.status_cd= #{statusCd}
  37. </if>
  38. <if test="ownerId !=null and ownerId != ''">
  39. and t.owner_id= #{ownerId}
  40. </if>
  41. <if test="communityId !=null and communityId != ''">
  42. and t.community_id= #{communityId}
  43. </if>
  44. <if test="projectId !=null and projectId != ''">
  45. and t.project_id= #{projectId}
  46. </if>
  47. <if test="examineValue !=null and examineValue != ''">
  48. and t.examine_value= #{examineValue}
  49. </if>
  50. <if test="staffId !=null and staffId != ''">
  51. and t.staff_id= #{staffId}
  52. </if>
  53. <if test="roomId !=null and roomId != ''">
  54. and t.room_id= #{roomId}
  55. </if>
  56. <if test="roomName !=null and roomName != ''">
  57. and t.room_name= #{roomName}
  58. </if>
  59. <if test="esYear !=null and esYear != ''">
  60. and t.es_year= #{esYear}
  61. </if>
  62. order by t.create_time desc
  63. <if test="page != -1 and page != null ">
  64. limit #{page}, #{row}
  65. </if>
  66. </select>
  67. <!-- 修改考核评分信息 add by wuxw 2018-07-03 -->
  68. <update id="updateExamineStaffValueInfo" parameterType="Map">
  69. update examine_staff_value t set t.status_cd = #{statusCd}
  70. <if test="newBId != null and newBId != ''">
  71. ,t.b_id = #{newBId}
  72. </if>
  73. <if test="ownerName !=null and ownerName != ''">
  74. , t.owner_name= #{ownerName}
  75. </if>
  76. <if test="esId !=null and esId != ''">
  77. , t.es_id= #{esId}
  78. </if>
  79. <if test="staffName !=null and staffName != ''">
  80. , t.staff_name= #{staffName}
  81. </if>
  82. <if test="ownerId !=null and ownerId != ''">
  83. , t.owner_id= #{ownerId}
  84. </if>
  85. <if test="examineValue !=null and examineValue != ''">
  86. , t.examine_value= #{examineValue}
  87. </if>
  88. <if test="roomId !=null and roomId != ''">
  89. , t.room_id= #{roomId}
  90. </if>
  91. <if test="roomName !=null and roomName != ''">
  92. , t.room_name= #{roomName}
  93. </if>
  94. where 1=1
  95. <if test="esvId !=null and esvId != ''">
  96. and t.esv_id= #{esvId}
  97. </if>
  98. <if test="projectId !=null and projectId != ''">
  99. and t.project_id= #{projectId}
  100. </if>
  101. <if test="staffId !=null and staffId != ''">
  102. and t.staff_id= #{staffId}
  103. </if>
  104. <if test="communityId !=null and communityId != ''">
  105. and t.community_id= #{communityId}
  106. </if>
  107. <if test="esYear !=null and esYear != ''">
  108. and t.es_year= #{esYear}
  109. </if>
  110. </update>
  111. <!-- 查询考核评分数量 add by wuxw 2018-07-03 -->
  112. <select id="queryExamineStaffValuesCount" parameterType="Map" resultType="Map">
  113. select count(1) count
  114. from examine_staff_value t
  115. where 1 =1
  116. <if test="ownerName !=null and ownerName != ''">
  117. and t.owner_name= #{ownerName}
  118. </if>
  119. <if test="esvId !=null and esvId != ''">
  120. and t.esv_id= #{esvId}
  121. </if>
  122. <if test="esId !=null and esId != ''">
  123. and t.es_id= #{esId}
  124. </if>
  125. <if test="staffName !=null and staffName != ''">
  126. and t.staff_name= #{staffName}
  127. </if>
  128. <if test="statusCd !=null and statusCd != ''">
  129. and t.status_cd= #{statusCd}
  130. </if>
  131. <if test="ownerId !=null and ownerId != ''">
  132. and t.owner_id= #{ownerId}
  133. </if>
  134. <if test="communityId !=null and communityId != ''">
  135. and t.community_id= #{communityId}
  136. </if>
  137. <if test="projectId !=null and projectId != ''">
  138. and t.project_id= #{projectId}
  139. </if>
  140. <if test="examineValue !=null and examineValue != ''">
  141. and t.examine_value= #{examineValue}
  142. </if>
  143. <if test="staffId !=null and staffId != ''">
  144. and t.staff_id= #{staffId}
  145. </if>
  146. <if test="roomId !=null and roomId != ''">
  147. and t.room_id= #{roomId}
  148. </if>
  149. <if test="roomName !=null and roomName != ''">
  150. and t.room_name= #{roomName}
  151. </if>
  152. <if test="esYear !=null and esYear != ''">
  153. and t.es_year= #{esYear}
  154. </if>
  155. </select>
  156. </mapper>