| | |
| | | public AjaxResult yzUpdateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | Boolean b = true; |
| | | String result = "1"; |
| | | BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo(); |
| | | getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode()); |
| | | getMaterTwo.setOperationType("2"); |
| | | List<BsFormulaChildInfo> operationType = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(getMaterTwo); |
| | | List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList()); |
| | | for (String s : collect) { |
| | | if(s.equals("")){ |
| | | // return AjaxResult.success("扫描未完成,禁止拧紧操作!"); |
| | | } |
| | | } |
| | | // BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo(); |
| | | // getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode()); |
| | | // getMaterTwo.setOperationType("2"); |
| | | // List<BsFormulaChildInfo> operationType = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(getMaterTwo); |
| | | // List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList()); |
| | | // for (String s : collect) { |
| | | // if(s.equals("")){ |
| | | //// return AjaxResult.success("扫描未完成,禁止拧紧操作!"); |
| | | // } |
| | | // } |
| | | BsFormulaChildInfo listQuery = new BsFormulaChildInfo(); |
| | | listQuery.setParamCode(bsFormulaChildInfo.getParamCode()); |
| | | listQuery.setProcessesCode(bsFormulaChildInfo.getLocationCode()); |
| | |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strA+".RecordDataDone").value(21).build()); |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+strB+".RecordDataDone").value(21).build()); |
| | | String locationCode = bsFormulaChildInfo.getLocationCode(); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+locationCode+".RecordDataDone").value(21).build()); |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+locationCode+".RecordDataDone").value(21).build()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult checkMaterialCode(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | String result = "1"; |
| | | BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo(); |
| | | getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode()); |
| | | getMaterTwo.setOperationType("2"); |
| | | List<BsFormulaChildInfo> operationType = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(getMaterTwo); |
| | | List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList()); |
| | | for (String s : collect) { |
| | | if(s.equals("")){ |
| | | result = "2"; |
| | | } |
| | | } |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @Override |
| | | public BsFormulaChildInfo releaseCheck(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | return bsFormulaChildInfoMapper.releaseCheck(bsFormulaChildInfo); |
| | | } |
| | |
| | | if(bsFormulaChildInfos.get(0).getSpareField4().equals("1")){ |
| | | try { |
| | | result = "3"; |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build()); |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | // List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection); |
| | | // daPassingStationCollections.get(0).setOutboundTime(new Date()); |
| | | // daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0)); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build()); |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build()); |
| | | WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT"); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |