| | |
| | | int input = Integer.parseInt(a); |
| | | ReadWriteEntity entity = new ReadWriteEntity(parts[0]+"."+parts[1]+".CodeCheckFeed", input); |
| | | log.info("-------监听到,{}的CodeCheck的信号",Node); |
| | | miloService.writeToOpcByte(entity); |
| | | log.info("监听到返回codecheckfeed信号,{}",entity); |
| | | //首站传输订单号 |
| | | if (OPCElement.OP050_HX_CODE_CHECK.equals(Node)){ |
| | | //查询订单号 |
| | |
| | | rework(SNCode,Node); |
| | | } |
| | | System.out.println(entity); |
| | | miloService.writeToOpcByte(entity); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | // }); |
| | | // } |
| | | |
| | | String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]); |
| | | if (StrUtil.isNotBlank(a)){ |
| | | int input = Integer.parseInt(a); |
| | | ReadWriteEntity entity = new ReadWriteEntity(parts[0]+"."+parts[1]+".CodeCheckFeed", input); |
| | | writeList.add(entity); |
| | | } |
| | | // String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]); |
| | | // if (StrUtil.isNotBlank(a)){ |
| | | // int input = Integer.parseInt(a); |
| | | // ReadWriteEntity entity = new ReadWriteEntity(parts[0]+"."+parts[1]+".CodeCheckFeed", input); |
| | | // writeList.add(entity); |
| | | // } |
| | | ReadWriteEntity readWriteEntity = new ReadWriteEntity(); |
| | | readWriteEntity.setIdentifier("Repair_sign"); |
| | | readWriteEntity.setIdentifier(parts[0]+"."+parts[1]+".Repair_sign"); |
| | | readWriteEntity.setValue(minOP); |
| | | writeList.add(readWriteEntity); |
| | | if (CollUtil.isNotEmpty(writeList)){ |
| | | miloService.writeToOpcShort(readWriteEntity); |
| | | /*if (CollUtil.isNotEmpty(writeList)){ |
| | | List<ReadWriteEntity> tempList = new ArrayList<>(); |
| | | for (int i = 0; i < writeList.size(); i++) { |
| | | tempList.add(writeList.get(i)); |
| | | if (tempList.size()>10){ |
| | | miloService.writeToOpcByte(tempList); |
| | | log.info("写入返修:,{}",tempList); |
| | | tempList = new ArrayList<>(); |
| | | } |
| | | miloService.writeToOpc(); |
| | | // tempList.add(writeList.get(i)); |
| | | // if (tempList.size()>10){ |
| | | // miloService.writeToOpcByte(tempList); |
| | | // log.info("写入返修:,{}",tempList); |
| | | // tempList = new ArrayList<>(); |
| | | // } |
| | | } |
| | | if (CollUtil.isNotEmpty(tempList)){ |
| | | miloService.writeToOpcByte(tempList); |
| | | log.info("写入返修:,{}",tempList); |
| | | } |
| | | // if (CollUtil.isNotEmpty(tempList)){ |
| | | // miloService.writeToOpcByte(tempList); |
| | | // log.info("写入返修:,{}",tempList); |
| | | // } |
| | | |
| | | |
| | | } |
| | | // miloService.writeToOpcByte(writeList); |
| | | }*/ |
| | | miloService.writeToOpcByte(writeList); |
| | | } |
| | | |
| | | |