| | |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | staProtocol.setPakMk(true); |
| | | //staProtocol.setPakMk(true); |
| | | // // 入出库模式判断 |
| | | // if ( inSta.getStaNo()==180 && devpThread.ioMode != IoModeType.PAKIN_MODE) { continue; } |
| | | // 判断是否满足入库条件 |
| | |
| | | } else if (jsonObject.getInteger("code").equals(700) && (!barcodeThread.getBarcode().equals("NG"))){ |
| | | StartupDto dto = jsonObject.getObject("data", StartupDto.class); |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNo((short)9998); |
| | | staProtocol.setWorkNo((short)9999); |
| | | staProtocol.setStaNo((short)201); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | }else { |
| | | StartupDto dto = jsonObject.getObject("data", StartupDto.class); |
| | | barcodeThread.setBarcode(""); |
| | | staProtocol.setWorkNo((short)9998); |
| | | staProtocol.setWorkNo((short)9999); |
| | | staProtocol.setStaNo((short)201); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | |
| | | if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() !=null && staDetl.getCanouting().equals("Y") |
| | | && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) { |
| | | //测试库位出库必须要按启动按钮才能出库 |
| | | if(wrkMast.getStaNo()==206 && locMast.getCtnKind()==0){ |
| | | if((wrkMast.getStaNo()==206 || wrkMast.getStaNo()==1000)&& locMast.getCtnKind()==0){ |
| | | log.error("出库 ===>> 等待启动出库按钮",wrkMast); |
| | | continue; |
| | | } |
| | |
| | | public void fierCrn() { |
| | | try { |
| | | for (CrnSlave crn :slaveProperties.getCrn()) { |
| | | if(crn.getId()!=1){ |
| | | continue; |
| | | } |
| | | // 获取堆垛机信息 |
| | | CrnThread crnThread = (CrnThread) SlaveConnection.get(SlaveType.Crn, crn.getId()); |
| | | CrnProtocol crnProtocol = crnThread.getCrnProtocol(); |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("fire_status", 1)); |
| | | if (!Cools.isEmpty(locMast)){ |
| | | //报警信号写入1 |
| | | if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, "1"))) { |
| | | if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, 1))) { |
| | | log.error("火警 ===>> 给堆垛机发送报警信号失败"); |
| | | } |
| | | } else { |
| | | //报警信号没有后,复位地址 |
| | | if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, "0"))) { |
| | | if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, 0))) { |
| | | log.error("火警 ===>> 给堆垛机清零复位报警信号失败"); |
| | | } |
| | | } |
| | |
| | | }else if(devpThread.startSignal[i][0]==3){ |
| | | locMast.setPackStatus(7); |
| | | testMast.setModiTime(new Date()); |
| | | }else if(devpThread.startSignal[i][0]==4){ |
| | | }else if(devpThread.startSignal[i][0]==4 && testMast.getStatus()!=4){ |
| | | locMast.setPackStatus(3); |
| | | testMast.setStatus(4); |
| | | testMast.setModiTime(new Date()); |
| | | }else if(devpThread.startSignal[i][0]==5){ |
| | | testMastService.insertPackQualified(true,new Date()); |
| | | }else if(devpThread.startSignal[i][0]==5 && testMast.getStatus()!=4){ |
| | | locMast.setPackStatus(4); |
| | | testMast.setStatus(4); |
| | | testMast.setModiTime(new Date()); |
| | | testMastService.insertPackQualified(false,new Date()); |
| | | } |
| | | // else if(devpThread.startSignal[i][0]==6||devpThread.startSignal[i][0]==7||devpThread.startSignal[i][0]==8){ |
| | | // locMast.setPackStatus(devpThread.startSignal[i][0]+3); |