diff --git a/backend/src/main/java/com/yfd/platform/config/SecurityConfig.java b/backend/src/main/java/com/yfd/platform/config/SecurityConfig.java index ba6eb18..fb55233 100644 --- a/backend/src/main/java/com/yfd/platform/config/SecurityConfig.java +++ b/backend/src/main/java/com/yfd/platform/config/SecurityConfig.java @@ -60,6 +60,7 @@ public class SecurityConfig { .requestMatchers("/eng/**").permitAll() .requestMatchers("/env/**").permitAll() .requestMatchers("/wt/**").permitAll() + .requestMatchers("/wq/**").permitAll() .requestMatchers("/data/**").permitAll() .requestMatchers("/sms/**").permitAll() .requestMatchers(HttpMethod.GET, "/").permitAll() diff --git a/backend/src/main/java/com/yfd/platform/env/wq/controller/EnvWqDataController.java b/backend/src/main/java/com/yfd/platform/env/wq/controller/EnvWqDataController.java new file mode 100644 index 0000000..aa8428b --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/env/wq/controller/EnvWqDataController.java @@ -0,0 +1,55 @@ +package com.yfd.platform.env.wq.controller; + +import com.yfd.platform.common.DataSourceRequest; +import com.yfd.platform.config.ResponseResult; +import com.yfd.platform.env.wq.service.EnvWqDataService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/wq") +@Tag(name = "水质统计分析") +@Validated +public class EnvWqDataController { + + @Resource + private EnvWqDataService envWqDataService; + + @PostMapping("/GetKendoListCust") + @Operation(summary = "水质统计分析") + public ResponseResult getKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) { + return ResponseResult.successData(envWqDataService.processKendoList(dataSourceRequest)); + } + + @PostMapping("/data/noAuth/GetKendoListCust") + @Operation(summary = "水质统计分析") + public ResponseResult getNoAuthKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) { + return ResponseResult.successData(envWqDataService.processKendoList(dataSourceRequest)); + } + + @PostMapping("/along/qgc/GetKendoListCust") + @Operation(summary = "查询时间范围内沿程水质最新时间的数据") + public ResponseResult getAlongWqKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) { + return ResponseResult.successData(envWqDataService.getAlongWqKendoListCust(dataSourceRequest)); + } + + @PostMapping("/msstbprpt/GetKendoList") + @Operation(summary = "查询水质基础站点分组统计") + public ResponseResult getMsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) { + return ResponseResult.successData(envWqDataService.getMsstbprptList(dataSourceRequest)); + } + + @GetMapping("/msstbprpt/getStcdInfo") + @Operation(summary = "根据站码查询单条水质基础数据") + public ResponseResult getStcdInfo(@RequestParam String stcd) { + return ResponseResult.successData(envWqDataService.getStcdInfo(stcd)); + } +} diff --git a/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqDataVo.java b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqDataVo.java new file mode 100644 index 0000000..4a60882 --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqDataVo.java @@ -0,0 +1,144 @@ +package com.yfd.platform.env.wq.entity.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Data +@Schema(description = "水质实时数据") +public class EnvWqDataVo { + @Schema(description = "测站编码") + private String stcd; + @Schema(description = "电站编码") + private String rstcd; + @Schema(description = "测站名称") + private String stnm; + @Schema(description = "栖息地编码") + private String stCode; + @Schema(description = "栖息地名称") + private String stName; + @Schema(description = "电站名称") + private String ennm; + @Schema(description = "数据时间") + private Date tm; + @Schema(description = "水温") + private BigDecimal wtmp; + @Schema(description = "pH") + private BigDecimal ph; + @Schema(description = "溶解氧") + private BigDecimal dox; + @Schema(description = "高锰酸盐指数") + private BigDecimal codmn; + @Schema(description = "化学需氧量") + private BigDecimal codcr; + @Schema(description = "五日生化需氧量") + private BigDecimal bod5; + @Schema(description = "氨氮") + private BigDecimal nh3n; + @Schema(description = "总磷") + private BigDecimal tp; + @Schema(description = "总氮") + private BigDecimal tn; + @Schema(description = "铜") + private BigDecimal cu; + @Schema(description = "锌") + private BigDecimal zn; + @Schema(description = "氟化物") + private BigDecimal f; + @Schema(description = "硒") + private BigDecimal se; + @Schema(description = "砷") + private BigDecimal ars; + @Schema(description = "汞") + private BigDecimal hg; + @Schema(description = "镉") + private BigDecimal cd; + @Schema(description = "六价铬") + private BigDecimal cr6; + @Schema(description = "铅") + private BigDecimal pb; + @Schema(description = "氰化物") + private BigDecimal cn; + @Schema(description = "挥发酚") + private BigDecimal vlph; + @Schema(description = "石油类") + private BigDecimal oil; + @Schema(description = "阴离子表面活性剂") + private BigDecimal las; + @Schema(description = "硫化物") + private BigDecimal s2; + @Schema(description = "粪大肠菌群") + private BigDecimal fcg; + @Schema(description = "氯化物") + private BigDecimal cl; + @Schema(description = "硫酸盐") + private BigDecimal so4; + @Schema(description = "硝酸盐氮") + private BigDecimal no3; + @Schema(description = "总硬度") + private BigDecimal thrd; + @Schema(description = "电导率") + private BigDecimal cond; + @Schema(description = "铁") + private BigDecimal fe; + @Schema(description = "锰") + private BigDecimal mn; + @Schema(description = "铝") + private BigDecimal al; + @Schema(description = "叶绿素a") + private BigDecimal chla; + @Schema(description = "透明度") + private BigDecimal clarity; + @Schema(description = "浊度") + private BigDecimal tu; + @Schema(description = "总需氧量") + private BigDecimal tod; + @Schema(description = "蓝绿藻") + private BigDecimal cyano; + @Schema(description = "实际水质等级") + private String wqgrd; + @Schema(description = "实际水质等级名称") + private String wqgrdName; + @Schema(description = "目标水质等级") + private String wwqtg; + @Schema(description = "目标水质等级名称") + private String wwqtgName; + @Schema(description = "是否达标") + private Integer sfdb; + @Schema(description = "是否达标名称") + private String sfdbName; + @Schema(description = "水质不达标的要素") + private String wqSfdbhnYs; + @Schema(description = "水质不达标的要素名称") + private String wqSfdbhnYsName; + @Schema(description = "基地编码") + private String baseId; + @Schema(description = "基地名称") + private String baseName; + @Schema(description = "流域名称") + private String rvcdName; + @Schema(description = "行政区名称") + private String addvcdName; + @Schema(description = "数据接入类型") + private String dtinType; + @Schema(description = "入库流量") + private BigDecimal qi; + @Schema(description = "出库流量") + private BigDecimal qo; + @Schema(description = "基地排序") + private Integer baseStepSort; + @Schema(description = "流域排序") + private Integer rvcdStepSort; + @Schema(description = "电站排序") + private Integer rstcdStepSort; + @Schema(description = "测站排序") + private Integer siteStepSort; + @Schema(description = "水质要素最小限值集合") + private List> min; + @Schema(description = "水质要素最大限值集合") + private List> max; +} diff --git a/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqVo.java b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqVo.java new file mode 100644 index 0000000..47163bf --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqVo.java @@ -0,0 +1,239 @@ +package com.yfd.platform.env.wq.entity.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Data +@Schema(description = "水质统计分析结果") +public class EnvWqVo { + + @Schema(description = "主键") + private String id; + + @Schema(description = "测站编码") + private String stcd; + + @Schema(description = "测站名称") + private String stnm; + + @Schema(description = "电站编码") + private String rstcd; + + @Schema(description = "电站名称") + private String ennm; + + @Schema(description = "统计时间") + private Date tm; + + @Schema(description = "统计类型") + private String type; + + @Schema(description = "测站类型") + private String sttype; + + @Schema(description = "测站类型名称") + private String sttypeName; + + @Schema(description = "是否达标") + private Integer sfdb; + + @Schema(description = "是否达标名称") + private String sfdbName; + + @Schema(description = "月维度") + private String drMonth; + + @Schema(description = "年维度") + private String drYear; + + @Schema(description = "基地编码") + private String baseId; + + @Schema(description = "基地名称") + private String baseName; + + @Schema(description = "流域编码") + private String hbrvcd; + + @Schema(description = "流域名称") + private String hbrvcdName; + + @Schema(description = "河流名称") + private String rvcdName; + + @Schema(description = "行政区名称") + private String addvcdName; + + @Schema(description = "水质目标") + private String wwqtg; + + @Schema(description = "水质目标名称") + private String wwqtgName; + + @Schema(description = "水质等级") + private String wqGrd; + + @Schema(description = "水质等级名称") + private String wqGrdName; + + @Schema(description = "去年同期水质等级") + private String beforeWqGrd; + + @Schema(description = "去年同期水质等级名称") + private String beforeWqGrdName; + + @Schema(description = "水质达标率") + private String wqRate; + + @Schema(description = "位置") + private String lctn; + + @Schema(description = "计算标识") + private String calculateFlag; + + @Schema(description = "水温") + private BigDecimal wtmp; + + @Schema(description = "pH") + private BigDecimal ph; + + @Schema(description = "溶解氧") + private BigDecimal dox; + + @Schema(description = "高锰酸盐指数") + private BigDecimal codmn; + + @Schema(description = "化学需氧量") + private BigDecimal codcr; + + @Schema(description = "五日生化需氧量") + private BigDecimal bod5; + + @Schema(description = "氨氮") + private BigDecimal nh3n; + + @Schema(description = "总磷") + private BigDecimal tp; + + @Schema(description = "总氮") + private BigDecimal tn; + + @Schema(description = "铜") + private BigDecimal cu; + + @Schema(description = "锌") + private BigDecimal zn; + + @Schema(description = "氟化物") + private BigDecimal f; + + @Schema(description = "硒") + private BigDecimal se; + + @Schema(description = "砷") + private BigDecimal ars; + + @Schema(description = "汞") + private BigDecimal hg; + + @Schema(description = "镉") + private BigDecimal cd; + + @Schema(description = "六价铬") + private BigDecimal cr6; + + @Schema(description = "铅") + private BigDecimal pb; + + @Schema(description = "氰化物") + private BigDecimal cn; + + @Schema(description = "挥发酚") + private BigDecimal vlph; + + @Schema(description = "石油类") + private BigDecimal oil; + + @Schema(description = "阴离子表面活性剂") + private BigDecimal las; + + @Schema(description = "硫化物") + private BigDecimal s2; + + @Schema(description = "粪大肠菌群") + private BigDecimal fcg; + + @Schema(description = "氯化物") + private BigDecimal cl; + + @Schema(description = "硫酸盐") + private BigDecimal so4; + + @Schema(description = "硝酸盐氮") + private BigDecimal no3; + + @Schema(description = "总硬度") + private BigDecimal thrd; + + @Schema(description = "电导率") + private BigDecimal cond; + + @Schema(description = "铁") + private BigDecimal fe; + + @Schema(description = "锰") + private BigDecimal mn; + + @Schema(description = "铝") + private BigDecimal al; + + @Schema(description = "叶绿素a") + private BigDecimal chla; + + @Schema(description = "透明度") + private BigDecimal clarity; + + @Schema(description = "浊度") + private BigDecimal tu; + + @Schema(description = "总需氧量") + private BigDecimal tod; + + @Schema(description = "蓝绿藻") + private BigDecimal cyano; + + @Schema(description = "水质要素最小限值集合") + private List> min; + + @Schema(description = "水质要素最大限值集合") + private List> max; + + @Schema(description = "电站排序") + private Integer rstcdStepSort; + + @Schema(description = "流域排序") + private Integer rvcdStepSort; + + @Schema(description = "基地排序") + private Integer baseStepSort; + + @Schema(description = "测站排序") + private Integer siteStepSort; + + @Schema(description = "R表水质达标数") + private BigDecimal wqSfdbHy; + + @Schema(description = "R表水质不达标数") + private BigDecimal wqSfdbHn; + + @Schema(description = "R表水质统计数") + private BigDecimal wqSfdbCount; + + @Schema(description = "R表水质异常数") + private BigDecimal wqSfdbHo; +} diff --git a/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqAlongVo.java b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqAlongVo.java new file mode 100644 index 0000000..ad5d38b --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqAlongVo.java @@ -0,0 +1,155 @@ +package com.yfd.platform.env.wq.entity.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Data +@Schema(description = "沿程水质数据") +public class WqAlongVo { + + @Schema(description = "站码") + private String stcd; + + @Schema(description = "所属电站编码") + private String rstcd; + + @Schema(description = "站名") + private String stnm; + + @Schema(description = "站类") + private String sttp; + + @Schema(description = "采样时间") + private Date tm; + + @Schema(description = "最小时间") + private Date minTm; + + @Schema(description = "目标水质类别") + private String wwqtg; + + @Schema(description = "实际水质类别") + private String wqgrd; + + @Schema(description = "实际水质类别名称") + private String wqgrdName; + + @Schema(description = "水温") + private BigDecimal wtmp; + + @Schema(description = "PH") + private BigDecimal ph; + + @Schema(description = "溶解氧") + private BigDecimal dox; + + @Schema(description = "高锰酸盐指数") + private BigDecimal codmn; + + @Schema(description = "化学需氧量") + private BigDecimal codcr; + + @Schema(description = "五日生化需氧量") + private BigDecimal bod5; + + @Schema(description = "氨氮") + private BigDecimal nh3n; + + @Schema(description = "总磷") + private BigDecimal tp; + + @Schema(description = "总氮") + private BigDecimal tn; + + @Schema(description = "铜") + private BigDecimal cu; + + @Schema(description = "锌") + private BigDecimal zn; + + @Schema(description = "氟化物") + private BigDecimal f; + + @Schema(description = "硒") + private BigDecimal se; + + @Schema(description = "砷") + private BigDecimal ars; + + @Schema(description = "汞") + private BigDecimal hg; + + @Schema(description = "镉") + private BigDecimal cd; + + @Schema(description = "六价铬") + private BigDecimal cr6; + + @Schema(description = "铅") + private BigDecimal pb; + + @Schema(description = "氰化物") + private BigDecimal cn; + + @Schema(description = "挥发酚") + private BigDecimal vlph; + + @Schema(description = "石油类") + private BigDecimal oil; + + @Schema(description = "阴离子表面活性剂") + private BigDecimal las; + + @Schema(description = "硫化物") + private BigDecimal s2; + + @Schema(description = "粪大肠菌群") + private BigDecimal fcg; + + @Schema(description = "氯化物") + private BigDecimal cl; + + @Schema(description = "硫酸盐") + private BigDecimal so4; + + @Schema(description = "硝酸盐氮") + private BigDecimal no3; + + @Schema(description = "总硬度") + private BigDecimal thrd; + + @Schema(description = "电导率") + private BigDecimal cond; + + @Schema(description = "铁") + private BigDecimal fe; + + @Schema(description = "锰") + private BigDecimal mn; + + @Schema(description = "铝") + private BigDecimal al; + + @Schema(description = "叶绿素a") + private BigDecimal chla; + + @Schema(description = "透明度") + private BigDecimal clarity; + + @Schema(description = "浊度") + private BigDecimal tu; + + @Schema(description = "蓝绿藻") + private BigDecimal cyano; + + @Schema(description = "水质要素最小限值集合") + private List> min; + + @Schema(description = "水质要素最大限值集合") + private List> max; +} diff --git a/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqBaseInfoVo.java b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqBaseInfoVo.java new file mode 100644 index 0000000..ac273d2 --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqBaseInfoVo.java @@ -0,0 +1,152 @@ +package com.yfd.platform.env.wq.entity.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.Date; + +@Data +@Schema(description = "水质基础站点信息") +public class WqBaseInfoVo { + + @Schema(description = "站码") + private String stcd; + + @Schema(description = "站名") + private String stnm; + + @Schema(description = "数据时间") + private Date tm; + + @Schema(description = "站类") + private String sttp; + + @Schema(description = "经度") + private Double lgtd; + + @Schema(description = "纬度") + private Double lttd; + + @Schema(description = "海拔") + private Double elev; + + @Schema(description = "站址") + private String stlc; + + @Schema(description = "水质目标") + private String wwqtg; + + @Schema(description = "水质建设类型") + private String wqtype; + + @Schema(description = "建成日期") + private Date jcdt; + + @Schema(description = "退役日期") + private Date wddt; + + @Schema(description = "建设状态分类") + private Integer bldsttCode; + + @Schema(description = "简介") + private String introduce; + + @Schema(description = "LOGO") + private String logo; + + @Schema(description = "介绍图片") + private String inffile; + + @Schema(description = "是否启用") + private Integer usfl; + + @Schema(description = "数据是否接入") + private Integer dtin; + + @Schema(description = "数据接入来源") + private String dtinSrc; + + @Schema(description = "数据接入类型") + private Integer dtinType; + + @Schema(description = "数据接入开始时间") + private Date dtinTm; + + @Schema(description = "监测方式") + private Integer mway; + + @Schema(description = "监测指标") + private String stindx; + + @Schema(description = "排序") + private Integer orderIndex; + + @Schema(description = "所属电站编码") + private String rstcd; + + @Schema(description = "所属电站名称") + private String ennm; + + @Schema(description = "所属基地编码") + private String baseId; + + @Schema(description = "所属基地名称") + private String baseName; + + @Schema(description = "基地流域编码") + private String hbrvcd; + + @Schema(description = "基地流域名称") + private String hbrvcdName; + + @Schema(description = "流域编码") + private String rvcd; + + @Schema(description = "流域名称") + private String rvcdName; + + @Schema(description = "行政区编码") + private String addvcd; + + @Schema(description = "行政区名称") + private String addvcdName; + + @Schema(description = "所属栖息地编码") + private String fhstcd; + + @Schema(description = "是否关联断面") + private Integer ispro; + + @Schema(description = "数据监测频次") + private Integer dtfrqcy; + + @Schema(description = "备注") + private String remark; + + @Schema(description = "数据来源") + private String vlsr; + + @Schema(description = "数据来源时间") + private Date vlsrTm; + + @Schema(description = "创建人") + private String recordUser; + + @Schema(description = "创建时间") + private Date recordTime; + + @Schema(description = "更新人") + private String modifyUser; + + @Schema(description = "更新时间") + private Date modifyTime; + + @Schema(description = "是否删除") + private Integer isDeleted; + + @Schema(description = "删除人") + private String deleteUser; + + @Schema(description = "删除时间") + private Date deleteTime; +} diff --git a/backend/src/main/java/com/yfd/platform/env/wq/service/EnvWqDataService.java b/backend/src/main/java/com/yfd/platform/env/wq/service/EnvWqDataService.java new file mode 100644 index 0000000..255fa4f --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/env/wq/service/EnvWqDataService.java @@ -0,0 +1,16 @@ +package com.yfd.platform.env.wq.service; + +import com.yfd.platform.common.DataSourceRequest; +import com.yfd.platform.common.DataSourceResult; +import com.yfd.platform.env.wq.entity.vo.WqBaseInfoVo; + +public interface EnvWqDataService { + + DataSourceResult processKendoList(DataSourceRequest dataSourceRequest); + + DataSourceResult getAlongWqKendoListCust(DataSourceRequest dataSourceRequest); + + DataSourceResult getMsstbprptList(DataSourceRequest dataSourceRequest); + + WqBaseInfoVo getStcdInfo(String stcd); +} diff --git a/backend/src/main/java/com/yfd/platform/env/wq/service/impl/EnvWqDataServiceImpl.java b/backend/src/main/java/com/yfd/platform/env/wq/service/impl/EnvWqDataServiceImpl.java new file mode 100644 index 0000000..92e9401 --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/env/wq/service/impl/EnvWqDataServiceImpl.java @@ -0,0 +1,120 @@ +package com.yfd.platform.env.wq.service.impl; + +import cn.hutool.core.util.StrUtil; +import com.yfd.platform.common.DataSourceRequest; +import com.yfd.platform.common.DataSourceResult; +import com.yfd.platform.common.MicroservicDynamicSQLMapper; +import com.yfd.platform.common.exception.BizException; +import com.yfd.platform.env.wq.entity.vo.WqBaseInfoVo; +import com.yfd.platform.env.wq.service.EnvWqDataService; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class EnvWqDataServiceImpl implements EnvWqDataService { + + @Resource + private MicroservicDynamicSQLMapper microservicDynamicSQLMapper; + + @Override + public DataSourceResult processKendoList(DataSourceRequest dataSourceRequest) { + return emptyResult(); + } + + @Override + public DataSourceResult getAlongWqKendoListCust(DataSourceRequest dataSourceRequest) { + return emptyResult(); + } + + @Override + public DataSourceResult getMsstbprptList(DataSourceRequest dataSourceRequest) { + return emptyResult(); + } + + @Override + public WqBaseInfoVo getStcdInfo(String stcd) { + if (StrUtil.isBlank(stcd)) { + throw new BizException("站点编码不能为空!"); + } + String sql = "SELECT " + + "t.STCD AS stcd, " + + "t.STNM AS stnm, " + + "t.TM AS tm, " + + "t.STTP AS sttp, " + + "t.LGTD AS lgtd, " + + "t.LTTD AS lttd, " + + "t.ELEV AS elev, " + + "t.STLC AS stlc, " + + "t.WWQTG AS wwqtg, " + + "t.WQTYPE AS wqtype, " + + "t.JCDT AS jcdt, " + + "t.WDDT AS wddt, " + + "t.BLDSTT_CODE AS bldsttCode, " + + "t.INTRODUCE AS introduce, " + + "t.LOGO AS logo, " + + "t.INFFILE AS inffile, " + + "t.USFL AS usfl, " + + "t.DTIN AS dtin, " + + "t.DTIN_SRC AS dtinSrc, " + + "t.DTIN_TYPE AS dtinType, " + + "t.DTIN_TM AS dtinTm, " + + "t.MWAY AS mway, " + + "t.STINDX AS stindx, " + + "t.ORDER_INDEX AS orderIndex, " + + "t.RSTCD AS rstcd, " + + "eng.ENNM AS ennm, " + + "eng.BASE_ID AS baseId, " + + "base.BASENAME AS baseName, " + + "eng.HBRVCD AS hbrvcd, " + + "hbrv.HBRVNM AS hbrvcdName, " + + "eng.RVCD AS rvcd, " + + "rv.RVNM AS rvcdName, " + + "eng.ADDVCD AS addvcd, " + + "addv.ADDVNM AS addvcdName, " + + "t.FHSTCD AS fhstcd, " + + "t.ISPRO AS ispro, " + + "t.DTFRQCY AS dtfrqcy, " + + "t.REMARK AS remark, " + + "t.VLSR AS vlsr, " + + "t.VLSR_TM AS vlsrTm, " + + "t.RECORD_USER AS recordUser, " + + "t.RECORD_TIME AS recordTime, " + + "t.MODIFY_USER AS modifyUser, " + + "t.MODIFY_TIME AS modifyTime, " + + "t.IS_DELETED AS isDeleted, " + + "t.DELETE_USER AS deleteUser, " + + "t.DELETE_TIME AS deleteTime " + + "FROM SD_WQ_B_H t " + + "LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = t.RSTCD " + + "LEFT JOIN SD_HYDROBASE base ON base.BASEID = eng.BASE_ID AND NVL(base.IS_DELETED, 0) = 0 " + + "LEFT JOIN SD_HBRV_DIC hbrv ON hbrv.HBRVCD = eng.HBRVCD " + + " AND hbrv.BASEID = eng.BASE_ID " + + " AND NVL(hbrv.IS_DELETED, 0) = 0 " + + " AND NVL(hbrv.ENABLED, 1) = 1 " + + "LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = eng.RVCD " + + "LEFT JOIN SD_ADDVCD_DIC addv ON addv.ADDVCD = eng.ADDVCD " + + "WHERE t.STCD = #{map.stcd} " + + " AND NVL(t.IS_DELETED, 0) = 0 " + + " AND t.STTP = 'WQ'"; + Map paramMap = new HashMap<>(); + paramMap.put("stcd", stcd); + List list = microservicDynamicSQLMapper.getAllListWithResultType(sql, paramMap, WqBaseInfoVo.class); + if (list == null || list.isEmpty()) { + return null; + } + return list.get(0); + } + + private DataSourceResult emptyResult() { + DataSourceResult result = new DataSourceResult(); + result.setData(new ArrayList<>()); + result.setTotal(0L); + result.setAggregates(new HashMap<>()); + return result; + } +}