admin
2024-11-12 706d57aa682845cf1bc01cbfd1087c4c0f33093f
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -375,6 +375,7 @@
        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) {
@@ -528,17 +529,19 @@
    @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());
@@ -590,7 +593,7 @@
    //                        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);