| 
					
				 | 
			
			
				@@ -5106,6 +5106,32 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         f = f.replace(el, "缺少数据无法匹配"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    //生成比较公式的时候是否使用或者 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    Boolean isOr = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    //如果是范围 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    if (list1.get(0).contains("~") || list2.get(0).contains("~")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        if(list1.get(0).contains("~")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            String[] split2 = list1.get(0).split("~"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            list1.set(0, ">" + split2[0] + " <" + split2[1]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            String[] split2 = list2.get(0).split("~"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            list2.set(0, ">" + split2[0] + " <" + split2[1]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    } else if (list1.get(0).startsWith("±") || list2.get(0).startsWith("±")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        isOr = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        //如果是正负值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        if(list1.get(0).startsWith("±")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            String value = list1.get(0).substring(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            list1.set(0, "=" + value + " =-" + value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            String value = list2.get(0).substring(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            list2.set(0, "=" + value + " =-" + value); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     //带后缀的数据去掉留纯数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     String strings1 = extractPureNumbers(list1.get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                     String strings2 = extractPureNumbers(list2.get(0)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5146,7 +5172,11 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 String str = split1[1] + operator + extractPureNumbers(number); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 list.add(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            formulaData = String.join("&&",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            if(isOr){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                formulaData = String.join("||",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                formulaData = String.join("&&",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             String number = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             //获取比较符 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5180,7 +5210,11 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 String str = split1[0] + operator + extractPureNumbers(number); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                 list.add(str); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                            formulaData = String.join("&&",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            if(isOr){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                formulaData = String.join("||",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                formulaData = String.join("&&",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                         }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             String number = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                             //获取比较符 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5313,17 +5347,23 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 检查第一个字符是否为数字 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (Character.isDigit(input.charAt(0))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 处理负数情况:以 '-' 开头且后跟数字 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (input.startsWith("-") && input.length() > 1 && Character.isDigit(input.charAt(1))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            int endIndex = 2;  // 从 '-' 后开始检查数字 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            while (endIndex < input.length() && Character.isDigit(input.charAt(endIndex))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                endIndex++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return input.substring(0, endIndex);  // 返回 "-" + 连续数字 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 处理正数情况:以数字开头 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else if (Character.isDigit(input.charAt(0))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             int endIndex = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 遍历后续字符,直到遇到非数字或字符串结束 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             while (endIndex < input.length() && Character.isDigit(input.charAt(endIndex))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 endIndex++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 返回开头的连续数字子串 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return input.substring(0, endIndex); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return input.substring(0, endIndex);  // 返回连续数字 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 如果开头不是数字,返回空字符串 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 其他情况返回 null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |