Compare commits
No commits in common. "main" and "main_hzz" have entirely different histories.
@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RestController
|
@RestController
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
@ServletComponentScan("com.yfd.platform.config")
|
@ServletComponentScan("com.yfd.platform.config")
|
||||||
@MapperScan(basePackages = {"com.yfd.platform.*.mapper","com.yfd.platform.*.*.mapper", "com.yfd.platform.common"})
|
@MapperScan(basePackages = {"com.yfd.platform.*.mapper", "com.yfd.platform.common"})
|
||||||
//@ComponentScan("com.zny.dec")
|
//@ComponentScan("com.zny.dec")
|
||||||
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class, DataRedisAutoConfiguration.class})
|
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class, DataRedisAutoConfiguration.class})
|
||||||
//@SpringBootApplication
|
//@SpringBootApplication
|
||||||
|
|||||||
@ -255,17 +255,13 @@ public class DataSourceRequest {
|
|||||||
for(SortDescriptor entry : sort) {
|
for(SortDescriptor entry : sort) {
|
||||||
String field = entry.getField();
|
String field = entry.getField();
|
||||||
String dir = entry.getDir();
|
String dir = entry.getDir();
|
||||||
String normalizedDir = StringUtil.isBlank(dir) ? "" : dir.toLowerCase();
|
|
||||||
if ("des".equals(normalizedDir)) {
|
|
||||||
normalizedDir = "desc";
|
|
||||||
}
|
|
||||||
SortingInfo sortingInfo = new SortingInfo();
|
SortingInfo sortingInfo = new SortingInfo();
|
||||||
sortingInfo.setSelector(field);
|
sortingInfo.setSelector(field);
|
||||||
if (StringUtil.isBlank(normalizedDir)) {
|
if (StringUtil.isBlank(dir)) {
|
||||||
sortingInfo.setDesc(false);
|
sortingInfo.setDesc(false);
|
||||||
} else if (normalizedDir.equals("asc")) {
|
} else if (dir.equals("asc")) {
|
||||||
sortingInfo.setDesc(false);
|
sortingInfo.setDesc(false);
|
||||||
} else if (normalizedDir.equals("desc")) {
|
} else if (dir.equals("desc")) {
|
||||||
sortingInfo.setDesc(true);
|
sortingInfo.setDesc(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,15 +303,11 @@ public class DataSourceRequest {
|
|||||||
GroupingInfo groupingInfo = new GroupingInfo();
|
GroupingInfo groupingInfo = new GroupingInfo();
|
||||||
groupingInfo.setSelector(groupDescriptor.getField());
|
groupingInfo.setSelector(groupDescriptor.getField());
|
||||||
String dir = groupDescriptor.getDir();
|
String dir = groupDescriptor.getDir();
|
||||||
String normalizedDir = StringUtil.isBlank(dir) ? "" : dir.toLowerCase();
|
if (StringUtil.isBlank(dir)) {
|
||||||
if ("des".equals(normalizedDir)) {
|
|
||||||
normalizedDir = "desc";
|
|
||||||
}
|
|
||||||
if (StringUtil.isBlank(normalizedDir)) {
|
|
||||||
groupingInfo.setDesc(false);
|
groupingInfo.setDesc(false);
|
||||||
} else if (normalizedDir.equals("asc")) {
|
} else if (dir.equals("asc")) {
|
||||||
groupingInfo.setDesc(false);
|
groupingInfo.setDesc(false);
|
||||||
} else if (normalizedDir.equals("desc")) {
|
} else if (dir.equals("desc")) {
|
||||||
groupingInfo.setDesc(true);
|
groupingInfo.setDesc(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -102,9 +102,6 @@ public class GroupHelper {
|
|||||||
Group newGroup = new Group();
|
Group newGroup = new Group();
|
||||||
newGroup.setKey(groupKey);
|
newGroup.setKey(groupKey);
|
||||||
newGroup.setField(groupInfo.getSelector());
|
newGroup.setField(groupInfo.getSelector());
|
||||||
newGroup.setKeyExt(new HashMap());
|
|
||||||
newGroup.setSummary(new Object[0]);
|
|
||||||
newGroup.setAggregates(new HashMap());
|
|
||||||
if (tempCount != null) {
|
if (tempCount != null) {
|
||||||
newGroup.setCount(NumberUtil.parseInt(tempCount.toString()));
|
newGroup.setCount(NumberUtil.parseInt(tempCount.toString()));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,9 +60,6 @@ public class SecurityConfig {
|
|||||||
.requestMatchers("/eng/**").permitAll()
|
.requestMatchers("/eng/**").permitAll()
|
||||||
.requestMatchers("/env/**").permitAll()
|
.requestMatchers("/env/**").permitAll()
|
||||||
.requestMatchers("/wt/**").permitAll()
|
.requestMatchers("/wt/**").permitAll()
|
||||||
.requestMatchers("/wq/**").permitAll()
|
|
||||||
.requestMatchers("/fp/**").permitAll()
|
|
||||||
.requestMatchers("/fh/**").permitAll()
|
|
||||||
.requestMatchers("/data/**").permitAll()
|
.requestMatchers("/data/**").permitAll()
|
||||||
.requestMatchers("/sms/**").permitAll()
|
.requestMatchers("/sms/**").permitAll()
|
||||||
.requestMatchers(HttpMethod.GET, "/").permitAll()
|
.requestMatchers(HttpMethod.GET, "/").permitAll()
|
||||||
|
|||||||
@ -56,45 +56,11 @@ public class SwaggerConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public GroupedOpenApi groupEnvApi() {
|
public GroupedOpenApi groupEnvApi() {
|
||||||
return GroupedOpenApi.builder()
|
return GroupedOpenApi.builder()
|
||||||
.group("3全过程-生态环保数据服务")
|
.group("3. 全过程-生态环保数据服务")
|
||||||
.packagesToScan("com.yfd.platform.env.controller")
|
.packagesToScan("com.yfd.platform.env.controller")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GroupedOpenApi groupEnvWTApi() {
|
|
||||||
return GroupedOpenApi.builder()
|
|
||||||
.group("3.1 全过程-生态环保数据服务-水温监测")
|
|
||||||
.packagesToScan("com.yfd.platform.env.wt.controller")
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
@Bean
|
|
||||||
public GroupedOpenApi groupEnvWQApi() {
|
|
||||||
return GroupedOpenApi.builder()
|
|
||||||
.group("3.2 全过程-生态环保数据服务-水质监测")
|
|
||||||
.packagesToScan("com.yfd.platform.env.wq.controller")
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GroupedOpenApi groupEnvFPApi() {
|
|
||||||
return GroupedOpenApi.builder()
|
|
||||||
.group("3.3 全过程-生态环保数据服务-过鱼设施")
|
|
||||||
.packagesToScan("com.yfd.platform.env.fp.controller")
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GroupedOpenApi groupEnvFHApi() {
|
|
||||||
return GroupedOpenApi.builder()
|
|
||||||
.group("3.4 全过程-生态环保数据服务-栖息地")
|
|
||||||
.packagesToScan("com.yfd.platform.env.fh.controller")
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public GroupedOpenApi groupEngApi() {
|
public GroupedOpenApi groupEngApi() {
|
||||||
return GroupedOpenApi.builder()
|
return GroupedOpenApi.builder()
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package com.yfd.platform.env.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yfd.platform.annotation.Log;
|
import com.yfd.platform.annotation.Log;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
import com.yfd.platform.env.domain.SdHydrobase;
|
import com.yfd.platform.env.domain.SdHydrobase;
|
||||||
import com.yfd.platform.env.service.ISdHydrobaseService;
|
import com.yfd.platform.env.service.ISdHydrobaseService;
|
||||||
@ -69,12 +68,6 @@ public class SdHydrobaseController {
|
|||||||
return ResponseResult.successData(hydrobaseService.selectForDropdown(basename));
|
return ResponseResult.successData(hydrobaseService.selectForDropdown(basename));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/wbsb/GetKendoList")
|
|
||||||
@Operation(summary = "水电基地列表")
|
|
||||||
public ResponseResult getWbsbKendoList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(hydrobaseService.getWbsbKendoList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
// @Log(module = "基地管理", value = "新增基地")
|
// @Log(module = "基地管理", value = "新增基地")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@Operation(summary = "新增基地")
|
@Operation(summary = "新增基地")
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.controller;
|
package com.yfd.platform.env.controller;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -8,8 +8,8 @@ import com.yfd.platform.common.DataSourceResult;
|
|||||||
import com.yfd.platform.common.exception.BizException;
|
import com.yfd.platform.common.exception.BizException;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
import com.yfd.platform.env.entity.vo.BatchDeleteAo;
|
import com.yfd.platform.env.entity.vo.BatchDeleteAo;
|
||||||
import com.yfd.platform.env.wt.entity.vo.WtrvInfo;
|
import com.yfd.platform.env.entity.vo.WtrvInfo;
|
||||||
import com.yfd.platform.env.wt.service.*;
|
import com.yfd.platform.env.service.*;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -17,6 +17,8 @@ import jakarta.annotation.Resource;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@ -142,12 +144,6 @@ public class SdWTMonitorController {
|
|||||||
return ResponseResult.successData(this.alongListService.getMonthKendoListCust(dataSourceRequest));
|
return ResponseResult.successData(this.alongListService.getMonthKendoListCust(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/monthDetail/Det/GetKendoListCust")
|
|
||||||
@Operation(summary = "全过程月平均水温历史对比二级数据接口")
|
|
||||||
public ResponseResult getMonthDetailList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(sdWtMonitorService.getMonthDetailList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/yearList/default/stcd")
|
@PostMapping("/yearList/default/stcd")
|
||||||
@Operation(summary = "获取水温年内分布默认有数据的电站")
|
@Operation(summary = "获取水温年内分布默认有数据的电站")
|
||||||
public ResponseResult getYearDefaultStcd(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getYearDefaultStcd(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
@ -160,43 +156,19 @@ public class SdWTMonitorController {
|
|||||||
return ResponseResult.successData(this.alongListService.getYearList(dataSourceRequest));
|
return ResponseResult.successData(this.alongListService.getYearList(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/yearDetail/GetKendoListCust")
|
|
||||||
@Operation(summary = "水温年内分布二级列表")
|
|
||||||
public ResponseResult getYearDetailList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(sdWtMonitorService.getYearDetailList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@PostMapping("/base/evnmAutoMonitor/GetKendoListCust")
|
||||||
@PostMapping("/evnmAutoMonitor/GetKendoListCust")
|
|
||||||
@Operation(summary = "查询水温监测数量")
|
@Operation(summary = "查询水温监测数量")
|
||||||
public ResponseResult getWTDataCount(@RequestBody(required = false) DataSourceRequest dataSourceRequest) {
|
public ResponseResult getWTDataCount(@RequestBody(required = false) DataSourceRequest dataSourceRequest) {
|
||||||
return ResponseResult.successData(sdWtMonitorService.getEvnmAutoMonitorList(dataSourceRequest));
|
return ResponseResult.successData(sdWtMonitorService.getEvnmAutoMonitorList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/dwInfo/GetKendoListCust")
|
@PostMapping("/base/vmsstbprpt/GetKendoList")
|
||||||
@Operation(summary = "查询低温水减缓设施数量")
|
|
||||||
public ResponseResult getDfltkwFacilityCount(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(sdWtMonitorService.getDfltkwFacilityCount(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/sttpb/GetKendoList")
|
|
||||||
@Operation(summary = "查询水减缓设施类型介绍")
|
|
||||||
public ResponseResult getSttpbList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(sdWtMonitorService.getSttpbList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/vmsstbprpt/GetKendoList")
|
|
||||||
@Operation(summary = "根据类型查询水温表基本数据")
|
@Operation(summary = "根据类型查询水温表基本数据")
|
||||||
public ResponseResult getVmsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getVmsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
return ResponseResult.successData(sdWtMonitorService.getVmsstbprptList(dataSourceRequest));
|
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")
|
@PostMapping("/cxDetail/GetKendoListCust")
|
||||||
@Operation(summary = "查询垂向水温明细")
|
@Operation(summary = "查询垂向水温明细")
|
||||||
public ResponseResult getCxDetailList(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getCxDetailList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
@ -209,12 +181,6 @@ public class SdWTMonitorController {
|
|||||||
return ResponseResult.successData(sdWtvtRService.getWtrvDefaultYear(dataSourceRequest));
|
return ResponseResult.successData(sdWtvtRService.getWtrvDefaultYear(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/sdrvwts/default/treeStcd")
|
|
||||||
@Operation(summary = "查询水温指定时间有数据的站点-树形结构")
|
|
||||||
public ResponseResult getWtvtDefaultTreeStcd(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(sdWtMonitorService.getWtvtDefaultTreeStcd(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/wtrv/fish/GetKendoListCust")
|
@PostMapping("/wtrv/fish/GetKendoListCust")
|
||||||
@Operation(summary = "鱼类繁殖适宜性分析")
|
@Operation(summary = "鱼类繁殖适宜性分析")
|
||||||
public ResponseResult getWtFishAnalysis(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getWtFishAnalysis(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
36
backend/src/main/java/com/yfd/platform/env/controller/SdWtvtRController.java
vendored
Normal file
36
backend/src/main/java/com/yfd/platform/env/controller/SdWtvtRController.java
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package com.yfd.platform.env.controller;
|
||||||
|
|
||||||
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
|
import com.yfd.platform.config.ResponseResult;
|
||||||
|
import com.yfd.platform.env.service.SdWtvtRService;
|
||||||
|
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.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 垂向水温Controller
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @date 2023/04/18 19:22
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sw/wtvt")
|
||||||
|
@Tag(name = "垂向水温")
|
||||||
|
@Validated
|
||||||
|
public class SdWtvtRController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SdWtvtRService sdWtvtRService;
|
||||||
|
|
||||||
|
@PostMapping({"/defaultYear/GetKendoListCust"})
|
||||||
|
@Operation(summary = "获取垂向水温有数据的年份")
|
||||||
|
public ResponseResult getWtrvDefaultYear(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(sdWtvtRService.getWtrvDefaultYear(dataSourceRequest));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "水电基地WBS列表")
|
|
||||||
public class HydrobaseWbsVo {
|
|
||||||
|
|
||||||
@Schema(description = "WBS编码")
|
|
||||||
private String wbsCode;
|
|
||||||
|
|
||||||
@Schema(description = "WBS名称")
|
|
||||||
private String wbsName;
|
|
||||||
|
|
||||||
@Schema(description = "父级WBS编码")
|
|
||||||
private String pwbsCode;
|
|
||||||
|
|
||||||
@Schema(description = "WBS类型")
|
|
||||||
private String wbsType;
|
|
||||||
|
|
||||||
@Schema(description = "树级别")
|
|
||||||
private String treeLevel;
|
|
||||||
|
|
||||||
@Schema(description = "树路径")
|
|
||||||
private String path;
|
|
||||||
|
|
||||||
@Schema(description = "排序")
|
|
||||||
private Integer orderIndex;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String rmk;
|
|
||||||
|
|
||||||
@Schema(description = "简介")
|
|
||||||
private String des;
|
|
||||||
|
|
||||||
@Schema(description = "简称")
|
|
||||||
private String shortname;
|
|
||||||
}
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wq.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -7,14 +7,11 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "水质基础站点列表")
|
@Schema(description = "水温表基本数据")
|
||||||
public class WqVmsstbprptVo implements Serializable {
|
public class SdWtBaseInfoVO implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "基地Id")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "基地名称")
|
@Schema(description = "基地名称")
|
||||||
private String baseName;
|
private String baseName;
|
||||||
|
|
||||||
@ -30,7 +27,7 @@ public class WqVmsstbprptVo implements Serializable {
|
|||||||
@Schema(description = "监测指标")
|
@Schema(description = "监测指标")
|
||||||
private String stindx;
|
private String stindx;
|
||||||
|
|
||||||
@Schema(description = "开展环保自动监测工作状态:1=正常 0=暂无数据")
|
@Schema(description = "开展环保自动检测工作状态:1=正常 0=暂无数据")
|
||||||
private Integer coenvwState;
|
private Integer coenvwState;
|
||||||
|
|
||||||
@Schema(description = "站类")
|
@Schema(description = "站类")
|
||||||
@ -50,16 +47,4 @@ public class WqVmsstbprptVo implements Serializable {
|
|||||||
|
|
||||||
@Schema(description = "开发方式")
|
@Schema(description = "开发方式")
|
||||||
private String dvtp;
|
private String dvtp;
|
||||||
|
|
||||||
@Schema(description = "基地排序")
|
|
||||||
private Integer baseStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "基地流域编码")
|
|
||||||
private String hbrvcd;
|
|
||||||
|
|
||||||
@Schema(description = "电站排序")
|
|
||||||
private Integer rstcdStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "站点排序")
|
|
||||||
private Integer siteStepSort;
|
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,10 +1,12 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.experimental.FieldNameConstants;
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@FieldNameConstants
|
@FieldNameConstants
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
package com.yfd.platform.env.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -1,66 +0,0 @@
|
|||||||
package com.yfd.platform.env.fh.controller;
|
|
||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.config.ResponseResult;
|
|
||||||
import com.yfd.platform.env.fh.entity.ao.FhDefaultAo;
|
|
||||||
import com.yfd.platform.env.fh.service.FhHabitatService;
|
|
||||||
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.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/fh")
|
|
||||||
@Tag(name = "栖息地统计")
|
|
||||||
@Validated
|
|
||||||
public class FhHabitatController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private FhHabitatService fhHabitatService;
|
|
||||||
|
|
||||||
@PostMapping("/GetKendoListCust")
|
|
||||||
@Operation(summary = "栖息地主列表")
|
|
||||||
public ResponseResult getKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fhHabitatService.getKendoListCust(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/GetKendoListCustom")
|
|
||||||
@Operation(summary = "栖息地河段自动监测情况统计和二级页")
|
|
||||||
public ResponseResult getKendoListCustom(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fhHabitatService.getKendoListCustom(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/default/getFhList")
|
|
||||||
@Operation(summary = "获取默认有数据的栖息地站点信息")
|
|
||||||
public ResponseResult getDefaultFhList(@RequestBody FhDefaultAo fhDefaultAo) {
|
|
||||||
return ResponseResult.successData(fhHabitatService.getDefaultFhList(fhDefaultAo));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/sdrvwts/GetKendoList")
|
|
||||||
@Operation(summary = "查询栖息地河道水温日统计数据")
|
|
||||||
public ResponseResult getSdrvwtsList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fhHabitatService.getSdrvwtsList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/zq/sdriverdays/GetKendoList")
|
|
||||||
@Operation(summary = "查询栖息地流量站日统计数据")
|
|
||||||
public ResponseResult getSdriverdaysList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fhHabitatService.getSdriverdaysList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/msstbprpt/GetKendoList")
|
|
||||||
@Operation(summary = "查询栖息地监测站点列表")
|
|
||||||
public ResponseResult getMsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fhHabitatService.getMsstbprptList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/stTbYs/GetStTbYsBVoKendoListCust")
|
|
||||||
@Operation(summary = "水质监测信息查询")
|
|
||||||
public ResponseResult getStTbYsBVoKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fhHabitatService.getStTbYsBVoKendoListCust(dataSourceRequest));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package com.yfd.platform.env.fh.entity.ao;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "栖息地默认数据信息")
|
|
||||||
public class FhDefaultAo {
|
|
||||||
|
|
||||||
@Schema(description = "基地编码")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "开始时间")
|
|
||||||
private Date sdt;
|
|
||||||
|
|
||||||
@Schema(description = "结束时间")
|
|
||||||
private Date edt;
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
package com.yfd.platform.env.fh.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@Schema(description = "栖息地默认数据结果")
|
|
||||||
public class FhDefaultVo {
|
|
||||||
|
|
||||||
@Schema(description = "站点编码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "站点名称")
|
|
||||||
private String stnm;
|
|
||||||
|
|
||||||
@Schema(description = "水温站编码")
|
|
||||||
private String wtstcd;
|
|
||||||
|
|
||||||
@Schema(description = "水温站名称")
|
|
||||||
private String wtstnm;
|
|
||||||
|
|
||||||
@Schema(description = "基地编码")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "基地名称")
|
|
||||||
private String baseName;
|
|
||||||
|
|
||||||
@Schema(description = "基地流域编码")
|
|
||||||
private String hbrvcd;
|
|
||||||
|
|
||||||
@Schema(description = "基地流域名称")
|
|
||||||
private String hbrvcdName;
|
|
||||||
|
|
||||||
@Schema(description = "栖息地编码")
|
|
||||||
private String fhstcd;
|
|
||||||
|
|
||||||
@Schema(description = "栖息地名称")
|
|
||||||
private String fhstnm;
|
|
||||||
|
|
||||||
@Schema(description = "数据数量")
|
|
||||||
private Integer dataStatus;
|
|
||||||
|
|
||||||
@Schema(description = "站点类型编码")
|
|
||||||
private String sttpCode;
|
|
||||||
|
|
||||||
@Schema(description = "站点类型名称")
|
|
||||||
private String sttpName;
|
|
||||||
|
|
||||||
@Schema(description = "流量站编码")
|
|
||||||
private String zqstcd;
|
|
||||||
|
|
||||||
@Schema(description = "流量站名称")
|
|
||||||
private String zqstnm;
|
|
||||||
}
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
package com.yfd.platform.env.fh.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "栖息地关联监测站点")
|
|
||||||
public class FhMsstbprptVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "站码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "站名")
|
|
||||||
private String stnm;
|
|
||||||
|
|
||||||
@Schema(description = "站类")
|
|
||||||
private String sttpCode;
|
|
||||||
|
|
||||||
@Schema(description = "所属栖息地编码")
|
|
||||||
private String fhstcd;
|
|
||||||
|
|
||||||
@Schema(description = "所属栖息地名称")
|
|
||||||
private String fhstnm;
|
|
||||||
|
|
||||||
@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 Date jcdt;
|
|
||||||
|
|
||||||
@Schema(description = "监测方式")
|
|
||||||
private Integer mway;
|
|
||||||
|
|
||||||
@Schema(description = "数据是否接入")
|
|
||||||
private Integer dtin;
|
|
||||||
|
|
||||||
@Schema(description = "数据接入来源")
|
|
||||||
private String dtinSrc;
|
|
||||||
|
|
||||||
@Schema(description = "数据接入类型")
|
|
||||||
private Integer dtinType;
|
|
||||||
|
|
||||||
@Schema(description = "数据接入开始时间")
|
|
||||||
private Date dtinTm;
|
|
||||||
|
|
||||||
@Schema(description = "监测指标")
|
|
||||||
private String stindx;
|
|
||||||
|
|
||||||
@Schema(description = "是否启用")
|
|
||||||
private Integer usfl;
|
|
||||||
|
|
||||||
@Schema(description = "基地排序")
|
|
||||||
private Integer baseStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "流域排序")
|
|
||||||
private Integer rvcdStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "电站排序")
|
|
||||||
private Integer rstcdStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "站点排序")
|
|
||||||
private Integer siteStepSort;
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
package com.yfd.platform.env.fh.entity.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
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 FhSdriverdayVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "主键ID")
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Schema(description = "站码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "时间")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
private Date dt;
|
|
||||||
|
|
||||||
@Schema(description = "水位")
|
|
||||||
private BigDecimal z;
|
|
||||||
|
|
||||||
@Schema(description = "流量")
|
|
||||||
private BigDecimal q;
|
|
||||||
|
|
||||||
@Schema(description = "流速")
|
|
||||||
private BigDecimal v;
|
|
||||||
|
|
||||||
@Schema(description = "测流方法")
|
|
||||||
private String msqmt;
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
package com.yfd.platform.env.fh.entity.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
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 FhSdrvwtsVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "主键ID")
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Schema(description = "站码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "时间")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
private Date dt;
|
|
||||||
|
|
||||||
@Schema(description = "水温")
|
|
||||||
private BigDecimal wt;
|
|
||||||
}
|
|
||||||
@ -1,114 +0,0 @@
|
|||||||
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 HabitatVo {
|
|
||||||
|
|
||||||
@Schema(description = "栖息地编码")
|
|
||||||
private String fhstcd;
|
|
||||||
|
|
||||||
@Schema(description = "基地ID")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "类型编码")
|
|
||||||
private String sttpCode;
|
|
||||||
|
|
||||||
@Schema(description = "栖息地名称")
|
|
||||||
private String fhstnm;
|
|
||||||
|
|
||||||
@Schema(description = "基地名称")
|
|
||||||
private String baseName;
|
|
||||||
|
|
||||||
@Schema(description = "水电站名称")
|
|
||||||
private String ennm;
|
|
||||||
|
|
||||||
@Schema(description = "基础对象编码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "电站编码")
|
|
||||||
private String rstcd;
|
|
||||||
|
|
||||||
@Schema(description = "基础对象名称")
|
|
||||||
private String stnm;
|
|
||||||
|
|
||||||
@Schema(description = "是否开展监测")
|
|
||||||
private Integer fhmonitor;
|
|
||||||
|
|
||||||
@Schema(description = "建设阶段")
|
|
||||||
private Integer bldstt;
|
|
||||||
|
|
||||||
@Schema(description = "保护对象")
|
|
||||||
private String qxdbhdx;
|
|
||||||
|
|
||||||
@Schema(description = "保护范围")
|
|
||||||
private String qxdbhfw;
|
|
||||||
|
|
||||||
@Schema(description = "保护长度")
|
|
||||||
private BigDecimal qxdbhcd;
|
|
||||||
|
|
||||||
@Schema(description = "保护面积")
|
|
||||||
private BigDecimal qxdbhmj;
|
|
||||||
|
|
||||||
@Schema(description = "保护河流")
|
|
||||||
private String bhhl;
|
|
||||||
|
|
||||||
@Schema(description = "保护河段")
|
|
||||||
private String bhhd;
|
|
||||||
|
|
||||||
@Schema(description = "保护措施")
|
|
||||||
private String bhcs;
|
|
||||||
|
|
||||||
@Schema(description = "保护方式")
|
|
||||||
private String qxdbhfs;
|
|
||||||
|
|
||||||
@Schema(description = "开工日期")
|
|
||||||
private Date ststdt;
|
|
||||||
|
|
||||||
@Schema(description = "建成日期")
|
|
||||||
private Date esstdt;
|
|
||||||
|
|
||||||
@Schema(description = "监测方式")
|
|
||||||
private Integer mway;
|
|
||||||
|
|
||||||
@Schema(description = "是否接入")
|
|
||||||
private Integer dtin;
|
|
||||||
|
|
||||||
@Schema(description = "数据来源")
|
|
||||||
private String vlsr;
|
|
||||||
|
|
||||||
@Schema(description = "数据接入类型")
|
|
||||||
private Integer dtinType;
|
|
||||||
|
|
||||||
@Schema(description = "是否启用")
|
|
||||||
private Integer enable;
|
|
||||||
|
|
||||||
@Schema(description = "保护核心长度")
|
|
||||||
private BigDecimal qxdbhhxcd;
|
|
||||||
|
|
||||||
@Schema(description = "保护外围长度")
|
|
||||||
private BigDecimal qxdbhwwcd;
|
|
||||||
|
|
||||||
@Schema(description = "数据监测频次")
|
|
||||||
private Integer dtfrqcy;
|
|
||||||
|
|
||||||
@Schema(description = "投资")
|
|
||||||
private BigDecimal qxdinv;
|
|
||||||
|
|
||||||
@Schema(description = "基地排序")
|
|
||||||
private Integer baseStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "电站排序")
|
|
||||||
private Integer rstcdStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "站点排序")
|
|
||||||
private Integer siteStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "流域排序")
|
|
||||||
private Integer rvcdStepSort;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.yfd.platform.env.fh.service;
|
|
||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
|
||||||
import com.yfd.platform.env.fh.entity.ao.FhDefaultAo;
|
|
||||||
import com.yfd.platform.env.fh.entity.vo.FhDefaultVo;
|
|
||||||
import com.yfd.platform.env.fh.entity.vo.HabitatVo;
|
|
||||||
|
|
||||||
public interface FhHabitatService {
|
|
||||||
|
|
||||||
DataSourceResult<HabitatVo> getKendoListCust(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult<HabitatVo> getKendoListCustom(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
FhDefaultVo getDefaultFhList(FhDefaultAo fhDefaultAo);
|
|
||||||
|
|
||||||
DataSourceResult getSdrvwtsList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getSdriverdaysList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getMsstbprptList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getStTbYsBVoKendoListCust(DataSourceRequest dataSourceRequest);
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,48 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.controller;
|
|
||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.config.ResponseResult;
|
|
||||||
import com.yfd.platform.env.fp.service.FpBuildService;
|
|
||||||
import com.yfd.platform.env.fp.service.FpRunService;
|
|
||||||
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("/fp")
|
|
||||||
@Tag(name = "过鱼设施建设及运行情况")
|
|
||||||
@Validated
|
|
||||||
public class FishPassageController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private FpRunService fpRunService;
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private FpBuildService fpBuildService;
|
|
||||||
|
|
||||||
@PostMapping("/run/secondPlan/qgc/GetKendoListCust")
|
|
||||||
@Operation(summary = "环保部-建设及运行运行情况(二级级页面 已建设施运行情况-计划接口)")
|
|
||||||
public ResponseResult getQgcSecondPlanKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fpRunService.processQgcSecondPlanKendoList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/build/GetKendoListCust")
|
|
||||||
@Operation(summary = "过鱼设施建设及接入情况统计")
|
|
||||||
public ResponseResult getKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(fpBuildService.processKendoList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/run/qgc/year/GetYearFpStatistics")
|
|
||||||
@Operation(summary = "全过程过鱼统计总数,根据基地分组")
|
|
||||||
public ResponseResult getYearFpStatic(@RequestParam("year") String year) {
|
|
||||||
return ResponseResult.successData(fpRunService.getYearFpStatic(year));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "过鱼鱼类信息")
|
|
||||||
public class FdFishVo {
|
|
||||||
|
|
||||||
@Schema(description = "鱼类编码")
|
|
||||||
private String ftp;
|
|
||||||
|
|
||||||
@Schema(description = "鱼类名称")
|
|
||||||
private String name;
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "过鱼设施建设及接入情况")
|
|
||||||
public class FpConstructionSituationVo {
|
|
||||||
|
|
||||||
@Schema(description = "过鱼设施类型")
|
|
||||||
private String sttpCode;
|
|
||||||
|
|
||||||
@Schema(description = "已接入")
|
|
||||||
private Integer bonusing;
|
|
||||||
|
|
||||||
@Schema(description = "已建")
|
|
||||||
private Integer built;
|
|
||||||
|
|
||||||
@Schema(description = "已建已接入")
|
|
||||||
private Integer builtConnected;
|
|
||||||
|
|
||||||
@Schema(description = "在建")
|
|
||||||
private Integer building;
|
|
||||||
|
|
||||||
@Schema(description = "在建已接入")
|
|
||||||
private Integer buildingConnected;
|
|
||||||
|
|
||||||
@Schema(description = "规划")
|
|
||||||
private Integer noBuilt;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "按鱼种统计的过鱼数量")
|
|
||||||
public class FpFtpStatisticsVo {
|
|
||||||
|
|
||||||
@Schema(description = "基地编码")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "基地名称")
|
|
||||||
private String baseName;
|
|
||||||
|
|
||||||
@Schema(description = "鱼种编码")
|
|
||||||
private String ftp;
|
|
||||||
|
|
||||||
@Schema(description = "鱼种名称")
|
|
||||||
private String fishName;
|
|
||||||
|
|
||||||
@Schema(description = "过鱼数量")
|
|
||||||
private Integer fcnt;
|
|
||||||
}
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "过鱼设施运行情况二级弹窗标题数据")
|
|
||||||
public class FpRunPlanVo {
|
|
||||||
|
|
||||||
@Schema(description = "设施编码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "计划开始月份")
|
|
||||||
private String designStartDate;
|
|
||||||
|
|
||||||
@Schema(description = "计划结束月份")
|
|
||||||
private String designEndDate;
|
|
||||||
|
|
||||||
@Schema(description = "计划运行月数")
|
|
||||||
private Integer mon;
|
|
||||||
|
|
||||||
@Schema(description = "计划运行频次")
|
|
||||||
private Integer pyRate;
|
|
||||||
|
|
||||||
@Schema(description = "计划运行次数")
|
|
||||||
private Integer pycnt;
|
|
||||||
|
|
||||||
@Schema(description = "设施类型编码")
|
|
||||||
private String sttpCode;
|
|
||||||
|
|
||||||
@Schema(description = "过鱼类型 0鱼道 1过鱼机")
|
|
||||||
private Integer dwtp;
|
|
||||||
|
|
||||||
@Schema(description = "计划过鱼种类")
|
|
||||||
private String planFtp;
|
|
||||||
|
|
||||||
@Schema(description = "计划过鱼列表")
|
|
||||||
private List<FdFishVo> planList;
|
|
||||||
|
|
||||||
@Schema(description = "设计过鱼列表")
|
|
||||||
private List<FdFishVo> designList;
|
|
||||||
|
|
||||||
@Schema(description = "过鱼对象列表")
|
|
||||||
private List<FdFishVo> objList;
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "按基地分组的年度过鱼统计")
|
|
||||||
public class YearFpStatisticsVo {
|
|
||||||
|
|
||||||
@Schema(description = "过鱼总数")
|
|
||||||
private Integer fpCount;
|
|
||||||
|
|
||||||
@Schema(description = "基地编码")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "基地名称")
|
|
||||||
private String baseName;
|
|
||||||
|
|
||||||
@Schema(description = "按鱼种统计列表")
|
|
||||||
private List<FpFtpStatisticsVo> fpFtpStatitcsVos;
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.service;
|
|
||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
|
||||||
import com.yfd.platform.env.fp.entity.vo.FpConstructionSituationVo;
|
|
||||||
|
|
||||||
public interface FpBuildService {
|
|
||||||
|
|
||||||
DataSourceResult<FpConstructionSituationVo> processKendoList(DataSourceRequest dataSourceRequest);
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.service;
|
|
||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
|
||||||
import com.yfd.platform.env.fp.entity.vo.YearFpStatisticsVo;
|
|
||||||
import com.yfd.platform.env.fp.entity.vo.FpRunPlanVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface FpRunService {
|
|
||||||
|
|
||||||
DataSourceResult<FpRunPlanVo> processQgcSecondPlanKendoList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
List<YearFpStatisticsVo> getYearFpStatic(String year);
|
|
||||||
}
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
|
||||||
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
|
||||||
import com.yfd.platform.common.PageInfo;
|
|
||||||
import com.yfd.platform.env.fp.entity.vo.FpConstructionSituationVo;
|
|
||||||
import com.yfd.platform.env.fp.service.FpBuildService;
|
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FpBuildServiceImpl implements FpBuildService {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MicroservicDynamicSQLMapper microservicDynamicSQLMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataSourceResult<FpConstructionSituationVo> processKendoList(DataSourceRequest dataSourceRequest) {
|
|
||||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
|
||||||
PageInfo pageInfo = QgcQueryWrapperUtil.getPageInfo(loadOptions);
|
|
||||||
Page<?> page = pageInfo.getHasPageInfo() ? pageInfo.getPage() : null;
|
|
||||||
|
|
||||||
String sql = "SELECT t.STTP AS sttpCode, " +
|
|
||||||
" SUM(CASE WHEN t.DTIN = 1 THEN 1 ELSE 0 END) AS bonusing, " +
|
|
||||||
" SUM(CASE WHEN t.DTIN = 1 AND t.BLDSTT_CODE = 2 THEN 1 ELSE 0 END) AS builtConnected, " +
|
|
||||||
" SUM(CASE WHEN t.BLDSTT_CODE = 2 THEN 1 ELSE 0 END) AS built, " +
|
|
||||||
" SUM(CASE WHEN t.DTIN = 1 AND t.BLDSTT_CODE = 1 THEN 1 ELSE 0 END) AS buildingConnected, " +
|
|
||||||
" SUM(CASE WHEN t.BLDSTT_CODE = 1 THEN 1 ELSE 0 END) AS building, " +
|
|
||||||
" SUM(CASE WHEN NVL(t.BLDSTT_CODE, 0) = 0 THEN 1 ELSE 0 END) AS noBuilt " +
|
|
||||||
"FROM SD_FPSS_B_H t " +
|
|
||||||
"GROUP BY t.STTP " +
|
|
||||||
"ORDER BY t.STTP";
|
|
||||||
|
|
||||||
List<FpConstructionSituationVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(
|
|
||||||
page,
|
|
||||||
sql,
|
|
||||||
new HashMap<>(),
|
|
||||||
FpConstructionSituationVo.class
|
|
||||||
);
|
|
||||||
|
|
||||||
DataSourceResult<FpConstructionSituationVo> result = new DataSourceResult<>();
|
|
||||||
result.setData(list);
|
|
||||||
result.setTotal(page != null ? page.getTotal() : list.size());
|
|
||||||
result.setAggregates(new HashMap<>());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,242 +0,0 @@
|
|||||||
package com.yfd.platform.env.fp.service.impl;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import cn.hutool.core.bean.copier.CopyOptions;
|
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
|
||||||
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.fp.entity.vo.FpFtpStatisticsVo;
|
|
||||||
import com.yfd.platform.env.fp.entity.vo.FpRunPlanVo;
|
|
||||||
import com.yfd.platform.env.fp.entity.vo.YearFpStatisticsVo;
|
|
||||||
import com.yfd.platform.env.fp.service.FpRunService;
|
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FpRunServiceImpl implements FpRunService {
|
|
||||||
|
|
||||||
private static final String FP_1 = "FP_1";
|
|
||||||
private static final String FP_2 = "FP_2";
|
|
||||||
private static final Pattern FISH_NAME_PATTERN = Pattern.compile("name\\s*[::]\\s*([^,,}\\]]+)");
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MicroservicDynamicSQLMapper microservicDynamicSQLMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataSourceResult<FpRunPlanVo> processQgcSecondPlanKendoList(DataSourceRequest dataSourceRequest) {
|
|
||||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
|
||||||
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
|
||||||
String yr = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "yr");
|
|
||||||
if (StrUtil.isBlank(stcd)) {
|
|
||||||
throw new BizException("设施编码(stcd)不能为空.");
|
|
||||||
}
|
|
||||||
if (StrUtil.isBlank(yr)) {
|
|
||||||
throw new BizException("年份(yr)不能为空.");
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, Object> paramMap = new HashMap<>();
|
|
||||||
paramMap.put("stcd", stcd);
|
|
||||||
paramMap.put("yr", yr);
|
|
||||||
|
|
||||||
Map<String, Object> row = microservicDynamicSQLMapper.getOneBySql(buildQgcSecondPlanSql(), paramMap);
|
|
||||||
FpRunPlanVo vo = row == null || row.isEmpty()
|
|
||||||
? new FpRunPlanVo()
|
|
||||||
: BeanUtil.fillBeanWithMap(
|
|
||||||
row,
|
|
||||||
new FpRunPlanVo(),
|
|
||||||
CopyOptions.create().setIgnoreCase(true).setIgnoreError(true)
|
|
||||||
);
|
|
||||||
|
|
||||||
String fallbackFishJson = row == null ? null : Convert.toStr(row.get("fallbackFishJson"), null);
|
|
||||||
String fallbackFishText = row == null ? null : Convert.toStr(row.get("fallbackFishText"), null);
|
|
||||||
if (StrUtil.isBlank(vo.getPlanFtp())) {
|
|
||||||
vo.setPlanFtp(resolveFallbackFishText(fallbackFishJson, fallbackFishText));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(vo.getDesignStartDate()) && StrUtil.isNotBlank(vo.getDesignEndDate())) {
|
|
||||||
try {
|
|
||||||
int startMonth = Integer.parseInt(vo.getDesignStartDate());
|
|
||||||
int endMonth = Integer.parseInt(vo.getDesignEndDate());
|
|
||||||
vo.setMon(Math.abs(endMonth - startMonth) + 1);
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
// Keep the old behavior: ignore invalid month format and return the raw values.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FP_1.equals(vo.getSttpCode()) || FP_2.equals(vo.getSttpCode())) {
|
|
||||||
vo.setDwtp(0);
|
|
||||||
} else {
|
|
||||||
vo.setDwtp(1);
|
|
||||||
if (vo.getPycnt() != null && vo.getPycnt() != 0 && vo.getMon() != null && vo.getMon() != 0) {
|
|
||||||
vo.setPyRate(new BigDecimal(vo.getPycnt())
|
|
||||||
.divide(new BigDecimal(vo.getMon()), 2, RoundingMode.HALF_UP)
|
|
||||||
.intValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DataSourceResult<FpRunPlanVo> result = new DataSourceResult<>();
|
|
||||||
result.setData(Collections.singletonList(vo));
|
|
||||||
result.setTotal(1L);
|
|
||||||
result.setAggregates(new HashMap<>());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<YearFpStatisticsVo> getYearFpStatic(String year) {
|
|
||||||
Map<String, Object> paramMap = new HashMap<>();
|
|
||||||
paramMap.put("year", StrUtil.trim(year));
|
|
||||||
List<FpFtpStatisticsVo> rows = microservicDynamicSQLMapper.getAllListWithResultType(
|
|
||||||
buildYearFpStatisticsSql(),
|
|
||||||
paramMap,
|
|
||||||
FpFtpStatisticsVo.class
|
|
||||||
);
|
|
||||||
if (rows == null || rows.isEmpty()) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, YearFpStatisticsVo> grouped = new LinkedHashMap<>();
|
|
||||||
for (FpFtpStatisticsVo row : rows) {
|
|
||||||
String key = StrUtil.nullToDefault(row.getBaseId(), "");
|
|
||||||
YearFpStatisticsVo yearVo = grouped.computeIfAbsent(key, k -> {
|
|
||||||
YearFpStatisticsVo item = new YearFpStatisticsVo();
|
|
||||||
item.setBaseId(row.getBaseId());
|
|
||||||
item.setBaseName(row.getBaseName());
|
|
||||||
item.setFpCount(0);
|
|
||||||
item.setFpFtpStatitcsVos(new ArrayList<>());
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
yearVo.setFpCount(yearVo.getFpCount() + (row.getFcnt() == null ? 0 : row.getFcnt()));
|
|
||||||
yearVo.getFpFtpStatitcsVos().add(row);
|
|
||||||
}
|
|
||||||
return new ArrayList<>(grouped.values());
|
|
||||||
}
|
|
||||||
|
|
||||||
private String buildQgcSecondPlanSql() {
|
|
||||||
return "SELECT t.STCD AS stcd, " +
|
|
||||||
" t2.stm AS designStartDate, " +
|
|
||||||
" t2.edm AS designEndDate, " +
|
|
||||||
" t2.pycnt AS pycnt, " +
|
|
||||||
" NULL AS pyRate, " +
|
|
||||||
" t.STTP AS sttpCode, " +
|
|
||||||
" t1.planFtp AS planFtp, " +
|
|
||||||
" t.ZYGYDX AS fallbackFishJson, " +
|
|
||||||
" NVL(t.ZYGYDXMS, t.JGGYDXMS) AS fallbackFishText " +
|
|
||||||
"FROM SD_FPSS_B_H t " +
|
|
||||||
"LEFT JOIN ( " +
|
|
||||||
" SELECT a.STCD, " +
|
|
||||||
" REGEXP_REPLACE(LISTAGG(TO_CHAR(fish.NAME), ',') WITHIN GROUP (ORDER BY NVL(rel.ORDER_INDEX, 999999), a.FTP), '([^,]+)(,\\1)*(,|$)', '\\1\\3') AS planFtp " +
|
|
||||||
" FROM ( " +
|
|
||||||
" SELECT STCD, TRIM(REGEXP_SUBSTR(FTP, '[^,]+', 1, LEVEL)) AS FTP " +
|
|
||||||
" FROM ( " +
|
|
||||||
" SELECT STCD, FTP " +
|
|
||||||
" FROM SD_FPRUNPLAN_B " +
|
|
||||||
" WHERE (TASK_STATUS = 'Approved' OR TASK_STATUS IS NULL) " +
|
|
||||||
" AND IS_DELETED = 0 " +
|
|
||||||
" AND STCD = #{map.stcd} " +
|
|
||||||
" AND TO_CHAR(START_TIME, 'yyyy') = #{map.yr} " +
|
|
||||||
" ) " +
|
|
||||||
" CONNECT BY REGEXP_SUBSTR(FTP, '[^,]+', 1, LEVEL) IS NOT NULL " +
|
|
||||||
" AND PRIOR TO_CHAR(SYS_GUID()) IS NOT NULL " +
|
|
||||||
" AND PRIOR FTP = FTP " +
|
|
||||||
" AND PRIOR STCD = STCD " +
|
|
||||||
" ) a " +
|
|
||||||
" INNER JOIN SD_FPSS_B_H fpss ON fpss.STCD = a.STCD " +
|
|
||||||
" LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = fpss.RSTCD " +
|
|
||||||
" LEFT JOIN SD_FISHDICTORY_RLTN_B rel ON rel.RVCD = eng.HBRVCD " +
|
|
||||||
" AND rel.FISH_ID = a.FTP " +
|
|
||||||
" AND rel.IS_DELETED = 0 " +
|
|
||||||
" LEFT JOIN SD_FISHDICTORY_B fish ON fish.ID = NVL(rel.ZY_FISH_ID, a.FTP) " +
|
|
||||||
" AND fish.IS_DELETED = 0 " +
|
|
||||||
" GROUP BY a.STCD " +
|
|
||||||
") t1 ON t.STCD = t1.STCD " +
|
|
||||||
"LEFT JOIN ( " +
|
|
||||||
" SELECT a.STCD, MIN(a.stm) AS stm, MAX(a.edm) AS edm, MAX(a.pycnt) AS pycnt " +
|
|
||||||
" FROM ( " +
|
|
||||||
" SELECT STCD, TO_CHAR(START_TIME, 'mm') AS stm, TO_CHAR(END_TIME, 'mm') AS edm, PYCNT AS pycnt " +
|
|
||||||
" FROM SD_FPRUNPLAN_B " +
|
|
||||||
" WHERE (TASK_STATUS = 'Approved' OR TASK_STATUS IS NULL) " +
|
|
||||||
" AND IS_DELETED = 0 " +
|
|
||||||
" AND STCD = #{map.stcd} " +
|
|
||||||
" AND TO_CHAR(START_TIME, 'yyyy') = #{map.yr} " +
|
|
||||||
" UNION ALL " +
|
|
||||||
" SELECT STCD, STMONTH AS stm, ETMMONTH AS edm, FREQUENCY AS pycnt " +
|
|
||||||
" FROM SD_FPDESIGNSTAND_B " +
|
|
||||||
" WHERE IS_DELETED = 0 " +
|
|
||||||
" AND STCD = #{map.stcd} " +
|
|
||||||
" AND STCD NOT IN ( " +
|
|
||||||
" SELECT STCD " +
|
|
||||||
" FROM SD_FPRUNPLAN_B " +
|
|
||||||
" WHERE (TASK_STATUS = 'Approved' OR TASK_STATUS IS NULL) " +
|
|
||||||
" AND IS_DELETED = 0 " +
|
|
||||||
" AND STCD = #{map.stcd} " +
|
|
||||||
" AND TO_CHAR(START_TIME, 'yyyy') = #{map.yr} " +
|
|
||||||
" GROUP BY STCD " +
|
|
||||||
" ) " +
|
|
||||||
" ) a " +
|
|
||||||
" GROUP BY a.STCD " +
|
|
||||||
") t2 ON t.STCD = t2.STCD " +
|
|
||||||
"WHERE t.STCD = #{map.stcd}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private String buildYearFpStatisticsSql() {
|
|
||||||
return "SELECT eng.BASE_ID AS baseId, " +
|
|
||||||
" hb.BASENAME AS baseName, " +
|
|
||||||
" a.FTP AS ftp, " +
|
|
||||||
" COALESCE(fishRv.NAME, relRv.FISH_NAME, fishZy.NAME, relZy.FISH_NAME, a.FTP) AS fishName, " +
|
|
||||||
" SUM(a.FCNT) AS fcnt " +
|
|
||||||
"FROM SD_FPSS_R a " +
|
|
||||||
"INNER JOIN ( " +
|
|
||||||
" SELECT STCD, MAX(RSTCD) AS RSTCD " +
|
|
||||||
" FROM SD_FPSS_B_H " +
|
|
||||||
" GROUP BY STCD " +
|
|
||||||
") fpss ON fpss.STCD = a.STCD " +
|
|
||||||
"LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = fpss.RSTCD " +
|
|
||||||
"LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = eng.BASE_ID " +
|
|
||||||
"LEFT JOIN SD_FISHDICTORY_RLTN_B relRv ON relRv.FISH_ID = a.FTP " +
|
|
||||||
" AND relRv.RVCD = eng.HBRVCD " +
|
|
||||||
" AND relRv.IS_DELETED = 0 " +
|
|
||||||
"LEFT JOIN SD_FISHDICTORY_B fishRv ON fishRv.ID = NVL(relRv.ZY_FISH_ID, relRv.FISH_ID) " +
|
|
||||||
" AND fishRv.IS_DELETED = 0 " +
|
|
||||||
"LEFT JOIN SD_FISHDICTORY_RLTN_B relZy ON relZy.FISH_ID = a.FTP " +
|
|
||||||
" AND relZy.RVCD = 'ZY' " +
|
|
||||||
" AND relZy.IS_DELETED = 0 " +
|
|
||||||
"LEFT JOIN SD_FISHDICTORY_B fishZy ON fishZy.ID = NVL(relZy.ZY_FISH_ID, relZy.FISH_ID) " +
|
|
||||||
" AND fishZy.IS_DELETED = 0 " +
|
|
||||||
"WHERE NVL(a.IS_DELETED, 0) = 0 " +
|
|
||||||
" AND (#{map.year} IS NULL OR #{map.year} = '' OR TO_CHAR(a.STRDT, 'YYYY') = #{map.year}) " +
|
|
||||||
"GROUP BY eng.BASE_ID, hb.BASENAME, a.FTP, COALESCE(fishRv.NAME, relRv.FISH_NAME, fishZy.NAME, relZy.FISH_NAME, a.FTP) " +
|
|
||||||
"ORDER BY eng.BASE_ID, a.FTP";
|
|
||||||
}
|
|
||||||
|
|
||||||
private String resolveFallbackFishText(String fallbackFishJson, String fallbackFishText) {
|
|
||||||
if (StrUtil.isNotBlank(fallbackFishJson)) {
|
|
||||||
Set<String> fishNames = new LinkedHashSet<>();
|
|
||||||
Matcher matcher = FISH_NAME_PATTERN.matcher(fallbackFishJson);
|
|
||||||
while (matcher.find()) {
|
|
||||||
fishNames.add(StrUtil.trim(matcher.group(1)));
|
|
||||||
}
|
|
||||||
if (!fishNames.isEmpty()) {
|
|
||||||
return String.join(",", fishNames);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return StrUtil.blankToDefault(StrUtil.trim(fallbackFishText), null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package com.yfd.platform.env.wt.mapper;
|
package com.yfd.platform.env.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdAlongDetailVO;
|
import com.yfd.platform.env.entity.vo.SdAlongDetailVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.WtrvInfo;
|
import com.yfd.platform.env.entity.vo.WtrvInfo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
@ -1,9 +1,9 @@
|
|||||||
package com.yfd.platform.env.wt.mapper;
|
package com.yfd.platform.env.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdAlongVO;
|
import com.yfd.platform.env.entity.vo.SdAlongVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package com.yfd.platform.env.wt.mapper;
|
package com.yfd.platform.env.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdDzChuiXiangListVO;
|
import com.yfd.platform.env.entity.vo.SdDzChuiXiangListVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package com.yfd.platform.env.wt.mapper;
|
package com.yfd.platform.env.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdRvwtSVO;
|
import com.yfd.platform.env.entity.vo.SdRvwtSVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
import com.yfd.platform.env.entity.vo.StcdVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.yfd.platform.env.wt.mapper;
|
package com.yfd.platform.env.mapper;
|
||||||
|
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdWtMonitorCountVO;
|
import com.yfd.platform.env.entity.vo.SdWtMonitorCountVO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.mapper;
|
package com.yfd.platform.env.mapper;
|
||||||
|
|
||||||
import com.yfd.platform.env.entity.vo.DataParam;
|
import com.yfd.platform.env.entity.vo.DataParam;
|
||||||
import org.apache.ibatis.annotations.Delete;
|
import org.apache.ibatis.annotations.Delete;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package com.yfd.platform.env.wt.mapper;
|
package com.yfd.platform.env.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdWtvtYearVo;
|
import com.yfd.platform.env.entity.vo.SdWtvtYearVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.service;
|
package com.yfd.platform.env.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
@ -6,8 +6,8 @@ import com.yfd.platform.common.DataSourceRequest;
|
|||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
import com.yfd.platform.common.GroupResult;
|
import com.yfd.platform.common.GroupResult;
|
||||||
import com.yfd.platform.env.entity.vo.BatchDeleteAo;
|
import com.yfd.platform.env.entity.vo.BatchDeleteAo;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdAlongDetailVO;
|
import com.yfd.platform.env.entity.vo.SdAlongDetailVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.WtrvInfo;
|
import com.yfd.platform.env.entity.vo.WtrvInfo;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -1,10 +1,10 @@
|
|||||||
package com.yfd.platform.env.wt.service;
|
package com.yfd.platform.env.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.wt.entity.vo.SdYearListVO;
|
import com.yfd.platform.env.entity.vo.SdYearListVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
import com.yfd.platform.env.entity.vo.StcdVo;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -1,11 +1,8 @@
|
|||||||
package com.yfd.platform.env.service;
|
package com.yfd.platform.env.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.yfd.platform.env.domain.SdHydrobase;
|
import com.yfd.platform.env.domain.SdHydrobase;
|
||||||
import com.yfd.platform.env.entity.vo.HydrobaseWbsVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -37,8 +34,6 @@ public interface ISdHydrobaseService extends IService<SdHydrobase> {
|
|||||||
*/
|
*/
|
||||||
List<SdHydrobase> selectForDropdown(String basename);
|
List<SdHydrobase> selectForDropdown(String basename);
|
||||||
|
|
||||||
DataSourceResult<HydrobaseWbsVo> getWbsbKendoList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
Set<String> getUserAuthorizedStationCodes();
|
Set<String> getUserAuthorizedStationCodes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
package com.yfd.platform.env.wt.service;
|
package com.yfd.platform.env.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 java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电站专题垂向水温一级面板Service接口
|
* 电站专题垂向水温一级面板Service接口
|
||||||
*
|
*
|
||||||
@ -1,9 +1,9 @@
|
|||||||
package com.yfd.platform.env.wt.service;
|
package com.yfd.platform.env.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.wt.entity.vo.SdRvwtSVO;
|
import com.yfd.platform.env.entity.vo.SdRvwtSVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
import com.yfd.platform.env.entity.vo.StcdVo;
|
||||||
|
|
||||||
public interface SdRvwtSInOutOneService {
|
public interface SdRvwtSInOutOneService {
|
||||||
|
|
||||||
21
backend/src/main/java/com/yfd/platform/env/service/SdWtMonitorService.java
vendored
Normal file
21
backend/src/main/java/com/yfd/platform/env/service/SdWtMonitorService.java
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package com.yfd.platform.env.service;
|
||||||
|
|
||||||
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
|
import com.yfd.platform.env.entity.vo.FishSpawnVo;
|
||||||
|
import com.yfd.platform.env.entity.vo.WtrvVo;
|
||||||
|
|
||||||
|
public interface SdWtMonitorService {
|
||||||
|
|
||||||
|
DataSourceResult getEvnmAutoMonitorList();
|
||||||
|
|
||||||
|
DataSourceResult getVmsstbprptList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
DataSourceResult getCxDetailList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
DataSourceResult getWtFishAnalysis(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
DataSourceResult<FishSpawnVo> getWtFishInfo(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
WtrvVo getFlagByStcd(String stcd);
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.service;
|
package com.yfd.platform.env.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;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.service.impl;
|
package com.yfd.platform.env.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
@ -9,11 +9,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.yfd.platform.common.*;
|
import com.yfd.platform.common.*;
|
||||||
import com.yfd.platform.common.exception.BizException;
|
import com.yfd.platform.common.exception.BizException;
|
||||||
import com.yfd.platform.env.entity.vo.*;
|
import com.yfd.platform.env.entity.vo.*;
|
||||||
import com.yfd.platform.env.wt.mapper.AlongDetailMapper;
|
import com.yfd.platform.env.mapper.AlongDetailMapper;
|
||||||
import com.yfd.platform.env.wt.mapper.SdWtrvdrtpSMapper;
|
import com.yfd.platform.env.mapper.SdWtrvdrtpSMapper;
|
||||||
import com.yfd.platform.env.wt.service.AlongDetailService;
|
import com.yfd.platform.env.service.AlongDetailService;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdAlongDetailVO;
|
|
||||||
import com.yfd.platform.env.wt.entity.vo.WtrvInfo;
|
|
||||||
import com.yfd.platform.utils.CollectionExtUtils;
|
import com.yfd.platform.utils.CollectionExtUtils;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
import com.yfd.platform.utils.SecurityUtils;
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
@ -52,7 +50,6 @@ public class AlongDetailServiceImpl extends ServiceImpl<AlongDetailMapper, SdAlo
|
|||||||
DataSourceResult dataSourceResult = new DataSourceResult();
|
DataSourceResult dataSourceResult = new DataSourceResult();
|
||||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||||
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
||||||
String baseId = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "baseId");
|
|
||||||
String tm = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "tm");
|
String tm = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "tm");
|
||||||
if (StrUtil.isBlank(tm)) {
|
if (StrUtil.isBlank(tm)) {
|
||||||
throw new BizException("时间(tm)不能为空.");
|
throw new BizException("时间(tm)不能为空.");
|
||||||
@ -88,9 +85,6 @@ public class AlongDetailServiceImpl extends ServiceImpl<AlongDetailMapper, SdAlo
|
|||||||
if (StrUtil.isNotBlank(stcd)) {
|
if (StrUtil.isNotBlank(stcd)) {
|
||||||
sql.append(" AND r.STCD = #{map.stcd} ");
|
sql.append(" AND r.STCD = #{map.stcd} ");
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotBlank(baseId)) {
|
|
||||||
sql.append(" AND eng.BASE_ID = #{map.baseId} ");
|
|
||||||
}
|
|
||||||
sql.append(") t WHERE 1=1 ");
|
sql.append(") t WHERE 1=1 ");
|
||||||
if (dataSourceRequest.getSort() != null && !dataSourceRequest.getSort().isEmpty()) {
|
if (dataSourceRequest.getSort() != null && !dataSourceRequest.getSort().isEmpty()) {
|
||||||
DataSourceRequest.SortDescriptor sortDescriptor = dataSourceRequest.getSort().get(0);
|
DataSourceRequest.SortDescriptor sortDescriptor = dataSourceRequest.getSort().get(0);
|
||||||
@ -114,9 +108,6 @@ public class AlongDetailServiceImpl extends ServiceImpl<AlongDetailMapper, SdAlo
|
|||||||
if (StrUtil.isNotBlank(stcd)) {
|
if (StrUtil.isNotBlank(stcd)) {
|
||||||
map.put("stcd", stcd);
|
map.put("stcd", stcd);
|
||||||
}
|
}
|
||||||
if (StrUtil.isNotBlank(baseId)) {
|
|
||||||
map.put("baseId", baseId);
|
|
||||||
}
|
|
||||||
PageInfo pageInfo = QgcQueryWrapperUtil.getPageInfo(loadOptions);
|
PageInfo pageInfo = QgcQueryWrapperUtil.getPageInfo(loadOptions);
|
||||||
Page currentPage = pageInfo.getHasPageInfo() ? pageInfo.getPage() : page;
|
Page currentPage = pageInfo.getHasPageInfo() ? pageInfo.getPage() : page;
|
||||||
List<SdAlongDetailVO> list = this.microservicDynamicSQLMapper.pageAllListWithResultType(currentPage, sql.toString(), map, SdAlongDetailVO.class);
|
List<SdAlongDetailVO> list = this.microservicDynamicSQLMapper.pageAllListWithResultType(currentPage, sql.toString(), map, SdAlongDetailVO.class);
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.service.impl;
|
package com.yfd.platform.env.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -10,12 +10,13 @@ import com.yfd.platform.common.DynamicSQLMapper;
|
|||||||
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.common.exception.BizException;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdAlongVO;
|
import com.yfd.platform.env.entity.vo.SdAlongVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdYearListVO;
|
import com.yfd.platform.env.entity.vo.SdYearListVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
import com.yfd.platform.env.entity.vo.StcdVo;
|
||||||
import com.yfd.platform.env.wt.mapper.AlongListMapper;
|
import com.yfd.platform.env.mapper.AlongListMapper;
|
||||||
import com.yfd.platform.env.wt.service.AlongListService;
|
import com.yfd.platform.env.service.AlongListService;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
|
import com.yfd.platform.utils.QueryWrapperUtil;
|
||||||
import com.yfd.platform.utils.SqlUtil;
|
import com.yfd.platform.utils.SqlUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -71,7 +72,7 @@ public class AlongListServiceImpl extends ServiceImpl<AlongListMapper, SdAlongVO
|
|||||||
"\t(SELECT HBRVCD FROM SD_HBRV_DIC WHERE #{full_path} 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 >= #{dt} AND TM <= #{dt_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 " +
|
||||||
"\tON t1.STCD = t3.STCD ORDER BY SORT ASC " +
|
"\tON t1.STCD = t3.STCD ORDER BY SORT ASC " +
|
||||||
"\t) WHERE ROWNUM = 1 ";
|
"\t) WHERE ROWNUM = 1 ";
|
||||||
Map<String,Object> sqlWhereMap = new HashMap<>();
|
Map<String,Object> sqlWhereMap = new HashMap<>();
|
||||||
@ -311,7 +312,6 @@ public class AlongListServiceImpl extends ServiceImpl<AlongListMapper, SdAlongVO
|
|||||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||||
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
||||||
String year = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "year");
|
String year = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "year");
|
||||||
String baseId = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "baseId");
|
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
sql.append("SELECT t.stcd AS stcd, t.rstcd AS rstcd, t.stnm AS stnm, t.YEAR AS year, t.MONTH AS month, ")
|
sql.append("SELECT t.stcd AS stcd, t.rstcd AS rstcd, t.stnm AS stnm, t.YEAR AS year, t.MONTH AS month, ")
|
||||||
@ -323,9 +323,7 @@ public class AlongListServiceImpl extends ServiceImpl<AlongListMapper, SdAlongVO
|
|||||||
.append(" FROM SD_WTRVDRTP_S sms ")
|
.append(" FROM SD_WTRVDRTP_S sms ")
|
||||||
.append(" LEFT JOIN SD_WT_B_H wt ON wt.STCD = sms.STCD ")
|
.append(" LEFT JOIN SD_WT_B_H wt ON wt.STCD = sms.STCD ")
|
||||||
.append(" AND wt.STTP = 'WTRV' AND wt.USFL = 1 AND wt.IS_DELETED = 0 ")
|
.append(" AND wt.STTP = 'WTRV' AND wt.USFL = 1 AND wt.IS_DELETED = 0 ")
|
||||||
.append(" LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD ")
|
|
||||||
.append(" WHERE sms.IS_DELETED = 0 ")
|
.append(" WHERE sms.IS_DELETED = 0 ")
|
||||||
.append(StrUtil.isNotBlank(baseId) ? " AND eng.BASE_ID = #{map.baseId} " : "")
|
|
||||||
.append(" ) t1 ")
|
.append(" ) t1 ")
|
||||||
.append(" LEFT JOIN (SELECT STCD, WT, MNTH FROM SD_WTNP_B WHERE IS_DELETED = 0) t2 ")
|
.append(" LEFT JOIN (SELECT STCD, WT, MNTH FROM SD_WTNP_B WHERE IS_DELETED = 0) t2 ")
|
||||||
.append(" ON t2.STCD = t1.RSTCD AND t2.MNTH = t1.MONTH ")
|
.append(" ON t2.STCD = t1.RSTCD AND t2.MNTH = t1.MONTH ")
|
||||||
@ -341,7 +339,6 @@ public class AlongListServiceImpl extends ServiceImpl<AlongListMapper, SdAlongVO
|
|||||||
Map<String, Object> paramMap = new HashMap<>();
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
paramMap.put("stcd", stcd);
|
paramMap.put("stcd", stcd);
|
||||||
paramMap.put("year", year);
|
paramMap.put("year", year);
|
||||||
paramMap.put("baseId", baseId);
|
|
||||||
Page<?> page = buildPage(loadOptions);
|
Page<?> page = buildPage(loadOptions);
|
||||||
List<SdYearListVO> voList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, SdYearListVO.class);
|
List<SdYearListVO> voList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, SdYearListVO.class);
|
||||||
for (SdYearListVO vo : voList) {
|
for (SdYearListVO vo : voList) {
|
||||||
@ -1,21 +1,20 @@
|
|||||||
package com.yfd.platform.env.wt.service.impl;
|
package com.yfd.platform.env.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||||
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.common.MicroservicDynamicSQLMapper;
|
import com.yfd.platform.env.entity.vo.SdDzChuiXiangListVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdDzChuiXiangListVO;
|
import com.yfd.platform.env.mapper.SdDzChuiXiangListMapper;
|
||||||
import com.yfd.platform.env.wt.mapper.SdDzChuiXiangListMapper;
|
import com.yfd.platform.env.service.SdDzChuiXiangListService;
|
||||||
import com.yfd.platform.env.wt.service.SdDzChuiXiangListService;
|
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
|
import com.yfd.platform.utils.QueryWrapperUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电站专题垂向水温一级面板Service实现类
|
* 电站专题垂向水温一级面板Service实现类
|
||||||
@ -29,23 +28,12 @@ public class SdDzChuiXiangListServiceImpl extends ServiceImpl<SdDzChuiXiangListM
|
|||||||
@Resource
|
@Resource
|
||||||
private SdDzChuiXiangListMapper sdDzChuiXiangListMapper;
|
private SdDzChuiXiangListMapper sdDzChuiXiangListMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MicroservicDynamicSQLMapper microservicDynamicSQLMapper;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataSourceResult processKendoList(DataSourceRequest dataSourceRequest) {
|
public DataSourceResult processKendoList(DataSourceRequest dataSourceRequest) {
|
||||||
DataSourceResult dataSourceResult = new DataSourceResult<>();
|
DataSourceResult dataSourceResult = new DataSourceResult<>();
|
||||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||||
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
||||||
String year = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "year");
|
String year = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "year");
|
||||||
String baseId = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "baseId");
|
|
||||||
|
|
||||||
if (baseId != null && !baseId.isBlank() && !matchWtvtBaseId(stcd, baseId)) {
|
|
||||||
dataSourceResult.setData(null);
|
|
||||||
dataSourceResult.setTotal(0);
|
|
||||||
dataSourceResult.setAggregates(new LinkedHashMap<>());
|
|
||||||
return dataSourceResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
int m = 12;
|
int m = 12;
|
||||||
Map<String, List<SdDzChuiXiangListVO>> map = new LinkedHashMap<>();
|
Map<String, List<SdDzChuiXiangListVO>> map = new LinkedHashMap<>();
|
||||||
@ -58,19 +46,4 @@ public class SdDzChuiXiangListServiceImpl extends ServiceImpl<SdDzChuiXiangListM
|
|||||||
dataSourceResult.setAggregates(map);
|
dataSourceResult.setAggregates(map);
|
||||||
return dataSourceResult;
|
return dataSourceResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean matchWtvtBaseId(String stcd, String baseId) {
|
|
||||||
String sql = "SELECT 1 AS flag " +
|
|
||||||
"FROM SD_WT_B_H wt " +
|
|
||||||
"INNER JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD " +
|
|
||||||
"WHERE NVL(wt.IS_DELETED, 0) = 0 " +
|
|
||||||
" AND wt.STTP = 'WTVT' " +
|
|
||||||
" AND wt.STCD = #{map.stcd} " +
|
|
||||||
" AND eng.BASE_ID = #{map.baseId}";
|
|
||||||
Map<String, Object> paramMap = new HashMap<>();
|
|
||||||
paramMap.put("stcd", stcd);
|
|
||||||
paramMap.put("baseId", baseId);
|
|
||||||
List<Map<String, Object>> result = microservicDynamicSQLMapper.pageAllList(null, sql, paramMap);
|
|
||||||
return result != null && !result.isEmpty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -3,13 +3,10 @@ package com.yfd.platform.env.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
|
||||||
import com.yfd.platform.data.domain.SysUserDataScope;
|
import com.yfd.platform.data.domain.SysUserDataScope;
|
||||||
import com.yfd.platform.data.mapper.SysUserDataScopeMapper;
|
import com.yfd.platform.data.mapper.SysUserDataScopeMapper;
|
||||||
import com.yfd.platform.env.domain.SdEngInfoBH;
|
import com.yfd.platform.env.domain.SdEngInfoBH;
|
||||||
import com.yfd.platform.env.domain.SdHydrobase;
|
import com.yfd.platform.env.domain.SdHydrobase;
|
||||||
import com.yfd.platform.env.entity.vo.HydrobaseWbsVo;
|
|
||||||
import com.yfd.platform.env.mapper.SdEngInfoBHMapper;
|
import com.yfd.platform.env.mapper.SdEngInfoBHMapper;
|
||||||
import com.yfd.platform.env.mapper.SdHydrobaseMapper;
|
import com.yfd.platform.env.mapper.SdHydrobaseMapper;
|
||||||
import com.yfd.platform.env.service.ISdHydrobaseService;
|
import com.yfd.platform.env.service.ISdHydrobaseService;
|
||||||
@ -19,10 +16,8 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -102,64 +97,6 @@ public class SdHydrobaseServiceImpl extends ServiceImpl<SdHydrobaseMapper, SdHyd
|
|||||||
return this.list(wrapper);
|
return this.list(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataSourceResult<HydrobaseWbsVo> getWbsbKendoList(DataSourceRequest dataSourceRequest) {
|
|
||||||
LambdaQueryWrapper<SdHydrobase> wrapper = new LambdaQueryWrapper<>();
|
|
||||||
List<DataSourceRequest.FilterDescriptor> filters = new ArrayList<>();
|
|
||||||
collectFilters(dataSourceRequest == null ? null : dataSourceRequest.getFilter(), filters);
|
|
||||||
|
|
||||||
String wbsType = null;
|
|
||||||
String treeLevel = null;
|
|
||||||
for (DataSourceRequest.FilterDescriptor filter : filters) {
|
|
||||||
if (!"eq".equalsIgnoreCase(filter.getOperator()) || filter.getValue() == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ("wbsType".equals(filter.getField())) {
|
|
||||||
wbsType = String.valueOf(filter.getValue());
|
|
||||||
} else if ("treeLevel".equals(filter.getField())) {
|
|
||||||
treeLevel = String.valueOf(filter.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DataSourceResult<HydrobaseWbsVo> result = new DataSourceResult<>();
|
|
||||||
result.setAggregates(new HashMap<>());
|
|
||||||
|
|
||||||
if (StringUtils.hasText(wbsType) && !"PSB".equalsIgnoreCase(wbsType)) {
|
|
||||||
result.setData(new ArrayList<>());
|
|
||||||
result.setTotal(0L);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StringUtils.hasText(treeLevel)) {
|
|
||||||
try {
|
|
||||||
wrapper.eq(SdHydrobase::getGrd, Integer.parseInt(treeLevel));
|
|
||||||
} catch (NumberFormatException ignored) {
|
|
||||||
result.setData(new ArrayList<>());
|
|
||||||
result.setTotal(0L);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
applySort(wrapper, dataSourceRequest == null ? null : dataSourceRequest.getSort());
|
|
||||||
|
|
||||||
List<SdHydrobase> hydrobaseList;
|
|
||||||
if (dataSourceRequest != null && dataSourceRequest.getTake() > 0) {
|
|
||||||
Page<SdHydrobase> page = new Page<>(
|
|
||||||
(long) (dataSourceRequest.getSkip() / dataSourceRequest.getTake() + 1),
|
|
||||||
dataSourceRequest.getTake()
|
|
||||||
);
|
|
||||||
Page<SdHydrobase> pageResult = this.page(page, wrapper);
|
|
||||||
hydrobaseList = pageResult.getRecords();
|
|
||||||
result.setTotal(pageResult.getTotal());
|
|
||||||
} else {
|
|
||||||
hydrobaseList = this.list(wrapper);
|
|
||||||
result.setTotal(hydrobaseList.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
result.setData(hydrobaseList.stream().map(this::toHydrobaseWbsVo).collect(Collectors.toList()));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<String> getUserAuthorizedStationCodes() {
|
public Set<String> getUserAuthorizedStationCodes() {
|
||||||
String userId = SecurityUtils.getUserId();
|
String userId = SecurityUtils.getUserId();
|
||||||
@ -239,72 +176,4 @@ public class SdHydrobaseServiceImpl extends ServiceImpl<SdHydrobaseMapper, SdHyd
|
|||||||
public boolean deleteHydrobase(String baseid) {
|
public boolean deleteHydrobase(String baseid) {
|
||||||
return this.removeById(baseid);
|
return this.removeById(baseid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void collectFilters(DataSourceRequest.FilterDescriptor root, List<DataSourceRequest.FilterDescriptor> filters) {
|
|
||||||
if (root == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (StringUtils.hasText(root.getField())) {
|
|
||||||
filters.add(root);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (root.getFilters() == null || root.getFilters().isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (DataSourceRequest.FilterDescriptor filter : root.getFilters()) {
|
|
||||||
collectFilters(filter, filters);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void applySort(LambdaQueryWrapper<SdHydrobase> wrapper, List<DataSourceRequest.SortDescriptor> sortList) {
|
|
||||||
boolean hasSort = false;
|
|
||||||
if (sortList != null) {
|
|
||||||
for (DataSourceRequest.SortDescriptor sortDescriptor : sortList) {
|
|
||||||
if (sortDescriptor == null || !StringUtils.hasText(sortDescriptor.getField())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
boolean asc = !"desc".equalsIgnoreCase(sortDescriptor.getDir());
|
|
||||||
if ("orderIndex".equals(sortDescriptor.getField())) {
|
|
||||||
if (asc) {
|
|
||||||
wrapper.orderByAsc(SdHydrobase::getOrderIndex);
|
|
||||||
} else {
|
|
||||||
wrapper.orderByDesc(SdHydrobase::getOrderIndex);
|
|
||||||
}
|
|
||||||
hasSort = true;
|
|
||||||
} else if ("wbsCode".equals(sortDescriptor.getField())) {
|
|
||||||
if (asc) {
|
|
||||||
wrapper.orderByAsc(SdHydrobase::getBaseid);
|
|
||||||
} else {
|
|
||||||
wrapper.orderByDesc(SdHydrobase::getBaseid);
|
|
||||||
}
|
|
||||||
hasSort = true;
|
|
||||||
} else if ("wbsName".equals(sortDescriptor.getField())) {
|
|
||||||
if (asc) {
|
|
||||||
wrapper.orderByAsc(SdHydrobase::getBasename);
|
|
||||||
} else {
|
|
||||||
wrapper.orderByDesc(SdHydrobase::getBasename);
|
|
||||||
}
|
|
||||||
hasSort = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!hasSort) {
|
|
||||||
wrapper.orderByAsc(SdHydrobase::getOrderIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private HydrobaseWbsVo toHydrobaseWbsVo(SdHydrobase hydrobase) {
|
|
||||||
HydrobaseWbsVo vo = new HydrobaseWbsVo();
|
|
||||||
vo.setWbsCode(hydrobase.getBaseid());
|
|
||||||
vo.setWbsName(hydrobase.getBasename());
|
|
||||||
vo.setPwbsCode(hydrobase.getPbaseid());
|
|
||||||
vo.setWbsType("PSB");
|
|
||||||
vo.setTreeLevel(hydrobase.getGrd() == null ? null : String.valueOf(hydrobase.getGrd()));
|
|
||||||
vo.setPath(hydrobase.getPath());
|
|
||||||
vo.setOrderIndex(hydrobase.getOrderIndex());
|
|
||||||
vo.setRmk(hydrobase.getRmk());
|
|
||||||
vo.setDes(hydrobase.getDes());
|
|
||||||
vo.setShortname(hydrobase.getShortname());
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.wt.service.impl;
|
package com.yfd.platform.env.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
@ -6,10 +6,10 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.common.*;
|
import com.yfd.platform.common.*;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdRvwtSVO;
|
import com.yfd.platform.env.entity.vo.SdRvwtSVO;
|
||||||
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
import com.yfd.platform.env.entity.vo.StcdVo;
|
||||||
import com.yfd.platform.env.wt.mapper.SdRvwtSInOutOneMapper;
|
import com.yfd.platform.env.mapper.SdRvwtSInOutOneMapper;
|
||||||
import com.yfd.platform.env.wt.service.SdRvwtSInOutOneService;
|
import com.yfd.platform.env.service.SdRvwtSInOutOneService;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
800
backend/src/main/java/com/yfd/platform/env/service/impl/SdWtMonitorServiceImpl.java
vendored
Normal file
800
backend/src/main/java/com/yfd/platform/env/service/impl/SdWtMonitorServiceImpl.java
vendored
Normal file
@ -0,0 +1,800 @@
|
|||||||
|
package com.yfd.platform.env.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.yfd.platform.common.*;
|
||||||
|
import com.yfd.platform.env.entity.vo.FishSpawnVo;
|
||||||
|
import com.yfd.platform.env.entity.vo.SdWtMonitorCountVO;
|
||||||
|
import com.yfd.platform.env.entity.vo.SdWtBaseInfoVO;
|
||||||
|
import com.yfd.platform.env.entity.vo.WtrvVo;
|
||||||
|
import com.yfd.platform.env.entity.vo.WtFishVo;
|
||||||
|
import com.yfd.platform.env.mapper.SdWtMonitorMapper;
|
||||||
|
import com.yfd.platform.env.service.SdWtMonitorService;
|
||||||
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class SdWtMonitorServiceImpl implements SdWtMonitorService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SdWtMonitorMapper sdWtMonitorMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MicroservicDynamicSQLMapper microservicDynamicSQLMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult getEvnmAutoMonitorList() {
|
||||||
|
List<SdWtMonitorCountVO> list = sdWtMonitorMapper.getMonitorCountList();
|
||||||
|
DataSourceResult<SdWtMonitorCountVO> result = new DataSourceResult<>();
|
||||||
|
result.setData(list);
|
||||||
|
result.setTotal(list == null ? 0 : list.size());
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WtrvVo getFlagByStcd(String stcd) {
|
||||||
|
String sql = "SELECT wt.STCD AS stcd, " +
|
||||||
|
"CASE WHEN rel.ENG_IWT_CODE IS NOT NULL OR rel.ENG_DWT_CODE IS NOT NULL THEN 1 ELSE 0 END AS isIoWtrv, " +
|
||||||
|
"CASE WHEN EXISTS ( " +
|
||||||
|
" SELECT 1 FROM SD_WT_B_H vt " +
|
||||||
|
" WHERE vt.RSTCD = wt.RSTCD " +
|
||||||
|
" AND vt.STTP = 'WTVT' " +
|
||||||
|
" AND vt.IS_DELETED = 0 " +
|
||||||
|
" AND vt.MWAY = 2" +
|
||||||
|
") THEN 1 ELSE 0 END AS hasRstcdWtvt " +
|
||||||
|
"FROM SD_WT_B_H wt " +
|
||||||
|
"LEFT JOIN SD_WTENGRLTN_B rel ON rel.STCD = wt.STCD AND rel.IS_DELETED = 0 " +
|
||||||
|
"WHERE wt.STCD = #{map.stcd} " +
|
||||||
|
" AND wt.STTP = 'WTRV' " +
|
||||||
|
" AND wt.IS_DELETED = 0";
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("stcd", stcd);
|
||||||
|
WtrvVo vo = (WtrvVo) microservicDynamicSQLMapper.getOneBySqlWithResultType(sql, paramMap, WtrvVo.class);
|
||||||
|
if (vo == null ) {
|
||||||
|
return buildDefaultWtrvVo(stcd);
|
||||||
|
}
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult getWtFishAnalysis(DataSourceRequest dataSourceRequest) {
|
||||||
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||||
|
String startTime = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "startTime");
|
||||||
|
String endTime = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "endTime");
|
||||||
|
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
||||||
|
DataSourceResult<WtFishVo> result = new DataSourceResult<>();
|
||||||
|
if (StrUtil.isBlank(stcd) || StrUtil.isBlank(startTime) || StrUtil.isBlank(endTime)) {
|
||||||
|
result.setData(new ArrayList<>());
|
||||||
|
result.setTotal(0L);
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("SELECT ")
|
||||||
|
.append("t1.DT AS dt, ")
|
||||||
|
.append("t2.WT AS wt, ")
|
||||||
|
.append("eng.HBRVCD AS hbrvcd, ")
|
||||||
|
.append("t3.WT AS beforeWt ")
|
||||||
|
.append("FROM (SELECT TRUNC(TO_DATE(#{map.startTime}, 'YYYY-MM-DD HH24:MI:SS')) + LEVEL - 1 AS DT ")
|
||||||
|
.append(" FROM DUAL ")
|
||||||
|
.append(" CONNECT BY TRUNC(TO_DATE(#{map.startTime}, 'YYYY-MM-DD HH24:MI:SS')) + LEVEL - 1 <= TRUNC(TO_DATE(#{map.endTime}, 'YYYY-MM-DD HH24:MI:SS'))) t1 ")
|
||||||
|
.append("LEFT JOIN (SELECT STCD, WT, DT FROM SD_WTRVDAY_S ")
|
||||||
|
.append(" WHERE IS_DELETED = 0 ")
|
||||||
|
.append(" AND STCD = #{map.stcd} ")
|
||||||
|
.append(" AND DT >= TO_DATE(#{map.startTime}, 'YYYY-MM-DD HH24:MI:SS') ")
|
||||||
|
.append(" AND DT <= TO_DATE(#{map.endTime}, 'YYYY-MM-DD HH24:MI:SS')) t2 ")
|
||||||
|
.append(" ON t1.DT = t2.DT ")
|
||||||
|
.append("LEFT JOIN (SELECT STCD, WT, DT FROM SD_WTRVDAY_S ")
|
||||||
|
.append(" WHERE IS_DELETED = 0 ")
|
||||||
|
.append(" AND STCD = #{map.stcd} ")
|
||||||
|
.append(" AND DT >= ADD_MONTHS(TO_DATE(#{map.startTime}, 'YYYY-MM-DD HH24:MI:SS'), -12) ")
|
||||||
|
.append(" AND DT <= ADD_MONTHS(TO_DATE(#{map.endTime}, 'YYYY-MM-DD HH24:MI:SS'), -12)) t3 ")
|
||||||
|
.append(" ON t1.DT = ADD_MONTHS(t3.DT, 12) ")
|
||||||
|
.append("LEFT JOIN SD_WT_B_H wt ON wt.STCD = #{map.stcd} AND wt.IS_DELETED = 0 AND wt.STTP = 'WTRV' ")
|
||||||
|
.append("LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD ")
|
||||||
|
.append("WHERE (t2.WT IS NOT NULL OR t3.WT IS NOT NULL) ")
|
||||||
|
.append(" AND t1.DT <= SYSDATE ")
|
||||||
|
.append("ORDER BY t1.DT DESC");
|
||||||
|
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("stcd", stcd);
|
||||||
|
paramMap.put("startTime", startTime);
|
||||||
|
paramMap.put("endTime", endTime);
|
||||||
|
|
||||||
|
Page<?> page = buildPage(dataSourceRequest.toDevRequest());
|
||||||
|
List<WtFishVo> wtFishVoList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, WtFishVo.class);
|
||||||
|
String hbrvcd = wtFishVoList.isEmpty() ? null : wtFishVoList.get(0).getHbrvcd();
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(hbrvcd)) {
|
||||||
|
String fishSql = "SELECT t1.ID AS id, " +
|
||||||
|
"t1.NAME AS name, " +
|
||||||
|
"t1.PRETEMP AS pretempStr, " +
|
||||||
|
"t1.SPAWN_MONTH AS spawnMonthStr " +
|
||||||
|
"FROM SD_FISHDICTORY_B t1 " +
|
||||||
|
"INNER JOIN SD_FISHDICTORY_RLTN_B t2 ON t1.ID = t2.ZY_FISH_ID " +
|
||||||
|
"WHERE t1.IS_DELETED = 0 " +
|
||||||
|
" AND t2.IS_DELETED = 0 " +
|
||||||
|
" AND t2.RVCD = #{map.hbrvcd} " +
|
||||||
|
" AND t1.PRETEMP IS NOT NULL " +
|
||||||
|
" AND t1.SPAWN_MONTH IS NOT NULL " +
|
||||||
|
"ORDER BY NVL(t2.ORDER_INDEX, 999999), NVL(t1.ORDER_INDEX, 999999), t1.NAME";
|
||||||
|
Map<String, Object> fishParamMap = new HashMap<>();
|
||||||
|
fishParamMap.put("hbrvcd", hbrvcd);
|
||||||
|
List<FishSpawnVo> fishSpawnVoList = microservicDynamicSQLMapper.getAllListWithResultType(fishSql, fishParamMap, FishSpawnVo.class);
|
||||||
|
fillFishList(wtFishVoList, fishSpawnVoList);
|
||||||
|
}
|
||||||
|
|
||||||
|
result.setData(wtFishVoList);
|
||||||
|
result.setTotal(page != null ? page.getTotal() : wtFishVoList.size());
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult<FishSpawnVo> getWtFishInfo(DataSourceRequest dataSourceRequest) {
|
||||||
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||||
|
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
||||||
|
|
||||||
|
DataSourceResult<FishSpawnVo> result = new DataSourceResult<>();
|
||||||
|
if (StrUtil.isBlank(stcd)) {
|
||||||
|
result.setData(new ArrayList<>());
|
||||||
|
result.setTotal(0L);
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
String sql = "SELECT DISTINCT " +
|
||||||
|
"t2.ID AS id, " +
|
||||||
|
"t2.NAME AS name, " +
|
||||||
|
"t2.PRETEMP AS pretempStr, " +
|
||||||
|
"t2.SPAWN_MONTH AS spawnMonthStr " +
|
||||||
|
"FROM SD_WT_B_H t1 " +
|
||||||
|
"INNER JOIN SD_ENGINFO_B_H eng ON eng.STCD = t1.RSTCD " +
|
||||||
|
"INNER JOIN SD_FISHDICTORY_RLTN_B t3 ON eng.HBRVCD = t3.RVCD " +
|
||||||
|
"INNER JOIN SD_FISHDICTORY_B t2 ON t2.ID = t3.ZY_FISH_ID " +
|
||||||
|
"WHERE t1.STCD = #{map.stcd} " +
|
||||||
|
" AND t1.IS_DELETED = 0 " +
|
||||||
|
" AND t1.STTP = 'WTRV' " +
|
||||||
|
" AND t2.IS_DELETED = 0 " +
|
||||||
|
" AND t3.IS_DELETED = 0 " +
|
||||||
|
" AND t2.PRETEMP IS NOT NULL " +
|
||||||
|
" AND t2.SPAWN_MONTH IS NOT NULL";
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("stcd", stcd);
|
||||||
|
List<FishSpawnVo> list = microservicDynamicSQLMapper.getAllListWithResultType(sql, paramMap, FishSpawnVo.class);
|
||||||
|
for (FishSpawnVo fishSpawnVo : list) {
|
||||||
|
fillFishSpawnMeta(fishSpawnVo);
|
||||||
|
}
|
||||||
|
result.setData(list);
|
||||||
|
result.setTotal((long) list.size());
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult getVmsstbprptList(DataSourceRequest dataSourceRequest) {
|
||||||
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||||
|
String mway = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "mway");
|
||||||
|
String sttpCode = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "sttpCode");
|
||||||
|
String rstcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "rstcd");
|
||||||
|
String stnm = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stnm");
|
||||||
|
String coenvwState = QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "coenvwState");
|
||||||
|
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("SELECT ")
|
||||||
|
.append("hb.BASENAME AS baseName, ")
|
||||||
|
.append("wt.STNM AS stnm, ")
|
||||||
|
.append("eng.ENNM AS ennm, ")
|
||||||
|
.append("wt.JCDT AS jcdt, ")
|
||||||
|
.append("wt.STINDX AS stindx, ")
|
||||||
|
.append("CASE ")
|
||||||
|
.append("WHEN wt.STTP = 'WTRV' AND rvRecent.STCD IS NOT NULL THEN 1 ")
|
||||||
|
.append("WHEN wt.STTP = 'WTVT' AND vtRecent.STCD IS NOT NULL THEN 1 ")
|
||||||
|
.append("ELSE 0 END AS coenvwState, ")
|
||||||
|
.append("wt.STTP AS sttpCode, ")
|
||||||
|
.append("wt.STCD AS stcd, ")
|
||||||
|
.append("wt.RSTCD AS rstcd, ")
|
||||||
|
.append("NULL AS stCode, ")
|
||||||
|
.append("NULL AS stName, ")
|
||||||
|
.append("eng.DVTP AS dvtp, ")
|
||||||
|
.append("hb.ORDER_INDEX AS baseStepSort, ")
|
||||||
|
.append("eng.HBRVCD AS hbrvcd, ")
|
||||||
|
.append("eng.ORDER_INDEX AS rstcdStepSort, ")
|
||||||
|
.append("wt.ORDER_INDEX AS siteStepSort ")
|
||||||
|
.append("FROM SD_WT_B_H wt ")
|
||||||
|
.append("LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD ")
|
||||||
|
.append("LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = eng.BASE_ID ")
|
||||||
|
.append("LEFT JOIN (SELECT DISTINCT STCD FROM SD_WTRV_R WHERE IS_DELETED = 0 AND TM >= SYSDATE - 1) rvRecent ON rvRecent.STCD = wt.STCD ")
|
||||||
|
.append("LEFT JOIN (SELECT DISTINCT STCD FROM SD_WTVT_R WHERE IS_DELETED = 0 AND TM >= SYSDATE - 1) vtRecent ON vtRecent.STCD = wt.STCD ")
|
||||||
|
.append("WHERE wt.IS_DELETED = 0 AND wt.DTIN_TYPE = 0 ");
|
||||||
|
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
if (mway != null && !mway.isBlank()) {
|
||||||
|
paramMap.put("mway", mway);
|
||||||
|
sql.append("AND wt.MWAY = #{map.mway} ");
|
||||||
|
}
|
||||||
|
if (sttpCode != null && !sttpCode.isBlank()) {
|
||||||
|
paramMap.put("sttpCode", sttpCode);
|
||||||
|
sql.append("AND wt.STTP = #{map.sttpCode} ");
|
||||||
|
}
|
||||||
|
if (rstcd != null && !rstcd.isBlank()) {
|
||||||
|
paramMap.put("rstcd", rstcd);
|
||||||
|
sql.append("AND wt.RSTCD = #{map.rstcd} ");
|
||||||
|
}
|
||||||
|
if (stnm != null && !stnm.isBlank()) {
|
||||||
|
paramMap.put("stnm", "%" + stnm + "%");
|
||||||
|
sql.append("AND wt.STNM LIKE #{map.stnm} ");
|
||||||
|
}
|
||||||
|
if (coenvwState != null && !coenvwState.isBlank()) {
|
||||||
|
paramMap.put("coenvwState", coenvwState);
|
||||||
|
sql.append("AND CASE ")
|
||||||
|
.append("WHEN wt.STTP = 'WTRV' AND rvRecent.STCD IS NOT NULL THEN 1 ")
|
||||||
|
.append("WHEN wt.STTP = 'WTVT' AND vtRecent.STCD IS NOT NULL THEN 1 ")
|
||||||
|
.append("ELSE 0 END = #{map.coenvwState} ");
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.append(buildVmsstbprptOrderBySql(dataSourceRequest.getSort()));
|
||||||
|
Page<?> page = buildPage(loadOptions);
|
||||||
|
List<SdWtBaseInfoVO> list = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, SdWtBaseInfoVO.class);
|
||||||
|
|
||||||
|
DataSourceResult<SdWtBaseInfoVO> result = new DataSourceResult<>();
|
||||||
|
result.setData(list);
|
||||||
|
result.setTotal(page != null ? page.getTotal() : list.size());
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult getCxDetailList(DataSourceRequest dataSourceRequest) {
|
||||||
|
List<DataSourceRequest.FilterDescriptor> filters = new ArrayList<>();
|
||||||
|
collectFilters(dataSourceRequest.getFilter(), filters);
|
||||||
|
|
||||||
|
String stcd = null;
|
||||||
|
String drtp = null;
|
||||||
|
Object startTime = null;
|
||||||
|
Object endTime = null;
|
||||||
|
Integer startYear = null;
|
||||||
|
Integer endYear = null;
|
||||||
|
Integer startMonth = null;
|
||||||
|
Integer endMonth = null;
|
||||||
|
Integer startDr = null;
|
||||||
|
Integer endDr = null;
|
||||||
|
|
||||||
|
for (DataSourceRequest.FilterDescriptor filter : filters) {
|
||||||
|
if ("stcd".equals(filter.getField())) {
|
||||||
|
stcd = toStringValue(filter.getValue());
|
||||||
|
} else if ("drtp".equals(filter.getField())) {
|
||||||
|
drtp = toStringValue(filter.getValue());
|
||||||
|
} else if ("tm".equals(filter.getField()) && "gte".equals(filter.getOperator())) {
|
||||||
|
startTime = filter.getValue();
|
||||||
|
} else if ("tm".equals(filter.getField()) && "lte".equals(filter.getOperator())) {
|
||||||
|
endTime = filter.getValue();
|
||||||
|
} else if ("startYear".equals(filter.getField()) && "gte".equals(filter.getOperator())) {
|
||||||
|
startYear = toIntegerValue(filter.getValue());
|
||||||
|
} else if ("endYear".equals(filter.getField()) && "lte".equals(filter.getOperator())) {
|
||||||
|
endYear = toIntegerValue(filter.getValue());
|
||||||
|
} else if ("startMonth".equals(filter.getField()) && "gte".equals(filter.getOperator())) {
|
||||||
|
startMonth = toIntegerValue(filter.getValue());
|
||||||
|
} else if ("endMonth".equals(filter.getField()) && "lte".equals(filter.getOperator())) {
|
||||||
|
endMonth = toIntegerValue(filter.getValue());
|
||||||
|
} else if ("startDr".equals(filter.getField()) && "gte".equals(filter.getOperator())) {
|
||||||
|
startDr = toIntegerValue(filter.getValue());
|
||||||
|
} else if ("endDr".equals(filter.getField()) && "lte".equals(filter.getOperator())) {
|
||||||
|
endDr = toIntegerValue(filter.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StrUtil.isBlank(stcd)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer wtDeviceType = sdWtMonitorMapper.getWtDeviceTypeByStcd(stcd);
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("stcd", stcd);
|
||||||
|
|
||||||
|
if ("DAY".equals(drtp)) {
|
||||||
|
if (startTime == null || endTime == null) {
|
||||||
|
return emptyCxDetailResult(wtDeviceType, drtp);
|
||||||
|
}
|
||||||
|
sql.append("SELECT t1.STCD AS stcd, ")
|
||||||
|
.append("wt.STNM AS stnm, ")
|
||||||
|
.append("TO_CHAR(t1.DT, 'YYYY-MM-DD') AS dt, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.WTHG), ',') WITHIN GROUP(ORDER BY t1.VWT) AS wthg, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.VWT), ',') WITHIN GROUP(ORDER BY t1.VWT) AS vwt ")
|
||||||
|
.append("FROM SD_WTVTDAY_S t1 ")
|
||||||
|
.append("INNER JOIN SD_WT_B_H wt ON t1.STCD = wt.STCD ")
|
||||||
|
.append("WHERE t1.STCD = #{map.stcd} ")
|
||||||
|
.append("AND t1.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.STTP = 'WTVT' ")
|
||||||
|
.append("AND t1.DT <= #{map.endTime} ")
|
||||||
|
.append("AND t1.DT >= #{map.startTime} ")
|
||||||
|
.append("AND t1.WTHG IS NOT NULL ")
|
||||||
|
.append("AND t1.VWT IS NOT NULL ")
|
||||||
|
.append("GROUP BY t1.DT, t1.STCD, wt.STNM ");
|
||||||
|
paramMap.put("startTime", startTime);
|
||||||
|
paramMap.put("endTime", endTime);
|
||||||
|
} else if ("HOUR".equals(drtp)) {
|
||||||
|
if (startTime == null || endTime == null) {
|
||||||
|
return emptyCxDetailResult(wtDeviceType, drtp);
|
||||||
|
}
|
||||||
|
sql.append("SELECT t1.STCD AS stcd, ")
|
||||||
|
.append("wt.STNM AS stnm, ")
|
||||||
|
.append("TO_CHAR(t1.TM, 'YYYY-MM-DD HH24:MI:SS') AS dt, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.WTHG), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS wthg, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.VWT), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS vwt ")
|
||||||
|
.append("FROM SD_WTVT_R t1 ")
|
||||||
|
.append("INNER JOIN SD_WT_B_H wt ON t1.STCD = wt.STCD ")
|
||||||
|
.append("WHERE t1.STCD = #{map.stcd} ")
|
||||||
|
.append("AND t1.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.STTP = 'WTVT' ")
|
||||||
|
.append("AND t1.TM <= TO_DATE(#{map.endTime}, 'YYYY-MM-DD HH24:MI:SS') ")
|
||||||
|
.append("AND t1.TM >= TO_DATE(#{map.startTime}, 'YYYY-MM-DD HH24:MI:SS') ")
|
||||||
|
.append("AND t1.WTHG IS NOT NULL ")
|
||||||
|
.append("AND t1.VWT IS NOT NULL ")
|
||||||
|
.append("GROUP BY t1.TM, t1.STCD, wt.STNM ");
|
||||||
|
paramMap.put("startTime", startTime);
|
||||||
|
paramMap.put("endTime", endTime);
|
||||||
|
} else if ("YEAR".equals(drtp)) {
|
||||||
|
if (startYear == null || endYear == null) {
|
||||||
|
return emptyCxDetailResult(wtDeviceType, drtp);
|
||||||
|
}
|
||||||
|
sql.append("SELECT t1.STCD AS stcd, ")
|
||||||
|
.append("wt.STNM AS stnm, ")
|
||||||
|
.append("t1.YEAR || '年' AS dt, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.WTHG), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS wthg, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.VWT), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS vwt ")
|
||||||
|
.append("FROM SD_WTVTDRTP_S t1 ")
|
||||||
|
.append("LEFT JOIN SD_WT_B_H wt ON t1.STCD = wt.STCD ")
|
||||||
|
.append("WHERE t1.DRTP = 'YEAR' ")
|
||||||
|
.append("AND t1.STCD = #{map.stcd} ")
|
||||||
|
.append("AND t1.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.STTP = 'WTVT' ")
|
||||||
|
.append("AND t1.YEAR >= #{map.startYear} ")
|
||||||
|
.append("AND t1.YEAR <= #{map.endYear} ")
|
||||||
|
.append("GROUP BY t1.STCD, wt.STNM, t1.YEAR ");
|
||||||
|
paramMap.put("startYear", startYear);
|
||||||
|
paramMap.put("endYear", endYear);
|
||||||
|
} else if ("MON".equals(drtp)) {
|
||||||
|
if (startYear == null || endYear == null || startMonth == null || endMonth == null) {
|
||||||
|
return emptyCxDetailResult(wtDeviceType, drtp);
|
||||||
|
}
|
||||||
|
sql.append("SELECT t1.STCD AS stcd, ")
|
||||||
|
.append("wt.STNM AS stnm, ")
|
||||||
|
.append("t1.YEAR || '-' || LPAD(t1.MONTH, 2, '0') AS dt, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.WTHG), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS wthg, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.VWT), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS vwt ")
|
||||||
|
.append("FROM SD_WTVTDRTP_S t1 ")
|
||||||
|
.append("LEFT JOIN SD_WT_B_H wt ON t1.STCD = wt.STCD ")
|
||||||
|
.append("WHERE t1.DRTP = 'MON' ")
|
||||||
|
.append("AND t1.STCD = #{map.stcd} ")
|
||||||
|
.append("AND t1.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.STTP = 'WTVT' ")
|
||||||
|
.append("AND TO_DATE(t1.YEAR || '-' || t1.MONTH, 'YYYY-MM') >= TO_DATE(#{map.startYearMonth}, 'YYYY-MM') ")
|
||||||
|
.append("AND TO_DATE(t1.YEAR || '-' || t1.MONTH, 'YYYY-MM') <= TO_DATE(#{map.endYearMonth}, 'YYYY-MM') ")
|
||||||
|
.append("GROUP BY t1.STCD, wt.STNM, t1.YEAR, t1.MONTH ");
|
||||||
|
paramMap.put("startYearMonth", startYear + "-" + startMonth);
|
||||||
|
paramMap.put("endYearMonth", endYear + "-" + endMonth);
|
||||||
|
} else if ("QUA".equals(drtp)) {
|
||||||
|
if (startYear == null || endYear == null || startDr == null || endDr == null) {
|
||||||
|
return emptyCxDetailResult(wtDeviceType, drtp);
|
||||||
|
}
|
||||||
|
sql.append("SELECT t1.STCD AS stcd, ")
|
||||||
|
.append("wt.STNM AS stnm, ")
|
||||||
|
.append("t1.YEAR || '年' || t1.DR || '季度' AS dt, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.WTHG), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS wthg, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.VWT), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS vwt ")
|
||||||
|
.append("FROM SD_WTVTDRTP_S t1 ")
|
||||||
|
.append("LEFT JOIN SD_WT_B_H wt ON t1.STCD = wt.STCD ")
|
||||||
|
.append("WHERE t1.DRTP = 'QUA' ")
|
||||||
|
.append("AND t1.STCD = #{map.stcd} ")
|
||||||
|
.append("AND t1.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.STTP = 'WTVT' ")
|
||||||
|
.append("AND t1.YEAR >= #{map.startYear} ")
|
||||||
|
.append("AND t1.YEAR <= #{map.endYear} ")
|
||||||
|
.append("AND t1.DR >= #{map.startDr} ")
|
||||||
|
.append("AND t1.DR <= #{map.endDr} ")
|
||||||
|
.append("GROUP BY t1.STCD, wt.STNM, t1.YEAR, t1.DR ");
|
||||||
|
paramMap.put("startYear", startYear);
|
||||||
|
paramMap.put("endYear", endYear);
|
||||||
|
paramMap.put("startDr", startDr);
|
||||||
|
paramMap.put("endDr", endDr);
|
||||||
|
} else if ("TEN".equals(drtp)) {
|
||||||
|
if (startYear == null || endYear == null || startMonth == null || endMonth == null || startDr == null || endDr == null) {
|
||||||
|
return emptyCxDetailResult(wtDeviceType, drtp);
|
||||||
|
}
|
||||||
|
sql.append("SELECT t1.STCD AS stcd, ")
|
||||||
|
.append("wt.STNM AS stnm, ")
|
||||||
|
.append("t1.YEAR || '年' || t1.MONTH || '月' || CASE t1.DR WHEN 1 THEN '上' WHEN 2 THEN '中' WHEN 3 THEN '下' ELSE '' END || '旬' AS dt, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.WTHG), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS wthg, ")
|
||||||
|
.append("LISTAGG(TO_CHAR(t1.VWT), ',') WITHIN GROUP(ORDER BY t1.WTHG) AS vwt ")
|
||||||
|
.append("FROM SD_WTVTDRTP_S t1 ")
|
||||||
|
.append("LEFT JOIN SD_WT_B_H wt ON t1.STCD = wt.STCD ")
|
||||||
|
.append("WHERE t1.DRTP = 'TEN' ")
|
||||||
|
.append("AND t1.STCD = #{map.stcd} ")
|
||||||
|
.append("AND t1.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.IS_DELETED = 0 ")
|
||||||
|
.append("AND wt.STTP = 'WTVT' ")
|
||||||
|
.append("AND t1.YEAR >= #{map.startYear} ")
|
||||||
|
.append("AND t1.YEAR <= #{map.endYear} ")
|
||||||
|
.append("AND t1.MONTH >= #{map.startMonth} ")
|
||||||
|
.append("AND t1.MONTH <= #{map.endMonth} ")
|
||||||
|
.append("AND t1.DR >= #{map.startDr} ")
|
||||||
|
.append("AND t1.DR <= #{map.endDr} ")
|
||||||
|
.append("GROUP BY t1.STCD, wt.STNM, t1.YEAR, t1.MONTH, t1.DR ");
|
||||||
|
paramMap.put("startYear", startYear);
|
||||||
|
paramMap.put("endYear", endYear);
|
||||||
|
paramMap.put("startMonth", startMonth);
|
||||||
|
paramMap.put("endMonth", endMonth);
|
||||||
|
paramMap.put("startDr", startDr);
|
||||||
|
paramMap.put("endDr", endDr);
|
||||||
|
} else {
|
||||||
|
return emptyCxDetailResult(wtDeviceType, drtp);
|
||||||
|
}
|
||||||
|
|
||||||
|
appendCxDetailOrderBy(sql, dataSourceRequest.getSort());
|
||||||
|
Page<?> page = buildPage(dataSourceRequest.toDevRequest());
|
||||||
|
List<WtCxDetailRow> rowList = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, WtCxDetailRow.class);
|
||||||
|
|
||||||
|
List<Double> verticalList = getVerticals(rowList, wtDeviceType);
|
||||||
|
List<Map<String, Object>> resultData = new ArrayList<>();
|
||||||
|
for (WtCxDetailRow row : rowList) {
|
||||||
|
Map<String, Object> result = new LinkedHashMap<>();
|
||||||
|
result.put("stcd", row.getStcd());
|
||||||
|
result.put("stnm", row.getStnm());
|
||||||
|
result.put("dt", row.getDt());
|
||||||
|
|
||||||
|
Map<String, Object> dataList = new LinkedHashMap<>();
|
||||||
|
for (Double vertical : verticalList) {
|
||||||
|
dataList.put(Double.toString(vertical), "-");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> wthgList = splitValue(row.getWthg());
|
||||||
|
List<String> vwtList = splitValue(row.getVwt());
|
||||||
|
for (int i = 0; i < wthgList.size(); i++) {
|
||||||
|
try {
|
||||||
|
Double wthg = Double.parseDouble(wthgList.get(i));
|
||||||
|
String key = Double.toString(wthg);
|
||||||
|
String vwt = i < vwtList.size() ? vwtList.get(i) : null;
|
||||||
|
dataList.put(key, vwt);
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result.put("dataList", dataList);
|
||||||
|
resultData.add(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Map<String, Object>> columns = new ArrayList<>();
|
||||||
|
columns.add(buildColumn("stnm", "测站名称", true, "stnm", false, null, null));
|
||||||
|
String dateFormat = "yyyy-MM-dd HH:mm";
|
||||||
|
if ("DAY".equals(drtp)) {
|
||||||
|
dateFormat = "yyyy-MM-dd";
|
||||||
|
} else if ("MON".equals(drtp)) {
|
||||||
|
dateFormat = "yyyy-MM";
|
||||||
|
}
|
||||||
|
columns.add(buildColumn("dt", "时间", true, "dt", false, "date", dateFormat));
|
||||||
|
for (Double vertical : verticalList) {
|
||||||
|
String key = Double.toString(vertical);
|
||||||
|
String title = (wtDeviceType == null || wtDeviceType == 1) ? "水深" + vertical + "m(℃)" : "高程" + vertical + "m(℃)";
|
||||||
|
columns.add(buildColumn(key, title, true, key, false, null, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> table = new LinkedHashMap<>();
|
||||||
|
table.put("columns", columns);
|
||||||
|
table.put("dataSource", resultData);
|
||||||
|
table.put("wtDeviceType", wtDeviceType);
|
||||||
|
|
||||||
|
DataSourceResult<Map<String, Object>> result = new DataSourceResult<>();
|
||||||
|
result.setData(Collections.singletonList(table));
|
||||||
|
result.setTotal(page != null ? page.getTotal() : rowList.size());
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Page<?> buildPage(DataSourceLoadOptionsBase loadOptions) {
|
||||||
|
PageInfo pageInfo = QgcQueryWrapperUtil.getPageInfo(loadOptions);
|
||||||
|
if (Boolean.TRUE.equals(pageInfo.getHasPageInfo())) {
|
||||||
|
return pageInfo.getPage();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildVmsstbprptOrderBySql(List<DataSourceRequest.SortDescriptor> sortList) {
|
||||||
|
List<String> orderColumns = new ArrayList<>();
|
||||||
|
if (sortList != null) {
|
||||||
|
for (DataSourceRequest.SortDescriptor sortDescriptor : sortList) {
|
||||||
|
String field = sortDescriptor.getField();
|
||||||
|
String dir = "desc".equalsIgnoreCase(sortDescriptor.getDir()) ? "DESC" : "ASC";
|
||||||
|
if ("baseStepSort".equals(field)) {
|
||||||
|
orderColumns.add("NVL(hb.ORDER_INDEX, 999999) " + dir);
|
||||||
|
} else if ("hbrvcd".equals(field)) {
|
||||||
|
orderColumns.add("NVL(eng.HBRVCD, '~') " + dir);
|
||||||
|
} else if ("rstcdStepSort".equals(field)) {
|
||||||
|
orderColumns.add("NVL(eng.ORDER_INDEX, 999999) " + dir);
|
||||||
|
} else if ("siteStepSort".equals(field)) {
|
||||||
|
orderColumns.add("NVL(wt.ORDER_INDEX, 999999) " + dir);
|
||||||
|
} else if ("stnm".equals(field)) {
|
||||||
|
orderColumns.add("wt.STNM " + dir);
|
||||||
|
} else if ("ennm".equals(field)) {
|
||||||
|
orderColumns.add("eng.ENNM " + dir);
|
||||||
|
} else if ("stcd".equals(field)) {
|
||||||
|
orderColumns.add("wt.STCD " + dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (orderColumns.isEmpty()) {
|
||||||
|
return " ORDER BY NVL(hb.ORDER_INDEX, 999999) ASC, NVL(eng.HBRVCD, '~') ASC, NVL(eng.ORDER_INDEX, 999999) ASC, NVL(wt.ORDER_INDEX, 999999) ASC";
|
||||||
|
}
|
||||||
|
return " ORDER BY " + String.join(", ", orderColumns);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void collectFilters(DataSourceRequest.FilterDescriptor filter, List<DataSourceRequest.FilterDescriptor> result) {
|
||||||
|
if (filter == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (filter.getFilters() == null || filter.getFilters().isEmpty()) {
|
||||||
|
if (StrUtil.isNotBlank(filter.getField())) {
|
||||||
|
result.add(filter);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (DataSourceRequest.FilterDescriptor child : filter.getFilters()) {
|
||||||
|
collectFilters(child, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String toStringValue(Object value) {
|
||||||
|
return value == null ? null : String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer toIntegerValue(Object value) {
|
||||||
|
if (value == null || StrUtil.isBlank(String.valueOf(value))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return Integer.parseInt(String.valueOf(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void appendCxDetailOrderBy(StringBuilder sql, List<DataSourceRequest.SortDescriptor> sortList) {
|
||||||
|
if (sortList == null || sortList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<String> orderColumns = new ArrayList<>();
|
||||||
|
for (DataSourceRequest.SortDescriptor sortDescriptor : sortList) {
|
||||||
|
String dir = "desc".equalsIgnoreCase(sortDescriptor.getDir()) ? "DESC" : "ASC";
|
||||||
|
if ("dt".equals(sortDescriptor.getField())) {
|
||||||
|
orderColumns.add("dt " + dir);
|
||||||
|
} else if ("stcd".equals(sortDescriptor.getField())) {
|
||||||
|
orderColumns.add("stcd " + dir);
|
||||||
|
} else if ("stnm".equals(sortDescriptor.getField())) {
|
||||||
|
orderColumns.add("stnm " + dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!orderColumns.isEmpty()) {
|
||||||
|
sql.append(" ORDER BY ").append(String.join(", ", orderColumns));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> emptyTableList(Integer wtDeviceType, String drtp) {
|
||||||
|
List<Map<String, Object>> columns = new ArrayList<>();
|
||||||
|
columns.add(buildColumn("stnm", "测站名称", true, "stnm", false, null, null));
|
||||||
|
String dateFormat = "yyyy-MM-dd HH:mm";
|
||||||
|
if ("DAY".equals(drtp)) {
|
||||||
|
dateFormat = "yyyy-MM-dd";
|
||||||
|
} else if ("MON".equals(drtp)) {
|
||||||
|
dateFormat = "yyyy-MM";
|
||||||
|
}
|
||||||
|
columns.add(buildColumn("dt", "时间", true, "dt", false, "date", dateFormat));
|
||||||
|
Map<String, Object> table = new LinkedHashMap<>();
|
||||||
|
table.put("columns", columns);
|
||||||
|
table.put("dataSource", new ArrayList<>());
|
||||||
|
table.put("wtDeviceType", wtDeviceType);
|
||||||
|
return Collections.singletonList(table);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataSourceResult emptyCxDetailResult(Integer wtDeviceType, String drtp) {
|
||||||
|
DataSourceResult<Map<String, Object>> result = new DataSourceResult<>();
|
||||||
|
result.setData(emptyTableList(wtDeviceType, drtp));
|
||||||
|
result.setTotal(0);
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, Object> buildColumn(String dataIndex,
|
||||||
|
String title,
|
||||||
|
boolean visible,
|
||||||
|
String key,
|
||||||
|
boolean merge,
|
||||||
|
String dataType,
|
||||||
|
String dataFormat) {
|
||||||
|
Map<String, Object> column = new LinkedHashMap<>();
|
||||||
|
column.put("dataIndex", dataIndex);
|
||||||
|
column.put("title", title);
|
||||||
|
column.put("visible", visible);
|
||||||
|
column.put("key", key);
|
||||||
|
column.put("unit", null);
|
||||||
|
column.put("merge", merge);
|
||||||
|
column.put("dataType", dataType);
|
||||||
|
column.put("dataFormat", dataFormat);
|
||||||
|
column.put("children", new ArrayList<>());
|
||||||
|
return column;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> splitValue(String value) {
|
||||||
|
if (StrUtil.isBlank(value)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
String[] values = value.split(",");
|
||||||
|
List<String> result = new ArrayList<>(values.length);
|
||||||
|
for (String item : values) {
|
||||||
|
result.add(item == null ? null : item.trim());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Double> getVerticals(List<WtCxDetailRow> rowList, Integer wtDeviceType) {
|
||||||
|
List<Double> verticals = new ArrayList<>();
|
||||||
|
for (WtCxDetailRow row : rowList) {
|
||||||
|
for (String wthg : splitValue(row.getWthg())) {
|
||||||
|
try {
|
||||||
|
verticals.add(Double.parseDouble(wthg));
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return verticals.stream()
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.distinct()
|
||||||
|
.sorted((wtDeviceType == null || wtDeviceType == 1) ? Comparator.naturalOrder() : Comparator.reverseOrder())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillFishList(List<WtFishVo> wtFishVoList, List<FishSpawnVo> fishSpawnVoList) {
|
||||||
|
if (wtFishVoList == null || wtFishVoList.isEmpty() || fishSpawnVoList == null || fishSpawnVoList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (WtFishVo wtFishVo : wtFishVoList) {
|
||||||
|
List<FishSpawnVo> fishList = new ArrayList<>();
|
||||||
|
Date dt = wtFishVo.getDt();
|
||||||
|
BigDecimal wt = wtFishVo.getWt();
|
||||||
|
if (dt == null || wt == null) {
|
||||||
|
wtFishVo.setFishList(fishList);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
calendar.setTime(dt);
|
||||||
|
int month = calendar.get(Calendar.MONTH) + 1;
|
||||||
|
for (FishSpawnVo fishSpawnVo : fishSpawnVoList) {
|
||||||
|
if (!matchSpawnMonth(fishSpawnVo.getSpawnMonthStr(), month)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
BigDecimal[] range = parsePretempRange(fishSpawnVo.getPretempStr());
|
||||||
|
if (range == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (wt.compareTo(range[0]) >= 0 && wt.compareTo(range[1]) <= 0) {
|
||||||
|
fishList.add(fishSpawnVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wtFishVo.setFishList(fishList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean matchSpawnMonth(String spawnMonthStr, int month) {
|
||||||
|
if (StrUtil.isBlank(spawnMonthStr)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (String monthStr : spawnMonthStr.split(",")) {
|
||||||
|
if (StrUtil.isBlank(monthStr)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (Integer.parseInt(monthStr.trim()) == month) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BigDecimal[] parsePretempRange(String pretempStr) {
|
||||||
|
if (StrUtil.isBlank(pretempStr)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String temp = pretempStr.replace("℃", "").trim();
|
||||||
|
String[] split = temp.contains("~") ? temp.split("~") : temp.split("~");
|
||||||
|
if (split.length != 2) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return new BigDecimal[]{new BigDecimal(split[0].trim()), new BigDecimal(split[1].trim())};
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillFishSpawnMeta(FishSpawnVo fishSpawnVo) {
|
||||||
|
if (fishSpawnVo == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BigDecimal[] range = parsePretempRange(fishSpawnVo.getPretempStr());
|
||||||
|
if (range != null) {
|
||||||
|
List<String> preTempList = new ArrayList<>(2);
|
||||||
|
preTempList.add(range[0].stripTrailingZeros().toPlainString());
|
||||||
|
preTempList.add(range[1].stripTrailingZeros().toPlainString());
|
||||||
|
fishSpawnVo.setPretemp(preTempList);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(fishSpawnVo.getSpawnMonthStr())) {
|
||||||
|
List<String> spawnList = new ArrayList<>();
|
||||||
|
for (String str : Arrays.asList(fishSpawnVo.getSpawnMonthStr().split(","))) {
|
||||||
|
if (StrUtil.isBlank(str)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String month = str.trim();
|
||||||
|
try {
|
||||||
|
if (Integer.parseInt(month) < 10 && month.length() == 1) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException ignored) {
|
||||||
|
}
|
||||||
|
spawnList.add(month);
|
||||||
|
}
|
||||||
|
fishSpawnVo.setSpawnMonth(spawnList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private WtrvVo buildDefaultWtrvVo(String stcd) {
|
||||||
|
WtrvVo vo = new WtrvVo();
|
||||||
|
vo.setStcd(stcd);
|
||||||
|
vo.setIsIoWtrv(false);
|
||||||
|
vo.setHasRstcdWtvt(false);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Boolean toBooleanValue(Object value) {
|
||||||
|
if (value == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (value instanceof Boolean boolValue) {
|
||||||
|
return boolValue;
|
||||||
|
}
|
||||||
|
if (value instanceof Number number) {
|
||||||
|
return number.intValue() != 0;
|
||||||
|
}
|
||||||
|
String strValue = String.valueOf(value).trim();
|
||||||
|
return "1".equals(strValue) || "true".equalsIgnoreCase(strValue) || "Y".equalsIgnoreCase(strValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
private static class WtCxDetailRow {
|
||||||
|
private String stcd;
|
||||||
|
private String dt;
|
||||||
|
private String stnm;
|
||||||
|
private String wthg;
|
||||||
|
private String vwt;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,21 +1,19 @@
|
|||||||
package com.yfd.platform.env.wt.service.impl;
|
package com.yfd.platform.env.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||||
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.common.MicroservicDynamicSQLMapper;
|
import com.yfd.platform.env.entity.vo.SdWtvtYearVo;
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdWtvtYearVo;
|
import com.yfd.platform.env.mapper.SdWtvtRMapper;
|
||||||
import com.yfd.platform.env.wt.mapper.SdWtvtRMapper;
|
import com.yfd.platform.env.service.SdWtvtRService;
|
||||||
import com.yfd.platform.env.wt.service.SdWtvtRService;
|
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
|
import com.yfd.platform.utils.QueryWrapperUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 垂向水温Service实现类
|
* 垂向水温Service实现类
|
||||||
@ -29,45 +27,21 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
|||||||
@Resource
|
@Resource
|
||||||
private SdWtvtRMapper sdWtvtRMapper;
|
private SdWtvtRMapper sdWtvtRMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MicroservicDynamicSQLMapper microservicDynamicSQLMapper;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataSourceResult getWtrvDefaultYear(DataSourceRequest dataSourceRequest) {
|
public DataSourceResult getWtrvDefaultYear(DataSourceRequest dataSourceRequest) {
|
||||||
DataSourceResult<SdWtvtYearVo> dataSourceResult = new DataSourceResult<>();
|
DataSourceResult<SdWtvtYearVo> dataSourceResult = new DataSourceResult<>();
|
||||||
DataSourceLoadOptionsBase loadOptionsBase = dataSourceRequest.toDevRequest();
|
DataSourceLoadOptionsBase loadOptionsBase = dataSourceRequest.toDevRequest();
|
||||||
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptionsBase, "stcd");
|
String stcd = QgcQueryWrapperUtil.getFilterFieldValue(loadOptionsBase, "stcd");
|
||||||
String baseId = QgcQueryWrapperUtil.getFilterFieldValue(loadOptionsBase, "baseId");
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(stcd)) {
|
if (StringUtils.isNotBlank(stcd)) {
|
||||||
stcd = stcd.replaceAll("\\[", "")
|
stcd = stcd.replaceAll("\\[", "")
|
||||||
.replaceAll("]", "")
|
.replaceAll("]", "")
|
||||||
.replaceAll("\"", "");
|
.replaceAll("\"", "");
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(baseId) && !matchWtvtBaseId(stcd, baseId)) {
|
|
||||||
dataSourceResult.setTotal(0L);
|
|
||||||
dataSourceResult.setData(List.of());
|
|
||||||
return dataSourceResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<SdWtvtYearVo> result = sdWtvtRMapper.getWtrvDefaultYear(stcd);
|
List<SdWtvtYearVo> result = sdWtvtRMapper.getWtrvDefaultYear(stcd);
|
||||||
dataSourceResult.setTotal(result.size());
|
dataSourceResult.setTotal(result.size());
|
||||||
dataSourceResult.setData(result);
|
dataSourceResult.setData(result);
|
||||||
return dataSourceResult;
|
return dataSourceResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean matchWtvtBaseId(String stcd, String baseId) {
|
|
||||||
String sql = "SELECT 1 AS flag " +
|
|
||||||
"FROM SD_WT_B_H wt " +
|
|
||||||
"INNER JOIN SD_ENGINFO_B_H eng ON eng.STCD = wt.RSTCD " +
|
|
||||||
"WHERE NVL(wt.IS_DELETED, 0) = 0 " +
|
|
||||||
" AND wt.STTP = 'WTVT' " +
|
|
||||||
" AND wt.STCD = #{map.stcd} " +
|
|
||||||
" AND eng.BASE_ID = #{map.baseId}";
|
|
||||||
Map<String, Object> paramMap = new HashMap<>();
|
|
||||||
paramMap.put("stcd", stcd);
|
|
||||||
paramMap.put("baseId", baseId);
|
|
||||||
List<Map<String, Object>> result = microservicDynamicSQLMapper.pageAllList(null, sql, paramMap);
|
|
||||||
return result != null && !result.isEmpty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,109 +0,0 @@
|
|||||||
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/GetKendoListCust")
|
|
||||||
@Operation(summary = "水质明细数据查询")
|
|
||||||
public ResponseResult getDataKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.processDataKendoList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/GetStbprpYsByStcd")
|
|
||||||
@Operation(summary = "水质监测数据查询")
|
|
||||||
public ResponseResult GetStbprpYsByStcd(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getStbprpYsByStcd(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/stbprp/GetStbprpYsByStcd")
|
|
||||||
@Operation(summary = "水质监测信息查询")
|
|
||||||
public ResponseResult getStTbYsBVoKendoListCust(
|
|
||||||
@RequestParam String stcd,
|
|
||||||
@RequestParam String tbCode,
|
|
||||||
@RequestParam String startTime,
|
|
||||||
@RequestParam String endTime) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getStTbYsBVoKendoListCust(stcd, tbCode, startTime, endTime));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/stTbYs/GetStTbYsBVoKendoListCust")
|
|
||||||
@Operation(summary = "水质监测信息查询")
|
|
||||||
public ResponseResult getStTbYsBVoKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getStTbYsBVoKendoListCust(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/data/noAuth/GetKendoListCust")
|
|
||||||
@Operation(summary = "水质统计分析(完成)")
|
|
||||||
public ResponseResult getNoAuthKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.processDataKendoList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/along/qgc/GetKendoListCust")
|
|
||||||
@Operation(summary = "查询时间范围内沿程水质最新时间的数据")
|
|
||||||
public ResponseResult getAlongWqKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getAlongWqKendoListCust(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/along/default/rvcd")
|
|
||||||
@Operation(summary = "获取水质沿程变化默认有数据的河流")
|
|
||||||
public ResponseResult getAlongDefaultRvcd(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getAlongDefaultRvcd(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/msstbprpt/GetKendoList")
|
|
||||||
@Operation(summary = "查询水质基础站点分组统计")
|
|
||||||
public ResponseResult getMsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getMsstbprptList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
// @PostMapping("/base/msstbprpt/GetKendoList")
|
|
||||||
// @Operation(summary = "查询水质基础站点分组统计")
|
|
||||||
// public ResponseResult getBaseMsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
// return ResponseResult.successData(envWqDataService.getMsstbprptList(dataSourceRequest));
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/wbsb/GetKendoList")
|
|
||||||
@Operation(summary = "查询水电基地流域字典列表")
|
|
||||||
public ResponseResult getWbsbList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getWbsbList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping("/vmsstbprpt/GetKendoList")
|
|
||||||
@Operation(summary = "根据条件查询水质基础站点数据(完成)")
|
|
||||||
public ResponseResult getVmsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getVmsstbprptList(dataSourceRequest));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/msstbprpt/getStcdInfo")
|
|
||||||
@Operation(summary = "根据站码查询单条水质基础数据(完成)")
|
|
||||||
public ResponseResult getStcdInfo(@RequestParam String stcd) {
|
|
||||||
return ResponseResult.successData(envWqDataService.getStcdInfo(stcd));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,144 +0,0 @@
|
|||||||
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<Map<String, Object>> min;
|
|
||||||
@Schema(description = "水质要素最大限值集合")
|
|
||||||
private List<Map<String, Object>> max;
|
|
||||||
}
|
|
||||||
@ -1,239 +0,0 @@
|
|||||||
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<Map<String, Object>> min;
|
|
||||||
|
|
||||||
@Schema(description = "水质要素最大限值集合")
|
|
||||||
private List<Map<String, Object>> 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;
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
package com.yfd.platform.env.wq.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "监测表要素配置")
|
|
||||||
public class StTbYsVo {
|
|
||||||
|
|
||||||
@Schema(description = "主键")
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Schema(description = "所属监测表ID")
|
|
||||||
private String tbId;
|
|
||||||
|
|
||||||
@Schema(description = "监测表名称")
|
|
||||||
private String tbName;
|
|
||||||
|
|
||||||
@Schema(description = "监测表编码")
|
|
||||||
private String tbCode;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
@Schema(description = "要素编码")
|
|
||||||
private String ys;
|
|
||||||
|
|
||||||
@Schema(description = "要素显示名称")
|
|
||||||
private String ysShowName;
|
|
||||||
|
|
||||||
@Schema(description = "显示控制")
|
|
||||||
private String showControl;
|
|
||||||
|
|
||||||
@Schema(description = "是否启用")
|
|
||||||
private String enable;
|
|
||||||
|
|
||||||
@Schema(description = "排序")
|
|
||||||
private Integer orderIndex;
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
package com.yfd.platform.env.wq.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "对象监测要素配置")
|
|
||||||
public class StbprpYsVo {
|
|
||||||
|
|
||||||
@Schema(description = "对象编码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "要素编码")
|
|
||||||
private String ys;
|
|
||||||
|
|
||||||
@Schema(description = "监测表ID")
|
|
||||||
private String tbId;
|
|
||||||
|
|
||||||
@Schema(description = "要素显示名称")
|
|
||||||
private String ysShowName;
|
|
||||||
|
|
||||||
@Schema(description = "显示控制")
|
|
||||||
private String showControl;
|
|
||||||
|
|
||||||
@Schema(description = "是否启用")
|
|
||||||
private String enable;
|
|
||||||
|
|
||||||
@Schema(description = "字段数据类型")
|
|
||||||
private String dataType;
|
|
||||||
|
|
||||||
@Schema(description = "标准单位ID")
|
|
||||||
private String standardUomId;
|
|
||||||
|
|
||||||
@Schema(description = "监测表名称")
|
|
||||||
private String tbName;
|
|
||||||
|
|
||||||
@Schema(description = "实时表名")
|
|
||||||
private String tb;
|
|
||||||
|
|
||||||
@Schema(description = "监测表编码")
|
|
||||||
private String tbCode;
|
|
||||||
|
|
||||||
@Schema(description = "日统计表")
|
|
||||||
private String dayTb;
|
|
||||||
|
|
||||||
@Schema(description = "时间维度统计表")
|
|
||||||
private String statTb;
|
|
||||||
|
|
||||||
@Schema(description = "最新数据表")
|
|
||||||
private String lastTb;
|
|
||||||
|
|
||||||
@Schema(description = "数据源ID")
|
|
||||||
private String dataSourceId;
|
|
||||||
|
|
||||||
@Schema(description = "站类监测表要素关联ID")
|
|
||||||
private String sttpTbYsBId;
|
|
||||||
|
|
||||||
@Schema(description = "最小值")
|
|
||||||
private BigDecimal minVal;
|
|
||||||
|
|
||||||
@Schema(description = "最大值")
|
|
||||||
private BigDecimal maxVal;
|
|
||||||
}
|
|
||||||
@ -1,155 +0,0 @@
|
|||||||
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<Map<String, Object>> min;
|
|
||||||
|
|
||||||
@Schema(description = "水质要素最大限值集合")
|
|
||||||
private List<Map<String, Object>> max;
|
|
||||||
}
|
|
||||||
@ -1,152 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package com.yfd.platform.env.wq.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "水质基础站点分组统计")
|
|
||||||
public class WqMsstbprptGroupVo {
|
|
||||||
|
|
||||||
@Schema(description = "数据接入类型")
|
|
||||||
private Integer dtinType;
|
|
||||||
|
|
||||||
@Schema(description = "数据接入类型分组数量")
|
|
||||||
private Integer countDtinType;
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
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 processDataKendoList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getStbprpYsByStcd(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getAlongWqKendoListCust(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getAlongDefaultRvcd(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getMsstbprptList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getVmsstbprptList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
WqBaseInfoVo getStcdInfo(String stcd);
|
|
||||||
|
|
||||||
DataSourceResult getWbsbList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getStTbYsBVoKendoListCust(String stcd, String tbCode, String startTime, String endTime);
|
|
||||||
|
|
||||||
DataSourceResult getStTbYsBVoKendoListCust(DataSourceRequest dataSourceRequest);
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,29 +0,0 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "低温水减缓设施数量统计")
|
|
||||||
public class DfltkwFacilityCountVo implements Serializable {
|
|
||||||
|
|
||||||
@Schema(description = "类型编码")
|
|
||||||
private String dwtp;
|
|
||||||
|
|
||||||
@Schema(description = "类型名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Schema(description = "已接入数量")
|
|
||||||
private Integer accessNum;
|
|
||||||
|
|
||||||
@Schema(description = "已建数量")
|
|
||||||
private Integer buildNum;
|
|
||||||
|
|
||||||
@Schema(description = "在建数量")
|
|
||||||
private Integer zjNum;
|
|
||||||
|
|
||||||
@Schema(description = "总数量")
|
|
||||||
private Integer totalNum;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
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.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "电站-站点树形结构")
|
|
||||||
public class RstcdTreeInfoVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "电站编码")
|
|
||||||
private String rstcd;
|
|
||||||
|
|
||||||
@Schema(description = "电站名称")
|
|
||||||
private String ennm;
|
|
||||||
|
|
||||||
@Schema(description = "测站数据")
|
|
||||||
private List<WtTreeStcdVo> stcdVo = new ArrayList<>();
|
|
||||||
}
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(description = "月平均水温历史对比二级列表")
|
|
||||||
public class SdMonthDetailVO {
|
|
||||||
|
|
||||||
@Schema(description = "站码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "日期")
|
|
||||||
private Date dt;
|
|
||||||
|
|
||||||
@Schema(description = "日均水温实测值")
|
|
||||||
private BigDecimal wt;
|
|
||||||
|
|
||||||
@Schema(description = "日均水温去年同期")
|
|
||||||
private BigDecimal beforeWt;
|
|
||||||
|
|
||||||
@Schema(description = "天然值")
|
|
||||||
private BigDecimal actualTemp;
|
|
||||||
|
|
||||||
@Schema(description = "站点类型")
|
|
||||||
private String sttp;
|
|
||||||
|
|
||||||
@Schema(description = "站点类型编码")
|
|
||||||
private String sttpCode;
|
|
||||||
|
|
||||||
@Schema(description = "站名")
|
|
||||||
private String stnm;
|
|
||||||
}
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
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.util.Date;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "水温表基本数据")
|
|
||||||
public class SdWtBaseInfoVO implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "基地Id")
|
|
||||||
private String baseId;
|
|
||||||
@Schema(description = "基地名称")
|
|
||||||
private String baseName;
|
|
||||||
|
|
||||||
@Schema(description = "基地排序")
|
|
||||||
private Integer baseStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "流域排序")
|
|
||||||
private Integer rvcdStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "电站排序")
|
|
||||||
private Integer rstcdStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "站点排序")
|
|
||||||
private Integer siteStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "站名")
|
|
||||||
private String stnm;
|
|
||||||
|
|
||||||
@Schema(description = "电站名称")
|
|
||||||
private String ennm;
|
|
||||||
|
|
||||||
@Schema(description = "建成日期")
|
|
||||||
private Date jcdt;
|
|
||||||
|
|
||||||
@Schema(description = "开工日期")
|
|
||||||
private Date ststdt;
|
|
||||||
|
|
||||||
@Schema(description = "建设状态")
|
|
||||||
private String bldsttCcodeName;
|
|
||||||
|
|
||||||
@Schema(description = "接入状态")
|
|
||||||
private String dtinName;
|
|
||||||
|
|
||||||
@Schema(description = "监测指标")
|
|
||||||
private String stindx;
|
|
||||||
|
|
||||||
@Schema(description = "开展环保自动检测工作状态:1=正常 0=暂无数据")
|
|
||||||
private Integer coenvwState;
|
|
||||||
|
|
||||||
@Schema(description = "站类")
|
|
||||||
private String sttpCode;
|
|
||||||
|
|
||||||
@Schema(description = "站类名称")
|
|
||||||
private String sttpName;
|
|
||||||
|
|
||||||
@Schema(description = "站类全路径")
|
|
||||||
private String sttpFullPath;
|
|
||||||
|
|
||||||
@Schema(description = "站码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "所属电站编码")
|
|
||||||
private String rstcd;
|
|
||||||
|
|
||||||
@Schema(description = "所属测站编码")
|
|
||||||
private String stCode;
|
|
||||||
|
|
||||||
@Schema(description = "所属测站名称")
|
|
||||||
private String stName;
|
|
||||||
|
|
||||||
@Schema(description = "开发方式")
|
|
||||||
private String dvtp;
|
|
||||||
|
|
||||||
@Schema(description = "基地流域编码")
|
|
||||||
private String hbrvcd;
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(description = "水温年内分布二级列表")
|
|
||||||
public class SdYearDetailVO {
|
|
||||||
|
|
||||||
@Schema(description = "站码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "站名")
|
|
||||||
private String stnm;
|
|
||||||
|
|
||||||
@Schema(description = "时间")
|
|
||||||
private Date dt;
|
|
||||||
|
|
||||||
@Schema(description = "月份排序值")
|
|
||||||
private Integer monthInt;
|
|
||||||
|
|
||||||
@Schema(description = "月份")
|
|
||||||
private String month;
|
|
||||||
|
|
||||||
@Schema(description = "实测值水温")
|
|
||||||
private BigDecimal actualTemp;
|
|
||||||
|
|
||||||
@Schema(description = "水温")
|
|
||||||
private BigDecimal wt;
|
|
||||||
|
|
||||||
@Schema(description = "天然水温")
|
|
||||||
private BigDecimal naturalTemp;
|
|
||||||
|
|
||||||
@Schema(description = "天然水温累计值")
|
|
||||||
private BigDecimal sumVal;
|
|
||||||
|
|
||||||
@Schema(description = "天然水温累计条数")
|
|
||||||
private Integer sumCount;
|
|
||||||
|
|
||||||
@Schema(description = "类型")
|
|
||||||
private String sttp;
|
|
||||||
|
|
||||||
@Schema(description = "去年同期")
|
|
||||||
private BigDecimal beforeWt;
|
|
||||||
}
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
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.util.Date;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "站类信息表")
|
|
||||||
public class SttpInfoVo implements Serializable {
|
|
||||||
|
|
||||||
private String id;
|
|
||||||
private String recordUser;
|
|
||||||
private Date recordTime;
|
|
||||||
private Date modifyTime;
|
|
||||||
private String displayRecordUser;
|
|
||||||
private String isolateType;
|
|
||||||
private Integer stbprpCnt;
|
|
||||||
private String recordUserName;
|
|
||||||
private String modifyUserName;
|
|
||||||
private String displayDepartment;
|
|
||||||
private String sttpCode;
|
|
||||||
private String sttpName;
|
|
||||||
private String description;
|
|
||||||
private String parentId;
|
|
||||||
private Integer enable;
|
|
||||||
private Integer treeLevel;
|
|
||||||
private Integer hasChildren;
|
|
||||||
private String fullPath;
|
|
||||||
private Integer internal;
|
|
||||||
private String introduce;
|
|
||||||
private String logo;
|
|
||||||
private String inffile;
|
|
||||||
private Integer orderIndex;
|
|
||||||
private String filterContent;
|
|
||||||
private Integer isTempStorage;
|
|
||||||
private String departmentId;
|
|
||||||
private String systemId;
|
|
||||||
private String platformId;
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
package com.yfd.platform.env.wt.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Schema(description = "垂向水温树形站点")
|
|
||||||
public class WtTreeStcdVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@Schema(description = "站码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@Schema(description = "站名")
|
|
||||||
private String stnm;
|
|
||||||
|
|
||||||
@Schema(description = "电站排序")
|
|
||||||
private Integer rstcdStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "所属电站编码")
|
|
||||||
private String rstcd;
|
|
||||||
|
|
||||||
@Schema(description = "所属电站名称")
|
|
||||||
private String ennm;
|
|
||||||
|
|
||||||
@Schema(description = "经度")
|
|
||||||
private String lgtd;
|
|
||||||
|
|
||||||
@Schema(description = "纬度")
|
|
||||||
private String lttd;
|
|
||||||
|
|
||||||
@Schema(description = "监测方式")
|
|
||||||
private Integer mway;
|
|
||||||
|
|
||||||
@Schema(description = "垂向水温类型:1=浮动式 2=固定式")
|
|
||||||
private Integer wtDeviceType;
|
|
||||||
|
|
||||||
@Schema(description = "所属流域")
|
|
||||||
private String hbrvcd;
|
|
||||||
|
|
||||||
@Schema(description = "站点排序")
|
|
||||||
private Integer orderIndex;
|
|
||||||
|
|
||||||
@Schema(description = "基地编码")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "基地排序")
|
|
||||||
private Integer baseStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "站点排序")
|
|
||||||
private Integer siteStepSort;
|
|
||||||
|
|
||||||
@Schema(description = "范围内是否有日数据")
|
|
||||||
private Integer sort;
|
|
||||||
}
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
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.DfltkwFacilityCountVo;
|
|
||||||
import com.yfd.platform.env.wt.entity.vo.FishSpawnVo;
|
|
||||||
import com.yfd.platform.env.wt.entity.vo.RstcdTreeInfoVo;
|
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdMonthDetailVO;
|
|
||||||
import com.yfd.platform.env.wt.entity.vo.SdYearDetailVO;
|
|
||||||
import com.yfd.platform.env.wt.entity.vo.SttpInfoVo;
|
|
||||||
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(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getVmsstbprptList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getCxDetailList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult getWtFishAnalysis(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult<FishSpawnVo> getWtFishInfo(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
WtrvVo getFlagByStcd(String stcd);
|
|
||||||
|
|
||||||
DataSourceResult<WbsbVo> getWbsbList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult<DfltkwFacilityCountVo> getDfltkwFacilityCount(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult<SttpInfoVo> getSttpbList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult<SdYearDetailVO> getYearDetailList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
DataSourceResult<SdMonthDetailVO> getMonthDetailList(DataSourceRequest dataSourceRequest);
|
|
||||||
|
|
||||||
List<RstcdTreeInfoVo> getWtvtDefaultTreeStcd(DataSourceRequest dataSourceRequest);
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -44,13 +44,9 @@ public class KendoUtil extends ReflectUtil {
|
|||||||
DataSourceRequest.GroupDescriptor groupingInfo = (DataSourceRequest.GroupDescriptor)groupDescriptorList.get(i);
|
DataSourceRequest.GroupDescriptor groupingInfo = (DataSourceRequest.GroupDescriptor)groupDescriptorList.get(i);
|
||||||
String selector = groupingInfo.getField();
|
String selector = groupingInfo.getField();
|
||||||
String dir = groupingInfo.getDir();
|
String dir = groupingInfo.getDir();
|
||||||
String normalizedDir = StrUtil.blankToDefault(dir, "asc").toLowerCase();
|
|
||||||
if ("des".equals(normalizedDir)) {
|
|
||||||
normalizedDir = "desc";
|
|
||||||
}
|
|
||||||
groupByBuilder.append(selector);
|
groupByBuilder.append(selector);
|
||||||
if (groupingInfo.getNeedSortFlag()) {
|
if (groupingInfo.getNeedSortFlag()) {
|
||||||
if ("desc".equals(normalizedDir)) {
|
if ("desc".equals(dir)) {
|
||||||
orderByBuilder.append(selector).append(" desc");
|
orderByBuilder.append(selector).append(" desc");
|
||||||
} else {
|
} else {
|
||||||
orderByBuilder.append(selector).append(" asc");
|
orderByBuilder.append(selector).append(" asc");
|
||||||
|
|||||||
@ -77,36 +77,6 @@ public class QgcQueryWrapperUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 支持页码模式和偏移量模式的分页
|
|
||||||
* 优先使用页码模式:当 page > 0 且 pageSize > 0 时,自动转换为 take/skip
|
|
||||||
* 否则回退到原有的 take/skip 偏移量模式
|
|
||||||
*/
|
|
||||||
public static PageInfo getPageInfo(DataSourceLoadOptionsBase loadOptions, Integer page, Integer pageSize) {
|
|
||||||
if (page != null && page > 0 && pageSize != null && pageSize > 0) {
|
|
||||||
loadOptions.setTake(pageSize);
|
|
||||||
loadOptions.setSkip((page - 1) * pageSize);
|
|
||||||
}
|
|
||||||
return getPageInfo(loadOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static Page<?> buildPage(DataSourceLoadOptionsBase loadOptions) {
|
|
||||||
PageInfo pageInfo = QgcQueryWrapperUtil.getPageInfo(loadOptions);
|
|
||||||
if (Boolean.TRUE.equals(pageInfo.getHasPageInfo())) {
|
|
||||||
return pageInfo.getPage();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Page<?> buildPage(DataSourceLoadOptionsBase loadOptions, Integer page, Integer pageSize) {
|
|
||||||
PageInfo pageInfo = QgcQueryWrapperUtil.getPageInfo(loadOptions, page, pageSize);
|
|
||||||
if (Boolean.TRUE.equals(pageInfo.getHasPageInfo())) {
|
|
||||||
return pageInfo.getPage();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void parseJArrayConditions(JsonArray jsonArray, String fieldName, StringBuffer fieldValue) {
|
private static void parseJArrayConditions(JsonArray jsonArray, String fieldName, StringBuffer fieldValue) {
|
||||||
if (jsonArray != null && jsonArray.size() != 0) {
|
if (jsonArray != null && jsonArray.size() != 0) {
|
||||||
if (jsonArray.get(0).isJsonPrimitive()) {
|
if (jsonArray.get(0).isJsonPrimitive()) {
|
||||||
|
|||||||
@ -9,7 +9,7 @@ VITE_APP_BASE_API = '/dev-api'
|
|||||||
# 本地环境
|
# 本地环境
|
||||||
# VITE_APP_BASE_URL = 'http://localhost:8093'
|
# VITE_APP_BASE_URL = 'http://localhost:8093'
|
||||||
# 测试环境
|
# 测试环境
|
||||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
# VITE_APP_BASE_URL = 'http://172.16.21.142:8096'
|
||||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8096'
|
# VITE_APP_BASE_URL = 'http://172.16.21.142:8096'
|
||||||
# 汤伟
|
# 汤伟
|
||||||
VITE_APP_BASE_URL = 'http://10.84.121.21:8093'
|
VITE_APP_BASE_URL = 'http://10.84.121.21:8093'
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
export function getStcdDetail(url: string, stcd: string) {
|
|
||||||
return request({
|
|
||||||
url: url,
|
|
||||||
method: 'get',
|
|
||||||
params: { stcd }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
export function getKendoListCust(data: any) {
|
export function getKendoListCust(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wt/alongList/qgc/GetKendoListCust',
|
url: '/api/wmp-env-server/sw/alongList/qgc/GetKendoListCust',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
@ -9,7 +9,7 @@ export function getKendoListCust(data: any) {
|
|||||||
//获取水温下拉框
|
//获取水温下拉框
|
||||||
export function wbsbGetKendoList(data: any) {
|
export function wbsbGetKendoList(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wt/wbsb/GetKendoList',
|
url: '/api/dec-lygk-base-server/base/wbsb/GetKendoList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
@ -21,7 +21,7 @@ export function wbsbGetKendoList(data: any) {
|
|||||||
*/
|
*/
|
||||||
export function getChuiXiangShuiWenTreeStcd(data: any) {
|
export function getChuiXiangShuiWenTreeStcd(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wt/sdrvwts/default/treeStcd',
|
url: '/api/wmp-env-server/base/sdrvwts/default/treeStcd',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
@ -34,7 +34,7 @@ export function getChuiXiangShuiWenTreeStcd(data: any) {
|
|||||||
*/
|
*/
|
||||||
export function getCxswList(data: any) {
|
export function getCxswList(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wt/dzCxList/GetKendoListCust',
|
url: '/api/wmp-env-server/sw/dzCxList/GetKendoListCust',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
@ -42,7 +42,7 @@ export function getCxswList(data: any) {
|
|||||||
//获取出入库水温下拉选则树
|
//获取出入库水温下拉选则树
|
||||||
export function getVmsstbprpt(data: any) {
|
export function getVmsstbprpt(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wt/vmsstbprpt/GetKendoList',
|
url: '/api/dec-lygk-base-server/base/vmsstbprpt/GetKendoList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
@ -51,7 +51,7 @@ export function getVmsstbprpt(data: any) {
|
|||||||
//
|
//
|
||||||
export function inOutOneGetKendoListCust(data: any) {
|
export function inOutOneGetKendoListCust(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wt/inOutOne/GetKendoListCust',
|
url: '/api/wmp-env-server/sw/inOutOne/GetKendoListCust',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
@ -59,96 +59,8 @@ export function inOutOneGetKendoListCust(data: any) {
|
|||||||
//水温监测工作开展情况
|
//水温监测工作开展情况
|
||||||
export function baseEvnmAutoMonitorGetKendoListCust(data: any) {
|
export function baseEvnmAutoMonitorGetKendoListCust(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wt/evnmAutoMonitor/GetKendoListCust',
|
url: '/api/dec-lygk-base-server/base/evnmAutoMonitor/GetKendoListCust',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
////水温监测工作开展情况弹框
|
|
||||||
export function vmsstbprptGetKendoList(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/vmsstbprpt/GetKendoList',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//出入库水温打开弹框api/wmp-env-server/sw/inOutOne/details
|
|
||||||
export function inOutOneDetails(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/inOutOne/details',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//鱼类适宜性分析 - select
|
|
||||||
export function infoGetKendoListCust(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/wtrv/fish/info/GetKendoListCust',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//鱼类适宜性分析-图表和table
|
|
||||||
export function fishGetKendoListCust(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/wtrv/fish/GetKendoListCust',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//月平均水温历史对比
|
|
||||||
export function avgMonGetKendoListCust(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/monthList/avgMon/GetKendoListCust',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//水温年内分布
|
|
||||||
export function yearListGetKendoListCust(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/yearList/GetKendoListCust',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//设施类型介绍
|
|
||||||
export function sttpbGetKendoList(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/sttpb/GetKendoList',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//设施类型及接入情况
|
|
||||||
export function dwInfoGetKendoListCust(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/dwInfo/GetKendoListCust',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//月均水温对比,图表,表格 /api/wmp-env-server/sw/monthDetail/Det/GetKendoListCust
|
|
||||||
export function DetGetKendoListCust(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/monthDetail/Det/GetKendoListCust',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//水温年内分布
|
|
||||||
export function yearDetailGetKendoListCust(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/yearDetail/GetKendoListCust',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
//获取建设状态
|
|
||||||
export function dictgetRemoteDictValue(data: any) {
|
|
||||||
return request({
|
|
||||||
url: '/wt/usm/v1/dict/getRemoteDictValue',
|
|
||||||
method: 'get',
|
|
||||||
params: data
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|||||||
@ -82,7 +82,7 @@ const scrollConfig = computed(() => {
|
|||||||
else if (tableScrollY.value > 0) {
|
else if (tableScrollY.value > 0) {
|
||||||
config.y = tableScrollY.value;
|
config.y = tableScrollY.value;
|
||||||
}
|
}
|
||||||
console.log(config);
|
console.log(tableScrollY.value);
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2072,7 +2072,7 @@ const DwPointColumns: Array<any> = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '站址',
|
name: '站址',
|
||||||
filed: 'addvcdName',
|
filed: 'stlc',
|
||||||
visible: true,
|
visible: true,
|
||||||
type: 'select',
|
type: 'select',
|
||||||
url: '',
|
url: '',
|
||||||
@ -2608,7 +2608,7 @@ const DwOnePointColumns: Array<any> = [
|
|||||||
url: '',
|
url: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '夹岩双层取水',
|
name: '多层式进水口',
|
||||||
visible: false,
|
visible: false,
|
||||||
ruleTips: '',
|
ruleTips: '',
|
||||||
type: '',
|
type: '',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
监测数据
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref, watch } from "vue";
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
||||||
@ -1,656 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="body_one">
|
|
||||||
<div class="search_one">
|
|
||||||
<div class="search_left">
|
|
||||||
<div>鱼类选择:</div>
|
|
||||||
<a-select v-model:value="selectValue" mode="multiple" style="width: 260px;" placeholder=" "
|
|
||||||
:options="selectOption" @change="handleChange"></a-select>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a-range-picker v-model:value="rangePicker" format="YYYY-MM-DD" :disabled-date="disabledDate"
|
|
||||||
:allow-clear="false" @change="handleDateChange">
|
|
||||||
<template #renderExtraFooter>
|
|
||||||
<div class="quick-date-options">
|
|
||||||
<a-button size="small" @click="setQuickRange(7)">最近七天</a-button>
|
|
||||||
<a-button size="small" @click="setQuickRange(30)">最近一个月</a-button>
|
|
||||||
<a-button size="small" @click="setQuickRange(90)">最近三个月</a-button>
|
|
||||||
<a-button size="small" @click="setQuickRange(180)">最近六个月</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</a-range-picker>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="body_body">
|
|
||||||
<div class="echarts" ref="chartRef"></div>
|
|
||||||
<div class="table">
|
|
||||||
<BasicTable ref="tableRef" :scrollY="460" :columns="columns" :list-url="fishGetKendoListCust"
|
|
||||||
:search-params="{}" :transform-data="customTransform">
|
|
||||||
<!-- 同期对比列的自定义渲染 -->
|
|
||||||
<template #contrast="{ record }">
|
|
||||||
<span v-if="record.wt && record.beforeWt"
|
|
||||||
:style="{ color: (record.wt - record.beforeWt) > 0 ? 'rgb(255, 85, 0)' : 'rgb(135, 208, 104)' }">
|
|
||||||
{{ (record.wt - record.beforeWt) > 0 ? '+' : '' }}{{ (record.wt - record.beforeWt).toFixed(2) }}
|
|
||||||
</span>
|
|
||||||
<span v-else>-</span>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref, watch, onMounted, onUnmounted, computed } from "vue";
|
|
||||||
import * as echarts from 'echarts';
|
|
||||||
import dayjs, { Dayjs } from 'dayjs';
|
|
||||||
import { useModelStore } from "@/store/modules/model";
|
|
||||||
import { infoGetKendoListCust, fishGetKendoListCust } from "@/api/sw";
|
|
||||||
import BasicTable from "@/components/BasicTable/index.vue";
|
|
||||||
const modelStore = useModelStore();
|
|
||||||
const selectOption = ref([])
|
|
||||||
const selectValue = ref([])
|
|
||||||
const tableRef = ref<any>(null);
|
|
||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
|
||||||
let chartInstance: echarts.ECharts | null = null;
|
|
||||||
const chartData = ref<any[]>([]);
|
|
||||||
const columns = [
|
|
||||||
{
|
|
||||||
title: '时间',
|
|
||||||
dataIndex: 'dt',
|
|
||||||
width: 180,
|
|
||||||
customRender: ({ text }: any) => text ? dayjs(text).format('YYYY-MM-DD') : '-'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '水温°C',
|
|
||||||
dataIndex: 'wt',
|
|
||||||
customRender: ({ text }: any) => text !== undefined && text !== null ? text : '-'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '上一年水温',
|
|
||||||
dataIndex: 'beforeWt',
|
|
||||||
customRender: ({ text }: any) => text !== undefined && text !== null ? text : '-'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '同期对比',
|
|
||||||
dataIndex: 'contrast',
|
|
||||||
width: 120,
|
|
||||||
slots: { customRender: 'contrast' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '适宜产卵鱼',
|
|
||||||
dataIndex: 'spawnFish',
|
|
||||||
width: 200,
|
|
||||||
customRender: ({ record }: any) => {
|
|
||||||
if (record.fishList && Array.isArray(record.fishList) && record.fishList.length > 0) {
|
|
||||||
return record.fishList.map(fish => fish.name).join('、');
|
|
||||||
}
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
];
|
|
||||||
// 初始化日期范围:7天前到当天
|
|
||||||
const initDateRange = () => {
|
|
||||||
const endDate = dayjs();
|
|
||||||
const startDate = dayjs().subtract(7, 'day');
|
|
||||||
return [startDate, endDate] as [Dayjs, Dayjs];
|
|
||||||
};
|
|
||||||
|
|
||||||
const rangePicker = ref<[Dayjs, Dayjs] | undefined>(initDateRange());
|
|
||||||
// 禁用超过当前日期的选项
|
|
||||||
const disabledDate = (current: Dayjs) => {
|
|
||||||
// 不能选择今天之后的日期
|
|
||||||
return current && current.isAfter(dayjs(), 'day');
|
|
||||||
};
|
|
||||||
|
|
||||||
// 设置快捷日期范围
|
|
||||||
const setQuickRange = (days: number) => {
|
|
||||||
const endDate = dayjs();
|
|
||||||
const startDate = dayjs().subtract(days, 'day');
|
|
||||||
rangePicker.value = [startDate, endDate];
|
|
||||||
// 手动触发变更事件
|
|
||||||
handleDateChange(rangePicker.value, [
|
|
||||||
startDate.format('YYYY-MM-DD'),
|
|
||||||
endDate.format('YYYY-MM-DD')
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 日期改变时的处理方法(内容待定)
|
|
||||||
const handleDateChange = (dates: any, dateStrings: string[]) => {
|
|
||||||
console.log('日期改变:', dates, dateStrings);
|
|
||||||
getEchartsData()
|
|
||||||
gerTableData()
|
|
||||||
// TODO: 在此处添加日期改变后的业务逻辑
|
|
||||||
};
|
|
||||||
// 下拉框数据
|
|
||||||
const getSelectOption = async () => {
|
|
||||||
//
|
|
||||||
// modelStore.params.date
|
|
||||||
let params = {
|
|
||||||
"filter": {
|
|
||||||
"logic": "and",
|
|
||||||
"filters": [
|
|
||||||
{
|
|
||||||
"field": "stcd",
|
|
||||||
"operator": "eq",
|
|
||||||
"dataType": "string",
|
|
||||||
"value": modelStore.params.stcd
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let res = await infoGetKendoListCust(params)
|
|
||||||
let data = res?.data?.data || res?.data
|
|
||||||
console.log(res)
|
|
||||||
selectOption.value = data.map(item => {
|
|
||||||
return {
|
|
||||||
label: item.name,
|
|
||||||
value: item.id,
|
|
||||||
pretemp: item.pretemp,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 根据数据长度智能选择ID:2个及以上取前2个,少于2个取第1个
|
|
||||||
selectValue.value = data.length >= 2 ? data.slice(0, 2).map(item => item.id) : (data.length > 0 ? [data[0].id] : [])
|
|
||||||
}
|
|
||||||
//echarts 数据获取
|
|
||||||
const getEchartsData = async () => {
|
|
||||||
const params = {
|
|
||||||
"filter": {
|
|
||||||
"logic": "and",
|
|
||||||
"filters": [
|
|
||||||
{
|
|
||||||
"field": "stcd",
|
|
||||||
"operator": "eq",
|
|
||||||
"dataType": "string",
|
|
||||||
"value": modelStore.params.stcd
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "startTime",
|
|
||||||
"operator": "gte",
|
|
||||||
"dataType": "date",
|
|
||||||
"value": rangePicker.value[0].format('YYYY-MM-DD') + " 00:00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "endTime",
|
|
||||||
"operator": "lte",
|
|
||||||
"dataType": "date",
|
|
||||||
"value": rangePicker.value[1].format('YYYY-MM-DD') + " 23:59:59"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"sort": [
|
|
||||||
{
|
|
||||||
"field": "dt",
|
|
||||||
"dir": "desc"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
let res = await fishGetKendoListCust(params)
|
|
||||||
console.log('ECharts原始数据:', res)
|
|
||||||
|
|
||||||
// 存储原始数据到响应式变量
|
|
||||||
const rawData = res?.data?.data || res?.data?.records || []
|
|
||||||
chartData.value = rawData
|
|
||||||
|
|
||||||
// 延迟更新图表,确保DOM已渲染
|
|
||||||
setTimeout(() => {
|
|
||||||
updateChart()
|
|
||||||
}, 100)
|
|
||||||
}
|
|
||||||
//table 数据获取
|
|
||||||
const gerTableData = async () => {
|
|
||||||
const filter = {
|
|
||||||
logic: 'and',
|
|
||||||
"filters": [
|
|
||||||
{
|
|
||||||
"field": "stcd",
|
|
||||||
"operator": "eq",
|
|
||||||
"dataType": "string",
|
|
||||||
"value": modelStore.params.stcd
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "startTime",
|
|
||||||
"operator": "gte",
|
|
||||||
"dataType": "date",
|
|
||||||
"value": rangePicker.value[0].format('YYYY-MM-DD') + " 00:00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "endTime",
|
|
||||||
"operator": "lte",
|
|
||||||
"dataType": "date",
|
|
||||||
"value": rangePicker.value[1].format('YYYY-MM-DD') + " 23:59:59"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
tableRef.value?.getList(filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleChange = (value: any) => {
|
|
||||||
console.log(value)
|
|
||||||
getEchartsData()
|
|
||||||
// gerTableData()
|
|
||||||
}
|
|
||||||
const customTransform = (res: any) => {
|
|
||||||
console.log('表格数据:', res);
|
|
||||||
return {
|
|
||||||
records: res?.data?.data || [],
|
|
||||||
total: res?.data?.total || 0
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// 过滤和处理图表数据
|
|
||||||
const processChartData = (rawData: any[]) => {
|
|
||||||
if (!rawData || !Array.isArray(rawData)) return [];
|
|
||||||
|
|
||||||
// 过滤掉 wt 或 beforeWt 为 null 的记录
|
|
||||||
const filtered = rawData.filter(item =>
|
|
||||||
item.wt !== null && item.wt !== undefined
|
|
||||||
);
|
|
||||||
// && item.beforeWt !== null && item.beforeWt !== undefined
|
|
||||||
|
|
||||||
// 按 dt 升序排序
|
|
||||||
return filtered.sort((a, b) =>
|
|
||||||
new Date(a.dt).getTime() - new Date(b.dt).getTime()
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算 Y 轴最大值(向上取整到个位)
|
|
||||||
const calculateYAxisMax = (data: any[]) => {
|
|
||||||
if (!data || data.length === 0) return 10;
|
|
||||||
|
|
||||||
const allValues = [
|
|
||||||
...data.map(item => item.wt),
|
|
||||||
...data.map(item => item.beforeWt)
|
|
||||||
].filter(v => v !== null && v !== undefined);
|
|
||||||
|
|
||||||
const max = Math.max(...allValues);
|
|
||||||
return Math.ceil(max);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 生成随机颜色(HSL转HEX)
|
|
||||||
const generateRandomColor = () => {
|
|
||||||
const hue = Math.random() * 360; // 色相:0-360°
|
|
||||||
const saturation = 40 + Math.random() * 30; // 饱和度:40%-70%
|
|
||||||
const lightness = 45 + Math.random() * 20; // 亮度:45%-65%
|
|
||||||
|
|
||||||
// HSL转RGB
|
|
||||||
const c = (1 - Math.abs(2 * lightness / 100 - 1)) * saturation / 100;
|
|
||||||
const x = c * (1 - Math.abs((hue / 60) % 2 - 1));
|
|
||||||
const m = lightness / 100 - c / 2;
|
|
||||||
|
|
||||||
let r = 0, g = 0, b = 0;
|
|
||||||
|
|
||||||
if (hue < 60) { r = c; g = x; b = 0; }
|
|
||||||
else if (hue < 120) { r = x; g = c; b = 0; }
|
|
||||||
else if (hue < 180) { r = 0; g = c; b = x; }
|
|
||||||
else if (hue < 240) { r = 0; g = x; b = c; }
|
|
||||||
else if (hue < 300) { r = x; g = 0; b = c; }
|
|
||||||
else { r = c; g = 0; b = x; }
|
|
||||||
|
|
||||||
// RGB转HEX
|
|
||||||
const toHex = (value: number) => {
|
|
||||||
const hex = Math.round((value + m) * 255).toString(16);
|
|
||||||
return hex.length === 1 ? '0' + hex : hex;
|
|
||||||
};
|
|
||||||
|
|
||||||
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算选中鱼类的温度范围数组
|
|
||||||
const calculateTempRanges = () => {
|
|
||||||
if (!selectValue.value || selectValue.value.length === 0) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 从 selectOption 中找到选中的鱼类
|
|
||||||
const selectedFish = selectOption.value.filter(fish =>
|
|
||||||
selectValue.value.includes(fish.value)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (selectedFish.length === 0) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 为每个鱼类生成温度范围和随机颜色
|
|
||||||
return selectedFish
|
|
||||||
.map(fish => {
|
|
||||||
if (!fish.pretemp || !Array.isArray(fish.pretemp) || fish.pretemp.length !== 2) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const min = parseFloat(fish.pretemp[0]);
|
|
||||||
const max = parseFloat(fish.pretemp[1]);
|
|
||||||
|
|
||||||
if (isNaN(min) || isNaN(max)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: fish.label,
|
|
||||||
min,
|
|
||||||
max,
|
|
||||||
color: generateRandomColor()
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.filter(item => item !== null);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 生成 ECharts 配置
|
|
||||||
const getChartOption = computed(() => {
|
|
||||||
const data = processChartData(chartData.value);
|
|
||||||
|
|
||||||
if (data.length === 0) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
// const yAxisMax = calculateYAxisMax(data);
|
|
||||||
const tempRanges = calculateTempRanges();
|
|
||||||
const dataMax = calculateYAxisMax(data);
|
|
||||||
const tempMax = tempRanges.length > 0
|
|
||||||
? Math.max(...tempRanges.map(r => r.max))
|
|
||||||
: 0;
|
|
||||||
const yAxisMax = Math.max(dataMax, tempMax);
|
|
||||||
// 提取时间轴和数据
|
|
||||||
const xAxisData = data.map(item => dayjs(item.dt).format('YYYY-MM-DD'));
|
|
||||||
const wtData = data.map(item => item.wt);
|
|
||||||
const beforeWtData = data.map(item => item.beforeWt);
|
|
||||||
|
|
||||||
// 构建 markArea 配置(为每个鱼类生成独立的背景区域)
|
|
||||||
const markAreaConfig = tempRanges.length > 0 ? {
|
|
||||||
silent: true,
|
|
||||||
data: tempRanges.map(range => [
|
|
||||||
{
|
|
||||||
yAxis: range.min,
|
|
||||||
name: `${range.name}: ${range.min}-${range.max}°C`,
|
|
||||||
itemStyle: { color: `${range.color}26` }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
yAxis: range.max
|
|
||||||
}
|
|
||||||
])
|
|
||||||
} : undefined;
|
|
||||||
|
|
||||||
return {
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
backgroundColor: 'rgba(50, 50, 50, 0.9)',
|
|
||||||
textStyle: {
|
|
||||||
color: '#fff',
|
|
||||||
fontSize: 14
|
|
||||||
},
|
|
||||||
axisPointer: {
|
|
||||||
type: 'cross',
|
|
||||||
label: {
|
|
||||||
backgroundColor: '#6a7985'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatter: (params: any) => {
|
|
||||||
if (!params || params.length === 0) return '';
|
|
||||||
|
|
||||||
const date = params[0].axisValue;
|
|
||||||
let html = `<div style="font-weight:bold;margin-bottom:8px;">${date}</div>`;
|
|
||||||
|
|
||||||
params.forEach((param: any) => {
|
|
||||||
const dataIndex = param.dataIndex;
|
|
||||||
const record = data[dataIndex];
|
|
||||||
|
|
||||||
html += `
|
|
||||||
<div style="display:flex;align-items:center;margin:4px 0;">
|
|
||||||
<span style="display:inline-block;width:10px;height:10px;border-radius:50%;background:${param.color};margin-right:8px;"></span>
|
|
||||||
<span>${param.seriesName}: ${param.value}°C</span>
|
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
top: 10,
|
|
||||||
left: 'center',
|
|
||||||
data: ['现在水温', '上一年同期水温'],
|
|
||||||
textStyle: {
|
|
||||||
fontSize: 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: 60,
|
|
||||||
right: 40,
|
|
||||||
top: 60,
|
|
||||||
bottom: 50
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: xAxisData,
|
|
||||||
boundaryGap: false,
|
|
||||||
axisLine: {
|
|
||||||
lineStyle: {
|
|
||||||
color: '#000000'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
interval: xAxisData.length > 7 ? Math.floor((xAxisData.length - 1) / 7) : 0,
|
|
||||||
fontSize: 12,
|
|
||||||
rotate: 0,
|
|
||||||
margin: 10
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#bfbfbf',
|
|
||||||
type: 'solid'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
name: '水温(°C)',
|
|
||||||
min: 0,
|
|
||||||
max: yAxisMax,
|
|
||||||
scale: false,
|
|
||||||
axisLine: {
|
|
||||||
lineStyle: {
|
|
||||||
color: '#000000',
|
|
||||||
width: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: true,
|
|
||||||
length: 4
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
fontSize: 12,
|
|
||||||
formatter: '{value}'
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#bfbfbf',
|
|
||||||
type: 'solid'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '现在水温',
|
|
||||||
type: 'line',
|
|
||||||
data: wtData,
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolSize: 6,
|
|
||||||
lineStyle: { color: '#009dff', width: 2 },
|
|
||||||
itemStyle: { color: '#009dff' },
|
|
||||||
connectNulls: false,
|
|
||||||
// 移除 markArea
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '上一年同期水温',
|
|
||||||
type: 'line',
|
|
||||||
data: beforeWtData,
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'circle',
|
|
||||||
symbolSize: 6,
|
|
||||||
lineStyle: { color: '#fee588', width: 2 },
|
|
||||||
itemStyle: { color: '#fee588' },
|
|
||||||
connectNulls: false
|
|
||||||
},
|
|
||||||
// 新增辅助系列,专门承载 markArea
|
|
||||||
{
|
|
||||||
name: '温度区间背景', // 名字不会被放入 legend,所以不显示
|
|
||||||
type: 'line',
|
|
||||||
data: new Array(xAxisData.length).fill(0), // 假数据,保证坐标匹配
|
|
||||||
showSymbol: false,
|
|
||||||
symbol: 'none',
|
|
||||||
lineStyle: { opacity: 0 },
|
|
||||||
itemStyle: { opacity: 0 },
|
|
||||||
legendHoverLink: false, // 图例悬停时不联动
|
|
||||||
silent: true, // 不响应鼠标事件
|
|
||||||
markArea: markAreaConfig // 温度区间背景绑定于此
|
|
||||||
}
|
|
||||||
],
|
|
||||||
dataZoom: [
|
|
||||||
{
|
|
||||||
type: 'inside',
|
|
||||||
xAxisIndex: [0],
|
|
||||||
throttle: 50,
|
|
||||||
start: 0,
|
|
||||||
end: 100
|
|
||||||
}
|
|
||||||
],
|
|
||||||
toolbox: {
|
|
||||||
show: true,
|
|
||||||
feature: {
|
|
||||||
saveAsImage: {
|
|
||||||
title: '导出图片',
|
|
||||||
type: 'png',
|
|
||||||
pixelRatio: 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
right: 20,
|
|
||||||
top: 10
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// 初始化图表
|
|
||||||
const initChart = () => {
|
|
||||||
if (!chartRef.value) return;
|
|
||||||
|
|
||||||
if (chartInstance) {
|
|
||||||
chartInstance.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
chartInstance = echarts.init(chartRef.value);
|
|
||||||
updateChart();
|
|
||||||
|
|
||||||
// 监听窗口resize
|
|
||||||
window.addEventListener('resize', handleResize);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 更新图表
|
|
||||||
const updateChart = () => {
|
|
||||||
if (!chartInstance) return;
|
|
||||||
|
|
||||||
const option = getChartOption.value;
|
|
||||||
if (Object.keys(option).length > 0) {
|
|
||||||
chartInstance.setOption(option, true);
|
|
||||||
} else {
|
|
||||||
// 如果没有数据,清空图表或显示空状态
|
|
||||||
chartInstance.clear();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 处理窗口resize
|
|
||||||
const handleResize = () => {
|
|
||||||
if (chartInstance) {
|
|
||||||
chartInstance.resize();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 销毁图表
|
|
||||||
const destroyChart = () => {
|
|
||||||
if (chartInstance) {
|
|
||||||
chartInstance.dispose();
|
|
||||||
chartInstance = null;
|
|
||||||
}
|
|
||||||
window.removeEventListener('resize', handleResize);
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getSelectOption()
|
|
||||||
getEchartsData()
|
|
||||||
gerTableData()
|
|
||||||
// 初始化图表
|
|
||||||
setTimeout(() => {
|
|
||||||
initChart()
|
|
||||||
}, 200)
|
|
||||||
});
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
destroyChart()
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.body_one {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 600px;
|
|
||||||
|
|
||||||
.search_one {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.search_left {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.body_body {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
height: 540px;
|
|
||||||
|
|
||||||
.echarts {
|
|
||||||
flex: 1;
|
|
||||||
height: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table {
|
|
||||||
flex: 1;
|
|
||||||
height: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.quick-date-options {
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 8px 0;
|
|
||||||
|
|
||||||
.ant-btn {
|
|
||||||
border-color: #1890ff !important;
|
|
||||||
color: #1890ff !important;
|
|
||||||
background-color: #e6f7ff !important;
|
|
||||||
font-size: 12px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
border-color: #40a9ff !important;
|
|
||||||
color: #40a9ff !important;
|
|
||||||
background-color: #bae7ff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -1,15 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal :open="visible" :title="title" width="80vw" :footer="null" :closable="true" @cancel="handleClose"
|
<a-modal
|
||||||
:destroyOnClose="true" class="map-modal">
|
:open="visible"
|
||||||
|
:title="title"
|
||||||
|
width="80vw"
|
||||||
|
:footer="null"
|
||||||
|
:closable="true"
|
||||||
|
@cancel="handleClose"
|
||||||
|
:destroyOnClose="true"
|
||||||
|
class="map-modal"
|
||||||
|
>
|
||||||
<a-tabs :active-key="currentActiveKey" @change="onTabChange">
|
<a-tabs :active-key="currentActiveKey" @change="onTabChange">
|
||||||
<a-tab-pane v-for="tab in tabsConfig" :key="tab.key" :tab="tab.name">
|
<a-tab-pane v-for="tab in tabsConfig" :key="tab.key" :tab="tab.name">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- 基本信息组件 -->
|
<!-- 基本信息组件 -->
|
||||||
<BasicInfo v-if="currentActiveKey === 'basicInfo'" :url="tab.url" />
|
<BasicInfo v-if="currentActiveKey === 'basicInfo'" :url="tab.url" />
|
||||||
<!-- 水温-监测数据 -->
|
|
||||||
<WaterTemperature v-if="currentActiveKey === 'WaterTemperature'" />
|
|
||||||
<!-- 水温-鱼类繁殖适宜性分析 -->
|
|
||||||
<WaterTemperatureContrast v-if="currentActiveKey === 'WaterTemperatureRep'" />
|
|
||||||
<!-- 地图组件 -->
|
<!-- 地图组件 -->
|
||||||
<!-- <MapView v-else-if="currentActiveKey === 'mapView'" :data="modalData" /> -->
|
<!-- <MapView v-else-if="currentActiveKey === 'mapView'" :data="modalData" /> -->
|
||||||
<!-- 周边配套组件 -->
|
<!-- 周边配套组件 -->
|
||||||
@ -24,7 +28,8 @@
|
|||||||
<a-button type="primary" :disabled="isEngConfig">
|
<a-button type="primary" :disabled="isEngConfig">
|
||||||
<i class="icon iconfont icon-topic mr-[5px]"></i>
|
<i class="icon iconfont icon-topic mr-[5px]"></i>
|
||||||
电站专题
|
电站专题
|
||||||
</a-button></a-tooltip>
|
</a-button></a-tooltip
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@ -34,8 +39,6 @@
|
|||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
// 导入预定义的 Tab 内容组件
|
// 导入预定义的 Tab 内容组件
|
||||||
import BasicInfo from "./components/BasicInfo.vue";
|
import BasicInfo from "./components/BasicInfo.vue";
|
||||||
import WaterTemperature from "./components/WaterTemperature.vue";
|
|
||||||
import WaterTemperatureContrast from "./components/WaterTemperatureContrast.vue";
|
|
||||||
import { useModelStore } from "@/store/modules/model";
|
import { useModelStore } from "@/store/modules/model";
|
||||||
import { handleTabs } from "./setting.config";
|
import { handleTabs } from "./setting.config";
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@ const ENGTabs: Array<any> = [
|
|||||||
name: '基础信息',
|
name: '基础信息',
|
||||||
key: 'basicInfo',
|
key: 'basicInfo',
|
||||||
type: 'basic',
|
type: 'basic',
|
||||||
url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo',
|
url: '/bbi/siteBipc/getSiteBasicInfo',
|
||||||
default: true // 默认显示
|
default: true // 默认显示
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -724,7 +724,7 @@ const WTTabs: Array<any> = [
|
|||||||
name: '基础信息',
|
name: '基础信息',
|
||||||
key: 'basicInfo',
|
key: 'basicInfo',
|
||||||
type: 'basic',
|
type: 'basic',
|
||||||
url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo'
|
url: '/bbi/siteBipc/getSiteBasicInfo'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '监测数据',
|
name: '监测数据',
|
||||||
@ -767,24 +767,23 @@ const DWTabs: Array<any> = [
|
|||||||
key: 'basicInfo',
|
key: 'basicInfo',
|
||||||
type: 'basic',
|
type: 'basic',
|
||||||
default: true, // 默认显示
|
default: true, // 默认显示
|
||||||
url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo'
|
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// name: '实时视频',
|
name: '实时视频',
|
||||||
// key: 'videoInfo',
|
key: 'videoInfo',
|
||||||
// type: 'video',
|
type: 'video',
|
||||||
// url: '/video/dataStcdFrame/getVideoMonitorList'
|
url: '/video/dataStcdFrame/getVideoMonitorList'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '监测数据',
|
name: '监测数据',
|
||||||
// key: 'VerticalWaterTemperature',
|
key: 'VerticalWaterTemperature',
|
||||||
// type: 'VerticalWaterTemperature',
|
type: 'VerticalWaterTemperature',
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '叠梁门运行AI识别',
|
name: '叠梁门运行AI识别',
|
||||||
// key: 'AIYXSB',
|
key: 'AIYXSB',
|
||||||
// type: 'AIYXSB',
|
type: 'AIYXSB',
|
||||||
// }
|
}
|
||||||
]
|
]
|
||||||
// //低温水减缓设施这是旧的
|
// //低温水减缓设施这是旧的
|
||||||
// const DWTabs2: Array<any> = [
|
// const DWTabs2: Array<any> = [
|
||||||
@ -888,7 +887,7 @@ const DEVICETABS: Array<any> = [
|
|||||||
name: '基础信息',
|
name: '基础信息',
|
||||||
key: 'basicInfo',
|
key: 'basicInfo',
|
||||||
type: 'basic',
|
type: 'basic',
|
||||||
url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo',
|
url: '/bbi/siteBipc/getSiteBasicInfo',
|
||||||
default: true, // 默认显示
|
default: true, // 默认显示
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@ -16,7 +16,8 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="iconmap.show" class="title_icon">
|
<span v-if="iconmap.show" class="title_icon">
|
||||||
<a-tooltip placement="top" :title="iconmap.value" :get-popup-container="getPopupContainer">
|
<a-tooltip placement="top" :title="iconmap.value"
|
||||||
|
:get-popup-container="getPopupContainer">
|
||||||
<span :class="iconmap.icon"></span>
|
<span :class="iconmap.icon"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</span>
|
</span>
|
||||||
@ -25,38 +26,52 @@
|
|||||||
<div v-if="select.show">
|
<div v-if="select.show">
|
||||||
<a-select v-model:value="selectValue" show-search placeholder="请选择" :size="'small'"
|
<a-select v-model:value="selectValue" show-search placeholder="请选择" :size="'small'"
|
||||||
style="width: 120px" :options="select.options" :filter-option="filterOption"
|
style="width: 120px" :options="select.options" :filter-option="filterOption"
|
||||||
@focus="handleFocus" @blur="handleBlur" @change="handleChange"></a-select>
|
@focus="handleFocus" @blur="handleBlur" @change="handleChange" ></a-select>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="shrink" class="title_shrink" @click="isExpand = !isExpand">
|
<div v-if="shrink" class="title_shrink" @click="isExpand = !isExpand">
|
||||||
<img v-if="isExpand" src="@/assets/components/arrow-up.png" alt="">
|
<img v-if="isExpand" src="@/assets/components/arrow-up.png" alt="">
|
||||||
<img v-else src="@/assets/components/arrow-down.png" alt="">
|
<img v-else src="@/assets/components/arrow-down.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div v-if="moreSelect.show">
|
<div v-if="moreSelect.show">
|
||||||
<a-tree-select v-model:value="moreSelectValue" v-model:tree-expanded-keys="treeExpandedKeys"
|
<a-tree-select v-model:value="moreSelectValue" show-search :size="'small'" style="width: 110px"
|
||||||
show-search :size="'small'" style="width: 110px"
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto',minWidth: '180px' }" placeholder=" "
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto', minWidth: '180px' }" placeholder=" "
|
:tree-data="processedMoreSelectOptions"
|
||||||
:tree-data="processedMoreSelectOptions"
|
|
||||||
:field-names="{ label: 'title', value: 'value', children: 'children' }"
|
:field-names="{ label: 'title', value: 'value', children: 'children' }"
|
||||||
tree-node-filter-prop="label" popup-class-name="no-wrap-tree-select" @select="handleTreeSelect"
|
tree-node-filter-prop="label"
|
||||||
@expand="handleTreeExpand">
|
:expanded-keys="expandedKeys"
|
||||||
|
popup-class-name="no-wrap-tree-select"
|
||||||
|
@select="handleTreeSelect"
|
||||||
|
@expand="handleTreeExpand"
|
||||||
|
@dropdownVisibleChange="handleDropdownVisibleChange">
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="datetimePicker.show">
|
<div v-if="datetimePicker.show">
|
||||||
<!-- 添加 locale 属性来设置语言 -->
|
<!-- 添加 locale 属性来设置语言 -->
|
||||||
<a-date-picker v-model:value="datetimeValue" show-time
|
<a-date-picker
|
||||||
:style="{ width: datetimePicker.picker === 'year' ? '80px' : datetimePicker.picker === 'month' ? '90px' : '130px' }"
|
v-model:value="datetimeValue"
|
||||||
|
show-time
|
||||||
|
:style="{ width: datetimePicker.picker === 'year' ? '80px' : '130px' }"
|
||||||
:format="datetimePicker.format !== null ? datetimePicker.format : undefined"
|
:format="datetimePicker.format !== null ? datetimePicker.format : undefined"
|
||||||
:picker="datetimePicker.picker" :allowClear="false" placeholder=" "
|
:picker="datetimePicker.picker"
|
||||||
@change="handleDateTimeChange" :size="'small'"
|
:allowClear="false"
|
||||||
|
placeholder=" "
|
||||||
|
@change="handleDateTimeChange"
|
||||||
|
:size="'small'"
|
||||||
:disabledDate="createDisabledDateFn(datetimePicker.picker)"
|
:disabledDate="createDisabledDateFn(datetimePicker.picker)"
|
||||||
:disabledTime="disabledTimeForSinglePicker" />
|
:disabledTime="disabledTimeForSinglePicker" />
|
||||||
<!-- 修改为 locale 变量 -->
|
<!-- 修改为 locale 变量 -->
|
||||||
</div>
|
</div>
|
||||||
<div v-if="scopeDate.show" class="title_scopeDate">
|
<div v-if="scopeDate.show" class="title_scopeDate">
|
||||||
<a-range-picker v-model:value="scopeDateValue" :picker="scopeDate.picker" :allowClear="false"
|
<a-range-picker
|
||||||
|
v-model:value="scopeDateValue"
|
||||||
|
:picker="scopeDate.picker"
|
||||||
|
:allowClear="false"
|
||||||
:style="{ width: scopeDate.picker === 'year' ? '80px' : (scopeDate.picker === 'month' ? '180px' : '') }"
|
:style="{ width: scopeDate.picker === 'year' ? '80px' : (scopeDate.picker === 'month' ? '180px' : '') }"
|
||||||
:format="scopeDate.format" :range-separator="' 至 '" :size="'small'"
|
:format="scopeDate.format"
|
||||||
:presets="computedScopeDatePresets" :disabledDate="createDisabledDateFn(scopeDate.picker)" />
|
:range-separator="' 至 '"
|
||||||
|
:size="'small'"
|
||||||
|
:presets="computedScopeDatePresets"
|
||||||
|
:disabledDate="createDisabledDateFn(scopeDate.picker)" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="tabs.show" class="typeOne">
|
<div v-if="tabs.show" class="typeOne">
|
||||||
<div @click="handleTabClick('one')" :class="tabsValue == 'one' ? 'typezhong' : ''">图片</div>
|
<div @click="handleTabClick('one')" :class="tabsValue == 'one' ? 'typezhong' : ''">图片</div>
|
||||||
@ -71,7 +86,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, watch, computed, nextTick } from 'vue';
|
import { ref, onMounted, watch, computed } from 'vue';
|
||||||
import {
|
import {
|
||||||
QuestionCircleOutlined,
|
QuestionCircleOutlined,
|
||||||
InfoCircleOutlined
|
InfoCircleOutlined
|
||||||
@ -129,7 +144,7 @@ const props = defineProps({
|
|||||||
default: () => ({
|
default: () => ({
|
||||||
show: false,
|
show: false,
|
||||||
value: '',
|
value: '',
|
||||||
icon: 'iconfont icon-time',
|
icon:'iconfont icon-time',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
select: { // 选择框
|
select: { // 选择框
|
||||||
@ -186,9 +201,8 @@ const scopeDateValue = ref<[Dayjs, Dayjs] | undefined>(
|
|||||||
);
|
);
|
||||||
const tabsValue = ref(props.tabs.value)
|
const tabsValue = ref(props.tabs.value)
|
||||||
|
|
||||||
// 树形选择器展开状态管理
|
// 树选择器展开状态管理
|
||||||
const treeExpandedKeys = ref<string[]>([])
|
const expandedKeys = ref<string[]>([]);
|
||||||
const nodeMap = new Map<string, { node: any; parentKey: string | null }>()
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建针对不同 picker 类型的日期禁用函数
|
* 创建针对不同 picker 类型的日期禁用函数
|
||||||
@ -196,34 +210,34 @@ const nodeMap = new Map<string, { node: any; parentKey: string | null }>()
|
|||||||
* @returns disabledDate 回调函数
|
* @returns disabledDate 回调函数
|
||||||
*/
|
*/
|
||||||
const createDisabledDateFn = (pickerType: string) => {
|
const createDisabledDateFn = (pickerType: string) => {
|
||||||
return (current: Dayjs) => {
|
return (current: Dayjs) => {
|
||||||
if (!current) return false
|
if (!current) return false
|
||||||
|
|
||||||
const now = dayjs()
|
const now = dayjs()
|
||||||
|
|
||||||
switch (pickerType) {
|
switch (pickerType) {
|
||||||
case 'year':
|
case 'year':
|
||||||
// 年份选择器:禁用 > 当前年份
|
// 年份选择器:禁用 > 当前年份
|
||||||
return current.year() > now.year()
|
return current.year() > now.year()
|
||||||
|
|
||||||
case 'month':
|
case 'month':
|
||||||
// 月份选择器:禁用 > 当前年月
|
// 月份选择器:禁用 > 当前年月
|
||||||
return current.isAfter(now, 'month')
|
return current.isAfter(now, 'month')
|
||||||
|
|
||||||
case 'quarter':
|
case 'quarter':
|
||||||
// 季度选择器:禁用 > 当前季度
|
// 季度选择器:禁用 > 当前季度
|
||||||
return current.isAfter(now, 'quarter')
|
return current.isAfter(now, 'quarter')
|
||||||
|
|
||||||
case 'week':
|
case 'week':
|
||||||
// 周选择器:禁用 > 当前周
|
// 周选择器:禁用 > 当前周
|
||||||
return current.isAfter(now, 'week')
|
return current.isAfter(now, 'week')
|
||||||
|
|
||||||
case 'date':
|
case 'date':
|
||||||
default:
|
default:
|
||||||
// 日期选择器:禁用 > 当前日期
|
// 日期选择器:禁用 > 当前日期
|
||||||
return current.isAfter(now, 'day')
|
return current.isAfter(now, 'day')
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -231,50 +245,50 @@ const createDisabledDateFn = (pickerType: string) => {
|
|||||||
* 精确限制到当前时刻的时分秒
|
* 精确限制到当前时刻的时分秒
|
||||||
*/
|
*/
|
||||||
const disabledTimeForSinglePicker = () => {
|
const disabledTimeForSinglePicker = () => {
|
||||||
// 只在 datetimePicker 显示且为 date 类型时生效
|
// 只在 datetimePicker 显示且为 date 类型时生效
|
||||||
if (!props.datetimePicker.show || props.datetimePicker.picker !== 'date') {
|
if (!props.datetimePicker.show || props.datetimePicker.picker !== 'date') {
|
||||||
return undefined
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
const now = dayjs()
|
||||||
|
const selectedDate = datetimeValue.value
|
||||||
|
|
||||||
|
// 如果未选择日期,或选择的不是今天,则不限制时间
|
||||||
|
if (!selectedDate || !selectedDate.isSame(now, 'day')) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 辅助函数:生成从 start 到 end-1 的数组
|
||||||
|
const range = (start: number, end: number) => {
|
||||||
|
const result: number[] = []
|
||||||
|
for (let i = start; i < end; i++) {
|
||||||
|
result.push(i)
|
||||||
}
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
const now = dayjs()
|
return {
|
||||||
const selectedDate = datetimeValue.value
|
// 禁用当前小时之后的所有小时
|
||||||
|
disabledHours: () => {
|
||||||
|
return range(now.hour() + 1, 24)
|
||||||
|
},
|
||||||
|
|
||||||
// 如果未选择日期,或选择的不是今天,则不限制时间
|
// 禁用当前分钟之后的所有分钟(仅在当前小时)
|
||||||
if (!selectedDate || !selectedDate.isSame(now, 'day')) {
|
disabledMinutes: (selectedHour: number) => {
|
||||||
return {}
|
if (selectedHour === now.hour()) {
|
||||||
}
|
return range(now.minute() + 1, 60)
|
||||||
|
}
|
||||||
// 辅助函数:生成从 start 到 end-1 的数组
|
return []
|
||||||
const range = (start: number, end: number) => {
|
},
|
||||||
const result: number[] = []
|
|
||||||
for (let i = start; i < end; i++) {
|
// 禁用当前秒数之后的所有秒数(仅在当前小时和分钟)
|
||||||
result.push(i)
|
disabledSeconds: (selectedHour: number, selectedMinute: number) => {
|
||||||
}
|
if (selectedHour === now.hour() && selectedMinute === now.minute()) {
|
||||||
return result
|
return range(now.second() + 1, 60)
|
||||||
}
|
}
|
||||||
|
return []
|
||||||
return {
|
|
||||||
// 禁用当前小时之后的所有小时
|
|
||||||
disabledHours: () => {
|
|
||||||
return range(now.hour() + 1, 24)
|
|
||||||
},
|
|
||||||
|
|
||||||
// 禁用当前分钟之后的所有分钟(仅在当前小时)
|
|
||||||
disabledMinutes: (selectedHour: number) => {
|
|
||||||
if (selectedHour === now.hour()) {
|
|
||||||
return range(now.minute() + 1, 60)
|
|
||||||
}
|
|
||||||
return []
|
|
||||||
},
|
|
||||||
|
|
||||||
// 禁用当前秒数之后的所有秒数(仅在当前小时和分钟)
|
|
||||||
disabledSeconds: (selectedHour: number, selectedMinute: number) => {
|
|
||||||
if (selectedHour === now.hour() && selectedMinute === now.minute()) {
|
|
||||||
return range(now.second() + 1, 60)
|
|
||||||
}
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 定义 locale 变量
|
// // 定义 locale 变量
|
||||||
@ -312,54 +326,6 @@ const processedMoreSelectOptions = computed(() => {
|
|||||||
return processTreeData(props.moreSelect.options || []);
|
return processTreeData(props.moreSelect.options || []);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* 构建树节点映射(建立父子关系)
|
|
||||||
* @param treeData 树形数据
|
|
||||||
* @param parentKey 父节点key
|
|
||||||
*/
|
|
||||||
const buildNodeMap = (treeData: any[], parentKey: string | null = null) => {
|
|
||||||
if (!treeData || !Array.isArray(treeData)) return
|
|
||||||
|
|
||||||
treeData.forEach(node => {
|
|
||||||
// 存储当前节点及其父节点信息
|
|
||||||
nodeMap.set(node.value, {
|
|
||||||
node,
|
|
||||||
parentKey
|
|
||||||
})
|
|
||||||
|
|
||||||
// 递归处理子节点
|
|
||||||
if (node.children && node.children.length > 0) {
|
|
||||||
buildNodeMap(node.children, node.value)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取目标节点的所有父节点keys
|
|
||||||
* @param targetValue 目标节点value
|
|
||||||
* @returns 父节点keys数组(从根到直接父节点)
|
|
||||||
*/
|
|
||||||
const getParentKeys = (targetValue: string): string[] => {
|
|
||||||
const parentKeys: string[] = []
|
|
||||||
let currentKey: string | null = targetValue
|
|
||||||
|
|
||||||
// 向上追溯所有父节点
|
|
||||||
while (currentKey !== null && currentKey !== undefined) {
|
|
||||||
const nodeInfo = nodeMap.get(currentKey)
|
|
||||||
|
|
||||||
// 如果节点不存在或已到达根节点,停止追溯
|
|
||||||
if (!nodeInfo || nodeInfo.parentKey === null || nodeInfo.parentKey === undefined) {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
// 将父节点插入到数组开头(保持从根到叶的顺序)
|
|
||||||
parentKeys.unshift(nodeInfo.parentKey)
|
|
||||||
currentKey = nodeInfo.parentKey
|
|
||||||
}
|
|
||||||
|
|
||||||
return parentKeys
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算属性:根据 picker 类型动态生成快捷日期选项
|
* 计算属性:根据 picker 类型动态生成快捷日期选项
|
||||||
*/
|
*/
|
||||||
@ -503,7 +469,56 @@ const handleTreeSelect = (selectedKeys: string | string[], info: any) => {
|
|||||||
* @param keys 展开的节点键值数组
|
* @param keys 展开的节点键值数组
|
||||||
*/
|
*/
|
||||||
const handleTreeExpand = (keys: string[]) => {
|
const handleTreeExpand = (keys: string[]) => {
|
||||||
// 保留事件处理函数以维持组件接口完整性
|
expandedKeys.value = keys;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找节点的父节点路径
|
||||||
|
* @param treeData 树数据
|
||||||
|
* @param targetValue 目标节点的值
|
||||||
|
* @returns 父节点值的数组(从根到直接父节点)
|
||||||
|
*/
|
||||||
|
const findParentKeys = (treeData: any[], targetValue: string): string[] => {
|
||||||
|
const parentKeys: string[] = [];
|
||||||
|
|
||||||
|
const search = (nodes: any[], target: string, parents: string[]): boolean => {
|
||||||
|
for (const node of nodes) {
|
||||||
|
if (node.value === target) {
|
||||||
|
// 找到目标节点,记录所有父节点
|
||||||
|
parentKeys.push(...parents);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
// 递归搜索子节点,将当前节点加入父节点列表
|
||||||
|
if (search(node.children, target, [...parents, node.value])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
search(treeData, targetValue, []);
|
||||||
|
return parentKeys;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理下拉框显示/隐藏变化事件
|
||||||
|
* 当下拉框打开且有选中值时,自动展开该节点的所有父节点
|
||||||
|
* @param visible 下拉框是否可见
|
||||||
|
*/
|
||||||
|
const handleDropdownVisibleChange = (visible: boolean) => {
|
||||||
|
if (visible && moreSelectValue.value && processedMoreSelectOptions.value.length > 0) {
|
||||||
|
// 查找选中节点的所有父节点
|
||||||
|
const parentKeys = findParentKeys(processedMoreSelectOptions.value, moreSelectValue.value);
|
||||||
|
|
||||||
|
if (parentKeys.length > 0) {
|
||||||
|
// 合并现有的展开节点和父节点,去重
|
||||||
|
const mergedKeys = Array.from(new Set([...expandedKeys.value, ...parentKeys]));
|
||||||
|
expandedKeys.value = mergedKeys;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 下拉选择框事件处理
|
// 下拉选择框事件处理
|
||||||
@ -604,12 +619,19 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 监听 moreSelectValue 的变化,移除了自动展开逻辑
|
|
||||||
watch(
|
watch(
|
||||||
() => props.moreSelect.value,
|
() => props.moreSelect.value,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal !== moreSelectValue.value) {
|
if (newVal !== moreSelectValue.value) {
|
||||||
moreSelectValue.value = newVal;
|
moreSelectValue.value = newVal;
|
||||||
|
|
||||||
|
// 如果有新值且树数据已加载,自动展开其父节点
|
||||||
|
if (newVal && processedMoreSelectOptions.value.length > 0) {
|
||||||
|
const parentKeys = findParentKeys(processedMoreSelectOptions.value, newVal);
|
||||||
|
if (parentKeys.length > 0) {
|
||||||
|
expandedKeys.value = Array.from(new Set([...expandedKeys.value, ...parentKeys]));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -654,45 +676,18 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// 监听 moreSelectValue 变化(包括默认值和用户选择)
|
|
||||||
watch(() => moreSelectValue.value, (newValue) => {
|
|
||||||
console.log('moreSelectValue 变化:', newValue)
|
|
||||||
|
|
||||||
if (newValue && nodeMap.size > 0) {
|
|
||||||
// 只有当 nodeMap 已构建时才执行
|
|
||||||
const parentKeys = getParentKeys(newValue as string)
|
|
||||||
treeExpandedKeys.value = parentKeys
|
|
||||||
console.log('自动展开父节点:', parentKeys)
|
|
||||||
} else {
|
|
||||||
treeExpandedKeys.value = []
|
|
||||||
}
|
|
||||||
}, { immediate: true }) // immediate: true 确保默认值也能触发
|
|
||||||
|
|
||||||
// 监听树数据变化,重新构建映射
|
|
||||||
watch(() => processedMoreSelectOptions.value, (newData) => {
|
|
||||||
console.log('树数据变化,重新构建映射')
|
|
||||||
|
|
||||||
if (newData && newData.length > 0) {
|
|
||||||
// 清空旧映射
|
|
||||||
nodeMap.clear()
|
|
||||||
// 重新构建映射
|
|
||||||
buildNodeMap(newData)
|
|
||||||
|
|
||||||
// 数据加载完成后,如果已有默认值,重新触发一次
|
|
||||||
if (moreSelectValue.value) {
|
|
||||||
nextTick(() => {
|
|
||||||
const parentKeys = getParentKeys(moreSelectValue.value as string)
|
|
||||||
treeExpandedKeys.value = parentKeys
|
|
||||||
console.log('数据加载后自动展开父节点:', parentKeys)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, { deep: true })
|
|
||||||
|
|
||||||
// 页面加载时执行的逻辑
|
// 页面加载时执行的逻辑
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 初始化时发送一次默认值
|
// 初始化时发送一次默认值
|
||||||
emitAllValues();
|
emitAllValues();
|
||||||
|
|
||||||
|
// 如果 tree-select 有默认值,预先展开其父节点
|
||||||
|
if (moreSelectValue.value && processedMoreSelectOptions.value.length > 0) {
|
||||||
|
const parentKeys = findParentKeys(processedMoreSelectOptions.value, moreSelectValue.value);
|
||||||
|
if (parentKeys.length > 0) {
|
||||||
|
expandedKeys.value = parentKeys;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -1,289 +0,0 @@
|
|||||||
<!-- ArtsDetail.vue -->
|
|
||||||
<template>
|
|
||||||
<div class="arts-detail">
|
|
||||||
<div class="card-container">
|
|
||||||
<div class="card_left">
|
|
||||||
<div class="card_img">
|
|
||||||
<div class="carousel-wrapper">
|
|
||||||
<div class="carousel-inner">
|
|
||||||
<div class="carousel-track" :style="trackStyle">
|
|
||||||
<div v-for="(item, index) in originalMediaData" :key="index" class="carousel-item">
|
|
||||||
<a-image :src="item.url" />
|
|
||||||
<!-- <img :src="item.url" :alt="item.title" /> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card_right">
|
|
||||||
<div class="card_text_title"></div>
|
|
||||||
<div class="card_text_content">
|
|
||||||
{{ currentDescription }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="width: 100%;display: flex;justify-content: center;">
|
|
||||||
<div class="card_button">
|
|
||||||
<LeftOutlined @click="prevSlide" :class="{ 'disabled': currentIndex === 0 }"
|
|
||||||
:style="{ cursor: currentIndex === 0 ? 'not-allowed' : 'pointer' }" />
|
|
||||||
<div class="pagination-dots">
|
|
||||||
<span v-for="(item, index) in originalMediaData" :key="index" class="dot-item"
|
|
||||||
:class="{ 'active': currentIndex === index }" @click="jumpToSlide(index)" />
|
|
||||||
</div>
|
|
||||||
<RightOutlined @click="nextSlide" :class="{ 'disabled': currentIndex === originalMediaData.length - 1 }"
|
|
||||||
:style="{ cursor: currentIndex === originalMediaData.length - 1 ? 'not-allowed' : 'pointer' }" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref, computed, onMounted, watch } from 'vue';
|
|
||||||
import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
|
|
||||||
|
|
||||||
defineOptions({
|
|
||||||
name: 'ArtsDetail'
|
|
||||||
});
|
|
||||||
|
|
||||||
const props = defineProps<{
|
|
||||||
dataSource: Array<{
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
url: string;
|
|
||||||
}>;
|
|
||||||
index:any
|
|
||||||
}>();
|
|
||||||
|
|
||||||
interface MediaItem {
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const originalMediaData = ref<MediaItem[]>([]);
|
|
||||||
const currentIndex = ref(0);
|
|
||||||
|
|
||||||
// 初始化数据
|
|
||||||
const initOriginalData = () => {
|
|
||||||
if (props.dataSource && props.dataSource.length > 0) {
|
|
||||||
originalMediaData.value = props.dataSource.map(item => ({
|
|
||||||
title: item.title,
|
|
||||||
description: item.description,
|
|
||||||
url: item.url
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 根据 index prop 设置当前索引
|
|
||||||
const setCurrentIndexFromProps = () => {
|
|
||||||
if (props.index !== undefined && props.index !== null && originalMediaData.value.length > 0) {
|
|
||||||
const validIndex = Math.max(0, Math.min(props.index, originalMediaData.value.length - 1));
|
|
||||||
currentIndex.value = validIndex;
|
|
||||||
} else {
|
|
||||||
currentIndex.value = 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算轨道样式 - 完全按照 React 版本的逻辑
|
|
||||||
const trackStyle = computed(() => {
|
|
||||||
return {
|
|
||||||
transform: `translateX(calc((68.8px - 48vw) * ${currentIndex.value}))`
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
// 切换到下一张
|
|
||||||
const nextSlide = () => {
|
|
||||||
if (currentIndex.value < originalMediaData.value.length - 1) {
|
|
||||||
currentIndex.value++;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 切换到上一张
|
|
||||||
const prevSlide = () => {
|
|
||||||
if (currentIndex.value > 0) {
|
|
||||||
currentIndex.value--;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 跳转到指定页面
|
|
||||||
const jumpToSlide = (targetIndex: number) => {
|
|
||||||
currentIndex.value = targetIndex;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算当前显示的描述文字
|
|
||||||
const currentDescription = computed(() => {
|
|
||||||
return originalMediaData.value[currentIndex.value]?.description || '';
|
|
||||||
});
|
|
||||||
|
|
||||||
// 页面加载时执行
|
|
||||||
onMounted(() => {
|
|
||||||
console.log('ArtsDetail mounted - props.index:', props.index, 'props.dataSource.length:', props.dataSource?.length);
|
|
||||||
initOriginalData();
|
|
||||||
setCurrentIndexFromProps();
|
|
||||||
console.log('After setCurrentIndexFromProps - currentIndex.value:', currentIndex.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 只监听 dataSource 变化,不监听 index 变化
|
|
||||||
watch(
|
|
||||||
() => props.dataSource,
|
|
||||||
(newData) => {
|
|
||||||
if (newData && newData.length > 0) {
|
|
||||||
// 数据更新时重新初始化
|
|
||||||
initOriginalData();
|
|
||||||
// 重置索引为 0 或根据当前 props.index 设置
|
|
||||||
setCurrentIndexFromProps();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ deep: true }
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.arts-detail {
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.card-container {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_left {
|
|
||||||
// flex: 6;
|
|
||||||
width: 60%;
|
|
||||||
height: 630px;
|
|
||||||
padding: 12px;
|
|
||||||
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.card_img {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 12px;
|
|
||||||
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
||||||
overflow: hidden;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.carousel-inner {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.carousel-track {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
transition: transform 0.3s ease-in-out;
|
|
||||||
|
|
||||||
.carousel-item {
|
|
||||||
width: calc(48vw - 80.8px);
|
|
||||||
flex: 0 0 calc(48vw - 80.8px);
|
|
||||||
height: 100%;
|
|
||||||
margin-right: 12px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-height: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
border: none;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_right {
|
|
||||||
// flex: 4;
|
|
||||||
width: 40%;
|
|
||||||
height: 630px;
|
|
||||||
padding-left: 40px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.card_text_title {
|
|
||||||
width: 6px;
|
|
||||||
height: 24px;
|
|
||||||
background-color: rgb(108, 164, 247);
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_text_content {
|
|
||||||
width: 100%;
|
|
||||||
height: 96%;
|
|
||||||
padding: 0px 16px 16px 0px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
line-height: 1.5;
|
|
||||||
overflow: auto;
|
|
||||||
font-size: 20px;
|
|
||||||
text-indent: 2em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.card_button {
|
|
||||||
display: flex;
|
|
||||||
// justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 16px 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.pagination-dots {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.dot-item {
|
|
||||||
display: inline-block;
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: #adaaaa;
|
|
||||||
margin: 0 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: #8a8a8a;
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
background-color: #5E9BFE;
|
|
||||||
transform: scale(1.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.anticon) {
|
|
||||||
font-size: 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
color: #6c8cf7;
|
|
||||||
transition: all 0.3s;
|
|
||||||
|
|
||||||
&:hover:not(.disabled) {
|
|
||||||
color: #4a6fd4;
|
|
||||||
transform: scale(1.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
color: #d9d9d9;
|
|
||||||
cursor: not-allowed !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -21,9 +21,7 @@ import type { ECharts } from 'echarts';
|
|||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
import { useJidiSelectEventStore } from "@/store/modules/jidiSelectEvent";
|
import { useJidiSelectEventStore } from "@/store/modules/jidiSelectEvent";
|
||||||
import { getChuiXiangShuiWenTreeStcd, getCxswList } from "@/api/sw";
|
import { getChuiXiangShuiWenTreeStcd, getCxswList } from "@/api/sw";
|
||||||
import { useModelStore } from "@/store/modules/model";
|
|
||||||
|
|
||||||
const modelStore = useModelStore();
|
|
||||||
const JidiSelectEventStore = useJidiSelectEventStore();
|
const JidiSelectEventStore = useJidiSelectEventStore();
|
||||||
const baseid = ref('');
|
const baseid = ref('');
|
||||||
|
|
||||||
@ -111,26 +109,11 @@ function arrMin(arr: number[]): number {
|
|||||||
/**
|
/**
|
||||||
* 将 API 返回的 aggregates 数据转换为图表数据格式
|
* 将 API 返回的 aggregates 数据转换为图表数据格式
|
||||||
*/
|
*/
|
||||||
function transformAggregatesToChartData(
|
function transformAggregatesToChartData(aggregates: Record<string, any[]>): Array<{
|
||||||
aggregates: Record<string, any[]>,
|
|
||||||
stcd: string,
|
|
||||||
stnm: string
|
|
||||||
): Array<{
|
|
||||||
name: string;
|
name: string;
|
||||||
dataXy: Array<{
|
dataXy: Array<[number, number]>;
|
||||||
value: [number, number];
|
|
||||||
stcd: string;
|
|
||||||
stnm: string;
|
|
||||||
}>;
|
|
||||||
}> {
|
}> {
|
||||||
const result: Array<{
|
const result: Array<{ name: string; dataXy: Array<[number, number]> }> = [];
|
||||||
name: string;
|
|
||||||
dataXy: Array<{
|
|
||||||
value: [number, number];
|
|
||||||
stcd: string;
|
|
||||||
stnm: string;
|
|
||||||
}>;
|
|
||||||
}> = [];
|
|
||||||
|
|
||||||
for (let month = 1; month <= 12; month++) {
|
for (let month = 1; month <= 12; month++) {
|
||||||
const key = month.toString();
|
const key = month.toString();
|
||||||
@ -145,19 +128,11 @@ function transformAggregatesToChartData(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ✅ 转换数据格式:将数据点包装为对象,包含元信息
|
// 转换数据格式:{ wthg, vwt } → [vwt, wthg]
|
||||||
const dataXy: Array<{
|
const dataXy: Array<[number, number]> = monthData.map((item: any) => [
|
||||||
value: [number, number];
|
parseFloat(item.vwt), // 温度
|
||||||
stcd: string;
|
parseInt(item.wthg) // 深度/高程
|
||||||
stnm: string;
|
]);
|
||||||
}> = monthData.map((item: any) => ({
|
|
||||||
value: [
|
|
||||||
parseFloat(item.vwt), // 温度
|
|
||||||
parseInt(item.wthg) // 深度/高程
|
|
||||||
] as [number, number], // ✅ 显式声明为元组类型
|
|
||||||
stcd: stcd, // 站点编码
|
|
||||||
stnm: stnm // 站点名称
|
|
||||||
}));
|
|
||||||
|
|
||||||
result.push({
|
result.push({
|
||||||
name: `${month}月`,
|
name: `${month}月`,
|
||||||
@ -361,15 +336,8 @@ const selectOptions = async () => {
|
|||||||
const chartRef = ref<HTMLElement | null>(null);
|
const chartRef = ref<HTMLElement | null>(null);
|
||||||
let chartInstance: ECharts | null = null;
|
let chartInstance: ECharts | null = null;
|
||||||
|
|
||||||
// 图表数据(对象型格式,包含站点元信息)
|
// 图表数据
|
||||||
const chartData = ref<Array<{
|
const chartData = ref<Array<{ name: string; dataXy: Array<[number, number]> }>>([]);
|
||||||
name: string;
|
|
||||||
dataXy: Array<{
|
|
||||||
value: [number, number];
|
|
||||||
stcd: string;
|
|
||||||
stnm: string;
|
|
||||||
}>;
|
|
||||||
}>>([]);
|
|
||||||
|
|
||||||
// Y轴类型(1=水深,2=高程)
|
// Y轴类型(1=水深,2=高程)
|
||||||
const type = ref(1);
|
const type = ref(1);
|
||||||
@ -418,18 +386,8 @@ const fetchChartData = async (stcd: string, year: string | number) => {
|
|||||||
const aggregates = res?.data?.aggregates;
|
const aggregates = res?.data?.aggregates;
|
||||||
|
|
||||||
if (aggregates) {
|
if (aggregates) {
|
||||||
// ✅ 获取当前选中的站点名称
|
// 转换数据
|
||||||
let currentStnm = '';
|
chartData.value = transformAggregatesToChartData(aggregates);
|
||||||
select.value.options.forEach((station: any) => {
|
|
||||||
station.children?.forEach((child: any) => {
|
|
||||||
if (child.value === stcd) {
|
|
||||||
currentStnm = child.title;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// ✅ 转换数据,传递 stcd 和 stnm
|
|
||||||
chartData.value = transformAggregatesToChartData(aggregates, stcd, currentStnm);
|
|
||||||
|
|
||||||
// ✅ 修改:传入固定值 12,而非 chartData.value.length
|
// ✅ 修改:传入固定值 12,而非 chartData.value.length
|
||||||
const { colors: newColors, selected: newSelected } = generateColorsAndVisibility(
|
const { colors: newColors, selected: newSelected } = generateColorsAndVisibility(
|
||||||
@ -475,30 +433,6 @@ const initChart = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
chartInstance = echarts.init(chartRef.value);
|
chartInstance = echarts.init(chartRef.value);
|
||||||
|
|
||||||
// 绑定点击事件(具体处理逻辑由用户自行实现)
|
|
||||||
chartInstance.on('click', (params: any) => {
|
|
||||||
console.log('图表数据点被点击:', params);
|
|
||||||
|
|
||||||
// ✅ 直接从 params.data 中获取 stcd 和 stnm
|
|
||||||
const stcd = params.data?.stcd;
|
|
||||||
const stnm = params.data?.stnm;
|
|
||||||
const temperature = params.data?.value?.[0];
|
|
||||||
const depth = params.data?.value?.[1];
|
|
||||||
|
|
||||||
console.log('站点编码:', stcd);
|
|
||||||
console.log('站点名称:', stnm);
|
|
||||||
console.log('水温:', temperature);
|
|
||||||
console.log('深度:', depth);
|
|
||||||
modelStore.modalVisible = true;
|
|
||||||
modelStore.params.sttp = "wt_point";
|
|
||||||
modelStore.title = stnm + "详情信息";
|
|
||||||
// modelStore.isBasicEdit = true;
|
|
||||||
modelStore.params.stcd = stcd;
|
|
||||||
|
|
||||||
// TODO: 在此处添加您的业务逻辑
|
|
||||||
});
|
|
||||||
|
|
||||||
updateChart();
|
updateChart();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -512,15 +446,14 @@ const updateChart = () => {
|
|||||||
|
|
||||||
chartData.value.forEach((item) => {
|
chartData.value.forEach((item) => {
|
||||||
if (item.dataXy.length > 0) {
|
if (item.dataXy.length > 0) {
|
||||||
// ✅ 从对象中提取 value[0](温度值)
|
xData.push(item.dataXy[0][0]);
|
||||||
xData.push(item.dataXy[0].value[0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
legend.push(item.name);
|
legend.push(item.name);
|
||||||
|
|
||||||
yData.push({
|
yData.push({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
data: item.dataXy, // ✅ 直接使用对象数组
|
data: item.dataXy,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
connectNulls: true,
|
connectNulls: true,
|
||||||
@ -550,9 +483,8 @@ const updateChart = () => {
|
|||||||
formatter: (params: any) => {
|
formatter: (params: any) => {
|
||||||
if (!params || !params.seriesName) return '';
|
if (!params || !params.seriesName) return '';
|
||||||
|
|
||||||
// ✅ 从对象格式中获取数据
|
const temperature = params.data[0];
|
||||||
const temperature = params.data?.value?.[0];
|
const depth = params.data[1];
|
||||||
const depth = params.data?.value?.[1];
|
|
||||||
|
|
||||||
return `<span>${params.seriesName}</span><br />
|
return `<span>${params.seriesName}</span><br />
|
||||||
<span>水温(℃):${temperature}</span><br />
|
<span>水温(℃):${temperature}</span><br />
|
||||||
@ -717,7 +649,7 @@ const handlePanelChange1 = (data: any) => {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 252px !important;
|
min-height: 252px !important;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,378 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="body_fu">
|
|
||||||
<!-- 左侧 ECharts 图表 -->
|
|
||||||
<a-spin :spinning="loading" tip="加载中...">
|
|
||||||
<div class="echarts">
|
|
||||||
<div ref="chartRef" class="echarts"></div>
|
|
||||||
</div>
|
|
||||||
</a-spin>
|
|
||||||
|
|
||||||
<!-- 右侧 BasicTable 表格 -->
|
|
||||||
<BasicTable ref="tableRef" :scrollY="460" :columns="columns" :list-url="inOutOneDetails" :search-params="{ sort: sort }"
|
|
||||||
:transform-data="customTransform" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue';
|
|
||||||
import * as echarts from 'echarts';
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { inOutOneDetails } from '@/api/sw';
|
|
||||||
import BasicTable from '@/components/BasicTable/index.vue';
|
|
||||||
|
|
||||||
// ==================== Props 定义 ====================
|
|
||||||
const props = defineProps<{
|
|
||||||
tm: [string, string]; // 时间范围 [startDate, endDate]
|
|
||||||
stcd: string; // 站点编码
|
|
||||||
}>();
|
|
||||||
|
|
||||||
// ==================== DOM 引用与状态 ====================
|
|
||||||
const chartRef = ref<HTMLDivElement>();
|
|
||||||
let chartInstance: echarts.ECharts | null = null;
|
|
||||||
const tableRef = ref<any>(null);
|
|
||||||
const loading = ref(false);
|
|
||||||
let sort = [
|
|
||||||
{
|
|
||||||
field: "tm",
|
|
||||||
dir: "asc"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
// ==================== 表格配置 ===================
|
|
||||||
|
|
||||||
const columns = [
|
|
||||||
{
|
|
||||||
title: '监测时间点',
|
|
||||||
dataIndex: 'dt',
|
|
||||||
width: 180,
|
|
||||||
customRender: ({ text }: any) => text ? dayjs(text).format('YYYY-MM-DD HH:mm:ss') : '-'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '入库水温(℃)',
|
|
||||||
dataIndex: 'iwtValue',
|
|
||||||
width: 120,
|
|
||||||
customRender: ({ text }: any) => {
|
|
||||||
const val = Number(text);
|
|
||||||
return isNaN(val) ? '-' : val.toFixed(1);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '出库水温(℃)',
|
|
||||||
dataIndex: 'dwtValue',
|
|
||||||
width: 120,
|
|
||||||
customRender: ({ text }: any) => {
|
|
||||||
const val = Number(text);
|
|
||||||
return isNaN(val) ? '-' : val.toFixed(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const customTransform = (res: any) => {
|
|
||||||
console.log('图表数据:', res);
|
|
||||||
return {
|
|
||||||
records: res?.data?.data || [],
|
|
||||||
total: res?.data?.total || 0
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// ==================== 辅助函数 ====================
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算Y轴显示范围
|
|
||||||
* 基于数据最小值和最大值,上下各扩展0.2的缓冲空间
|
|
||||||
* @param data - 水温数据数组(可能包含null值)
|
|
||||||
* @returns Y轴的最小值和最大值对象
|
|
||||||
*/
|
|
||||||
function calculateYAxisRange(data: (number | null)[]) {
|
|
||||||
// 过滤出有效数值
|
|
||||||
const validValues = data.filter(v => v !== null) as number[]
|
|
||||||
if (validValues.length === 0) return { min: 0, max: 10 } // 无数据时返回默认范围
|
|
||||||
|
|
||||||
const min = Math.min(...validValues)
|
|
||||||
const max = Math.max(...validValues)
|
|
||||||
|
|
||||||
// 上下各扩展0.2,避免曲线贴边
|
|
||||||
return {
|
|
||||||
min: Number((min - 0.1).toFixed(1)), // 最小值减0.2
|
|
||||||
max: Number((max + 0.1).toFixed(1)) // 最大值加0.2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计算X轴刻度间隔
|
|
||||||
* 确保最多显示4个刻度标签,避免标签重叠
|
|
||||||
* @param dateCount - 日期总数
|
|
||||||
* @returns X轴刻度间隔值(interval属性)
|
|
||||||
*/
|
|
||||||
function calculateXAxisInterval(dateCount: number): number {
|
|
||||||
if (dateCount <= 4) return 0 // 数据点≤4时,显示所有刻度
|
|
||||||
return Math.ceil(dateCount / 4) - 1 // 动态计算间隔,保证最多4个刻度
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 图表初始化与更新 ====================
|
|
||||||
const initChart = () => {
|
|
||||||
if (!chartRef.value) return;
|
|
||||||
|
|
||||||
const rect = chartRef.value.getBoundingClientRect();
|
|
||||||
if (rect.width === 0 || rect.height === 0) {
|
|
||||||
setTimeout(() => initChart(), 50);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
chartInstance = echarts.init(chartRef.value);
|
|
||||||
window.addEventListener('resize', handleResize);
|
|
||||||
};
|
|
||||||
|
|
||||||
const updateChart = (data: any[]) => {
|
|
||||||
if (!chartInstance) return;
|
|
||||||
|
|
||||||
const xData: string[] = [];
|
|
||||||
const inData: (number | null)[] = [];
|
|
||||||
const outData: (number | null)[] = [];
|
|
||||||
|
|
||||||
data.forEach((item: any) => {
|
|
||||||
xData.push(item.dt);
|
|
||||||
inData.push(item.iwtValue !== null && item.iwtValue !== undefined ? Number(item.iwtValue) : null);
|
|
||||||
outData.push(item.dwtValue !== null && item.dwtValue !== undefined ? Number(item.dwtValue) : null);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 动态计算坐标轴范围
|
|
||||||
const xAxisInterval = calculateXAxisInterval(xData.length);
|
|
||||||
const { min: yAxisMin, max: yAxisMaxValue } = calculateYAxisRange([...inData, ...outData]);
|
|
||||||
|
|
||||||
const option = {
|
|
||||||
// 提示框配置
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
backgroundColor: 'rgba(50, 50, 50, 0.9)',
|
|
||||||
borderColor: 'transparent',
|
|
||||||
textStyle: {
|
|
||||||
color: '#fff',
|
|
||||||
fontSize: 14
|
|
||||||
},
|
|
||||||
axisPointer: {
|
|
||||||
type: 'line',
|
|
||||||
lineStyle: {
|
|
||||||
color: 'rgba(91, 143, 249, 0.15)',
|
|
||||||
width: 30,
|
|
||||||
type: 'solid'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatter: function (params: any) {
|
|
||||||
if (!params || params.length === 0) return '';
|
|
||||||
const date = params[0].name;
|
|
||||||
let result = `<div style="font-weight: bold; margin-bottom: 8px; font-size: 14px;">${date}</div>`;
|
|
||||||
params.forEach((item: any) => {
|
|
||||||
const value = item.value !== null && item.value !== undefined ? `${item.value}°C` : '-';
|
|
||||||
result += `<div style="display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 14px;">
|
|
||||||
<span style="display: inline-block; width: 10px; height: 10px; border-radius: 50%; background-color: ${item.color};"></span>
|
|
||||||
<span>${item.seriesName}</span>
|
|
||||||
<span style="font-weight: bold; margin-left: auto;">${value}</span>
|
|
||||||
</div>`;
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// // 标题配置
|
|
||||||
// title: {
|
|
||||||
// text: '水温(°C)',
|
|
||||||
// left: 17,
|
|
||||||
// top: 13,
|
|
||||||
// textStyle: {
|
|
||||||
// fontSize: 13,
|
|
||||||
// color: '#000000',
|
|
||||||
// fontWeight: 'normal'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
legend: {
|
|
||||||
data: ['入库水温', '出库水温'],
|
|
||||||
top: 0
|
|
||||||
},
|
|
||||||
|
|
||||||
grid: {
|
|
||||||
left: '7%',
|
|
||||||
right: '4%',
|
|
||||||
bottom: '3%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
boundaryGap: true,
|
|
||||||
data: xData,
|
|
||||||
interval: xAxisInterval,
|
|
||||||
axisLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#000000'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
color: '#000000',
|
|
||||||
fontSize: 10,
|
|
||||||
margin: 5
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#bfbfbf',
|
|
||||||
type: 'solid'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 数据缩放配置
|
|
||||||
dataZoom: [
|
|
||||||
{
|
|
||||||
type: 'inside',
|
|
||||||
start: 0,
|
|
||||||
end: 100,
|
|
||||||
minValueSpan: 2,
|
|
||||||
zoomOnMouseWheel: true,
|
|
||||||
moveOnMouseMove: true,
|
|
||||||
moveOnMouseWheel: false,
|
|
||||||
zoomLock: false,
|
|
||||||
throttle: 50
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
yAxis: {
|
|
||||||
type: 'value',
|
|
||||||
name: '水温(℃)',
|
|
||||||
min: yAxisMin,
|
|
||||||
max: yAxisMaxValue,
|
|
||||||
scale: true,
|
|
||||||
axisLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#000000',
|
|
||||||
width: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#000000',
|
|
||||||
width: 1
|
|
||||||
},
|
|
||||||
length: 4
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
color: '#000000',
|
|
||||||
fontSize: 10,
|
|
||||||
formatter: '{value}'
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
color: '#bfbfbf',
|
|
||||||
type: 'solid'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '入库水温',
|
|
||||||
data: inData,
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
connectNulls: true,
|
|
||||||
color: '#5470c6'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '出库水温',
|
|
||||||
data: outData,
|
|
||||||
type: 'line',
|
|
||||||
smooth: true,
|
|
||||||
symbol: 'none',
|
|
||||||
connectNulls: true,
|
|
||||||
color: '#91cc75'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
chartInstance.setOption(option);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleResize = () => {
|
|
||||||
chartInstance?.resize();
|
|
||||||
};
|
|
||||||
|
|
||||||
// ==================== 数据获取逻辑 ====================
|
|
||||||
const fetchData = async () => {
|
|
||||||
if (!props.stcd || !props.tm || !props.tm[0]) return;
|
|
||||||
|
|
||||||
loading.value = true;
|
|
||||||
try {
|
|
||||||
// 构建过滤条件
|
|
||||||
console.log('图表点击事件:', props.tm);
|
|
||||||
const startTime = dayjs(props.tm[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss');
|
|
||||||
const endTime = dayjs(props.tm[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss');
|
|
||||||
|
|
||||||
|
|
||||||
const filter = {
|
|
||||||
logic: 'and',
|
|
||||||
filters: [
|
|
||||||
{
|
|
||||||
logic: "or",
|
|
||||||
filters: [
|
|
||||||
{ field: "engDwtCode", operator: "eq", value: props.stcd },
|
|
||||||
{ field: "engIwtCode", operator: "eq", value: props.stcd }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{ field: "tm", operator: 'gte', dataType: "date", value: startTime },
|
|
||||||
{ field: "tm", operator: 'lte', dataType: "date", value: endTime }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
tableRef.value?.getList(filter);
|
|
||||||
// 调用接口获取图表数据
|
|
||||||
const res = await inOutOneDetails({ filter, sort: [{ field: "tm", dir: "asc" }] });
|
|
||||||
let dataOne = res?.data?.data || res?.data;
|
|
||||||
if (dataOne) {
|
|
||||||
updateChart(dataOne);
|
|
||||||
// 刷新表格数据
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取出入库水温数据失败:', error);
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// ==================== 生命周期与监听 ====================
|
|
||||||
onMounted(() => {
|
|
||||||
initChart();
|
|
||||||
fetchData();
|
|
||||||
});
|
|
||||||
|
|
||||||
onUnmounted(() => {
|
|
||||||
window.removeEventListener('resize', handleResize);
|
|
||||||
chartInstance?.dispose();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 监听 props 变化,重新获取数据
|
|
||||||
watch(() => [props.tm, props.stcd], () => {
|
|
||||||
fetchData();
|
|
||||||
}, { deep: true });
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.body_fu {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
height: 570px;
|
|
||||||
gap: 10px;
|
|
||||||
|
|
||||||
.echarts {
|
|
||||||
min-width: 541px;
|
|
||||||
height: 500px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -14,15 +14,6 @@
|
|||||||
<a-empty />
|
<a-empty />
|
||||||
</div>
|
</div>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
|
||||||
<!-- 数据点详情弹框 -->
|
|
||||||
<a-modal v-model:open="modalVisible" :title="`${stationName}出入库水温`" :width="1536" :footer="null"
|
|
||||||
@cancel="handleModalClose">
|
|
||||||
<!-- 弹框内容区域 - 待完善 -->
|
|
||||||
<div class="modal-content">
|
|
||||||
<churukushuiwen v-if="clickDataInfo" :tm="[clickDataInfo.date, clickDataInfo.date]" :stcd="paramsOne.value" />
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
</SidePanelItem>
|
</SidePanelItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -33,7 +24,7 @@ import dayjs from 'dayjs';
|
|||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
import { getVmsstbprpt, inOutOneGetKendoListCust } from '@/api/sw';
|
import { getVmsstbprpt, inOutOneGetKendoListCust } from '@/api/sw';
|
||||||
import { useJidiSelectEventStore } from "@/store/modules/jidiSelectEvent";
|
import { useJidiSelectEventStore } from "@/store/modules/jidiSelectEvent";
|
||||||
import churukushuiwen from './churukushuiwen.vue'
|
|
||||||
// ==================== 组件基础配置 ====================
|
// ==================== 组件基础配置 ====================
|
||||||
// 定义组件名(便于调试和递归)
|
// 定义组件名(便于调试和递归)
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@ -73,9 +64,6 @@ const scopeDate = ref({
|
|||||||
|
|
||||||
// ==================== 业务变量 ====================
|
// ==================== 业务变量 ====================
|
||||||
const baseid = ref(''); // 当前选中的基地ID
|
const baseid = ref(''); // 当前选中的基地ID
|
||||||
const modalVisible = ref(false); // 弹框显示状态
|
|
||||||
const clickDataInfo = ref<any>(null); // 点击的数据点信息
|
|
||||||
const stationName = ref(''); // 站点名称
|
|
||||||
|
|
||||||
// ==================== 基地列表数据(硬编码) ====================
|
// ==================== 基地列表数据(硬编码) ====================
|
||||||
const jiDiList: any = ref([
|
const jiDiList: any = ref([
|
||||||
@ -213,7 +201,7 @@ function calculateYAxisRange(data: (number | null)[]) {
|
|||||||
// 上下各扩展0.2,避免曲线贴边
|
// 上下各扩展0.2,避免曲线贴边
|
||||||
return {
|
return {
|
||||||
min: Number((min - 0.2).toFixed(1)), // 最小值减0.2
|
min: Number((min - 0.2).toFixed(1)), // 最小值减0.2
|
||||||
max: Number((max + 0.1).toFixed(1)) // 最大值加0.2
|
max: Number((max + 0.2).toFixed(1)) // 最大值加0.2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,7 +215,7 @@ function calculateXAxisInterval(dateCount: number): number {
|
|||||||
if (dateCount <= 4) return 0 // 数据点≤4时,显示所有刻度
|
if (dateCount <= 4) return 0 // 数据点≤4时,显示所有刻度
|
||||||
return Math.ceil(dateCount / 4) - 1 // 动态计算间隔,保证最多4个刻度
|
return Math.ceil(dateCount / 4) - 1 // 动态计算间隔,保证最多4个刻度
|
||||||
}
|
}
|
||||||
const paramsOne:any = ref({
|
const paramsOne = ref({
|
||||||
value: '',
|
value: '',
|
||||||
tm: [currentMonth, currentMonth]
|
tm: [currentMonth, currentMonth]
|
||||||
})
|
})
|
||||||
@ -540,11 +528,6 @@ function updateChart(dates: string[], iwtData: (number | null)[], dwtData: (numb
|
|||||||
|
|
||||||
// 应用配置到图表实例
|
// 应用配置到图表实例
|
||||||
chartInstance.setOption(option, true); // true表示完全替换配置
|
chartInstance.setOption(option, true); // true表示完全替换配置
|
||||||
|
|
||||||
// 绑定点击事件监听器
|
|
||||||
chartInstance.off('click'); // 先移除旧的事件监听
|
|
||||||
chartInstance.on('click', handleChartClick);
|
|
||||||
|
|
||||||
console.log('图表更新成功')
|
console.log('图表更新成功')
|
||||||
|
|
||||||
// 强制重绘,确保图表尺寸正确适配容器
|
// 强制重绘,确保图表尺寸正确适配容器
|
||||||
@ -599,51 +582,14 @@ const handleResize = () => {
|
|||||||
|
|
||||||
// ==================== 事件处理函数 ====================
|
// ==================== 事件处理函数 ====================
|
||||||
|
|
||||||
/**
|
|
||||||
* 图表数据点点击事件处理
|
|
||||||
* @param params - ECharts点击事件参数
|
|
||||||
*/
|
|
||||||
const handleChartClick = (params: any) => {
|
|
||||||
console.log('图表点击事件:', params);
|
|
||||||
|
|
||||||
// 只处理数据系列的点击
|
|
||||||
if (params.componentType === 'series') {
|
|
||||||
const { seriesName, name, value, dataIndex } = params;
|
|
||||||
|
|
||||||
// 保存点击数据信息
|
|
||||||
clickDataInfo.value = {
|
|
||||||
date: name, // 日期
|
|
||||||
temperature: value, // 水温值
|
|
||||||
type: seriesName, // 类型:入库水温/出库水温
|
|
||||||
dataIndex: dataIndex // 数据索引
|
|
||||||
};
|
|
||||||
|
|
||||||
// 获取站点名称(从下拉选项中查找)
|
|
||||||
// console.log('站点名称:', select.value.options, paramsOne.value.value);
|
|
||||||
const selectedStation = select.value.options
|
|
||||||
.flatMap((base: any) => base.children || [])
|
|
||||||
.find((station: any) => station.stcd === paramsOne.value.value);
|
|
||||||
stationName.value = selectedStation?.title || '未知站点';
|
|
||||||
|
|
||||||
// 打开弹框
|
|
||||||
modalVisible.value = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 弹框关闭处理
|
|
||||||
*/
|
|
||||||
const handleModalClose = () => {
|
|
||||||
modalVisible.value = false;
|
|
||||||
clickDataInfo.value = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SidePanelItem面板变化回调
|
* SidePanelItem面板变化回调
|
||||||
* 处理下拉框和日期选择器的值变化
|
* 处理下拉框和日期选择器的值变化
|
||||||
* @param data - 包含moreSelect(下拉框值)和datetime(日期范围)的对象
|
* @param data - 包含moreSelect(下拉框值)和datetime(日期范围)的对象
|
||||||
*/
|
*/
|
||||||
const handlePanelChange1 = (data: any) => {
|
const handlePanelChange1 = (data: any) => {
|
||||||
|
// console.log('当前所有控件状态:', data);
|
||||||
|
// debugger
|
||||||
// TODO: 后续可扩展联动逻辑
|
// TODO: 后续可扩展联动逻辑
|
||||||
if (data.moreSelect) {
|
if (data.moreSelect) {
|
||||||
paramsOne.value.value = data.moreSelect;
|
paramsOne.value.value = data.moreSelect;
|
||||||
@ -779,19 +725,12 @@ watch(
|
|||||||
.chart-container {
|
.chart-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 252px;
|
height: 252px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
/* 固定高度252px */
|
/* 固定高度252px */
|
||||||
}
|
}
|
||||||
|
:deep(.ant-spin-nested-loading ){
|
||||||
:deep(.ant-spin-nested-loading) {
|
height: 252px !important;
|
||||||
height: 252px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 弹框内容样式 */
|
|
||||||
.modal-content {
|
|
||||||
min-height: 100px;
|
|
||||||
padding: 16px 0;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user