fix: 修复数值过滤报错 #17836

This commit is contained in:
junjun
2026-01-22 14:37:42 +08:00
parent 983a8cd26d
commit be4438d355
2 changed files with 14 additions and 2 deletions

View File

@@ -258,7 +258,13 @@ public class CustomWhere2Str {
&& StringUtils.equalsIgnoreCase(dsType, DatasourceConfiguration.DatasourceType.sqlServer.getType())) {
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE_CH, value);
} else {
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
if (request.getDatasetTableField().getDeType() == 2
|| request.getDatasetTableField().getDeType() == 3
|| request.getDatasetTableField().getDeType() == 4) {
whereValue = String.format(SQLConstants.WHERE_NUMBER_VALUE, value);
} else {
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
}
}
}
}

View File

@@ -276,7 +276,13 @@ public class ExtWhere2Str {
&& StringUtils.equalsIgnoreCase(dsType, DatasourceConfiguration.DatasourceType.sqlServer.getType())) {
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE_CH, value.get(0));
} else {
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value.get(0));
if (request.getDatasetTableField().getDeType() == 2
|| request.getDatasetTableField().getDeType() == 3
|| request.getDatasetTableField().getDeType() == 4) {
whereValue = String.format(SQLConstants.WHERE_NUMBER_VALUE, value.get(0));
} else {
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value.get(0));
}
}
}
}