feat(schedule): 添加排班管理的时间段筛选功能
- 在 WmsAttendanceScheduleBo 中新增 startDate 和 endDate 字段用于时间段筛选 - 更新 mapper 接口方法参数,支持时间段范围查询 - 修改 XML 映射文件,添加时间段条件判断逻辑 - 重构服务实现类,优化分页查询逻辑并支持时间段筛选 - 完善查询方法,统一时间段参数传递机制
This commit is contained in:
@@ -57,25 +57,37 @@
|
||||
<if test="shiftId != null">
|
||||
AND s.shift_id = #{shiftId}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
AND s.work_date >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
AND s.work_date <= #{endDate}
|
||||
</if>
|
||||
ORDER BY s.work_date DESC, s.user_id
|
||||
</select>
|
||||
|
||||
<select id="selectScheduleWithDetailsPage" parameterType="java.util.Map" resultMap="WmsAttendanceScheduleVoResult">
|
||||
<select id="selectScheduleWithDetailsPage" resultMap="WmsAttendanceScheduleVoResult">
|
||||
<include refid="selectScheduleWithDetailsVo"/>
|
||||
<if test="userId != null">
|
||||
AND s.user_id = #{userId}
|
||||
<if test="bo.userId != null">
|
||||
AND s.user_id = #{bo.userId}
|
||||
</if>
|
||||
<if test="workDate != null">
|
||||
AND s.work_date = #{workDate}
|
||||
<if test="bo.workDate != null">
|
||||
AND s.work_date = #{bo.workDate}
|
||||
</if>
|
||||
<if test="shiftId != null">
|
||||
AND s.shift_id = #{shiftId}
|
||||
<if test="bo.shiftId != null">
|
||||
AND s.shift_id = #{bo.shiftId}
|
||||
</if>
|
||||
<if test="shiftName != null and shiftName != ''">
|
||||
AND s.shift_name LIKE CONCAT('%', #{shiftName}, '%')
|
||||
<if test="bo.shiftName != null and bo.shiftName != ''">
|
||||
AND s.shift_name LIKE CONCAT('%', #{bo.shiftName}, '%')
|
||||
</if>
|
||||
<if test="shiftGroup != null and shiftGroup != ''">
|
||||
AND s.shift_group = #{shiftGroup}
|
||||
<if test="bo.shiftGroup != null and bo.shiftGroup != ''">
|
||||
AND s.shift_group = #{bo.shiftGroup}
|
||||
</if>
|
||||
<if test="bo.startDate != null">
|
||||
AND s.work_date >= #{bo.startDate}
|
||||
</if>
|
||||
<if test="bo.endDate != null">
|
||||
AND s.work_date <= #{bo.endDate}
|
||||
</if>
|
||||
ORDER BY s.work_date DESC, s.user_id
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user