AttendanceClassesV1ServiceDaoImplMapper.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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="attendanceClassesV1ServiceDaoImpl">
  6. <!-- 保存申请钥匙信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveAttendanceClassesInfo" parameterType="Map">
  8. insert into attendance_classes(
  9. time_offset,clock_count,store_id,clock_type,classes_name,classes_id,leave_offset,late_offset,clock_type_value,max_last_offset
  10. ) values (
  11. #{timeOffset},#{clockCount},#{storeId},#{clockType},#{classesName},#{classesId},#{leaveOffset},#{lateOffset},#{clockTypeValue},#{maxLastOffset}
  12. )
  13. </insert>
  14. <!-- 查询申请钥匙信息 add by wuxw 2018-07-03 -->
  15. <select id="getAttendanceClassesInfo" parameterType="Map" resultType="Map">
  16. select t.time_offset,t.time_offset
  17. timeOffset,t.clock_count,t.clock_count clockCount,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.clock_type,t.clock_type
  18. clockType,t.classes_name,t.classes_name
  19. classesName,t.classes_id,t.classes_id classesId,t.leave_offset,t.leave_offset
  20. leaveOffset,t.late_offset,t.late_offset lateOffset,t.clock_type_value,t.clock_type_value clockTypeValue,
  21. t.max_last_offset maxLastOffset
  22. from attendance_classes t
  23. where 1 =1
  24. <if test="timeOffset !=null and timeOffset != ''">
  25. and t.time_offset= #{timeOffset}
  26. </if>
  27. <if test="clockCount !=null and clockCount != ''">
  28. and t.clock_count= #{clockCount}
  29. </if>
  30. <if test="maxLastOffset !=null and maxLastOffset != ''">
  31. and t.max_last_offset= #{maxLastOffset}
  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="clockType !=null and clockType != ''">
  40. and t.clock_type= #{clockType}
  41. </if>
  42. <if test="classesName !=null and classesName != ''">
  43. and t.classes_name= #{classesName}
  44. </if>
  45. <if test="classesId !=null and classesId != ''">
  46. and t.classes_id= #{classesId}
  47. </if>
  48. <if test="leaveOffset !=null and leaveOffset != ''">
  49. and t.leave_offset= #{leaveOffset}
  50. </if>
  51. <if test="lateOffset !=null and lateOffset != ''">
  52. and t.late_offset= #{lateOffset}
  53. </if>
  54. <if test="clockTypeValue !=null and clockTypeValue != ''">
  55. and t.clock_type_value= #{clockTypeValue}
  56. </if>
  57. order by t.create_time desc
  58. <if test="page != -1 and page != null ">
  59. limit #{page}, #{row}
  60. </if>
  61. </select>
  62. <!-- 修改申请钥匙信息 add by wuxw 2018-07-03 -->
  63. <update id="updateAttendanceClassesInfo" parameterType="Map">
  64. update attendance_classes t set t.status_cd = #{statusCd}
  65. <if test="newBId != null and newBId != ''">
  66. ,t.b_id = #{newBId}
  67. </if>
  68. <if test="timeOffset !=null and timeOffset != ''">
  69. , t.time_offset= #{timeOffset}
  70. </if>
  71. <if test="clockCount !=null and clockCount != ''">
  72. , t.clock_count= #{clockCount}
  73. </if>
  74. <if test="clockType !=null and clockType != ''">
  75. , t.clock_type= #{clockType}
  76. </if>
  77. <if test="classesName !=null and classesName != ''">
  78. , t.classes_name= #{classesName}
  79. </if>
  80. <if test="leaveOffset !=null and leaveOffset != ''">
  81. , t.leave_offset= #{leaveOffset}
  82. </if>
  83. <if test="lateOffset !=null and lateOffset != ''">
  84. , t.late_offset= #{lateOffset}
  85. </if>
  86. <if test="maxLastOffset !=null and maxLastOffset != ''">
  87. , t.max_last_offset= #{maxLastOffset}
  88. </if>
  89. <if test="clockTypeValue !=null and clockTypeValue != ''">
  90. , t.clock_type_value= #{clockTypeValue}
  91. </if>
  92. where 1=1
  93. <if test="classesId !=null and classesId != ''">
  94. and t.classes_id= #{classesId}
  95. </if>
  96. <if test="storeId !=null and storeId != ''">
  97. and t.store_id= #{storeId}
  98. </if>
  99. </update>
  100. <!-- 查询申请钥匙数量 add by wuxw 2018-07-03 -->
  101. <select id="queryAttendanceClassessCount" parameterType="Map" resultType="Map">
  102. select count(1) count
  103. from attendance_classes t
  104. where 1 =1
  105. <if test="timeOffset !=null and timeOffset != ''">
  106. and t.time_offset= #{timeOffset}
  107. </if>
  108. <if test="clockCount !=null and clockCount != ''">
  109. and t.clock_count= #{clockCount}
  110. </if>
  111. <if test="statusCd !=null and statusCd != ''">
  112. and t.status_cd= #{statusCd}
  113. </if>
  114. <if test="storeId !=null and storeId != ''">
  115. and t.store_id= #{storeId}
  116. </if>
  117. <if test="clockType !=null and clockType != ''">
  118. and t.clock_type= #{clockType}
  119. </if>
  120. <if test="classesName !=null and classesName != ''">
  121. and t.classes_name= #{classesName}
  122. </if>
  123. <if test="classesId !=null and classesId != ''">
  124. and t.classes_id= #{classesId}
  125. </if>
  126. <if test="leaveOffset !=null and leaveOffset != ''">
  127. and t.leave_offset= #{leaveOffset}
  128. </if>
  129. <if test="maxLastOffset !=null and maxLastOffset != ''">
  130. and t.max_last_offset= #{maxLastOffset}
  131. </if>
  132. <if test="lateOffset !=null and lateOffset != ''">
  133. and t.late_offset= #{lateOffset}
  134. </if>
  135. <if test="clockTypeValue !=null and clockTypeValue != ''">
  136. and t.clock_type_value= #{clockTypeValue}
  137. </if>
  138. </select>
  139. </mapper>