| | |
| | | if (waitPakinNotIn > 0) { |
| | | return; |
| | | } |
| | | // 存在进行中/在途任务(2,3,12,13,14)则不下发出库,避免冲突 |
| | | // 2 待执行(入库) |
| | | //3 设备执行中(入库) |
| | | //12 设备执行中(出库) |
| | | //13 出库到站点上 |
| | | //14 出库等待确认 |
| | | int activeCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>() |
| | | .in("wrk_sts", 2, 3, 12, 13, 14)); |
| | | if (activeCount > 0) { |
| | | return; |
| | | } |
| | | |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", 11).orderBy("create_time")); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | | } |
| | | |
| | | WrkMast wrkMast = wrkMasts.get(0); |
| | | // 存在进行中/在途任务(2,3,12,13,14)则不下发出库,避免冲突(排除当前任务) |
| | | // 2 待执行(入库) |
| | | // 3 设备执行中(入库) |
| | | // 12 设备执行中(出库) |
| | | // 13 出库到站点上 |
| | | // 14 出库等待确认 |
| | | int activeCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>() |
| | | .in("wrk_sts", 2, 3, 12, 13, 14) |
| | | .ne("wrk_no", wrkMast.getWrkNo())); |
| | | if (activeCount > 0) { |
| | | return; |
| | | } |
| | | |
| | | Integer sourceStaNo = Utils.getStaNoByLocNo(wrkMast.getSourceLocNo()); |
| | | |
| | | LiftCommand command = new LiftCommand(); |