Commit 8ed1793d authored by 温志超's avatar 温志超

排班计划,屏蔽前端序号错误问题

parent 077c8bd8
......@@ -168,8 +168,12 @@ public class CalPlanController extends BaseController {
List<CalShift> breakTimeList = calShift.getBreakTimeList();
if (CollectionUtil.isNotEmpty(breakTimeList)) {
Set<Integer> collect = breakTimeList.stream().map(CalShift::getOrderNum).filter(Objects::nonNull).collect(Collectors.toSet());
ExceptionUtil.checkTrueThrowException(collect.size() != breakTimeList.size(), MessageUtils.message("cal.error.error10"));
int i = 1;
for (CalShift calShift1 : breakTimeList){
calShift1.setOrderNum(i++);
}
// Set<Integer> collect = breakTimeList.stream().map(CalShift::getOrderNum).filter(Objects::nonNull).collect(Collectors.toSet());
// ExceptionUtil.checkTrueThrowException(collect.size() != breakTimeList.size(), MessageUtils.message("cal.error.error10"));
ExceptionUtil.checkTrueThrowException(endDate.getTime() <= startDate.getTime(),
MessageUtils.message("cal.error.error11", shiftName));
......
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