fix: 优化逻辑

This commit is contained in:
tangwei 2026-05-28 17:00:34 +08:00
parent e7476da008
commit 71ad7f4b0f
2 changed files with 7 additions and 2 deletions

View File

@ -1148,8 +1148,8 @@ public class FhHabitatServiceImpl implements FhHabitatService {
.append("LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD AND NVL(eng.IS_DELETED, 0) = 0 ") .append("LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD AND NVL(eng.IS_DELETED, 0) = 0 ")
.append("LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = NVL(fh.BASE_ID, eng.BASE_ID) AND NVL(hb.IS_DELETED, 0) = 0 ") .append("LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = NVL(fh.BASE_ID, eng.BASE_ID) AND NVL(hb.IS_DELETED, 0) = 0 ")
.append("WHERE NVL(wt.IS_DELETED, 0) = 0 ") .append("WHERE NVL(wt.IS_DELETED, 0) = 0 ")
.append("AND wt.STTP = 'WTRV' ") .append("AND wt.STTP = 'WTRV' ");
.append("AND wt.FHSTCD IS NOT NULL "); // .append("AND wt.FHSTCD IS NOT NULL ");
} }
sql.append(") t WHERE 1 = 1 "); sql.append(") t WHERE 1 = 1 ");
return sql.toString(); return sql.toString();

View File

@ -645,6 +645,11 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
.append("sttp.FULL_PATH AS sttpFullPath, ") .append("sttp.FULL_PATH AS sttpFullPath, ")
.append("wt.STCD AS stcd, ") .append("wt.STCD AS stcd, ")
.append("wt.RSTCD AS rstcd, ") .append("wt.RSTCD AS rstcd, ")
.append("CASE ")
.append("WHEN wt.BLDSTT_CODE IN ('1', '10', '11') THEN '已建' ")
.append("WHEN wt.BLDSTT_CODE IN ('2', '7', '8') THEN '在建' ")
.append("ELSE '未建/规划' END AS bldsttCcodeName, ")
.append("wt.BLDSTT_CODE AS bldsttCcode, ")
.append("NULL AS stCode, ") .append("NULL AS stCode, ")
.append("NULL AS stName, ") .append("NULL AS stName, ")
.append("eng.DVTP AS dvtp, ") .append("eng.DVTP AS dvtp, ")