| | |
| | | |
| | | // 获取模式为电脑模式,无任务的堆垛机列表:防止分配到堆垛机不可用 |
| | | List<BasCrnp> basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("crn_sts",3) |
| | | .eq("wrk_no",0)); |
| | | .eq("wrk_no",0).eq("in_enable","Y")); |
| | | if (basCrnps.isEmpty()) { |
| | | // 都有任务则获取电脑模式的堆垛机列表 |
| | | basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("crn_sts",3)); |
| | | basCrnps = basCrnpService.selectList(new EntityWrapper<BasCrnp>().eq("crn_sts",3).eq("in_enable","Y")); |
| | | } |
| | | if (basCrnps.isEmpty()) { |
| | | throw new CoolException("没有可用堆垛机,堆垛机停止或异常"); |
| | | throw new CoolException("没有可用堆垛机,堆垛机停止或异常或禁用"); |
| | | } |
| | | // 可用堆垛机列表 |
| | | List<Integer> crnNoList = basCrnps.stream().map(BasCrnp::getCrnNo).collect(Collectors.toList()); |