-
admin
2024-06-06 019f1c8bac7e8986d299aff70c123dedc1747d72
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -279,14 +279,18 @@
                    read = read + "ModuleCode";
                    if(device.equals("OP365")){
                        try {
                            result = saveStationInfo365(thoroughfare,device);
                            return result;
//                            result = saveStationInfo365(thoroughfare,device);
//                            return result;
                            saveStationInfo365(thoroughfare,device);
//                            return result;
                        }catch (Exception e){
                            e.printStackTrace();
                        }
                    }
                }else {
                    read = read + "PACKCode";
                }
            }
                    snCode = miloService.readFromOpcUa(read).getValue().toString();
                    if(null == snCode || "".equals(snCode)){
@@ -322,8 +326,6 @@
                        }
                        result = "21";
                    }
                }
            }
@@ -553,7 +555,7 @@
    /**
     * 保存过站采集
     */
    public String saveStationInfo365(String thoroughfare,String device) throws Exception {
    public void saveStationInfo365(String thoroughfare,String device) throws Exception {
        String RecordDataDoneAddress = thoroughfare + "." + device + ".RecordDataDone";
        String prefix = thoroughfare+"."+device+".";
        List<DaPassingStationCollection> passingStationCollections = new ArrayList<>();
@@ -590,11 +592,11 @@
                passingStationCollections.add(daPassingStationCollection);
            }
            daPassingStationCollectionService.saveBeachDaPassingStationCollection(passingStationCollections);
            //miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build());
            return "21";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(21).build());
//            return "21";
        }else {
            //miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(22).build());
            return "22";
            miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(RecordDataDoneAddress).value(22).build());
//            return "22";
        }
    }