AttendanceClassesStaffV1ServiceDaoImplMapper.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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="attendanceClassesStaffV1ServiceDaoImpl">
  6. <!-- 保存考勤员工信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveAttendanceClassesStaffInfo" parameterType="Map">
  8. insert into attendance_classes_staff(
  9. classes_id,cs_id,staff_name,store_id,staff_id
  10. ) values (
  11. #{classesId},#{csId},#{staffName},#{storeId},#{staffId}
  12. )
  13. </insert>
  14. <!-- 查询考勤员工信息 add by wuxw 2018-07-03 -->
  15. <select id="getAttendanceClassesStaffInfo" parameterType="Map" resultType="Map">
  16. select t.classes_id,t.classes_id classesId,t.cs_id,t.cs_id csId,t.staff_name,t.staff_name
  17. staffName,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.staff_id,t.staff_id staffId,
  18. t.create_time createTime
  19. from attendance_classes_staff t
  20. where 1 =1
  21. <if test="classesId !=null and classesId != ''">
  22. and t.classes_id= #{classesId}
  23. </if>
  24. <if test="csId !=null and csId != ''">
  25. and t.cs_id= #{csId}
  26. </if>
  27. <if test="staffName !=null and staffName != ''">
  28. and t.staff_name= #{staffName}
  29. </if>
  30. <if test="staffNameLike !=null and staffNameLike != ''">
  31. and t.staff_name like concat('%', #{staffNameLike},'%')
  32. </if>
  33. <if test="statusCd !=null and statusCd != ''">
  34. and t.status_cd= #{statusCd}
  35. </if>
  36. <if test="storeId !=null and storeId != ''">
  37. and t.store_id= #{storeId}
  38. </if>
  39. <if test="staffId !=null and staffId != ''">
  40. and t.staff_id= #{staffId}
  41. </if>
  42. order by t.create_time desc
  43. <if test="page != -1 and page != null ">
  44. limit #{page}, #{row}
  45. </if>
  46. </select>
  47. <!-- 修改考勤员工信息 add by wuxw 2018-07-03 -->
  48. <update id="updateAttendanceClassesStaffInfo" parameterType="Map">
  49. update attendance_classes_staff t set t.status_cd = #{statusCd}
  50. <if test="newBId != null and newBId != ''">
  51. ,t.b_id = #{newBId}
  52. </if>
  53. <if test="classesId !=null and classesId != ''">
  54. , t.classes_id= #{classesId}
  55. </if>
  56. <if test="staffName !=null and staffName != ''">
  57. , t.staff_name= #{staffName}
  58. </if>
  59. <if test="staffId !=null and staffId != ''">
  60. , t.staff_id= #{staffId}
  61. </if>
  62. where 1=1
  63. <if test="csId !=null and csId != ''">
  64. and t.cs_id= #{csId}
  65. </if>
  66. <if test="storeId !=null and storeId != ''">
  67. and t.store_id= #{storeId}
  68. </if>
  69. </update>
  70. <!-- 查询考勤员工数量 add by wuxw 2018-07-03 -->
  71. <select id="queryAttendanceClassesStaffsCount" parameterType="Map" resultType="Map">
  72. select count(1) count
  73. from attendance_classes_staff t
  74. where 1 =1
  75. <if test="classesId !=null and classesId != ''">
  76. and t.classes_id= #{classesId}
  77. </if>
  78. <if test="csId !=null and csId != ''">
  79. and t.cs_id= #{csId}
  80. </if>
  81. <if test="staffName !=null and staffName != ''">
  82. and t.staff_name= #{staffName}
  83. </if>
  84. <if test="staffNameLike !=null and staffNameLike != ''">
  85. and t.staff_name like concat('%', #{staffNameLike},'%')
  86. </if>
  87. <if test="statusCd !=null and statusCd != ''">
  88. and t.status_cd= #{statusCd}
  89. </if>
  90. <if test="storeId !=null and storeId != ''">
  91. and t.store_id= #{storeId}
  92. </if>
  93. <if test="staffId !=null and staffId != ''">
  94. and t.staff_id= #{staffId}
  95. </if>
  96. </select>
  97. </mapper>