zouyu
6 天以前 dc7300e21fe53f74e08eb2fa494a83430e2e54ca
performance-server/src/main/resources/mapper/PerformanceShiftMapper.xml
@@ -145,4 +145,27 @@
        from department_lims
        where id = #{depLimsId}
    </select>
    <select id="selectListByWorkTime" resultType="com.ruoyi.performance.dto.PerformanceShiftMapDto">
        SELECT
            ps.id,
            ps.shift,
            ps.work_time,
            ps.user_id,
            u.name AS user_name,
            u.account AS person_code,
            st.start_time,
            st.end_time
        FROM performance_shift ps
        LEFT JOIN user u ON ps.user_id = u.id
        LEFT JOIN shift_time st ON ps.shift = st.shift
        <where>
            <if test="startTime!=null and endTime!=null">
                AND ps.work_time BETWEEN #{startTime} AND #{endTime}
            </if>
            <if test="keyword!='' and keyword!=null">
                AND (u.account like concat('%',#{keyword},'%') OR u.name like concat('%',#{keyword},'%'))
            </if>
        </where>
        ORDER BY ps.work_time
    </select>
</mapper>