| | |
| | | Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP020.Code").getValue(); |
| | | if (ObjectUtil.isNotEmpty(SNCodeObject)){ |
| | | String snCode = SNCodeObject.toString(); |
| | | if (snCode.startsWith("380")){ |
| | | log.info("enter-380"); |
| | | String[] split = snCode.split(StrUtil.SPACE); |
| | | if (split.length>1){ |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", split[0]); |
| | | OPCUaSubscription.miloService.writeToOpcUa(entity);//写完成 |
| | | ReadWriteEntity entity2 = new ReadWriteEntity("CFL4HX.OP020.PrintSN2", "☆"+split[1]+"☆"); |
| | | OPCUaSubscription.miloService.writeToOpcUa(entity2);//写完成 |
| | | ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 1); |
| | | DaPassingStationCollection passingStationCollectionCheck = new DaPassingStationCollection(); |
| | | passingStationCollectionCheck.setLocationCode("OP020"); |
| | | passingStationCollectionCheck.setSfcCode(snCode); |
| | | List<DaPassingStationCollection> checkList = passingStationCollectionServiceImpl.selectDaPassingStationCollectionList(passingStationCollectionCheck); |
| | | if (CollUtil.isNotEmpty(checkList)){ |
| | | if (snCode.startsWith("380")){ |
| | | log.info("enter-380"); |
| | | String[] split = snCode.split(StrUtil.SPACE); |
| | | if (split.length>1){ |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", split[0]); |
| | | OPCUaSubscription.miloService.writeToOpcUa(entity);//写完成 |
| | | ReadWriteEntity entity2 = new ReadWriteEntity("CFL4HX.OP020.PrintSN2", "☆"+split[1]+"☆"); |
| | | OPCUaSubscription.miloService.writeToOpcUa(entity2);//写完成 |
| | | ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 2); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成 |
| | | } |
| | | } else { |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", snCode); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity);//写完成 |
| | | ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 2); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成 |
| | | } |
| | | } else { |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", snCode); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity);//写完成 |
| | | ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 1); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成 |
| | | if (snCode.startsWith("380")){ |
| | | log.info("enter-380"); |
| | | String[] split = snCode.split(StrUtil.SPACE); |
| | | if (split.length>1){ |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", split[0]); |
| | | OPCUaSubscription.miloService.writeToOpcUa(entity);//写完成 |
| | | ReadWriteEntity entity2 = new ReadWriteEntity("CFL4HX.OP020.PrintSN2", "☆"+split[1]+"☆"); |
| | | OPCUaSubscription.miloService.writeToOpcUa(entity2);//写完成 |
| | | ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 1); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成 |
| | | } |
| | | } else { |
| | | ReadWriteEntity entity = new ReadWriteEntity("CFL4HX.OP020.PrintSN1", snCode); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity);//写完成 |
| | | ReadWriteEntity entity3 = new ReadWriteEntity("CFL4HX.OP020.SendSNDone", 1); |
| | | OPCUaSubscription.miloService.writeToOpcByte(entity3);//写完成 |
| | | } |
| | | } |
| | | |
| | | } |
| | | } else if (OPCElement.OP030_SAVE_REQUEST.equals(identifier)) { |
| | | cleanForm("CFL4HX.OP030.SaveFeed"); |