|
@@ -42,7 +42,7 @@ public class VerifyUtil {
|
|
|
* @return
|
|
|
*/
|
|
|
public static boolean checkCodeEquation(List<String> coding, String str) {
|
|
|
- boolean res = false;
|
|
|
+ boolean res = true;
|
|
|
// 分割出所有的数字
|
|
|
String[] split = str.split("\\+");
|
|
|
String[] digitalSplit = str.split("[+ ( / ) 任 一 二 三 四 五 六 七 八 九 十 ]");
|
|
@@ -62,21 +62,25 @@ public class VerifyUtil {
|
|
|
boolean end = str1.endsWith(")");
|
|
|
|
|
|
if (start == false || end == false) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
|
|
|
+ res = false;
|
|
|
+ break;
|
|
|
+ //throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
|
|
|
}
|
|
|
String str2 = split[i].substring(split[i].indexOf(")") + 1);
|
|
|
String[] array = { "任一", "任二", "任三", "任四", "任五", "任六", "任七", "任八", "任九", "任十" };
|
|
|
if (str2.length() > 0) {
|
|
|
boolean pp = Arrays.asList(array).contains(str2);
|
|
|
if (pp == false) {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
|
|
|
+ res = false;
|
|
|
+ break;
|
|
|
}
|
|
|
} else {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
|
|
|
+ res = false;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "公式格式有误");
|
|
|
+ res = false;
|
|
|
}
|
|
|
|
|
|
return res;
|