| | |
| | | if (CollUtil.isNotEmpty(collect1)){ |
| | | collect3 = collect3.stream().filter(x -> !collect1.contains(x)).collect(Collectors.toList()); |
| | | } |
| | | String[] parts = Node.split("[.]"); |
| | | String par = parts[0]+"."+parts[1]; |
| | | if (CollUtil.isNotEmpty(collect3)){ |
| | | collect3.forEach(x -> { |
| | | ReadWriteEntity readWriteEntity = new ReadWriteEntity(); |
| | | readWriteEntity.setIdentifier(x); |
| | | readWriteEntity.setIdentifier(par+"."+x); |
| | | readWriteEntity.setValue(2); |
| | | writeList.add(readWriteEntity); |
| | | }); |
| | |
| | | //数据库查询出的工位 |
| | | collect4.forEach(x -> { |
| | | ReadWriteEntity readWriteEntity = new ReadWriteEntity(); |
| | | readWriteEntity.setIdentifier(x); |
| | | readWriteEntity.setIdentifier(par+"."+x); |
| | | readWriteEntity.setValue(1); |
| | | writeList.add(readWriteEntity); |
| | | }); |
| | |
| | | // writeList.add(readWriteEntity); |
| | | // }); |
| | | // } |
| | | String[] parts = Node.split("[.]"); |
| | | |
| | | String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]); |
| | | if (StrUtil.isNotBlank(a)){ |
| | | int input = Integer.parseInt(a); |
| | |
| | | readWriteEntity.setIdentifier("Repair_sign"); |
| | | readWriteEntity.setValue(minOP); |
| | | writeList.add(readWriteEntity); |
| | | miloService.writeToOpcByte(writeList); |
| | | 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<>(); |
| | | } |
| | | } |
| | | if (CollUtil.isNotEmpty(tempList)){ |
| | | miloService.writeToOpcByte(tempList); |
| | | log.info("写入返修:,{}",tempList); |
| | | } |
| | | |
| | | |
| | | } |
| | | // miloService.writeToOpcByte(writeList); |
| | | } |
| | | |
| | | |
| | | public void SaveData(String Node) throws Exception { |
| | | |
| | | String[] parts = Node.split("[.]"); |
| | | Object SNCodeObject = miloService.readFromOpcUa(parts[0] + "." + parts[1] + ".Code1").getValue(); |
| | | if (null == SNCodeObject){ |