| | |
| | | |
| | | <select id="performanceShiftPage" resultMap="performanceShiftPageMap"> |
| | | SELECT |
| | | GROUP_CONCAT(s.work_time, ':', s.shift, ':', s.id order by s.work_time SEPARATOR ';') AS shift_time, u2.id user_id |
| | | u2.name name, |
| | | GROUP_CONCAT(s.work_time, ':', s.shift, ':',IFNULL(s.annotation_text,''), ':',s.id order by s.work_time SEPARATOR ';') AS shift_time, |
| | | u2.id user_id |
| | | FROM performance_shift s |
| | | LEFT JOIN (SELECT distinct u.* from |
| | | user u |
| | |
| | | ) u2 on u2.id = s.user_id |
| | | <where> |
| | | name is not null |
| | | <if test="time != null and time != ''"> |
| | | and DATE_FORMAT(s.work_time, '%Y-%m') = DATE_FORMAT(#{time}, '%Y-%m' ) |
| | | <if test="firstDayOfMonth != null and lastDayOfMonth != null"> |
| | | AND s.work_time BETWEEN #{firstDayOfMonth} AND #{lastDayOfMonth} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | and u2.name like concat('%', #{userName}, '%') |
| | |
| | | |
| | | <select id="performanceShiftYear" resultType="java.util.Map"> |
| | | SELECT |
| | | u2.name name, |
| | | s.user_id, u2.account, |
| | | DATE_FORMAT(s.work_time, '%c') work_time, |
| | | GROUP_CONCAT(DATE_FORMAT(s.work_time, '%c'), ':', s.shift order by s.work_time SEPARATOR ';') month_str |
| | |
| | | |
| | | <select id="performanceShiftYearList" resultType="map"> |
| | | SELECT |
| | | u.name name, |
| | | s.user_id, u.account, |
| | | DATE_FORMAT(s.work_time, '%c') work_time, |
| | | GROUP_CONCAT(DATE_FORMAT(s.work_time, '%c'), ':', s.shift order by s.work_time SEPARATOR ';') month_str |
| | |
| | | |
| | | <select id="performanceShiftList" resultMap="performanceShiftPageMap"> |
| | | SELECT |
| | | GROUP_CONCAT(s.work_time, ':', s.shift, ':', s.id order by s.work_time SEPARATOR ';') AS shift_time, u.id user_id, u.department |
| | | u.name name, |
| | | GROUP_CONCAT(s.work_time, ':', s.shift, ':', s.id order by s.work_time SEPARATOR ';') AS shift_time, u.id user_id |
| | | FROM performance_shift s |
| | | LEFT JOIN user u on u.id = s.user_id |
| | | <where> |