Commit 0d833f94 by huluobin

update

parent a61e2e85
...@@ -1560,6 +1560,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1560,6 +1560,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
scheduleServe.setProduceId(scheduleServeCommand.getProduceId()); scheduleServe.setProduceId(scheduleServeCommand.getProduceId());
//服务id //服务id
scheduleServe.setServeId(scheduleServeCommand.getServeId()); scheduleServe.setServeId(scheduleServeCommand.getServeId());
scheduleServe.setMainServeId((scheduleServeCommand.getMainServeId()));
return scheduleServe; return scheduleServe;
}) })
.collect(Collectors.toList())); .collect(Collectors.toList()));
...@@ -1575,6 +1576,8 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1575,6 +1576,8 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
IdleTimeDTO idleTimeDTO = idleTimeDTOList.stream().findAny().orElseThrow(NullPointerException::new); IdleTimeDTO idleTimeDTO = idleTimeDTOList.stream().findAny().orElseThrow(NullPointerException::new);
if (!idleTimeDTO.isStatus()) { if (!idleTimeDTO.isStatus()) {
throw new RRException("预约时间已过期"); throw new RRException("预约时间已过期");
} else {
this.validTechnician(scheduleManage.getListScheduleServer().stream().filter(scheduleServe -> scheduleServe.getMainServeId() == null).collect(Collectors.toCollection(LinkedList::new)), idleTimeDTO.getTreeProgram().getChildList());
} }
} catch (RRException e) { } catch (RRException e) {
...@@ -1596,6 +1599,22 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper, ...@@ -1596,6 +1599,22 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
} }
} }
void validTechnician(Queue<ScheduleServe> scheduleServeList, List<TreeProgram> childList) {
if (ListUtil.isNotEmpty(scheduleServeList)) {
ScheduleServe scheduleServe = scheduleServeList.poll();
TreeProgram findChild = childList.stream()
.filter(treeProgram -> treeProgram.getStoreTechnicianDTO().getTechnicianId().equals(scheduleServe.getTechnicianId()) &&
treeProgram.getScheduleServeQuery().getServeId().equals(scheduleServe.getServeId()))
.findAny()
.orElseThrow(() -> new RRException("预约时间已过期"));
if (ListUtil.isNotEmpty(scheduleServeList)) {
this.validTechnician(scheduleServeList, findChild.getChildList());
}
}
}
private String getScheduleNo(Integer debarmentId) { private String getScheduleNo(Integer debarmentId) {
//调用店铺服务根据id查询店铺 //调用店铺服务根据id查询店铺
......
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