feat: 查询水电基地流域字典列表
This commit is contained in:
parent
88a2d81953
commit
684eb621e4
@ -155,7 +155,7 @@ public class SdWTMonitorController {
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/base/evnmAutoMonitor/GetKendoListCust")
|
||||
@PostMapping("/evnmAutoMonitor/GetKendoListCust")
|
||||
@Operation(summary = "查询水温监测数量")
|
||||
public ResponseResult getWTDataCount(@RequestBody(required = false) DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(sdWtMonitorService.getEvnmAutoMonitorList());
|
||||
@ -167,6 +167,12 @@ public class SdWTMonitorController {
|
||||
return ResponseResult.successData(sdWtMonitorService.getVmsstbprptList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/wbsb/GetKendoList")
|
||||
@Operation(summary = "查询水电基地流域字典列表")
|
||||
public ResponseResult getWbsbList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(sdWtMonitorService.getWbsbList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/cxDetail/GetKendoListCust")
|
||||
@Operation(summary = "查询垂向水温明细")
|
||||
public ResponseResult getCxDetailList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
|
||||
60
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/WbsbVo.java
vendored
Normal file
60
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/WbsbVo.java
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
package com.yfd.platform.env.wt.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Schema(description = "水电基地流域字典")
|
||||
public class WbsbVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
private String recordUser;
|
||||
private Date recordTime;
|
||||
private Date modifyTime;
|
||||
private String displayRecordUser;
|
||||
private String isolateType;
|
||||
private String wbsType;
|
||||
private String wbsCode;
|
||||
private String wbsName;
|
||||
private String wbsSname;
|
||||
private String wbsNameEn;
|
||||
private String wbsSnameEn;
|
||||
private Integer enable;
|
||||
private String description;
|
||||
private String parentId;
|
||||
private String parentCode;
|
||||
private Integer treeLevel;
|
||||
private Integer hasChildren;
|
||||
private String objId;
|
||||
private String topWbsType;
|
||||
private String fullPath;
|
||||
private Integer internal;
|
||||
private BigDecimal lgtd;
|
||||
private BigDecimal lttd;
|
||||
private BigDecimal area;
|
||||
private BigDecimal perimeter;
|
||||
private String synopsis;
|
||||
private String introduce;
|
||||
private String logo;
|
||||
private String inffile;
|
||||
private Integer orderIndex;
|
||||
private String filterContent;
|
||||
private String departmentId;
|
||||
private String systemId;
|
||||
private String platformId;
|
||||
private String reachWwqtg;
|
||||
private BigDecimal maxElev;
|
||||
private BigDecimal minElev;
|
||||
private String datTp;
|
||||
private String rvAg;
|
||||
private Integer ifInnRv;
|
||||
private String showControl;
|
||||
private String stcd;
|
||||
private String displayDepartment;
|
||||
}
|
||||
@ -2,8 +2,11 @@ package com.yfd.platform.env.wt.service;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.env.wt.entity.vo.WbsbVo;
|
||||
import com.yfd.platform.env.wt.entity.vo.WtrvVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SdWtMonitorService {
|
||||
|
||||
DataSourceResult getEvnmAutoMonitorList();
|
||||
@ -15,4 +18,6 @@ public interface SdWtMonitorService {
|
||||
DataSourceResult getWtFishAnalysis(DataSourceRequest dataSourceRequest);
|
||||
|
||||
WtrvVo getFlagByStcd(String stcd);
|
||||
|
||||
DataSourceResult<WbsbVo> getWbsbList(DataSourceRequest dataSourceRequest);
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.yfd.platform.common.*;
|
||||
import com.yfd.platform.env.wt.entity.vo.FishSpawnVo;
|
||||
import com.yfd.platform.env.wt.entity.vo.SdWtMonitorCountVO;
|
||||
import com.yfd.platform.env.wt.entity.vo.SdWtBaseInfoVO;
|
||||
import com.yfd.platform.env.wt.entity.vo.WbsbVo;
|
||||
import com.yfd.platform.env.wt.entity.vo.WtrvVo;
|
||||
import com.yfd.platform.env.wt.entity.vo.WtFishVo;
|
||||
import com.yfd.platform.env.wt.mapper.SdWtMonitorMapper;
|
||||
@ -47,6 +48,81 @@ public class SdWtMonitorServiceImpl implements SdWtMonitorService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<WbsbVo> getWbsbList(DataSourceRequest dataSourceRequest) {
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
String wbsType = loadOptions == null ? null : QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "wbsType");
|
||||
if (!"PSB_RVCD".equalsIgnoreCase(wbsType)) {
|
||||
DataSourceResult<WbsbVo> emptyResult = new DataSourceResult<>();
|
||||
emptyResult.setData(new ArrayList<>());
|
||||
emptyResult.setTotal(0L);
|
||||
emptyResult.setAggregates(new HashMap<>());
|
||||
return emptyResult;
|
||||
}
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT ")
|
||||
.append("t.HBRVCD || '_' || t.BASEID AS id, ")
|
||||
.append("t.RECORD_USER AS recordUser, ")
|
||||
.append("t.RECORD_TIME AS recordTime, ")
|
||||
.append("t.MODIFY_TIME AS modifyTime, ")
|
||||
.append("NULL AS displayRecordUser, ")
|
||||
.append("NULL AS isolateType, ")
|
||||
.append("'PSB_RVCD' AS wbsType, ")
|
||||
.append("t.HBRVCD AS wbsCode, ")
|
||||
.append("t.HBRVNM AS wbsName, ")
|
||||
.append("NULL AS wbsSname, ")
|
||||
.append("NULL AS wbsNameEn, ")
|
||||
.append("NULL AS wbsSnameEn, ")
|
||||
.append("t.ENABLED AS enable, ")
|
||||
.append("t.REMARK AS description, ")
|
||||
.append("CASE WHEN t.PHBRVCD IS NULL OR t.PHBRVCD = '0' THEN NULL ELSE t.PHBRVCD || '_' || t.BASEID END AS parentId, ")
|
||||
.append("CASE WHEN t.PHBRVCD IS NULL OR t.PHBRVCD = '0' THEN NULL ELSE t.PHBRVCD END AS parentCode, ")
|
||||
.append("t.GRD AS treeLevel, ")
|
||||
.append("CASE WHEN EXISTS (")
|
||||
.append(" SELECT 1 FROM SD_HBRV_DIC c ")
|
||||
.append(" WHERE c.PHBRVCD = t.HBRVCD ")
|
||||
.append(" AND c.BASEID = t.BASEID ")
|
||||
.append(" AND NVL(c.IS_DELETED, 0) = 0")
|
||||
.append(") THEN 1 ELSE 0 END AS hasChildren, ")
|
||||
.append("t.BASEID AS objId, ")
|
||||
.append("'PSB' AS topWbsType, ")
|
||||
.append("t.PATH AS fullPath, ")
|
||||
.append("0 AS internal, ")
|
||||
.append("NULL AS lgtd, ")
|
||||
.append("NULL AS lttd, ")
|
||||
.append("NULL AS area, ")
|
||||
.append("NULL AS perimeter, ")
|
||||
.append("NULL AS synopsis, ")
|
||||
.append("NULL AS introduce, ")
|
||||
.append("NULL AS logo, ")
|
||||
.append("NULL AS inffile, ")
|
||||
.append("t.ORDER_INDEX AS orderIndex, ")
|
||||
.append("NULL AS filterContent, ")
|
||||
.append("NULL AS departmentId, ")
|
||||
.append("NULL AS systemId, ")
|
||||
.append("NULL AS platformId, ")
|
||||
.append("NULL AS reachWwqtg, ")
|
||||
.append("NULL AS maxElev, ")
|
||||
.append("NULL AS minElev, ")
|
||||
.append("NULL AS datTp, ")
|
||||
.append("NULL AS rvAg, ")
|
||||
.append("NULL AS ifInnRv, ")
|
||||
.append("NULL AS showControl, ")
|
||||
.append("NULL AS stcd, ")
|
||||
.append("NULL AS displayDepartment ")
|
||||
.append("FROM SD_HBRV_DIC t ")
|
||||
.append("WHERE NVL(t.IS_DELETED, 0) = 0 ");
|
||||
|
||||
sql.append("ORDER BY NVL(t.ORDER_INDEX, 999999), t.HBRVNM ASC");
|
||||
List<WbsbVo> list = microservicDynamicSQLMapper.getAllListWithResultType(sql.toString(), new HashMap<>(), WbsbVo.class);
|
||||
DataSourceResult<WbsbVo> result = new DataSourceResult<>();
|
||||
result.setData(list);
|
||||
result.setTotal((long) list.size());
|
||||
result.setAggregates(new HashMap<>());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WtrvVo getFlagByStcd(String stcd) {
|
||||
String sql = "SELECT wt.STCD AS stcd, " +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user