From 0bf5153f00e6fc1722454a6c6d39025f58471f20 Mon Sep 17 00:00:00 2001 From: liyawei Date: Thu, 7 Apr 2022 09:11:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=86=E5=88=86=E6=9D=A1=E6=AC=BE-=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FileSplitItemsEOServiceImpl.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java index c88bbfe0d..52a80e951 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/service/impl/FileSplitItemsEOServiceImpl.java @@ -672,14 +672,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl map : mapList) { String fieldName = (String) map.get("db_field_name");//字段 if (key.equals(fieldName)) { //字段类型(判断是输入框还是下拉,等等) String fieldType = (String) map.get("field_show_type");//字段类型 - if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldType)) { + if (FieldTypeEnum.TEXT_STRING.getValue().equals(fieldType) || FieldTypeEnum.TEXT_LINK.getValue().equals(fieldType)) { + String value = (String) entry.getValue(); //输入框 LIKE CONCAT("%", '/%', "%") ESCAPE '/' if(value.contains("%")){ value = value.replace("%", "/%"); @@ -689,23 +689,29 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl= '" + value.split(",")[0] + "'" - + " and " + "date_format(" + key + ",'%Y-%m-%d') <= '" + value.split(",")[1] + "'"); + conditionSb.append(" and " + "date_format(sar_file_split_items." + key + ",'%Y-%m-%d') >= '" + value.split(",")[0] + "'" + + " and " + "date_format(sar_file_split_items." + key + ",'%Y-%m-%d') <= '" + value.split(",")[1] + "'"); } else { - conditionSb.append(" and " + "date_format(" + key + ",'%Y-%m-%d') = '" + value + "'"); + conditionSb.append(" and " + "date_format(sar_file_split_items." + key + ",'%Y-%m-%d') = '" + value + "'"); } + } else if (FieldTypeEnum.TEXT_NUMBER.getValue().equals(fieldType)) { + Double value = Double.valueOf(entry.getValue().toString()); + conditionSb.append(" and sar_file_split_items." + key + " =" + value); } } }