Commit fdde63b8 by huluobin

update

parent 3a3a4f55
......@@ -63,7 +63,6 @@ import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.atomic.AtomicLong;
......@@ -301,10 +300,11 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
});
ForkJoinPool myPool = new ForkJoinPool(dateTimeList.size());
List<IdleTimeDTO> idleTimeDTOList = new CopyOnWriteArrayList();
List<IdleTimeDTO> idleTimeDTOList = new ArrayList<>();
myPool.submit(() -> {
idleTimeQuery.getDateTimeList()
.forEach(dateTime -> {
AtomicLong time = new AtomicLong(System.currentTimeMillis());
......@@ -342,10 +342,11 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
idleTimeDTO.setStatus(!treeProgram.childNull());
idleTimeDTO.setTreeProgram(treeProgram);
idleTimeDTO.setDefaultNodeList(defaultNodes);
idleTimeDTOList.add(idleTimeDTO);
});
});
}).get();
return idleTimeDTOList.stream().sorted(Comparator.comparing(IdleTimeDTO::getTime)).collect(Collectors.toList());
......
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