| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | // 已经存在吊车执行任务时,则过滤 |
| | |
| | | public synchronized boolean locToCrnStn(CrnSlave slave, CrnProtocol crnProtocol){ |
| | | Collections.shuffle(slave.getCrnOutStn()); |
| | | for (CrnSlave.CrnStn crnStn : slave.getCrnOutStn()) { |
| | | // 获取工作状态为11(生成出库ID)的出库工作档 |
| | | // 获取工作状态为11,12,13,14,15, 16(生成出库ID)的出库工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakOutStep111215(slave.getId(), crnStn.getStaNo()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | |
| | | /* |
| | | * 100、200存在进行中的盘点任务,则不执行盘点任务 |
| | | * */ |
| | | if (wrkMast.getIoType().equals(107)){ |
| | | Integer countPan = wrkMastMapper.selectWrkStsAndIoType107Count(wrkMast.getSourceStaNo(),wrkMast.getWrkNo()); |
| | | if (countPan > 0){ |
| | | News.error("MainServiceImpl locToCrnStn 1271行"+"盘点出库跳过,存在进行中可能堵塞任务数{}个",countPan); |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 获取堆垛机出库站信息 |
| | |
| | | Integer sour = wrkMast.getSourceStaNo(); |
| | | List<WrkMast> wrkMasts = wrkMastMapper.selectWrkStsAndIoType0(sour); |
| | | if (wrkMasts.size() > 0){ |
| | | News.error("MainServiceImpl 1028行"+"存在捡料、盘点未入库货物,2号堆垛机暂时禁止出库!!!"); |
| | | News.error("MainServiceImpl 1300行"+"存在捡料、盘点未入库货物,2号堆垛机暂时禁止出库!!!"); |
| | | return false; |
| | | } |
| | | |
| | |
| | | .eq("sta_no",300) |
| | | .last(" and wrk_sts>11 and io_type in (103,107) ")); |
| | | if(!Cools.isEmpty(one)){ |
| | | News.error("MainServiceImpl 1099行"+"存在捡料、盘点未入库货物,2号堆垛机暂时禁止出库!!!"); |
| | | News.error("MainServiceImpl 1309行"+"存在捡料、盘点未入库货物,2号堆垛机暂时禁止出库!!!"); |
| | | continue; |
| | | } |
| | | } |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | if (steProtocol.isIdle()) { |
| | | |
| | | //小车只能绑定一笔作业中任务 |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, ste.getId()); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | if (Utils.getGroupRow(locNo).equals(Utils.getGroupRow(steProtocol.getRow().intValue())) && steProtocol.getBay() == Utils.getBay(locNo) && steProtocol.getLev() == Utils.getLev(locNo)) { |
| | | return steProtocol.getSteNo().intValue(); |
| | | } |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, ste.getId()); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | if (steProtocol.isIdle()) { |
| | | if (Utils.getGroupRow(locNo).equals(Utils.getGroupRow(steProtocol.getRow().intValue())) && steProtocol.getBay() == Utils.getBay(locNo) && steProtocol.getLev() == Utils.getLev(locNo)) { |
| | | return steProtocol.getSteNo().intValue(); |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | // if (steProtocol.loca==0) continue; |
| | | if (steProtocol.isIdle()) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | // if (steProtocol.loca==0) continue; |
| | | // 穿梭车重新定位排列层 |
| | | if (!steThread.confirmPos()) { |
| | | News.error("{}号穿梭车重新定位失败!作业工作档任务号:{}", wrkMast.getSteNo(), wrkMast.getWrkNo()); |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | // if (steProtocol.loca==0) continue; |
| | | if (steProtocol.isIdle()) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | if (steProtocol.isIdle()) { |
| | | // 命令下发区 -------------------------------------------------------------------------- |
| | | SteCommand steCommand = new SteCommand(); |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, steNo); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | // 穿梭车重新定位排列层 |
| | | if (!steThread.confirmPos()) { |
| | | News.error("{}号穿梭车重新定位失败!作业工作档任务号:{}", wrkMast.getSteNo(), wrkMast.getWrkNo()); |
| | |
| | | SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, ste.getId()); |
| | | SteProtocol steProtocol = steThread.getSteProtocol(); |
| | | if (steProtocol == null) { continue; } |
| | | if (steProtocol.loca==0) continue; |
| | | if (steProtocol.getWaiting() && steProtocol.getTaskNo() == 0){ |
| | | News.info("ste[id={}] 收到等待WCS确认信号,但是任务号(地址V824)为0", steProtocol.getSteNo()); |
| | | } |