From 8a6c319933941a80490551b0fd4a8e06d3bb168e Mon Sep 17 00:00:00 2001 From: tangwei Date: Tue, 21 Jul 2026 10:20:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/qgc_base/domain/SdFhbtBH.java | 6 ++-- .../yfd/platform/qgc_base/domain/SdWqBH.java | 3 ++ .../service/impl/SdWqBHServiceImpl.java | 1 + .../impl/MsThreedRoamMServiceImpl.java | 30 +++++++++++++++++-- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdFhbtBH.java b/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdFhbtBH.java index 28a3cc1b..b42b0282 100644 --- a/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdFhbtBH.java +++ b/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdFhbtBH.java @@ -179,12 +179,12 @@ public class SdFhbtBH implements Serializable { /** * 保护河流 */ - private Integer bhhl; + private String bhhl; /** * 保护河道 */ - private Integer bhhd; + private String bhhd; /** * 保护措施 @@ -224,7 +224,7 @@ public class SdFhbtBH implements Serializable { /** * 植被覆盖类型 */ - private BigDecimal vlsr; + private String vlsr; /** * 植被覆盖调查时间 diff --git a/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdWqBH.java b/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdWqBH.java index 10dd07e4..2ff8c41d 100644 --- a/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdWqBH.java +++ b/backend/src/main/java/com/yfd/platform/qgc_base/domain/SdWqBH.java @@ -39,6 +39,9 @@ public class SdWqBH implements Serializable { private String wwqtg; + @TableField(exist = false) + private String wwqtgName; + private String wqtype; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") diff --git a/backend/src/main/java/com/yfd/platform/qgc_base/service/impl/SdWqBHServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_base/service/impl/SdWqBHServiceImpl.java index c9ec411f..cb5fd299 100644 --- a/backend/src/main/java/com/yfd/platform/qgc_base/service/impl/SdWqBHServiceImpl.java +++ b/backend/src/main/java/com/yfd/platform/qgc_base/service/impl/SdWqBHServiceImpl.java @@ -51,6 +51,7 @@ public class SdWqBHServiceImpl extends ServiceImpl impleme CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build()); CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build()); CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build()); + CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("wwqtg").modifyProperty("wwqtgName").dictType("STATIC").dictSource("WWQTG").build()); CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build()); CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build()); CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build()); diff --git a/backend/src/main/java/com/yfd/platform/qgc_sys/threedRoam/service/impl/MsThreedRoamMServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_sys/threedRoam/service/impl/MsThreedRoamMServiceImpl.java index e7602266..ccd38999 100644 --- a/backend/src/main/java/com/yfd/platform/qgc_sys/threedRoam/service/impl/MsThreedRoamMServiceImpl.java +++ b/backend/src/main/java/com/yfd/platform/qgc_sys/threedRoam/service/impl/MsThreedRoamMServiceImpl.java @@ -67,8 +67,8 @@ public class MsThreedRoamMServiceImpl extends ServiceImpl page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake()); List list = microservicDynamicSQLMapper.pageAllListWithResultType( @@ -82,6 +82,31 @@ public class MsThreedRoamMServiceImpl extends ServiceImpl sorts) { + if (CollUtil.isEmpty(sorts)) { + return " ORDER BY r.tm DESC NULLS LAST, r.stcd ASC, r.name ASC"; + } + List orderByParts = new ArrayList<>(); + for (DataSourceRequest.SortDescriptor sort : sorts) { + if (sort == null || StrUtil.isBlank(sort.getField())) { + continue; + } + String column = mapToListColumn(sort.getField()); + if (StrUtil.isBlank(column)) { + continue; + } + String direction = "desc".equalsIgnoreCase(sort.getDir()) ? "DESC" : "ASC"; + orderByParts.add(column + " " + direction + " NULLS LAST"); + } + if (orderByParts.isEmpty()) { + return " ORDER BY r.tm DESC NULLS LAST, r.stcd ASC, r.name ASC"; + } + return " ORDER BY " + String.join(", ", orderByParts); + } + + + /** * 递归构建过滤 SQL */ @@ -141,6 +166,7 @@ public class MsThreedRoamMServiceImpl extends ServiceImpl "a.NAME"; case "rvcd" -> "a.RVCD"; case "remark" -> "a.REMARK"; + case "modifyTime" -> "a.MODIFY_TIME"; default -> null; }; }