From c7cc659eb7efd877a012765f63b5f6ee18697bf8 Mon Sep 17 00:00:00 2001 From: junjun Date: Fri, 18 Oct 2024 11:35:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=BF=87=E6=BB=A4=E7=BB=84=E4=BB=B6=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E5=BC=82=E5=B8=B8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/engine/trans/ExtWhere2Str.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java index 4ac200e7f6..007fc64175 100644 --- a/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java +++ b/core/core-backend/src/main/java/io/dataease/engine/trans/ExtWhere2Str.java @@ -13,7 +13,10 @@ import io.dataease.extensions.view.dto.ChartExtFilterDTO; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -100,8 +103,10 @@ public class ExtWhere2Str { originName = String.format(SQLConstants.DE_STR_TO_DATE, String.format(SQLConstants.CONCAT, "'1970-01-01 '", originName), SQLConstants.DEFAULT_DATE_FORMAT); } } - // 此处获取标准格式的日期 - whereName = originName; + // 此处获取标准格式的日期,同时此处是仪表板过滤,仪表板中图表的日期均已经格式化,所以要强制加上日期转换 + whereName = String.format(SQLConstants.DE_CAST_DATE_FORMAT, originName, + SQLConstants.DEFAULT_DATE_FORMAT, + SQLConstants.DEFAULT_DATE_FORMAT); } } else if (field.getDeType() == 2 || field.getDeType() == 3) { if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {