| | |
| | | log.error("入库 ===>> 堆垛机站点在数据库不存在, 站点编号={}", crnStn.getStaNo()); |
| | | continue; |
| | | } |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | // if (staProtocol.isAutoing() && staProtocol.isLoading() && staProtocol.getWorkNo() > 0 && staProtocol.isInEnable() |
| | | // && staDetl.getCanining() != null && staDetl.getCanining().equals("Y") && staDetl.getWrkNo().equals(wrkMast.getWrkNo())) { |
| | | // flag = true; |
| | | // } |
| | | if (staProtocol.isAutoing() && staProtocol.getWorkNo() > 0 |
| | | && staDetl.getCanining() != null && staDetl.getCanining().equals("Y") && staDetl.getWrkNo().equals(wrkMast.getWrkNo())) { |
| | | flag = true; |
| | | } |
| | |
| | | log.error("{}库位异常,未检索到相应工作档!", shallowLocNo); |
| | | } else { |
| | | if (waitWrkMast.getWrkSts() == 11) { |
| | | if (waitWrkMast.getIoPri() + 100000D < 99999999) { |
| | | if (waitWrkMast.getIoPri() + 100000D < 999999999D) { |
| | | waitWrkMast.setIoPri(waitWrkMast.getIoPri()+100000D); |
| | | } else { |
| | | waitWrkMast.setIoPri(99999999D); |
| | | waitWrkMast.setIoPri(999999999D); |
| | | } |
| | | waitWrkMast.setModiTime(new Date()); |
| | | if (wrkMastMapper.updateById(waitWrkMast) == 0) { |
| | |
| | | if (Cools.isEmpty(wrkDetls)){ |
| | | continue; |
| | | } |
| | | Integer count1 = wrkDetlService.count1(); |
| | | Integer count11 = wrkDetlService.count11(); |
| | | // Integer count1 = wrkDetlService.count1(); |
| | | Integer count111 = wrkDetlService.count111(); |
| | | // Integer count11 = wrkDetlService.count11(); |
| | | Integer count2 = wrkDetlService.count2(wrkDetls.get(0).getOrderNo()); |
| | | Integer count3 = wrkDetlService.count3(); |
| | | wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl,count1+count11,count2,count3))); |
| | | wrkDetls.forEach(wrkDetl -> ledCommand.getMatDtos().add(new MatDto(wrkDetl,count111,count2,count3))); |
| | | } |
| | | commands.add(ledCommand); |
| | | } |
| | |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } |
| | | if (staProtocol.getWorkNo() != 0 && staProtocol.isLoading()) { |
| | | if (staProtocol.getWorkNo() != 0 || staProtocol.isLoading()) { |
| | | reset = false; |
| | | break; |
| | | } |
| | |
| | | LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId()); |
| | | // led显示默认内容 |
| | | if (reset && !ledThread.isLedMk()) { |
| | | if (led.getId() == 7) { |
| | | ledThread.setLedMk(true); |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) { |
| | | log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | } else { |
| | | |
| | | } |
| | | } else { |
| | | // if (led.getId() == 7) { |
| | | // ledThread.setLedMk(true); |
| | | // if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) { |
| | | // log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | // } else { |
| | | // |
| | | // } |
| | | // } else { |
| | | ledThread.setLedMk(true); |
| | | if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) { |
| | | log.error("{}号LED命令下发失败!!![ip:{}] [port:{}]", led.getId(), led.getIp(), led.getPort()); |
| | | } else { |
| | | |
| | | } |
| | | } |
| | | // } |
| | | } |
| | | } |
| | | } |