ExamineStaffV1ServiceDaoImplMapper.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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="examineStaffV1ServiceDaoImpl">
  6. <!-- 保存考核员工信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveExamineStaffInfo" parameterType="Map">
  8. insert into examine_staff(
  9. es_id,staff_name,community_id,staff_id,post
  10. ) values (
  11. #{esId},#{staffName},#{communityId},#{staffId},#{post}
  12. )
  13. </insert>
  14. <!-- 查询考核员工信息 add by wuxw 2018-07-03 -->
  15. <select id="getExamineStaffInfo" parameterType="Map" resultType="Map">
  16. select t.es_id,t.es_id esId,t.staff_name,t.staff_name staffName,t.status_cd,t.status_cd
  17. statusCd,t.community_id,t.community_id communityId,t.staff_id,t.staff_id staffId,t.post
  18. from examine_staff t
  19. where 1 =1
  20. <if test="esId !=null and esId != ''">
  21. and t.es_id= #{esId}
  22. </if>
  23. <if test="staffName !=null and staffName != ''">
  24. and t.staff_name= #{staffName}
  25. </if>
  26. <if test="statusCd !=null and statusCd != ''">
  27. and t.status_cd= #{statusCd}
  28. </if>
  29. <if test="communityId !=null and communityId != ''">
  30. and t.community_id= #{communityId}
  31. </if>
  32. <if test="staffId !=null and staffId != ''">
  33. and t.staff_id= #{staffId}
  34. </if>
  35. order by t.create_time desc
  36. <if test="page != -1 and page != null ">
  37. limit #{page}, #{row}
  38. </if>
  39. </select>
  40. <!-- 修改考核员工信息 add by wuxw 2018-07-03 -->
  41. <update id="updateExamineStaffInfo" parameterType="Map">
  42. update examine_staff t set t.status_cd = #{statusCd}
  43. <if test="newBId != null and newBId != ''">
  44. ,t.b_id = #{newBId}
  45. </if>
  46. <if test="staffName !=null and staffName != ''">
  47. , t.staff_name= #{staffName}
  48. </if>
  49. <if test="post !=null and post != ''">
  50. , t.post= #{post}
  51. </if>
  52. where 1=1
  53. <if test="esId !=null and esId != ''">
  54. and t.es_id= #{esId}
  55. </if>
  56. <if test="communityId !=null and communityId != ''">
  57. and t.community_id= #{communityId}
  58. </if>
  59. <if test="staffId !=null and staffId != ''">
  60. and t.staff_id= #{staffId}
  61. </if>
  62. </update>
  63. <!-- 查询考核员工数量 add by wuxw 2018-07-03 -->
  64. <select id="queryExamineStaffsCount" parameterType="Map" resultType="Map">
  65. select count(1) count
  66. from examine_staff t
  67. where 1 =1
  68. <if test="esId !=null and esId != ''">
  69. and t.es_id= #{esId}
  70. </if>
  71. <if test="staffName !=null and staffName != ''">
  72. and t.staff_name= #{staffName}
  73. </if>
  74. <if test="statusCd !=null and statusCd != ''">
  75. and t.status_cd= #{statusCd}
  76. </if>
  77. <if test="communityId !=null and communityId != ''">
  78. and t.community_id= #{communityId}
  79. </if>
  80. <if test="staffId !=null and staffId != ''">
  81. and t.staff_id= #{staffId}
  82. </if>
  83. </select>
  84. </mapper>