Browse Source

Pull request #2189: CHART-15451 日期判断需要是一种格式

Merge in DESIGN/design from ~BJORN/design:final/10.0 to final/10.0

* commit '91c4c7a0f050bc1da0bfd30750e3c1171ae2078f':
  CHART-15451 日期判断需要是一种格式
final/10.0
Kara 4 years ago
parent
commit
068be8ea06
  1. 18
      designer-chart/src/main/java/com/fr/design/chart/auto/AutoTypeCalculate.java

18
designer-chart/src/main/java/com/fr/design/chart/auto/AutoTypeCalculate.java

@ -102,22 +102,22 @@ public class AutoTypeCalculate {
}
private static boolean isNumberData(List<String> values) {
for (String value : values) {
if (!isNumberData(value)) {
return false;
for (Pattern pattern : dataPatterns) {
if (isNumberData(values, pattern)) {
return true;
}
}
return true;
return false;
}
private static boolean isNumberData(String value) {
for (Pattern pattern : dataPatterns) {
private static boolean isNumberData(List<String> values, Pattern pattern) {
for (String value : values) {
Matcher matcher = pattern.matcher(value);
if (matcher.matches()) {
return true;
if (!matcher.matches()) {
return false;
}
}
return false;
return true;
}
private static List<ColumnInfo> calculateField(String tableName, List<String> columns) {

Loading…
Cancel
Save