Commit 986e1bbe by liyanlin

fix

parent 6768c80d
...@@ -233,6 +233,10 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -233,6 +233,10 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
departmentId, departmentId,
serveStartTime.toLocalDate().toString(), serveStartTime.toLocalDate().toString(),
Lists.newArrayList(serveId)); Lists.newArrayList(serveId));
//下班时间加上,下班时间不属于闲时
storeTechnicianPeriodList.forEach(storeTechnicianPeriod -> {
storeTechnicianPeriod.getPeriodList().add(storeTechnicianPeriod.getBreakTime());
});
//服务占用的时间区间 //服务占用的时间区间
Period servePeriod = new Period(serveStartTime.toInstant(ZoneOffset.of("+8")).toEpochMilli(), serveEndTime.toInstant(ZoneOffset.of("+8")).toEpochMilli()); Period servePeriod = new Period(serveStartTime.toInstant(ZoneOffset.of("+8")).toEpochMilli(), serveEndTime.toInstant(ZoneOffset.of("+8")).toEpochMilli());
...@@ -315,10 +319,10 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -315,10 +319,10 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
List<IdleTimeDTO> idleTimeDTOList = new ArrayList<>(qry.getDateTimeList().size()); List<IdleTimeDTO> idleTimeDTOList = new ArrayList<>(qry.getDateTimeList().size());
//ExecutorService threadPool = ThreadUtil.newExecutor(qry.getDateTimeList().size()); ExecutorService threadPool = ThreadUtil.newExecutor(qry.getDateTimeList().size());
for (Long dateTime : qry.getDateTimeList()) { for (Long dateTime : qry.getDateTimeList()) {
//threadPool.submit(() -> { threadPool.submit(() -> {
//System.out.println("threadName:" + Thread.currentThread().getName()); System.out.println("threadName:" + Thread.currentThread().getName());
//每个主服务由不同的美甲师做,setter主服务的时间period //每个主服务由不同的美甲师做,setter主服务的时间period
mainScheduleServeQueryLinkedList.forEach(mainScheduleServeQuery -> { mainScheduleServeQueryLinkedList.forEach(mainScheduleServeQuery -> {
...@@ -350,16 +354,16 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -350,16 +354,16 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
idleTimeDTO.setDefaultNodeList(defaultNodeList); idleTimeDTO.setDefaultNodeList(defaultNodeList);
idleTimeDTOList.add(idleTimeDTO); idleTimeDTOList.add(idleTimeDTO);
//}); });
} }
//threadPool.shutdown(); threadPool.shutdown();
//等待直到所有任务完成 //等待直到所有任务完成
/*try { try {
threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MINUTES); threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MINUTES);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
}*/ }
if (qry.getShowNodeDetail() != null && !qry.getShowNodeDetail()) { if (qry.getShowNodeDetail() != null && !qry.getShowNodeDetail()) {
idleTimeDTOList.forEach(idleTimeDTO -> { idleTimeDTOList.forEach(idleTimeDTO -> {
......
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