| | |
| | | BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo(); |
| | | getMaterTwo.setProcessesCode(bsFormulaChildInfo.getLocationCode()); |
| | | getMaterTwo.setOperationType("2"); |
| | | getMaterTwo.setProductCode(bsFormulaChildInfo.getProductCode()); |
| | | List<BsFormulaChildInfo> operationType = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(getMaterTwo); |
| | | List<String> collect = operationType.stream().map(BsFormulaChildInfo::getResults).collect(Collectors.toList()); |
| | | for (String s : collect) { |
| | |
| | | @Override |
| | | public AjaxResult updateTighteningFormula(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | Boolean b = true; |
| | | 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.error("扫码未完成,禁止拧紧操作!"); |
| | | if(!"OP100".equals(bsFormulaChildInfo.getLocationCode())){ |
| | | BsFormulaChildInfo getMaterTwo = new BsFormulaChildInfo(); |
| | | getMaterTwo.setProductCode(bsFormulaChildInfo.getProductCode()); |
| | | 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.error("扫码未完成,禁止拧紧操作!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //添加拧紧参数-参数采集表 |
| | | DaParamCollection daParamCollection = new DaParamCollection(); |
| | | daParamCollection.setParamCode(bsFormulaChildInfo.getParamCode()); |
| | |
| | | // List<DaPassingStationCollection> daPassingStationCollections = daPassingStationCollectionMapper.selectDaPassingStationCollectionList(daPassingStationCollection); |
| | | // daPassingStationCollections.get(0).setOutboundTime(new Date()); |
| | | // daPassingStationCollectionMapper.updateDaPassingStationCollection(daPassingStationCollections.get(0)); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare +"."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(21).build()); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare +"."+bsFormulaChildInfo.getLocationCode()+".RecordDataDone").value(11).build()); |
| | | WebSocketUsers.sendMessageToUserByText(map.get(bsFormulaChildInfo.getLocationCode()), "OUT"); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |