wuyouming666
2023-12-21 3cbdeaa5e8983ea5071ea446813ef5215b9822a0
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter2.java
@@ -188,9 +188,17 @@
                                        }
                                    }
//完成出片
                                    boolean containsOne = data.stream().anyMatch(number -> number == 1);
                                    for (int i = 1; i <= 5; i++) {
                                        boolean value = sValue.get(i);
                                        if (value) {
                                        String id=paramlist.get(i);
                                        //判断是否自动状态
                                       if(!containsOne) {
                                     //判断id是否包含数字
                                      if(id.matches(".*\\d.*")){
                                          //判断清楚id是否true
                                          if (value) {
                                           System.out.println(id);
                                            switch (i) {
                                                case 1:
                                                    StorageCageService.UpdateTask(2, 0, paramlist.get(i));
@@ -207,7 +215,8 @@
                                            }
                                        }
                                    }
                                 }
                                    }
                                    // 检查布尔值列表是否为空
                                    if (!sValue.isEmpty()) {