cl
2024-07-17 2da22bb80f786b5ba45dbdf927102510b2c86c67
修改OP020
已修改1个文件
44 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -205,25 +205,31 @@
                        if(ObjectUtil.isNull(cellCodeList) || cellCodeList.size() != 4 ){
                            result = 23;
                        }else{
                            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(!cellCode3.isEmpty() && cellCode4.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(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;
                                }
                            }
                            result = savePassingStation(thoroughfare, device,cellCodeList);//保存过站