fix: 优化逻辑
This commit is contained in:
parent
fa7b9b8e69
commit
67dc13039d
@ -264,14 +264,14 @@ public class FpRunServiceImpl implements FpRunService {
|
||||
stationParamMap
|
||||
);
|
||||
String rstcd = stationContext == null ? null : Convert.toStr(stationContext.get("rstcd"), null);
|
||||
String hbrvcd = stationContext == null ? null : Convert.toStr(stationContext.get("hbrvcd"), null);
|
||||
|
||||
// String hbrvcd = stationContext == null ? null : Convert.toStr(stationContext.get("hbrvcd"), null);
|
||||
String rvcd = stationContext == null ? null : Convert.toStr(stationContext.get("rvcd"), null);
|
||||
String wtrvStcd = null;
|
||||
String wqStcd = null;
|
||||
if (StrUtil.isNotBlank(rstcd) && StrUtil.isNotBlank(hbrvcd)) {
|
||||
if (StrUtil.isNotBlank(rstcd) && StrUtil.isNotBlank(rvcd)) {
|
||||
Map<String, Object> alongParamMap = new HashMap<>();
|
||||
alongParamMap.put("rstcd", rstcd);
|
||||
alongParamMap.put("hbrvcd", hbrvcd);
|
||||
alongParamMap.put("rvcd", rvcd);
|
||||
List<Map<String, Object>> alongRows = microservicDynamicSQLMapper.pageAllList(
|
||||
null,
|
||||
buildQgcFpRunAnalysisAlongSql(),
|
||||
@ -294,14 +294,13 @@ public class FpRunServiceImpl implements FpRunService {
|
||||
paramMap.put("startTime", StrUtil.trim(tmArr[0]));
|
||||
paramMap.put("endTime", StrUtil.trim(tmArr[1]));
|
||||
paramMap.put("rstcd", rstcd);
|
||||
paramMap.put("hbrvcd", hbrvcd);
|
||||
paramMap.put("hbrvcd", rvcd);
|
||||
paramMap.put("wtrvStcd", wtrvStcd);
|
||||
paramMap.put("wqStcd", wqStcd);
|
||||
|
||||
String sql = buildQgcFpRunAnalysisDataSql(dataSourceRequest == null ? null : dataSourceRequest.getSort());
|
||||
Page<?> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions);
|
||||
List<FpRunAnalysisVo> rows = microservicDynamicSQLMapper.pageAllListWithResultType(
|
||||
page,
|
||||
buildQgcFpRunAnalysisDataSql(dataSourceRequest == null ? null : dataSourceRequest.getSort()),
|
||||
page,sql,
|
||||
paramMap,
|
||||
FpRunAnalysisVo.class
|
||||
);
|
||||
@ -2059,7 +2058,7 @@ public class FpRunServiceImpl implements FpRunService {
|
||||
}
|
||||
|
||||
private String buildQgcFpRunAnalysisStationSql() {
|
||||
return "SELECT fp.RSTCD AS rstcd, eng.HBRVCD AS hbrvcd " +
|
||||
return "SELECT fp.RSTCD AS \"rstcd\",eng.RVCD AS \"rvcd\", eng.HBRVCD AS \"hbrvcd\" " +
|
||||
"FROM SD_FPSS_B_H fp " +
|
||||
"LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = fp.RSTCD AND NVL(eng.IS_DELETED, 0) = 0 " +
|
||||
"WHERE fp.STCD = #{map.stcd} " +
|
||||
@ -2071,7 +2070,7 @@ public class FpRunServiceImpl implements FpRunService {
|
||||
"FROM MS_ALONG_B t1 " +
|
||||
"INNER JOIN MS_ALONGDET_B t2 ON t1.ID = t2.ALONG_ID " +
|
||||
"WHERE t1.CODE = 'common' " +
|
||||
" AND t1.RVCD = #{map.hbrvcd} " +
|
||||
" AND t1.RVCD = #{map.rvcd} " +
|
||||
" AND t2.RSTCD = #{map.rstcd} " +
|
||||
" AND t2.STTP IN ('WTRV', 'WQ') " +
|
||||
" AND NVL(t1.IS_DELETED, 0) = 0 " +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user