feat: 获取沿程水温变化默认有数据的河流
This commit is contained in:
parent
8a793b3cae
commit
e75bb27492
@ -105,6 +105,9 @@ public class SdWTMonitorController {
|
|||||||
@GetMapping("/alongDetail/qgc/stcdCheck2")
|
@GetMapping("/alongDetail/qgc/stcdCheck2")
|
||||||
@Operation(summary = "判断出库水温站、垂向水温站所属的电站是否有出库水温站、垂向水温站")
|
@Operation(summary = "判断出库水温站、垂向水温站所属的电站是否有出库水温站、垂向水温站")
|
||||||
public ResponseResult getQgcStcdCheck2(@RequestParam String stcd) {
|
public ResponseResult getQgcStcdCheck2(@RequestParam String stcd) {
|
||||||
|
if (StrUtil.isBlank(stcd)) {
|
||||||
|
throw new BizException("站点编码不能为空.");
|
||||||
|
}
|
||||||
WtrvInfo result = alongDetailService.getWtrvInfoByStcd3(stcd);
|
WtrvInfo result = alongDetailService.getWtrvInfoByStcd3(stcd);
|
||||||
return ResponseResult.successData(result);
|
return ResponseResult.successData(result);
|
||||||
}
|
}
|
||||||
@ -119,7 +122,6 @@ public class SdWTMonitorController {
|
|||||||
@PostMapping({"/alongList/default/rvcd"})
|
@PostMapping({"/alongList/default/rvcd"})
|
||||||
@Operation(summary = "获取沿程水温变化默认有数据的河流")
|
@Operation(summary = "获取沿程水温变化默认有数据的河流")
|
||||||
public ResponseResult getDefaultStcd(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getDefaultStcd(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
|
||||||
return ResponseResult.successData(alongListService.getDefaultRvcd(dataSourceRequest));
|
return ResponseResult.successData(alongListService.getDefaultRvcd(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -136,18 +136,27 @@ public interface AlongDetailMapper extends BaseMapper<SdAlongDetailVO> {
|
|||||||
WtrvInfo getWtrvInfoByStcd2(@Param("stcd") String stcd);
|
WtrvInfo getWtrvInfoByStcd2(@Param("stcd") String stcd);
|
||||||
|
|
||||||
@Select("SELECT eng.STCD AS rstcd, eng.ENNM AS ennm, " +
|
@Select("SELECT eng.STCD AS rstcd, eng.ENNM AS ennm, " +
|
||||||
"REGEXP_REPLACE(LISTAGG(DISTINCT TO_CHAR(wtrv.STCD), ',') WITHIN GROUP (ORDER BY wtrv.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS stcd, " +
|
"REGEXP_REPLACE(LISTAGG(TO_CHAR(wtrv.STCD), ',') WITHIN GROUP (ORDER BY wtrv.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS stcd, " +
|
||||||
"REGEXP_REPLACE(LISTAGG(DISTINCT TO_CHAR(wtrv.STNM), ',') WITHIN GROUP (ORDER BY wtrv.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS stnm, " +
|
"REGEXP_REPLACE(LISTAGG(TO_CHAR(wtrv.STNM), ',') WITHIN GROUP (ORDER BY wtrv.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS stnm, " +
|
||||||
"REGEXP_REPLACE(LISTAGG(DISTINCT TO_CHAR(vt.STCD), ',') WITHIN GROUP (ORDER BY vt.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS vtStcd, " +
|
"REGEXP_REPLACE(LISTAGG(TO_CHAR(vt.STCD), ',') WITHIN GROUP (ORDER BY vt.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS vtStcd, " +
|
||||||
"REGEXP_REPLACE(LISTAGG(DISTINCT TO_CHAR(vt.STNM), ',') WITHIN GROUP (ORDER BY vt.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS vtStnm " +
|
"REGEXP_REPLACE(LISTAGG(TO_CHAR(vt.STNM), ',') WITHIN GROUP (ORDER BY vt.STCD), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS vtStnm " +
|
||||||
"FROM SD_ENGINFO_B_H eng " +
|
"FROM SD_ENGINFO_B_H eng " +
|
||||||
"LEFT JOIN SD_WT_B_H wtrv ON wtrv.RSTCD = eng.STCD AND wtrv.STTP = 'WTRV' AND wtrv.IS_DELETED = 0 AND wtrv.MWAY = 2 " +
|
"LEFT JOIN SD_WT_B_H wtrv ON eng.STCD = wtrv.RSTCD " +
|
||||||
|
"AND wtrv.STTP = 'WTRV' " +
|
||||||
|
"AND wtrv.IS_DELETED = 0 " +
|
||||||
|
"AND wtrv.MWAY = 2 " +
|
||||||
|
"AND wtrv.DTIN_TYPE = 0 " +
|
||||||
"LEFT JOIN SD_WTENGRLTN_B rel ON rel.STCD = wtrv.STCD AND rel.IS_DELETED = 0 " +
|
"LEFT JOIN SD_WTENGRLTN_B rel ON rel.STCD = wtrv.STCD AND rel.IS_DELETED = 0 " +
|
||||||
"LEFT JOIN SD_WT_B_H vt ON vt.RSTCD = eng.STCD AND vt.STTP = 'WTVT' AND vt.IS_DELETED = 0 AND vt.MWAY = 2 " +
|
"LEFT JOIN SD_WT_B_H vt ON eng.STCD = vt.RSTCD " +
|
||||||
|
"AND vt.STTP = 'WTVT' " +
|
||||||
|
"AND vt.IS_DELETED = 0 " +
|
||||||
|
"AND vt.MWAY = 2 " +
|
||||||
"WHERE eng.USFL = 1 " +
|
"WHERE eng.USFL = 1 " +
|
||||||
"AND wtrv.STCD IS NOT NULL AND vt.STCD IS NOT NULL AND rel.ENG_DWT_CODE IS NOT NULL " +
|
"AND wtrv.STCD IS NOT NULL " +
|
||||||
|
"AND vt.STCD IS NOT NULL " +
|
||||||
|
"AND rel.ENG_DWT_CODE IS NOT NULL " +
|
||||||
"AND (wtrv.STCD = #{stcd} OR vt.STCD = #{stcd} OR eng.STCD = #{stcd}) " +
|
"AND (wtrv.STCD = #{stcd} OR vt.STCD = #{stcd} OR eng.STCD = #{stcd}) " +
|
||||||
"AND rel.ENG_DWT_CODE = eng.STCD " +
|
"AND eng.STCD = rel.ENG_DWT_CODE " +
|
||||||
"GROUP BY eng.STCD, eng.ENNM")
|
"GROUP BY eng.STCD, eng.ENNM")
|
||||||
WtrvInfo getWtrvInfoByStcd3(@Param("stcd") String stcd);
|
WtrvInfo getWtrvInfoByStcd3(@Param("stcd") String stcd);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ public class AlongListServiceImpl extends ServiceImpl<AlongListMapper, SdAlongVO
|
|||||||
"\t( SELECT RVCD,SORT FROM " +
|
"\t( SELECT RVCD,SORT FROM " +
|
||||||
"\t(select MAB.RVCD,SAB.STCD,CASE WHEN MAB.RVCD #{rvcd} THEN 0 ELSE 1 END AS SORT from MS_ALONG_B MAB inner join MS_ALONGDET_B SAB on SAB.ALONG_ID = MAB.ID WHERE SAB.IS_DELETED =0 AND MAB.IS_DELETED =0 AND SAB.STTP IN ('WTRV', 'ENG') and MAB.CODE='common') t1 " +
|
"\t(select MAB.RVCD,SAB.STCD,CASE WHEN MAB.RVCD #{rvcd} THEN 0 ELSE 1 END AS SORT from MS_ALONG_B MAB inner join MS_ALONGDET_B SAB on SAB.ALONG_ID = MAB.ID WHERE SAB.IS_DELETED =0 AND MAB.IS_DELETED =0 AND SAB.STTP IN ('WTRV', 'ENG') and MAB.CODE='common') t1 " +
|
||||||
"\tINNER JOIN " +
|
"\tINNER JOIN " +
|
||||||
"\t(SELECT HBRVCD FROM SD_HBRV_DIC WHERE IS_DELETED=0 AND ENABLED=1 #{full_path} AND HBRVNM IS NOT NULL) t2 " +
|
"\t(SELECT HBRVCD FROM SD_HBRV_DIC WHERE #{full_path} HBRVNM IS NOT NULL) t2 " +
|
||||||
"\tON t1.RVCD = t2.HBRVCD " +
|
"\tON t1.RVCD = t2.HBRVCD " +
|
||||||
"\tINNER JOIN " +
|
"\tINNER JOIN " +
|
||||||
"\t(SELECT STCD FROM SD_WTRV_R WHERE TM >= #{tm} AND TM <= #{tm_1} AND WT IS NOT NULL ) t3 " +
|
"\t(SELECT STCD FROM SD_WTRV_R WHERE TM >= #{tm} AND TM <= #{tm_1} AND WT IS NOT NULL ) t3 " +
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user