feat: 根据站码查询单条栖息地基础数据
This commit is contained in:
parent
25bb50533d
commit
0715616e5f
@ -8,9 +8,11 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
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.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -58,6 +60,12 @@ public class FhHabitatController {
|
|||||||
return ResponseResult.successData(fhHabitatService.getMsstbprptList(dataSourceRequest));
|
return ResponseResult.successData(fhHabitatService.getMsstbprptList(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/msstbprpt/getStcdInfo")
|
||||||
|
@Operation(summary = "根据站码查询单条栖息地基础数据")
|
||||||
|
public ResponseResult getStcdInfo(@RequestParam String stcd) {
|
||||||
|
return ResponseResult.successData(fhHabitatService.getStcdInfo(stcd));
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/stTbYs/GetStTbYsBVoKendoListCust")
|
@PostMapping("/stTbYs/GetStTbYsBVoKendoListCust")
|
||||||
@Operation(summary = "水质监测信息查询")
|
@Operation(summary = "水质监测信息查询")
|
||||||
public ResponseResult getStTbYsBVoKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getStTbYsBVoKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
|||||||
165
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhBaseInfoVo.java
vendored
Normal file
165
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhBaseInfoVo.java
vendored
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
package com.yfd.platform.env.fh.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "栖息地基础信息")
|
||||||
|
public class FhBaseInfoVo {
|
||||||
|
|
||||||
|
@Schema(description = "栖息地编码")
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
@Schema(description = "栖息地名称")
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
@Schema(description = "数据时间")
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
@Schema(description = "所属建设阶段")
|
||||||
|
private Integer blprd;
|
||||||
|
|
||||||
|
@Schema(description = "经度")
|
||||||
|
private Double lgtd;
|
||||||
|
|
||||||
|
@Schema(description = "纬度")
|
||||||
|
private Double lttd;
|
||||||
|
|
||||||
|
@Schema(description = "高程")
|
||||||
|
private Double elev;
|
||||||
|
|
||||||
|
@Schema(description = "站址")
|
||||||
|
private String stlc;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用")
|
||||||
|
private Integer usfl;
|
||||||
|
|
||||||
|
@Schema(description = "数据是否接入")
|
||||||
|
private Integer dtin;
|
||||||
|
|
||||||
|
@Schema(description = "数据接入时间")
|
||||||
|
private Date dtinTm;
|
||||||
|
|
||||||
|
@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 reachdes;
|
||||||
|
|
||||||
|
@Schema(description = "栖息地范围经纬度列表")
|
||||||
|
private String lglttd;
|
||||||
|
|
||||||
|
@Schema(description = "简介")
|
||||||
|
private String introduce;
|
||||||
|
|
||||||
|
@Schema(description = "LOGO")
|
||||||
|
private String logo;
|
||||||
|
|
||||||
|
@Schema(description = "介绍图片")
|
||||||
|
private String inffile;
|
||||||
|
|
||||||
|
@Schema(description = "投资")
|
||||||
|
private BigDecimal inv;
|
||||||
|
|
||||||
|
@Schema(description = "投资是否计入主体工程")
|
||||||
|
private Integer invinmn;
|
||||||
|
|
||||||
|
@Schema(description = "保护对象")
|
||||||
|
private String bhdx;
|
||||||
|
|
||||||
|
@Schema(description = "保护范围")
|
||||||
|
private String bhfw;
|
||||||
|
|
||||||
|
@Schema(description = "保护长度")
|
||||||
|
private BigDecimal bhcd;
|
||||||
|
|
||||||
|
@Schema(description = "保护面积")
|
||||||
|
private BigDecimal bhmj;
|
||||||
|
|
||||||
|
@Schema(description = "保护河流")
|
||||||
|
private String bhhl;
|
||||||
|
|
||||||
|
@Schema(description = "保护河段")
|
||||||
|
private String bhhd;
|
||||||
|
|
||||||
|
@Schema(description = "保护措施")
|
||||||
|
private String bhcs;
|
||||||
|
|
||||||
|
@Schema(description = "保护方式")
|
||||||
|
private String bhfs;
|
||||||
|
|
||||||
|
@Schema(description = "实施时间")
|
||||||
|
private Date attm;
|
||||||
|
|
||||||
|
@Schema(description = "保护外围长度")
|
||||||
|
private BigDecimal bhwwcd;
|
||||||
|
|
||||||
|
@Schema(description = "保护核心长度")
|
||||||
|
private BigDecimal bhhxcd;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ package com.yfd.platform.env.fh.service;
|
|||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
import com.yfd.platform.env.fh.entity.ao.FhDefaultAo;
|
import com.yfd.platform.env.fh.entity.ao.FhDefaultAo;
|
||||||
|
import com.yfd.platform.env.fh.entity.vo.FhBaseInfoVo;
|
||||||
import com.yfd.platform.env.fh.entity.vo.FhDefaultVo;
|
import com.yfd.platform.env.fh.entity.vo.FhDefaultVo;
|
||||||
import com.yfd.platform.env.fh.entity.vo.HabitatVo;
|
import com.yfd.platform.env.fh.entity.vo.HabitatVo;
|
||||||
|
|
||||||
@ -20,5 +21,7 @@ public interface FhHabitatService {
|
|||||||
|
|
||||||
DataSourceResult getMsstbprptList(DataSourceRequest dataSourceRequest);
|
DataSourceResult getMsstbprptList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
FhBaseInfoVo getStcdInfo(String stcd);
|
||||||
|
|
||||||
DataSourceResult getStTbYsBVoKendoListCust(DataSourceRequest dataSourceRequest);
|
DataSourceResult getStTbYsBVoKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,9 @@ import com.yfd.platform.common.GroupHelper;
|
|||||||
import com.yfd.platform.common.GroupingInfo;
|
import com.yfd.platform.common.GroupingInfo;
|
||||||
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||||
import com.yfd.platform.common.PageInfo;
|
import com.yfd.platform.common.PageInfo;
|
||||||
|
import com.yfd.platform.common.exception.BizException;
|
||||||
import com.yfd.platform.env.fh.entity.ao.FhDefaultAo;
|
import com.yfd.platform.env.fh.entity.ao.FhDefaultAo;
|
||||||
|
import com.yfd.platform.env.fh.entity.vo.FhBaseInfoVo;
|
||||||
import com.yfd.platform.env.fh.entity.vo.FhDefaultVo;
|
import com.yfd.platform.env.fh.entity.vo.FhDefaultVo;
|
||||||
import com.yfd.platform.env.fh.entity.vo.HabitatVo;
|
import com.yfd.platform.env.fh.entity.vo.HabitatVo;
|
||||||
import com.yfd.platform.env.fh.entity.vo.FhMsstbprptVo;
|
import com.yfd.platform.env.fh.entity.vo.FhMsstbprptVo;
|
||||||
@ -161,6 +163,83 @@ public class FhHabitatServiceImpl implements FhHabitatService {
|
|||||||
return result.get(0);
|
return result.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FhBaseInfoVo 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.BLPRD AS blprd, " +
|
||||||
|
"t.LGTD AS lgtd, " +
|
||||||
|
"t.LTTD AS lttd, " +
|
||||||
|
"t.ELEV AS elev, " +
|
||||||
|
"t.STLC AS stlc, " +
|
||||||
|
"t.USFL AS usfl, " +
|
||||||
|
"t.DTIN AS dtin, " +
|
||||||
|
"t.DTIN_TM AS dtinTm, " +
|
||||||
|
"t.ORDER_INDEX AS orderIndex, " +
|
||||||
|
"t.RSTCD AS rstcd, " +
|
||||||
|
"eng.ENNM AS ennm, " +
|
||||||
|
"t.BASE_ID AS baseId, " +
|
||||||
|
"base.BASENAME AS baseName, " +
|
||||||
|
"t.HBRVCD AS hbrvcd, " +
|
||||||
|
"hbrv.HBRVNM AS hbrvcdName, " +
|
||||||
|
"t.RVCD AS rvcd, " +
|
||||||
|
"rv.RVNM AS rvcdName, " +
|
||||||
|
"t.ADDVCD AS addvcd, " +
|
||||||
|
"addv.ADDVNM AS addvcdName, " +
|
||||||
|
"t.REACHDES AS reachdes, " +
|
||||||
|
"t.LGLTTD AS lglttd, " +
|
||||||
|
"t.INTRODUCE AS introduce, " +
|
||||||
|
"t.LOGO AS logo, " +
|
||||||
|
"t.INFFILE AS inffile, " +
|
||||||
|
"t.INV AS inv, " +
|
||||||
|
"t.INVINMN AS invinmn, " +
|
||||||
|
"t.BHDX AS bhdx, " +
|
||||||
|
"t.BHFW AS bhfw, " +
|
||||||
|
"t.BHCD AS bhcd, " +
|
||||||
|
"t.BHMJ AS bhmj, " +
|
||||||
|
"t.BHHL AS bhhl, " +
|
||||||
|
"t.BHHD AS bhhd, " +
|
||||||
|
"t.BHCS AS bhcs, " +
|
||||||
|
"t.BHFS AS bhfs, " +
|
||||||
|
"t.ATTM AS attm, " +
|
||||||
|
"t.BHWWCD AS bhwwcd, " +
|
||||||
|
"t.BHHXCD AS bhhxcd, " +
|
||||||
|
"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_FHBT_B_H t " +
|
||||||
|
"LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = t.RSTCD " +
|
||||||
|
"LEFT JOIN SD_HYDROBASE base ON base.BASEID = t.BASE_ID AND NVL(base.IS_DELETED, 0) = 0 " +
|
||||||
|
"LEFT JOIN SD_HBRV_DIC hbrv ON hbrv.HBRVCD = t.HBRVCD " +
|
||||||
|
" AND hbrv.BASEID = t.BASE_ID " +
|
||||||
|
" AND NVL(hbrv.IS_DELETED, 0) = 0 " +
|
||||||
|
" AND NVL(hbrv.ENABLED, 1) = 1 " +
|
||||||
|
"LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = t.RVCD " +
|
||||||
|
"LEFT JOIN SD_ADDVCD_DIC addv ON addv.ADDVCD = t.ADDVCD " +
|
||||||
|
"WHERE t.STCD = #{map.stcd} " +
|
||||||
|
" AND NVL(t.IS_DELETED, 0) = 0 ";
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("stcd", stcd);
|
||||||
|
List<FhBaseInfoVo> list = microservicDynamicSQLMapper.getAllListWithResultType(sql, paramMap, FhBaseInfoVo.class);
|
||||||
|
if (list == null || list.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return list.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataSourceResult getSdrvwtsList(DataSourceRequest dataSourceRequest) {
|
public DataSourceResult getSdrvwtsList(DataSourceRequest dataSourceRequest) {
|
||||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user