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 73234b851..d9b25ddc3 100644 --- a/src/main/java/com/nis/util/excel/thread/CheckComplexStringFormatThread.java +++ b/src/main/java/com/nis/util/excel/thread/CheckComplexStringFormatThread.java @@ -367,7 +367,7 @@ public class CheckComplexStringFormatThread implements Callable{ baseStringCfg.setIsHexbin(1); } else if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 1) { baseStringCfg.setIsHexbin(2); - }else { + } else if (hexP.indexOf("1") != -1 && isHex.intValue() == 1 && isCaseInsenstive.intValue() == 1) {// 只有是十六进制且取值正确的时候, 才进行(十六进制)与(大小写敏感)的校验 errInfo.append(prop.getProperty("hex_case_insensitive")+ ";"); } } 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 d3c8819c8..8bfa9a4dd 100644 --- a/src/main/java/com/nis/util/excel/thread/CheckStringFormatThread.java +++ b/src/main/java/com/nis/util/excel/thread/CheckStringFormatThread.java @@ -408,7 +408,7 @@ public class CheckStringFormatThread implements Callable{ baseStringCfg.setIsHexbin(1); } else if (isHex.intValue() == 0 && isCaseInsenstive.intValue() == 1) { baseStringCfg.setIsHexbin(2); - }else { + } else if (hexP.indexOf("1") != -1 && isHex.intValue() == 1 && isCaseInsenstive.intValue() == 1) {// 只有是十六进制且取值正确的时候, 才进行(十六进制)与(大小写敏感)的校验 errInfo.append(prop.getProperty("hex_case_insensitive")+ ";"); } }