Merge branch 'dev-tw'
# Conflicts: # backend/src/main/java/com/yfd/platform/env/service/SdWtMonitorService.java # backend/src/main/java/com/yfd/platform/env/service/impl/SdWtMonitorServiceImpl.java
This commit is contained in:
commit
3e637d5a98
@ -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.common"})
|
@MapperScan(basePackages = {"com.yfd.platform.*.mapper","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,13 +255,17 @@ 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(dir)) {
|
if (StringUtil.isBlank(normalizedDir)) {
|
||||||
sortingInfo.setDesc(false);
|
sortingInfo.setDesc(false);
|
||||||
} else if (dir.equals("asc")) {
|
} else if (normalizedDir.equals("asc")) {
|
||||||
sortingInfo.setDesc(false);
|
sortingInfo.setDesc(false);
|
||||||
} else if (dir.equals("desc")) {
|
} else if (normalizedDir.equals("desc")) {
|
||||||
sortingInfo.setDesc(true);
|
sortingInfo.setDesc(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,11 +307,15 @@ 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();
|
||||||
if (StringUtil.isBlank(dir)) {
|
String normalizedDir = StringUtil.isBlank(dir) ? "" : dir.toLowerCase();
|
||||||
|
if ("des".equals(normalizedDir)) {
|
||||||
|
normalizedDir = "desc";
|
||||||
|
}
|
||||||
|
if (StringUtil.isBlank(normalizedDir)) {
|
||||||
groupingInfo.setDesc(false);
|
groupingInfo.setDesc(false);
|
||||||
} else if (dir.equals("asc")) {
|
} else if (normalizedDir.equals("asc")) {
|
||||||
groupingInfo.setDesc(false);
|
groupingInfo.setDesc(false);
|
||||||
} else if (dir.equals("desc")) {
|
} else if (normalizedDir.equals("desc")) {
|
||||||
groupingInfo.setDesc(true);
|
groupingInfo.setDesc(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -102,6 +102,9 @@ 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,6 +60,9 @@ 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,11 +56,45 @@ 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,6 +2,7 @@ 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;
|
||||||
@ -68,6 +69,12 @@ 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 = "新增基地")
|
||||||
@ -91,4 +98,4 @@ public class SdHydrobaseController {
|
|||||||
boolean result = hydrobaseService.deleteHydrobase(baseid);
|
boolean result = hydrobaseService.deleteHydrobase(baseid);
|
||||||
return result ? ResponseResult.success("删除成功") : ResponseResult.error("删除失败");
|
return result ? ResponseResult.success("删除成功") : ResponseResult.error("删除失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,36 +0,0 @@
|
|||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
39
backend/src/main/java/com/yfd/platform/env/entity/vo/HydrobaseWbsVo.java
vendored
Normal file
39
backend/src/main/java/com/yfd/platform/env/entity/vo/HydrobaseWbsVo.java
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
66
backend/src/main/java/com/yfd/platform/env/fh/controller/FhHabitatController.java
vendored
Normal file
66
backend/src/main/java/com/yfd/platform/env/fh/controller/FhHabitatController.java
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
20
backend/src/main/java/com/yfd/platform/env/fh/entity/ao/FhDefaultAo.java
vendored
Normal file
20
backend/src/main/java/com/yfd/platform/env/fh/entity/ao/FhDefaultAo.java
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
56
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhDefaultVo.java
vendored
Normal file
56
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhDefaultVo.java
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
80
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhMsstbprptVo.java
vendored
Normal file
80
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhMsstbprptVo.java
vendored
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
38
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhSdriverdayVo.java
vendored
Normal file
38
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhSdriverdayVo.java
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
29
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhSdrvwtsVo.java
vendored
Normal file
29
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/FhSdrvwtsVo.java
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
114
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/HabitatVo.java
vendored
Normal file
114
backend/src/main/java/com/yfd/platform/env/fh/entity/vo/HabitatVo.java
vendored
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
24
backend/src/main/java/com/yfd/platform/env/fh/service/FhHabitatService.java
vendored
Normal file
24
backend/src/main/java/com/yfd/platform/env/fh/service/FhHabitatService.java
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
1745
backend/src/main/java/com/yfd/platform/env/fh/service/impl/FhHabitatServiceImpl.java
vendored
Normal file
1745
backend/src/main/java/com/yfd/platform/env/fh/service/impl/FhHabitatServiceImpl.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
48
backend/src/main/java/com/yfd/platform/env/fp/controller/FishPassageController.java
vendored
Normal file
48
backend/src/main/java/com/yfd/platform/env/fp/controller/FishPassageController.java
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
15
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FdFishVo.java
vendored
Normal file
15
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FdFishVo.java
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
30
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FpConstructionSituationVo.java
vendored
Normal file
30
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FpConstructionSituationVo.java
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
24
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FpFtpStatisticsVo.java
vendored
Normal file
24
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FpFtpStatisticsVo.java
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
47
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FpRunPlanVo.java
vendored
Normal file
47
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/FpRunPlanVo.java
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
23
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/YearFpStatisticsVo.java
vendored
Normal file
23
backend/src/main/java/com/yfd/platform/env/fp/entity/vo/YearFpStatisticsVo.java
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
10
backend/src/main/java/com/yfd/platform/env/fp/service/FpBuildService.java
vendored
Normal file
10
backend/src/main/java/com/yfd/platform/env/fp/service/FpBuildService.java
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
15
backend/src/main/java/com/yfd/platform/env/fp/service/FpRunService.java
vendored
Normal file
15
backend/src/main/java/com/yfd/platform/env/fp/service/FpRunService.java
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
54
backend/src/main/java/com/yfd/platform/env/fp/service/impl/FpBuildServiceImpl.java
vendored
Normal file
54
backend/src/main/java/com/yfd/platform/env/fp/service/impl/FpBuildServiceImpl.java
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
242
backend/src/main/java/com/yfd/platform/env/fp/service/impl/FpRunServiceImpl.java
vendored
Normal file
242
backend/src/main/java/com/yfd/platform/env/fp/service/impl/FpRunServiceImpl.java
vendored
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
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,11 @@
|
|||||||
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;
|
||||||
@ -34,6 +37,8 @@ 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();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,4 +55,4 @@ public interface ISdHydrobaseService extends IService<SdHydrobase> {
|
|||||||
* 删除基地
|
* 删除基地
|
||||||
*/
|
*/
|
||||||
boolean deleteHydrobase(String baseid);
|
boolean deleteHydrobase(String baseid);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
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);
|
|
||||||
}
|
|
||||||
@ -3,10 +3,13 @@ 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;
|
||||||
@ -16,8 +19,10 @@ 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;
|
||||||
|
|
||||||
@ -97,6 +102,64 @@ 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();
|
||||||
@ -176,4 +239,72 @@ 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,800 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
109
backend/src/main/java/com/yfd/platform/env/wq/controller/EnvWqDataController.java
vendored
Normal file
109
backend/src/main/java/com/yfd/platform/env/wq/controller/EnvWqDataController.java
vendored
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
144
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqDataVo.java
vendored
Normal file
144
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqDataVo.java
vendored
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
package com.yfd.platform.env.wq.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "水质实时数据")
|
||||||
|
public class EnvWqDataVo {
|
||||||
|
@Schema(description = "测站编码")
|
||||||
|
private String stcd;
|
||||||
|
@Schema(description = "电站编码")
|
||||||
|
private String rstcd;
|
||||||
|
@Schema(description = "测站名称")
|
||||||
|
private String stnm;
|
||||||
|
@Schema(description = "栖息地编码")
|
||||||
|
private String stCode;
|
||||||
|
@Schema(description = "栖息地名称")
|
||||||
|
private String stName;
|
||||||
|
@Schema(description = "电站名称")
|
||||||
|
private String ennm;
|
||||||
|
@Schema(description = "数据时间")
|
||||||
|
private Date tm;
|
||||||
|
@Schema(description = "水温")
|
||||||
|
private BigDecimal wtmp;
|
||||||
|
@Schema(description = "pH")
|
||||||
|
private BigDecimal ph;
|
||||||
|
@Schema(description = "溶解氧")
|
||||||
|
private BigDecimal dox;
|
||||||
|
@Schema(description = "高锰酸盐指数")
|
||||||
|
private BigDecimal codmn;
|
||||||
|
@Schema(description = "化学需氧量")
|
||||||
|
private BigDecimal codcr;
|
||||||
|
@Schema(description = "五日生化需氧量")
|
||||||
|
private BigDecimal bod5;
|
||||||
|
@Schema(description = "氨氮")
|
||||||
|
private BigDecimal nh3n;
|
||||||
|
@Schema(description = "总磷")
|
||||||
|
private BigDecimal tp;
|
||||||
|
@Schema(description = "总氮")
|
||||||
|
private BigDecimal tn;
|
||||||
|
@Schema(description = "铜")
|
||||||
|
private BigDecimal cu;
|
||||||
|
@Schema(description = "锌")
|
||||||
|
private BigDecimal zn;
|
||||||
|
@Schema(description = "氟化物")
|
||||||
|
private BigDecimal f;
|
||||||
|
@Schema(description = "硒")
|
||||||
|
private BigDecimal se;
|
||||||
|
@Schema(description = "砷")
|
||||||
|
private BigDecimal ars;
|
||||||
|
@Schema(description = "汞")
|
||||||
|
private BigDecimal hg;
|
||||||
|
@Schema(description = "镉")
|
||||||
|
private BigDecimal cd;
|
||||||
|
@Schema(description = "六价铬")
|
||||||
|
private BigDecimal cr6;
|
||||||
|
@Schema(description = "铅")
|
||||||
|
private BigDecimal pb;
|
||||||
|
@Schema(description = "氰化物")
|
||||||
|
private BigDecimal cn;
|
||||||
|
@Schema(description = "挥发酚")
|
||||||
|
private BigDecimal vlph;
|
||||||
|
@Schema(description = "石油类")
|
||||||
|
private BigDecimal oil;
|
||||||
|
@Schema(description = "阴离子表面活性剂")
|
||||||
|
private BigDecimal las;
|
||||||
|
@Schema(description = "硫化物")
|
||||||
|
private BigDecimal s2;
|
||||||
|
@Schema(description = "粪大肠菌群")
|
||||||
|
private BigDecimal fcg;
|
||||||
|
@Schema(description = "氯化物")
|
||||||
|
private BigDecimal cl;
|
||||||
|
@Schema(description = "硫酸盐")
|
||||||
|
private BigDecimal so4;
|
||||||
|
@Schema(description = "硝酸盐氮")
|
||||||
|
private BigDecimal no3;
|
||||||
|
@Schema(description = "总硬度")
|
||||||
|
private BigDecimal thrd;
|
||||||
|
@Schema(description = "电导率")
|
||||||
|
private BigDecimal cond;
|
||||||
|
@Schema(description = "铁")
|
||||||
|
private BigDecimal fe;
|
||||||
|
@Schema(description = "锰")
|
||||||
|
private BigDecimal mn;
|
||||||
|
@Schema(description = "铝")
|
||||||
|
private BigDecimal al;
|
||||||
|
@Schema(description = "叶绿素a")
|
||||||
|
private BigDecimal chla;
|
||||||
|
@Schema(description = "透明度")
|
||||||
|
private BigDecimal clarity;
|
||||||
|
@Schema(description = "浊度")
|
||||||
|
private BigDecimal tu;
|
||||||
|
@Schema(description = "总需氧量")
|
||||||
|
private BigDecimal tod;
|
||||||
|
@Schema(description = "蓝绿藻")
|
||||||
|
private BigDecimal cyano;
|
||||||
|
@Schema(description = "实际水质等级")
|
||||||
|
private String wqgrd;
|
||||||
|
@Schema(description = "实际水质等级名称")
|
||||||
|
private String wqgrdName;
|
||||||
|
@Schema(description = "目标水质等级")
|
||||||
|
private String wwqtg;
|
||||||
|
@Schema(description = "目标水质等级名称")
|
||||||
|
private String wwqtgName;
|
||||||
|
@Schema(description = "是否达标")
|
||||||
|
private Integer sfdb;
|
||||||
|
@Schema(description = "是否达标名称")
|
||||||
|
private String sfdbName;
|
||||||
|
@Schema(description = "水质不达标的要素")
|
||||||
|
private String wqSfdbhnYs;
|
||||||
|
@Schema(description = "水质不达标的要素名称")
|
||||||
|
private String wqSfdbhnYsName;
|
||||||
|
@Schema(description = "基地编码")
|
||||||
|
private String baseId;
|
||||||
|
@Schema(description = "基地名称")
|
||||||
|
private String baseName;
|
||||||
|
@Schema(description = "流域名称")
|
||||||
|
private String rvcdName;
|
||||||
|
@Schema(description = "行政区名称")
|
||||||
|
private String addvcdName;
|
||||||
|
@Schema(description = "数据接入类型")
|
||||||
|
private String dtinType;
|
||||||
|
@Schema(description = "入库流量")
|
||||||
|
private BigDecimal qi;
|
||||||
|
@Schema(description = "出库流量")
|
||||||
|
private BigDecimal qo;
|
||||||
|
@Schema(description = "基地排序")
|
||||||
|
private Integer baseStepSort;
|
||||||
|
@Schema(description = "流域排序")
|
||||||
|
private Integer rvcdStepSort;
|
||||||
|
@Schema(description = "电站排序")
|
||||||
|
private Integer rstcdStepSort;
|
||||||
|
@Schema(description = "测站排序")
|
||||||
|
private Integer siteStepSort;
|
||||||
|
@Schema(description = "水质要素最小限值集合")
|
||||||
|
private List<Map<String, Object>> min;
|
||||||
|
@Schema(description = "水质要素最大限值集合")
|
||||||
|
private List<Map<String, Object>> max;
|
||||||
|
}
|
||||||
239
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqVo.java
vendored
Normal file
239
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/EnvWqVo.java
vendored
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
package com.yfd.platform.env.wq.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "水质统计分析结果")
|
||||||
|
public class EnvWqVo {
|
||||||
|
|
||||||
|
@Schema(description = "主键")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "测站编码")
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
@Schema(description = "测站名称")
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
@Schema(description = "电站编码")
|
||||||
|
private String rstcd;
|
||||||
|
|
||||||
|
@Schema(description = "电站名称")
|
||||||
|
private String ennm;
|
||||||
|
|
||||||
|
@Schema(description = "统计时间")
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
@Schema(description = "统计类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "测站类型")
|
||||||
|
private String sttype;
|
||||||
|
|
||||||
|
@Schema(description = "测站类型名称")
|
||||||
|
private String sttypeName;
|
||||||
|
|
||||||
|
@Schema(description = "是否达标")
|
||||||
|
private Integer sfdb;
|
||||||
|
|
||||||
|
@Schema(description = "是否达标名称")
|
||||||
|
private String sfdbName;
|
||||||
|
|
||||||
|
@Schema(description = "月维度")
|
||||||
|
private String drMonth;
|
||||||
|
|
||||||
|
@Schema(description = "年维度")
|
||||||
|
private String drYear;
|
||||||
|
|
||||||
|
@Schema(description = "基地编码")
|
||||||
|
private String baseId;
|
||||||
|
|
||||||
|
@Schema(description = "基地名称")
|
||||||
|
private String baseName;
|
||||||
|
|
||||||
|
@Schema(description = "流域编码")
|
||||||
|
private String hbrvcd;
|
||||||
|
|
||||||
|
@Schema(description = "流域名称")
|
||||||
|
private String hbrvcdName;
|
||||||
|
|
||||||
|
@Schema(description = "河流名称")
|
||||||
|
private String rvcdName;
|
||||||
|
|
||||||
|
@Schema(description = "行政区名称")
|
||||||
|
private String addvcdName;
|
||||||
|
|
||||||
|
@Schema(description = "水质目标")
|
||||||
|
private String wwqtg;
|
||||||
|
|
||||||
|
@Schema(description = "水质目标名称")
|
||||||
|
private String wwqtgName;
|
||||||
|
|
||||||
|
@Schema(description = "水质等级")
|
||||||
|
private String wqGrd;
|
||||||
|
|
||||||
|
@Schema(description = "水质等级名称")
|
||||||
|
private String wqGrdName;
|
||||||
|
|
||||||
|
@Schema(description = "去年同期水质等级")
|
||||||
|
private String beforeWqGrd;
|
||||||
|
|
||||||
|
@Schema(description = "去年同期水质等级名称")
|
||||||
|
private String beforeWqGrdName;
|
||||||
|
|
||||||
|
@Schema(description = "水质达标率")
|
||||||
|
private String wqRate;
|
||||||
|
|
||||||
|
@Schema(description = "位置")
|
||||||
|
private String lctn;
|
||||||
|
|
||||||
|
@Schema(description = "计算标识")
|
||||||
|
private String calculateFlag;
|
||||||
|
|
||||||
|
@Schema(description = "水温")
|
||||||
|
private BigDecimal wtmp;
|
||||||
|
|
||||||
|
@Schema(description = "pH")
|
||||||
|
private BigDecimal ph;
|
||||||
|
|
||||||
|
@Schema(description = "溶解氧")
|
||||||
|
private BigDecimal dox;
|
||||||
|
|
||||||
|
@Schema(description = "高锰酸盐指数")
|
||||||
|
private BigDecimal codmn;
|
||||||
|
|
||||||
|
@Schema(description = "化学需氧量")
|
||||||
|
private BigDecimal codcr;
|
||||||
|
|
||||||
|
@Schema(description = "五日生化需氧量")
|
||||||
|
private BigDecimal bod5;
|
||||||
|
|
||||||
|
@Schema(description = "氨氮")
|
||||||
|
private BigDecimal nh3n;
|
||||||
|
|
||||||
|
@Schema(description = "总磷")
|
||||||
|
private BigDecimal tp;
|
||||||
|
|
||||||
|
@Schema(description = "总氮")
|
||||||
|
private BigDecimal tn;
|
||||||
|
|
||||||
|
@Schema(description = "铜")
|
||||||
|
private BigDecimal cu;
|
||||||
|
|
||||||
|
@Schema(description = "锌")
|
||||||
|
private BigDecimal zn;
|
||||||
|
|
||||||
|
@Schema(description = "氟化物")
|
||||||
|
private BigDecimal f;
|
||||||
|
|
||||||
|
@Schema(description = "硒")
|
||||||
|
private BigDecimal se;
|
||||||
|
|
||||||
|
@Schema(description = "砷")
|
||||||
|
private BigDecimal ars;
|
||||||
|
|
||||||
|
@Schema(description = "汞")
|
||||||
|
private BigDecimal hg;
|
||||||
|
|
||||||
|
@Schema(description = "镉")
|
||||||
|
private BigDecimal cd;
|
||||||
|
|
||||||
|
@Schema(description = "六价铬")
|
||||||
|
private BigDecimal cr6;
|
||||||
|
|
||||||
|
@Schema(description = "铅")
|
||||||
|
private BigDecimal pb;
|
||||||
|
|
||||||
|
@Schema(description = "氰化物")
|
||||||
|
private BigDecimal cn;
|
||||||
|
|
||||||
|
@Schema(description = "挥发酚")
|
||||||
|
private BigDecimal vlph;
|
||||||
|
|
||||||
|
@Schema(description = "石油类")
|
||||||
|
private BigDecimal oil;
|
||||||
|
|
||||||
|
@Schema(description = "阴离子表面活性剂")
|
||||||
|
private BigDecimal las;
|
||||||
|
|
||||||
|
@Schema(description = "硫化物")
|
||||||
|
private BigDecimal s2;
|
||||||
|
|
||||||
|
@Schema(description = "粪大肠菌群")
|
||||||
|
private BigDecimal fcg;
|
||||||
|
|
||||||
|
@Schema(description = "氯化物")
|
||||||
|
private BigDecimal cl;
|
||||||
|
|
||||||
|
@Schema(description = "硫酸盐")
|
||||||
|
private BigDecimal so4;
|
||||||
|
|
||||||
|
@Schema(description = "硝酸盐氮")
|
||||||
|
private BigDecimal no3;
|
||||||
|
|
||||||
|
@Schema(description = "总硬度")
|
||||||
|
private BigDecimal thrd;
|
||||||
|
|
||||||
|
@Schema(description = "电导率")
|
||||||
|
private BigDecimal cond;
|
||||||
|
|
||||||
|
@Schema(description = "铁")
|
||||||
|
private BigDecimal fe;
|
||||||
|
|
||||||
|
@Schema(description = "锰")
|
||||||
|
private BigDecimal mn;
|
||||||
|
|
||||||
|
@Schema(description = "铝")
|
||||||
|
private BigDecimal al;
|
||||||
|
|
||||||
|
@Schema(description = "叶绿素a")
|
||||||
|
private BigDecimal chla;
|
||||||
|
|
||||||
|
@Schema(description = "透明度")
|
||||||
|
private BigDecimal clarity;
|
||||||
|
|
||||||
|
@Schema(description = "浊度")
|
||||||
|
private BigDecimal tu;
|
||||||
|
|
||||||
|
@Schema(description = "总需氧量")
|
||||||
|
private BigDecimal tod;
|
||||||
|
|
||||||
|
@Schema(description = "蓝绿藻")
|
||||||
|
private BigDecimal cyano;
|
||||||
|
|
||||||
|
@Schema(description = "水质要素最小限值集合")
|
||||||
|
private List<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;
|
||||||
|
}
|
||||||
39
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/StTbYsVo.java
vendored
Normal file
39
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/StTbYsVo.java
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
65
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/StbprpYsVo.java
vendored
Normal file
65
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/StbprpYsVo.java
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
155
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqAlongVo.java
vendored
Normal file
155
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqAlongVo.java
vendored
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
package com.yfd.platform.env.wq.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "沿程水质数据")
|
||||||
|
public class WqAlongVo {
|
||||||
|
|
||||||
|
@Schema(description = "站码")
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
@Schema(description = "所属电站编码")
|
||||||
|
private String rstcd;
|
||||||
|
|
||||||
|
@Schema(description = "站名")
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
@Schema(description = "站类")
|
||||||
|
private String sttp;
|
||||||
|
|
||||||
|
@Schema(description = "采样时间")
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
@Schema(description = "最小时间")
|
||||||
|
private Date minTm;
|
||||||
|
|
||||||
|
@Schema(description = "目标水质类别")
|
||||||
|
private String wwqtg;
|
||||||
|
|
||||||
|
@Schema(description = "实际水质类别")
|
||||||
|
private String wqgrd;
|
||||||
|
|
||||||
|
@Schema(description = "实际水质类别名称")
|
||||||
|
private String wqgrdName;
|
||||||
|
|
||||||
|
@Schema(description = "水温")
|
||||||
|
private BigDecimal wtmp;
|
||||||
|
|
||||||
|
@Schema(description = "PH")
|
||||||
|
private BigDecimal ph;
|
||||||
|
|
||||||
|
@Schema(description = "溶解氧")
|
||||||
|
private BigDecimal dox;
|
||||||
|
|
||||||
|
@Schema(description = "高锰酸盐指数")
|
||||||
|
private BigDecimal codmn;
|
||||||
|
|
||||||
|
@Schema(description = "化学需氧量")
|
||||||
|
private BigDecimal codcr;
|
||||||
|
|
||||||
|
@Schema(description = "五日生化需氧量")
|
||||||
|
private BigDecimal bod5;
|
||||||
|
|
||||||
|
@Schema(description = "氨氮")
|
||||||
|
private BigDecimal nh3n;
|
||||||
|
|
||||||
|
@Schema(description = "总磷")
|
||||||
|
private BigDecimal tp;
|
||||||
|
|
||||||
|
@Schema(description = "总氮")
|
||||||
|
private BigDecimal tn;
|
||||||
|
|
||||||
|
@Schema(description = "铜")
|
||||||
|
private BigDecimal cu;
|
||||||
|
|
||||||
|
@Schema(description = "锌")
|
||||||
|
private BigDecimal zn;
|
||||||
|
|
||||||
|
@Schema(description = "氟化物")
|
||||||
|
private BigDecimal f;
|
||||||
|
|
||||||
|
@Schema(description = "硒")
|
||||||
|
private BigDecimal se;
|
||||||
|
|
||||||
|
@Schema(description = "砷")
|
||||||
|
private BigDecimal ars;
|
||||||
|
|
||||||
|
@Schema(description = "汞")
|
||||||
|
private BigDecimal hg;
|
||||||
|
|
||||||
|
@Schema(description = "镉")
|
||||||
|
private BigDecimal cd;
|
||||||
|
|
||||||
|
@Schema(description = "六价铬")
|
||||||
|
private BigDecimal cr6;
|
||||||
|
|
||||||
|
@Schema(description = "铅")
|
||||||
|
private BigDecimal pb;
|
||||||
|
|
||||||
|
@Schema(description = "氰化物")
|
||||||
|
private BigDecimal cn;
|
||||||
|
|
||||||
|
@Schema(description = "挥发酚")
|
||||||
|
private BigDecimal vlph;
|
||||||
|
|
||||||
|
@Schema(description = "石油类")
|
||||||
|
private BigDecimal oil;
|
||||||
|
|
||||||
|
@Schema(description = "阴离子表面活性剂")
|
||||||
|
private BigDecimal las;
|
||||||
|
|
||||||
|
@Schema(description = "硫化物")
|
||||||
|
private BigDecimal s2;
|
||||||
|
|
||||||
|
@Schema(description = "粪大肠菌群")
|
||||||
|
private BigDecimal fcg;
|
||||||
|
|
||||||
|
@Schema(description = "氯化物")
|
||||||
|
private BigDecimal cl;
|
||||||
|
|
||||||
|
@Schema(description = "硫酸盐")
|
||||||
|
private BigDecimal so4;
|
||||||
|
|
||||||
|
@Schema(description = "硝酸盐氮")
|
||||||
|
private BigDecimal no3;
|
||||||
|
|
||||||
|
@Schema(description = "总硬度")
|
||||||
|
private BigDecimal thrd;
|
||||||
|
|
||||||
|
@Schema(description = "电导率")
|
||||||
|
private BigDecimal cond;
|
||||||
|
|
||||||
|
@Schema(description = "铁")
|
||||||
|
private BigDecimal fe;
|
||||||
|
|
||||||
|
@Schema(description = "锰")
|
||||||
|
private BigDecimal mn;
|
||||||
|
|
||||||
|
@Schema(description = "铝")
|
||||||
|
private BigDecimal al;
|
||||||
|
|
||||||
|
@Schema(description = "叶绿素a")
|
||||||
|
private BigDecimal chla;
|
||||||
|
|
||||||
|
@Schema(description = "透明度")
|
||||||
|
private BigDecimal clarity;
|
||||||
|
|
||||||
|
@Schema(description = "浊度")
|
||||||
|
private BigDecimal tu;
|
||||||
|
|
||||||
|
@Schema(description = "蓝绿藻")
|
||||||
|
private BigDecimal cyano;
|
||||||
|
|
||||||
|
@Schema(description = "水质要素最小限值集合")
|
||||||
|
private List<Map<String, Object>> min;
|
||||||
|
|
||||||
|
@Schema(description = "水质要素最大限值集合")
|
||||||
|
private List<Map<String, Object>> max;
|
||||||
|
}
|
||||||
152
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqBaseInfoVo.java
vendored
Normal file
152
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqBaseInfoVo.java
vendored
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
package com.yfd.platform.env.wq.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "水质基础站点信息")
|
||||||
|
public class WqBaseInfoVo {
|
||||||
|
|
||||||
|
@Schema(description = "站码")
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
@Schema(description = "站名")
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
@Schema(description = "数据时间")
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
@Schema(description = "站类")
|
||||||
|
private String sttp;
|
||||||
|
|
||||||
|
@Schema(description = "经度")
|
||||||
|
private Double lgtd;
|
||||||
|
|
||||||
|
@Schema(description = "纬度")
|
||||||
|
private Double lttd;
|
||||||
|
|
||||||
|
@Schema(description = "海拔")
|
||||||
|
private Double elev;
|
||||||
|
|
||||||
|
@Schema(description = "站址")
|
||||||
|
private String stlc;
|
||||||
|
|
||||||
|
@Schema(description = "水质目标")
|
||||||
|
private String wwqtg;
|
||||||
|
|
||||||
|
@Schema(description = "水质建设类型")
|
||||||
|
private String wqtype;
|
||||||
|
|
||||||
|
@Schema(description = "建成日期")
|
||||||
|
private Date jcdt;
|
||||||
|
|
||||||
|
@Schema(description = "退役日期")
|
||||||
|
private Date wddt;
|
||||||
|
|
||||||
|
@Schema(description = "建设状态分类")
|
||||||
|
private Integer bldsttCode;
|
||||||
|
|
||||||
|
@Schema(description = "简介")
|
||||||
|
private String introduce;
|
||||||
|
|
||||||
|
@Schema(description = "LOGO")
|
||||||
|
private String logo;
|
||||||
|
|
||||||
|
@Schema(description = "介绍图片")
|
||||||
|
private String inffile;
|
||||||
|
|
||||||
|
@Schema(description = "是否启用")
|
||||||
|
private Integer usfl;
|
||||||
|
|
||||||
|
@Schema(description = "数据是否接入")
|
||||||
|
private Integer dtin;
|
||||||
|
|
||||||
|
@Schema(description = "数据接入来源")
|
||||||
|
private String dtinSrc;
|
||||||
|
|
||||||
|
@Schema(description = "数据接入类型")
|
||||||
|
private Integer dtinType;
|
||||||
|
|
||||||
|
@Schema(description = "数据接入开始时间")
|
||||||
|
private Date dtinTm;
|
||||||
|
|
||||||
|
@Schema(description = "监测方式")
|
||||||
|
private Integer mway;
|
||||||
|
|
||||||
|
@Schema(description = "监测指标")
|
||||||
|
private String stindx;
|
||||||
|
|
||||||
|
@Schema(description = "排序")
|
||||||
|
private Integer orderIndex;
|
||||||
|
|
||||||
|
@Schema(description = "所属电站编码")
|
||||||
|
private String rstcd;
|
||||||
|
|
||||||
|
@Schema(description = "所属电站名称")
|
||||||
|
private String ennm;
|
||||||
|
|
||||||
|
@Schema(description = "所属基地编码")
|
||||||
|
private String baseId;
|
||||||
|
|
||||||
|
@Schema(description = "所属基地名称")
|
||||||
|
private String baseName;
|
||||||
|
|
||||||
|
@Schema(description = "基地流域编码")
|
||||||
|
private String hbrvcd;
|
||||||
|
|
||||||
|
@Schema(description = "基地流域名称")
|
||||||
|
private String hbrvcdName;
|
||||||
|
|
||||||
|
@Schema(description = "流域编码")
|
||||||
|
private String rvcd;
|
||||||
|
|
||||||
|
@Schema(description = "流域名称")
|
||||||
|
private String rvcdName;
|
||||||
|
|
||||||
|
@Schema(description = "行政区编码")
|
||||||
|
private String addvcd;
|
||||||
|
|
||||||
|
@Schema(description = "行政区名称")
|
||||||
|
private String addvcdName;
|
||||||
|
|
||||||
|
@Schema(description = "所属栖息地编码")
|
||||||
|
private String fhstcd;
|
||||||
|
|
||||||
|
@Schema(description = "是否关联断面")
|
||||||
|
private Integer ispro;
|
||||||
|
|
||||||
|
@Schema(description = "数据监测频次")
|
||||||
|
private Integer dtfrqcy;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "数据来源")
|
||||||
|
private String vlsr;
|
||||||
|
|
||||||
|
@Schema(description = "数据来源时间")
|
||||||
|
private Date vlsrTm;
|
||||||
|
|
||||||
|
@Schema(description = "创建人")
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新人")
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除")
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
@Schema(description = "删除人")
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
@Schema(description = "删除时间")
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
15
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqMsstbprptGroupVo.java
vendored
Normal file
15
backend/src/main/java/com/yfd/platform/env/wq/entity/vo/WqMsstbprptGroupVo.java
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wq.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,11 +7,14 @@ import java.io.Serializable;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "水温表基本数据")
|
@Schema(description = "水质基础站点列表")
|
||||||
public class SdWtBaseInfoVO implements Serializable {
|
public class WqVmsstbprptVo 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;
|
||||||
|
|
||||||
@ -27,7 +30,7 @@ public class SdWtBaseInfoVO 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 = "站类")
|
||||||
@ -47,4 +50,16 @@ public class SdWtBaseInfoVO 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;
|
||||||
}
|
}
|
||||||
30
backend/src/main/java/com/yfd/platform/env/wq/service/EnvWqDataService.java
vendored
Normal file
30
backend/src/main/java/com/yfd/platform/env/wq/service/EnvWqDataService.java
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
2317
backend/src/main/java/com/yfd/platform/env/wq/service/impl/EnvWqDataServiceImpl.java
vendored
Normal file
2317
backend/src/main/java/com/yfd/platform/env/wq/service/impl/EnvWqDataServiceImpl.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.controller;
|
package com.yfd.platform.env.wt.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.entity.vo.WtrvInfo;
|
import com.yfd.platform.env.wt.entity.vo.WtrvInfo;
|
||||||
import com.yfd.platform.env.service.*;
|
import com.yfd.platform.env.wt.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,8 +17,6 @@ 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
|
||||||
@ -144,6 +142,12 @@ 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) {
|
||||||
@ -156,19 +160,43 @@ public class SdWTMonitorController {
|
|||||||
return ResponseResult.successData(this.alongListService.getYearList(dataSourceRequest));
|
return ResponseResult.successData(this.alongListService.getYearList(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/yearDetail/GetKendoListCust")
|
||||||
@PostMapping("/base/evnmAutoMonitor/GetKendoListCust")
|
@Operation(summary = "水温年内分布二级列表")
|
||||||
@Operation(summary = "查询水温监测数量")
|
public ResponseResult getYearDetailList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
public ResponseResult getWTDataCount(@RequestBody(required = false) DataSourceRequest dataSourceRequest) {
|
return ResponseResult.successData(sdWtMonitorService.getYearDetailList(dataSourceRequest));
|
||||||
return ResponseResult.successData(sdWtMonitorService.getEvnmAutoMonitorList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/base/vmsstbprpt/GetKendoList")
|
|
||||||
|
@PostMapping("/evnmAutoMonitor/GetKendoListCust")
|
||||||
|
@Operation(summary = "查询水温监测数量")
|
||||||
|
public ResponseResult getWTDataCount(@RequestBody(required = false) DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(sdWtMonitorService.getEvnmAutoMonitorList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/dwInfo/GetKendoListCust")
|
||||||
|
@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) {
|
||||||
@ -181,6 +209,12 @@ 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) {
|
||||||
29
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/DfltkwFacilityCountVo.java
vendored
Normal file
29
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/DfltkwFacilityCountVo.java
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
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,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
24
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/RstcdTreeInfoVo.java
vendored
Normal file
24
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/RstcdTreeInfoVo.java
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.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.entity.vo;
|
package com.yfd.platform.env.wt.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.entity.vo;
|
package com.yfd.platform.env.wt.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
38
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SdMonthDetailVO.java
vendored
Normal file
38
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SdMonthDetailVO.java
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.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;
|
||||||
82
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SdWtBaseInfoVO.java
vendored
Normal file
82
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SdWtBaseInfoVO.java
vendored
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
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,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.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,12 +1,10 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.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
|
||||||
50
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SdYearDetailVO.java
vendored
Normal file
50
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SdYearDetailVO.java
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
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,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.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.entity.vo;
|
package com.yfd.platform.env.wt.entity.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
41
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SttpInfoVo.java
vendored
Normal file
41
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/SttpInfoVo.java
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
60
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/WbsbVo.java
vendored
Normal file
60
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/WbsbVo.java
vendored
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
package com.yfd.platform.env.wt.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "水电基地流域字典")
|
||||||
|
public class WbsbVo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String recordUser;
|
||||||
|
private Date recordTime;
|
||||||
|
private Date modifyTime;
|
||||||
|
private String displayRecordUser;
|
||||||
|
private String isolateType;
|
||||||
|
private String wbsType;
|
||||||
|
private String wbsCode;
|
||||||
|
private String wbsName;
|
||||||
|
private String wbsSname;
|
||||||
|
private String wbsNameEn;
|
||||||
|
private String wbsSnameEn;
|
||||||
|
private Integer enable;
|
||||||
|
private String description;
|
||||||
|
private String parentId;
|
||||||
|
private String parentCode;
|
||||||
|
private Integer treeLevel;
|
||||||
|
private Integer hasChildren;
|
||||||
|
private String objId;
|
||||||
|
private String topWbsType;
|
||||||
|
private String fullPath;
|
||||||
|
private Integer internal;
|
||||||
|
private BigDecimal lgtd;
|
||||||
|
private BigDecimal lttd;
|
||||||
|
private BigDecimal area;
|
||||||
|
private BigDecimal perimeter;
|
||||||
|
private String synopsis;
|
||||||
|
private String introduce;
|
||||||
|
private String logo;
|
||||||
|
private String inffile;
|
||||||
|
private Integer orderIndex;
|
||||||
|
private String filterContent;
|
||||||
|
private String departmentId;
|
||||||
|
private String systemId;
|
||||||
|
private String platformId;
|
||||||
|
private String reachWwqtg;
|
||||||
|
private BigDecimal maxElev;
|
||||||
|
private BigDecimal minElev;
|
||||||
|
private String datTp;
|
||||||
|
private String rvAg;
|
||||||
|
private Integer ifInnRv;
|
||||||
|
private String showControl;
|
||||||
|
private String stcd;
|
||||||
|
private String displayDepartment;
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.entity.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
58
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/WtTreeStcdVo.java
vendored
Normal file
58
backend/src/main/java/com/yfd/platform/env/wt/entity/vo/WtTreeStcdVo.java
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
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,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.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.entity.vo;
|
package com.yfd.platform.env.wt.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,7 +1,6 @@
|
|||||||
package com.yfd.platform.env.entity.vo;
|
package com.yfd.platform.env.wt.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,8 +1,8 @@
|
|||||||
package com.yfd.platform.env.mapper;
|
package com.yfd.platform.env.wt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.entity.vo.SdAlongDetailVO;
|
import com.yfd.platform.env.wt.entity.vo.SdAlongDetailVO;
|
||||||
import com.yfd.platform.env.entity.vo.WtrvInfo;
|
import com.yfd.platform.env.wt.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.mapper;
|
package com.yfd.platform.env.wt.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.entity.vo.SdAlongVO;
|
import com.yfd.platform.env.wt.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.mapper;
|
package com.yfd.platform.env.wt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.entity.vo.SdDzChuiXiangListVO;
|
import com.yfd.platform.env.wt.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.mapper;
|
package com.yfd.platform.env.wt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.entity.vo.SdRvwtSVO;
|
import com.yfd.platform.env.wt.entity.vo.SdRvwtSVO;
|
||||||
import com.yfd.platform.env.entity.vo.StcdVo;
|
import com.yfd.platform.env.wt.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.mapper;
|
package com.yfd.platform.env.wt.mapper;
|
||||||
|
|
||||||
import com.yfd.platform.env.entity.vo.SdWtMonitorCountVO;
|
import com.yfd.platform.env.wt.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.mapper;
|
package com.yfd.platform.env.wt.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.mapper;
|
package com.yfd.platform.env.wt.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.yfd.platform.env.entity.vo.SdWtvtYearVo;
|
import com.yfd.platform.env.wt.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.service;
|
package com.yfd.platform.env.wt.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.entity.vo.SdAlongDetailVO;
|
import com.yfd.platform.env.wt.entity.vo.SdAlongDetailVO;
|
||||||
import com.yfd.platform.env.entity.vo.WtrvInfo;
|
import com.yfd.platform.env.wt.entity.vo.WtrvInfo;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -1,10 +1,10 @@
|
|||||||
package com.yfd.platform.env.service;
|
package com.yfd.platform.env.wt.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.entity.vo.SdYearListVO;
|
import com.yfd.platform.env.wt.entity.vo.SdYearListVO;
|
||||||
import com.yfd.platform.env.entity.vo.StcdVo;
|
import com.yfd.platform.env.wt.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,10 +1,8 @@
|
|||||||
package com.yfd.platform.env.service;
|
package com.yfd.platform.env.wt.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.service;
|
package com.yfd.platform.env.wt.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.entity.vo.SdRvwtSVO;
|
import com.yfd.platform.env.wt.entity.vo.SdRvwtSVO;
|
||||||
import com.yfd.platform.env.entity.vo.StcdVo;
|
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
||||||
|
|
||||||
public interface SdRvwtSInOutOneService {
|
public interface SdRvwtSInOutOneService {
|
||||||
|
|
||||||
41
backend/src/main/java/com/yfd/platform/env/wt/service/SdWtMonitorService.java
vendored
Normal file
41
backend/src/main/java/com/yfd/platform/env/wt/service/SdWtMonitorService.java
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.service;
|
package com.yfd.platform.env.wt.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.service.impl;
|
package com.yfd.platform.env.wt.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,9 +9,11 @@ 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.mapper.AlongDetailMapper;
|
import com.yfd.platform.env.wt.mapper.AlongDetailMapper;
|
||||||
import com.yfd.platform.env.mapper.SdWtrvdrtpSMapper;
|
import com.yfd.platform.env.wt.mapper.SdWtrvdrtpSMapper;
|
||||||
import com.yfd.platform.env.service.AlongDetailService;
|
import com.yfd.platform.env.wt.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;
|
||||||
@ -50,6 +52,7 @@ 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)不能为空.");
|
||||||
@ -85,6 +88,9 @@ 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);
|
||||||
@ -108,6 +114,9 @@ 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.service.impl;
|
package com.yfd.platform.env.wt.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,13 +10,12 @@ 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.entity.vo.SdAlongVO;
|
import com.yfd.platform.env.wt.entity.vo.SdAlongVO;
|
||||||
import com.yfd.platform.env.entity.vo.SdYearListVO;
|
import com.yfd.platform.env.wt.entity.vo.SdYearListVO;
|
||||||
import com.yfd.platform.env.entity.vo.StcdVo;
|
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
||||||
import com.yfd.platform.env.mapper.AlongListMapper;
|
import com.yfd.platform.env.wt.mapper.AlongListMapper;
|
||||||
import com.yfd.platform.env.service.AlongListService;
|
import com.yfd.platform.env.wt.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;
|
||||||
@ -72,7 +71,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 >= #{tm} AND TM <= #{tm_1} AND WT IS NOT NULL ) t3 " +
|
"\t(SELECT STCD FROM SD_WTRV_R WHERE TM >= #{dt} AND TM <= #{dt_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<>();
|
||||||
@ -312,6 +311,7 @@ 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,7 +323,9 @@ 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 ")
|
||||||
@ -339,6 +341,7 @@ 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,20 +1,21 @@
|
|||||||
package com.yfd.platform.env.service.impl;
|
package com.yfd.platform.env.wt.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.env.entity.vo.SdDzChuiXiangListVO;
|
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||||
import com.yfd.platform.env.mapper.SdDzChuiXiangListMapper;
|
import com.yfd.platform.env.wt.entity.vo.SdDzChuiXiangListVO;
|
||||||
import com.yfd.platform.env.service.SdDzChuiXiangListService;
|
import com.yfd.platform.env.wt.mapper.SdDzChuiXiangListMapper;
|
||||||
|
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实现类
|
||||||
@ -28,12 +29,23 @@ 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<>();
|
||||||
@ -46,4 +58,19 @@ 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.yfd.platform.env.service.impl;
|
package com.yfd.platform.env.wt.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.entity.vo.SdRvwtSVO;
|
import com.yfd.platform.env.wt.entity.vo.SdRvwtSVO;
|
||||||
import com.yfd.platform.env.entity.vo.StcdVo;
|
import com.yfd.platform.env.wt.entity.vo.StcdVo;
|
||||||
import com.yfd.platform.env.mapper.SdRvwtSInOutOneMapper;
|
import com.yfd.platform.env.wt.mapper.SdRvwtSInOutOneMapper;
|
||||||
import com.yfd.platform.env.service.SdRvwtSInOutOneService;
|
import com.yfd.platform.env.wt.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;
|
||||||
2086
backend/src/main/java/com/yfd/platform/env/wt/service/impl/SdWtMonitorServiceImpl.java
vendored
Normal file
2086
backend/src/main/java/com/yfd/platform/env/wt/service/impl/SdWtMonitorServiceImpl.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,21 @@
|
|||||||
package com.yfd.platform.env.service.impl;
|
package com.yfd.platform.env.wt.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.env.entity.vo.SdWtvtYearVo;
|
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||||
import com.yfd.platform.env.mapper.SdWtvtRMapper;
|
import com.yfd.platform.env.wt.entity.vo.SdWtvtYearVo;
|
||||||
import com.yfd.platform.env.service.SdWtvtRService;
|
import com.yfd.platform.env.wt.mapper.SdWtvtRMapper;
|
||||||
|
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实现类
|
||||||
@ -27,21 +29,45 @@ 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -44,9 +44,13 @@ 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(dir)) {
|
if ("desc".equals(normalizedDir)) {
|
||||||
orderByBuilder.append(selector).append(" desc");
|
orderByBuilder.append(selector).append(" desc");
|
||||||
} else {
|
} else {
|
||||||
orderByBuilder.append(selector).append(" asc");
|
orderByBuilder.append(selector).append(" asc");
|
||||||
|
|||||||
@ -77,6 +77,36 @@ 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()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user