diff --git a/src/main/java/com/nis/util/excel/thread/CheckComplexStringFormatThread.java b/src/main/java/com/nis/util/excel/thread/CheckComplexStringFormatThread.java index a2b0bd291..1f8bb407a 100644 --- a/src/main/java/com/nis/util/excel/thread/CheckComplexStringFormatThread.java +++ b/src/main/java/com/nis/util/excel/thread/CheckComplexStringFormatThread.java @@ -381,45 +381,46 @@ public class CheckComplexStringFormatThread implements Callable{ prop.getProperty("is_case_insenstive")) + ";"); } } - } else { - if (isHex.intValue() != 0 && isHex.intValue() != 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (isCaseInsenstive.intValue() != 0 && isCaseInsenstive.intValue() != 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - if (hexP.indexOf("1") == -1 && isHex.intValue() == 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (hexP.equals("1") && isHex.intValue() == 0) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (hexP.indexOf("2") == -1 && isCaseInsenstive.intValue() == 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - if (hexP.equals("2") && isCaseInsenstive.intValue() == 0) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - // 关键字十六进制校验 - if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) { - boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches(); - if(!bl) { - errInfo.append( - prop.getProperty("key_word") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); - } - } } + isHex = baseStringCfg.getIsHex(); isCaseInsenstive = baseStringCfg.getIsCaseInsenstive(); + if (isHex.intValue() != 0 && isHex.intValue() != 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (isCaseInsenstive.intValue() != 0 && isCaseInsenstive.intValue() != 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + if (hexP.indexOf("1") == -1 && isHex.intValue() == 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (hexP.equals("1") && isHex.intValue() == 0) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (hexP.indexOf("2") == -1 && isCaseInsenstive.intValue() == 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + if (hexP.equals("2") && isCaseInsenstive.intValue() == 0) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + // 关键字十六进制校验 + if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) { + boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches(); + if(!bl) { + errInfo.append( + prop.getProperty("key_word") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); + } + } + if (isHex != null && isCaseInsenstive != null) { if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) { baseStringCfg.setIsHexbin(0); diff --git a/src/main/java/com/nis/util/excel/thread/CheckStringFormatThread.java b/src/main/java/com/nis/util/excel/thread/CheckStringFormatThread.java index be14df6f4..2be4d90a0 100644 --- a/src/main/java/com/nis/util/excel/thread/CheckStringFormatThread.java +++ b/src/main/java/com/nis/util/excel/thread/CheckStringFormatThread.java @@ -437,49 +437,50 @@ public class CheckStringFormatThread implements Callable{ prop.getProperty("is_case_insenstive")) + ";"); } } - } else { - if (isHex.intValue() != 0 && isHex.intValue() != 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (isCaseInsenstive.intValue() != 0 && isCaseInsenstive.intValue() != 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - if (hexP.indexOf("1") == -1 && isHex.intValue() == 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (hexP.equals("1") && isHex.intValue() == 0) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (hexP.indexOf("2") == -1 && isCaseInsenstive.intValue() == 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - if (hexP.equals("2") && isCaseInsenstive.intValue() == 0) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - // 十六进制 关键字校验 - if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) { - boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches(); - if(!bl) { - String message = prop.getProperty("key_word"); - if(regionDict.getFunctionId().equals(403) || regionDict.getFunctionId().equals(200)) { - message = prop.getProperty("domain_name"); - } - errInfo.append( - message + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); - } - } } + isHex = baseStringCfg.getIsHex(); isCaseInsenstive = baseStringCfg.getIsCaseInsenstive(); + if (isHex.intValue() != 0 && isHex.intValue() != 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (isCaseInsenstive.intValue() != 0 && isCaseInsenstive.intValue() != 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + if (hexP.indexOf("1") == -1 && isHex.intValue() == 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (hexP.equals("1") && isHex.intValue() == 0) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (hexP.indexOf("2") == -1 && isCaseInsenstive.intValue() == 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + if (hexP.equals("2") && isCaseInsenstive.intValue() == 0) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + // 十六进制 关键字校验 + if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) { + boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches(); + if(!bl) { + String message = prop.getProperty("key_word"); + if(regionDict.getFunctionId().equals(403) || regionDict.getFunctionId().equals(200)) { + message = prop.getProperty("domain_name"); + } + errInfo.append( + message + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); + } + } + if (isHex != null && isCaseInsenstive != null) { if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) { baseStringCfg.setIsHexbin(0); diff --git a/src/main/java/com/nis/util/excel/thread/CheckTopicWebsiteFormatThread.java b/src/main/java/com/nis/util/excel/thread/CheckTopicWebsiteFormatThread.java index 2be1b7641..e7f2e5c4a 100644 --- a/src/main/java/com/nis/util/excel/thread/CheckTopicWebsiteFormatThread.java +++ b/src/main/java/com/nis/util/excel/thread/CheckTopicWebsiteFormatThread.java @@ -254,45 +254,46 @@ public class CheckTopicWebsiteFormatThread implements Callable{ prop.getProperty("is_case_insenstive")) + ";"); } } - } else { - if (isHex.intValue() != 0 && isHex.intValue() != 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (isCaseInsenstive.intValue() != 0 && isCaseInsenstive.intValue() != 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - if (hexP.indexOf("1") == -1 && isHex.intValue() == 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (hexP.equals("1") && isHex.intValue() == 0) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); - } - if (hexP.indexOf("2") == -1 && isCaseInsenstive.intValue() == 1) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - if (hexP.equals("2") && isCaseInsenstive.intValue() == 0) { - errInfo.append( - String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) - + ";"); - } - // 十六进制 关键字校验 - if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) { - boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches(); - if(!bl) { - errInfo.append( - prop.getProperty("domain_name") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); - } - } } + isHex = baseStringCfg.getIsHex(); isCaseInsenstive = baseStringCfg.getIsCaseInsenstive(); + if (isHex.intValue() != 0 && isHex.intValue() != 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (isCaseInsenstive.intValue() != 0 && isCaseInsenstive.intValue() != 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + if (hexP.indexOf("1") == -1 && isHex.intValue() == 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (hexP.equals("1") && isHex.intValue() == 0) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_hex")) + ";"); + } + if (hexP.indexOf("2") == -1 && isCaseInsenstive.intValue() == 1) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + if (hexP.equals("2") && isCaseInsenstive.intValue() == 0) { + errInfo.append( + String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive")) + + ";"); + } + // 十六进制 关键字校验 + if (hexP.indexOf("1") != -1 && isHex.intValue() == 1) { + boolean bl = Pattern.compile("^([0-9|a-f|A-F]*)$").matcher(keyword).matches(); + if(!bl) { + errInfo.append( + prop.getProperty("domain_name") + " '" + keyword + "' "+String.format(prop.getProperty("contains_non_hex_char")) + ";"); + } + } + if (isHex != null && isCaseInsenstive != null) { if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 0) { baseStringCfg.setIsHexbin(0);