Commit bd338b2b authored by 李驰骋's avatar 李驰骋

排班日历BUG修复

parent fe2de281
......@@ -8,13 +8,11 @@ import com.ximai.mes.cal.domain.CalShift;
import com.ximai.mes.cal.domain.vo.CalShiftVo;
import com.ximai.mes.cal.mapper.CalShiftMapper;
import com.ximai.mes.cal.service.ICalShiftService;
import com.ximai.mes.pro.schedule.impl.AlgorithmDataSourceThXMImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -46,11 +44,6 @@ public class CalShiftServiceImpl implements ICalShiftService {
*/
@Override
public List<CalShift> selectCalShiftList(CalShift calShift) {
// <if test="planId != null ">and plan_id = #{planId}</if>
// <if test="orderNum != null ">and order_num = #{orderNum}</if>
// <if test="shiftName != null and shiftName != ''">and shift_name like concat('%', #{shiftName}, '%')</if>
// <if test="startTime != null ">and start_time = #{startTime}</if>
// <if test="endTime != null ">and end_time = #{endTime}</if>
QueryWrapper<CalShift> calShiftVoQueryWrapper = new QueryWrapper<>();
calShiftVoQueryWrapper.eq(StringUtils.isNotEmpty(calShift.getPlanId()), "plan_id", calShift.getPlanId());
calShiftVoQueryWrapper.eq(StringUtils.isNotEmpty(calShift.getOrderNum()), "order_num", calShift.getOrderNum());
......@@ -76,6 +69,7 @@ public class CalShiftServiceImpl implements ICalShiftService {
}
}
}
objects.sort(Comparator.comparing(CalShift::getOrderNum));
return objects;
}
......@@ -229,17 +223,17 @@ public class CalShiftServiceImpl implements ICalShiftService {
List<CalShiftVo> list3 = new ArrayList<>();
CalShiftVo breakShift3 = new CalShiftVo();
breakShift3.setBreakStartTime("00:00");
breakShift3.setBreakEndTime("1:00");
breakShift3.setBreakStartTime("03:00");
breakShift3.setBreakEndTime("04:00");
breakShift3.setStartTime(null);
breakShift3.setEndTime(null);
breakShift3.setOrderNum(1);
list3.add(breakShift3);
shiftNight.setBreakTimeList(list3);
resultList.add(shiftNight);
resultList.add(shiftDay);
resultList.add(shiftMid);
resultList.add(shiftNight);
}
Arrays.sort(resultList.toArray(new CalShiftVo[resultList.size()]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment