| | |
| | | Object SNCodeObject = miloService.readFromOpcUa(parts[0] + "." + parts[1] + ".Code").getValue(); |
| | | if(null != SNCodeObject) { |
| | | String SNCode=SNCodeObject.toString(); |
| | | String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]); |
| | | // String a="1"; |
| | | // String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]); |
| | | String a="1"; |
| | | // 1:OK可生产 2:NG不可生产 3:NG可返工 4:PC检索失败(无记录)5:PC检索失败(软件) |
| | | if (StrUtil.isNotBlank(a)){ |
| | | int input = Integer.parseInt(a); |
| | |
| | | } |
| | | |
| | | ReadWriteEntity entity2 = new ReadWriteEntity(parts[0]+"."+parts[1]+".OrderNumber", orderNum); |
| | | miloService.writeToOpcByte(entity2); |
| | | miloService.writeToOpcUa(entity2); |
| | | } |
| | | //如果是返修工位需要传输返修工位号 |
| | | if (OPCElement.OP465_ZZ_CODE_CHECK.equals(Node) || OPCElement.OP355_ZZ_CODE_CHECK.equals(Node)){ |
| | |
| | | List<DaCollectionParamConf> list; |
| | | DaCollectionParamConf daCollectionParamConf = new DaCollectionParamConf(); |
| | | daCollectionParamConf.setGatherAddress(parts[0] + "." + parts[1]); |
| | | daCollectionParamConf.setRemarks("1"); |
| | | list = collectionParamConfService.selectDaCollectionParamConfList(daCollectionParamConf); |
| | | |
| | | List<String> nodeIdList = list.stream().map(info -> { |
| | |
| | | List<ReadWriteEntity> readWriteEntityList = miloService.readFromOpcUa(nodeIdList); |
| | | List<DaParamCollection> daParamCollectionlist = new ArrayList<>(); |
| | | for(int i=0;i<nodeIdList.size();i++){ |
| | | DaParamCollection ParamCollection = new DaParamCollection(); |
| | | if(!readWriteEntityList.get(i).getValue().toString().equals("0.0")){ |
| | | DaParamCollection ParamCollection = new DaParamCollection(); |
| | | ParamCollection.setParamCode(readWriteEntityList.get(i).getIdentifier().toString().split("[.]")[2]); |
| | | ParamCollection.setLocationCode(parts[1]); |
| | | ParamCollection.setParamValue(readWriteEntityList.get(i).getValue().toString()); |
| | |
| | | daParamCollectionlist.add(ParamCollection); |
| | | } |
| | | } |
| | | System.out.println("11111111111111"); |
| | | daParamCollectionService.saveBeachDaParamCollection(daParamCollectionlist); |
| | | } |
| | | |