fix: 优化水温接口

This commit is contained in:
tangwei 2026-05-27 17:38:36 +08:00
parent 914a3b68d8
commit 2090e6c7fe

View File

@ -500,6 +500,7 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
String mway = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "mway");
String sttpCode = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "sttpCode");
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
String rstcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "rstcd");
String stnm = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stnm");
String coenvwState = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "coenvwState");
@ -575,6 +576,14 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
sql.append("AND wt.RSTCD = #{map.rstcd} ");
}
}
if (stcd != null && !stcd.isBlank()) {
paramMap.put("stcd", stcd);
if (queryEngDirectly) {
sql.append("AND eng.STCD = #{map.stcd} ");
} else {
sql.append("AND wt.STCD = #{map.stcd} ");
}
}
if (stnm != null && !stnm.isBlank()) {
paramMap.put("stnm", "%" + stnm + "%");
if (queryEngDirectly) {