cl
2024-07-17 09dec78835ac5d573f56377ae22d9306459b08d4
修改OP020
已修改1个文件
35 ■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -205,31 +205,16 @@
                        if(ObjectUtil.isNull(cellCodeList) || cellCodeList.size() != 4 ){
                            result = 23;
                        }else{
                            if(Constants.OP020.contains(device)) {
                                String cellCode1 = cellCodeList.get(0);
                                String cellCode2 = cellCodeList.get(1);
                                String cellCode3 = cellCodeList.get(2);
                                String cellCode4 = cellCodeList.get(3);
                                if (!cellCode1.isEmpty() && cellCode2.isEmpty()) {
                                    result = 23;
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                    return;
                                }
                                if (cellCode1.isEmpty() && !cellCode2.isEmpty()) {
                                    result = 23;
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                    return;
                                }
                                if (!cellCode3.isEmpty() && cellCode4.isEmpty()) {
                                    result = 23;
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                    return;
                                }
                                if (!cellCode4.isEmpty() && cellCode3.isEmpty()) {
                                    result = 23;
                                    miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                    return;
                                }
                            String cellCode1 = cellCodeList.get(0);
                            String cellCode2 = cellCodeList.get(1);
                            String cellCode3 = cellCodeList.get(2);
                            String cellCode4 = cellCodeList.get(3);
                            if ((!cellCode1.isEmpty() && cellCode2.isEmpty()) || (cellCode1.isEmpty() && !cellCode2.isEmpty())
                            || (!cellCode3.isEmpty() && cellCode4.isEmpty()) || (!cellCode4.isEmpty() && cellCode3.isEmpty())) {
                                result = 23;
                                miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build());
                                return;
                            }
                            result = savePassingStation(thoroughfare, device,cellCodeList);//保存过站