| | |
| | | logger.info("-------监听到,{}的扫码枪扫码的CODE_CHECK的信号",identifier); |
| | | scannerGunMessage(); |
| | | } |
| | | if (identifier.equals(OPCElement.OP060_HX_CODE_CHECK) && "1".equals(value.toString())){ |
| | | Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code1").getValue(); |
| | | if (null == SNCodeObject){ |
| | | SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code").getValue(); |
| | | } |
| | | if (null != SNCodeObject){ |
| | | String XT=""; |
| | | String CZ=""; |
| | | String SNCode = SNCodeObject.toString(); |
| | | DaParamCollection ParamCollection = new DaParamCollection(); |
| | | ParamCollection.setSfcCode(SNCode); |
| | | List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection); |
| | | List<DaParamCollection> XTParamCollection = DaParamCollectionlist.stream().filter(x -> "箱体".equals(x.getParamName())).collect(Collectors.toList()); |
| | | if (CollUtil.isNotEmpty(XTParamCollection)){ |
| | | DaParamCollection lastOne = XTParamCollection.get(0); |
| | | XT = lastOne.getParamValue(); |
| | | } |
| | | List<DaParamCollection> CZParamCollection = DaParamCollectionlist.stream().filter(x -> "曲轴".equals(x.getParamName())).collect(Collectors.toList()); |
| | | if (CollUtil.isNotEmpty(CZParamCollection)){ |
| | | DaParamCollection lastOne = CZParamCollection.get(0); |
| | | CZ = lastOne.getParamValue(); |
| | | } |
| | | passingStationCollectionServiceImpl.sendMessage(XT+"*"+CZ,"OP060"); |
| | | } |
| | | } |
| | | // if (identifier.equals(OPCElement.OP060_HX_CODE_CHECK) && "1".equals(value.toString())){ |
| | | // Object SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code1").getValue(); |
| | | // if (null == SNCodeObject){ |
| | | // SNCodeObject = miloService.readFromOpcUa("CFL4HX.OP060.Code").getValue(); |
| | | // } |
| | | // if (null != SNCodeObject){ |
| | | // String XT=""; |
| | | // String CZ=""; |
| | | // String SNCode = SNCodeObject.toString(); |
| | | // DaParamCollection ParamCollection = new DaParamCollection(); |
| | | // ParamCollection.setSfcCode(SNCode); |
| | | // List<DaParamCollection> DaParamCollectionlist=daParamCollectionService.selectDaParamCollectionList(ParamCollection); |
| | | // List<DaParamCollection> XTParamCollection = DaParamCollectionlist.stream().filter(x -> "箱体".equals(x.getParamName())).collect(Collectors.toList()); |
| | | // if (CollUtil.isNotEmpty(XTParamCollection)){ |
| | | // DaParamCollection lastOne = XTParamCollection.get(0); |
| | | // XT = lastOne.getParamValue(); |
| | | // } |
| | | // List<DaParamCollection> CZParamCollection = DaParamCollectionlist.stream().filter(x -> "曲轴".equals(x.getParamName())).collect(Collectors.toList()); |
| | | // if (CollUtil.isNotEmpty(CZParamCollection)){ |
| | | // DaParamCollection lastOne = CZParamCollection.get(0); |
| | | // CZ = lastOne.getParamValue(); |
| | | // } |
| | | // passingStationCollectionServiceImpl.sendMessage(XT+"*"+CZ,"OP060"); |
| | | // } |
| | | // } |
| | | } |
| | | if (collect2.contains(identifier)){ |
| | | if ("1".equals(value.toString())){ |
| | |
| | | DaPassingStationCollection PassingStationCollection=new DaPassingStationCollection(); |
| | | PassingStationCollection.setSfcCode(SNCode); |
| | | daPassingStationCollections = passingStationCollectionServiceImpl.selectDaPassingStationCollectionList(PassingStationCollection); |
| | | if (CollUtil.isNotEmpty(daPassingStationCollections)){ |
| | | DaPassingStationCollection lastOne = daPassingStationCollections.get(daPassingStationCollections.size() - 1); |
| | | String outRsSign = lastOne.getOutRsSign(); |
| | | if ("合格".equals(outRsSign)){ |
| | | a = "1"; |
| | | }else { |
| | | a = "2"; |
| | | } |
| | | } |
| | | // if (CollUtil.isNotEmpty(daPassingStationCollections)){ |
| | | // DaPassingStationCollection lastOne = daPassingStationCollections.get(daPassingStationCollections.size() - 1); |
| | | // String outRsSign = lastOne.getOutRsSign(); |
| | | // if ("合格".equals(outRsSign)){ |
| | | // a = "1"; |
| | | // }else { |
| | | // a = "2"; |
| | | // } |
| | | // } |
| | | RmRepairRecord rmRepairRecord = new RmRepairRecord(); |
| | | rmRepairRecord.setBoxCode(SNCode); |
| | | rmRepairRecords = rmRepairRecordService.selectRmRepairRecordList(rmRepairRecord); |
| | | if (CollUtil.isNotEmpty(rmRepairRecords)){ |
| | | a = "1"; |
| | | }else { |
| | | a = "2"; |
| | | } |
| | | } |
| | | logger.info("-----返回codeCheckFeed-----,{}",a); |