Merge branch 'main' of http://121.37.111.42:3000/zhengsl/WholeProcessPlatform into main_hzz
This commit is contained in:
commit
d177ebec69
@ -64,12 +64,14 @@ public class SecurityConfig {
|
||||
// .requestMatchers("/eng/**").permitAll()
|
||||
// .requestMatchers("/eq/**").permitAll()
|
||||
// .requestMatchers("/env/**").permitAll()
|
||||
// .requestMatchers("/warn/**").permitAll()
|
||||
// .requestMatchers("/wt/**").permitAll()
|
||||
// .requestMatchers("/fb/**").permitAll()
|
||||
// .requestMatchers("/zq/**").permitAll()
|
||||
// .requestMatchers("/wq/**").permitAll()
|
||||
// .requestMatchers("/vd/**").permitAll()
|
||||
// .requestMatchers("/fp/**").permitAll()
|
||||
// .requestMatchers("/fpr/**").permitAll()
|
||||
// .requestMatchers("/fh/**").permitAll()
|
||||
// .requestMatchers("/data/**").permitAll()
|
||||
.requestMatchers("/sms/**").permitAll()
|
||||
|
||||
@ -64,14 +64,14 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvWTApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.1 全过程-生态环保数据服务-水温监测")
|
||||
.group("3.1 全过程-生态环保数据服务-水温监测(wt)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.wt.controller")
|
||||
.build();
|
||||
}
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvWQApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.2 全过程-生态环保数据服务-水质监测")
|
||||
.group("3.2 全过程-生态环保数据服务-水质监测(wq)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.wq.controller")
|
||||
.build();
|
||||
}
|
||||
@ -79,7 +79,7 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvFPApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.3 全过程-生态环保数据服务-过鱼设施")
|
||||
.group("3.3 全过程-生态环保数据服务-过鱼设施(fp)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.fp.controller")
|
||||
.build();
|
||||
}
|
||||
@ -87,7 +87,7 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvVDApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.3.1 全过程-生态环保数据服务-过鱼设施-过鱼监测(VD视频模块)")
|
||||
.group("3.3.1 全过程-生态环保数据服务-过鱼设施-过鱼监测(vd视频模块)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.vd.controller")
|
||||
.build();
|
||||
}
|
||||
@ -97,7 +97,7 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvFHApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.4 全过程-生态环保数据服务-栖息地")
|
||||
.group("3.4 全过程-生态环保数据服务-栖息地(fh)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.fh.controller")
|
||||
.build();
|
||||
}
|
||||
@ -105,7 +105,7 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvZQApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.4.1 全过程-生态环保数据服务-栖息地-水文模块")
|
||||
.group("3.4.1 全过程-生态环保数据服务-栖息地-水文模块(zq)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.zq.controller")
|
||||
.build();
|
||||
}
|
||||
@ -114,7 +114,7 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvVapApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.5 全过程-生态环保数据服务-珍稀动植物")
|
||||
.group("3.5 全过程-生态环保数据服务-珍稀动植物(vap)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.vap.controller")
|
||||
.build();
|
||||
}
|
||||
@ -122,7 +122,7 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvFprApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.6 全过程-生态环保数据服务-鱼类调查")
|
||||
.group("3.6 全过程-生态环保数据服务-鱼类调查(fpr)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.fpr.controller")
|
||||
.build();
|
||||
}
|
||||
@ -130,11 +130,21 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvFbApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.7 全过程-生态环保数据服务-增殖放流")
|
||||
.group("3.7 全过程-生态环保数据服务-增殖放流(fb)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.fb.controller")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi groupEnvWarnApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("3.8 全过程-生态环保数据服务-智能告警(warn)")
|
||||
.packagesToScan("com.yfd.platform.qgc_env.warn.controller")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -150,7 +160,7 @@ public class SwaggerConfig {
|
||||
@Bean
|
||||
public GroupedOpenApi groupEngEqApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("4.1. 全过程-常规水电数据服务-生态流量")
|
||||
.group("4.1. 全过程-常规水电数据服务-生态流量(eq)")
|
||||
.packagesToScan("com.yfd.platform.qgc_eng.eq.controller")
|
||||
.build();
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import com.yfd.platform.annotation.Log;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBHOperateRequest;
|
||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBHRequest;
|
||||
import com.yfd.platform.qgc_base.service.ISdEngInfoBHService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@ -91,16 +92,16 @@ public class SdEngInfoBHController {
|
||||
@Log(module = "电站管理", value = "新增电站")
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "新增电站")
|
||||
public ResponseResult add(@RequestBody SdEngInfoBH engInfo) {
|
||||
boolean result = engInfoBHService.addEngInfo(engInfo);
|
||||
public ResponseResult add(@RequestBody SdEngInfoBHOperateRequest request) {
|
||||
boolean result = engInfoBHService.addEngInfo(request.getEngInfo(), request.getSource());
|
||||
return result ? ResponseResult.success("新增成功") : ResponseResult.error("新增失败");
|
||||
}
|
||||
|
||||
@Log(module = "电站管理", value = "修改电站")
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "修改电站")
|
||||
public ResponseResult update(@RequestBody SdEngInfoBH engInfo) {
|
||||
boolean result = engInfoBHService.updateEngInfo(engInfo);
|
||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) {
|
||||
boolean result = engInfoBHService.updateEngInfo(request.getEngInfo(), request.getSource());
|
||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||
}
|
||||
|
||||
@ -111,4 +112,5 @@ public class SdEngInfoBHController {
|
||||
boolean result = engInfoBHService.deleteEngInfo(stcd);
|
||||
return result ? ResponseResult.success("删除成功") : ResponseResult.error("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -27,6 +27,12 @@ public class SdEngMonitorController {
|
||||
return ResponseResult.successData(engInfoBHService.getStInfoByStcd(stcd));
|
||||
}
|
||||
|
||||
@GetMapping("/msstbprpt/getStcdInfo")
|
||||
@Operation(summary = "根据站码查询电站详情兼容结构")
|
||||
public ResponseResult getStcdInfo(@RequestParam String stcd) {
|
||||
return ResponseResult.successData(engInfoBHService.getStcdInfo(stcd));
|
||||
}
|
||||
|
||||
@PostMapping("/eiaapproval/GetKendoList")
|
||||
@Operation(summary = "查询生态环保批复文件列表")
|
||||
public ResponseResult getEiaapprovalKendoList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
|
||||
@ -111,6 +111,15 @@ public class SdRvcdDicController {
|
||||
return ResponseResult.successData(rvcdDicService.selectForDropdown(rvnm, rvcd));
|
||||
}
|
||||
|
||||
@GetMapping("/selectRvcdDropdown")
|
||||
@Operation(summary = "流域下拉框列表查询")
|
||||
public ResponseResult selectRvcdDropdown(
|
||||
@RequestParam(required = false) String rvnm,
|
||||
@RequestParam(required = false) String baseId
|
||||
) {
|
||||
return ResponseResult.successData(rvcdDicService.selectRvcdDropdown(rvnm,baseId));
|
||||
}
|
||||
|
||||
@GetMapping("/regDropdown")
|
||||
@Operation(summary = "下拉框列表查询(注册)")
|
||||
public ResponseResult regDropdown(
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
package com.yfd.platform.qgc_base.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("MS_OPERATION_LOG")
|
||||
public class MsOperationLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
@TableField("OPERATOR")
|
||||
private String operator;
|
||||
|
||||
@TableField("OPERATE_TIME")
|
||||
private Date operateTime;
|
||||
|
||||
@TableField("SOURCE")
|
||||
private String source;
|
||||
|
||||
@TableField("REMARK")
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.yfd.platform.qgc_base.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@TableName("MS_OPERATION_LOG_DETAIL")
|
||||
public class MsOperationLogDetail implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
@TableField("MAIN_ID")
|
||||
private String mainId;
|
||||
|
||||
@TableField("FIELD_CODE")
|
||||
private String fieldCode;
|
||||
|
||||
@TableField("TABLE_NAME")
|
||||
private String tableName;
|
||||
|
||||
@TableField("FIELD_MEANING")
|
||||
private String fieldMeaning;
|
||||
|
||||
@TableField("STATION_CODE")
|
||||
private String stationCode;
|
||||
|
||||
@TableField("OLD_VALUE_CODE")
|
||||
private String oldValueCode;
|
||||
|
||||
@TableField("OLD_VALUE_NAME")
|
||||
private String oldValueName;
|
||||
|
||||
@TableField("NEW_VALUE_CODE")
|
||||
private String newValueCode;
|
||||
|
||||
@TableField("NEW_VALUE_NAME")
|
||||
private String newValueName;
|
||||
|
||||
@TableField("REMARK")
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.yfd.platform.qgc_base.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SdEngInfoBHOperateRequest {
|
||||
|
||||
private SdEngInfoBH engInfo;
|
||||
|
||||
private String source;
|
||||
}
|
||||
@ -13,8 +13,10 @@ public class SdEngInfoBHRequest {
|
||||
private String baseId;
|
||||
private String hbrvcd;
|
||||
private String rvcd;
|
||||
private String reachcd;
|
||||
private List<String> basIds;
|
||||
private List<String> hbrvcds;
|
||||
private List<String> rvcds;
|
||||
// private List<String> rvcds;
|
||||
private String ennm;
|
||||
}
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
package com.yfd.platform.qgc_base.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "电站单站基础信息")
|
||||
public class EngStBaseInfoVo {
|
||||
|
||||
@Schema(description = "站点编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "站点名称")
|
||||
private String stnm;
|
||||
|
||||
@Schema(description = "站类编码")
|
||||
private String sttpCode;
|
||||
|
||||
@Schema(description = "站类名称")
|
||||
private String sttpName;
|
||||
|
||||
@Schema(description = "站类全路径")
|
||||
private String sttpFullPath;
|
||||
|
||||
@Schema(description = "站类层级")
|
||||
private Integer sttpTreeLevel;
|
||||
|
||||
@Schema(description = "关联站点编码")
|
||||
private String stCode;
|
||||
|
||||
@Schema(description = "关联站点名称")
|
||||
private String stName;
|
||||
|
||||
@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;
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.yfd.platform.qgc_base.domain.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Schema(description = "电站详情返回")
|
||||
public class EngStInfoResultVo {
|
||||
|
||||
@Schema(description = "主信息兼容对象")
|
||||
private Map<String, Object> msStbprpT = new LinkedHashMap<>();
|
||||
|
||||
@Schema(description = "测值列表")
|
||||
private List<Object> stcdValVoList = new ArrayList<>();
|
||||
|
||||
@Schema(description = "关联列表")
|
||||
private List<Object> relList = new ArrayList<>();
|
||||
|
||||
@Schema(description = "站点基础信息")
|
||||
private EngStBaseInfoVo stBaseInfo;
|
||||
}
|
||||
@ -20,6 +20,7 @@ public class EngVmsstbprptVo implements Serializable {
|
||||
private String ennm;
|
||||
private String baseId;
|
||||
private String baseName;
|
||||
private String reachcdName;
|
||||
private String hbrvcd;
|
||||
private String hbrvcdName;
|
||||
private String rvcd;
|
||||
@ -33,6 +34,7 @@ public class EngVmsstbprptVo implements Serializable {
|
||||
private Date aiodt;
|
||||
private String bldstt;
|
||||
private Integer bldsttCcode;
|
||||
private String bldsttCcodeName;
|
||||
private Double nrupar;
|
||||
private Double dstcrvr;
|
||||
private Double avyrp;
|
||||
@ -79,6 +81,7 @@ public class EngVmsstbprptVo implements Serializable {
|
||||
private Double ddcp;
|
||||
private Double cpsc;
|
||||
private String rgcp;
|
||||
private String rgcpName;
|
||||
private Double dsflzmxq;
|
||||
private Double dsflzxyz;
|
||||
private Double ckflzmxq;
|
||||
@ -102,7 +105,9 @@ public class EngVmsstbprptVo implements Serializable {
|
||||
private Double unyge;
|
||||
private Double gap;
|
||||
private String dvtp;
|
||||
private String dvtpName;
|
||||
private Integer dtin;
|
||||
private String dtinName;
|
||||
private Integer baseStepSort;
|
||||
private Integer rvcdStepSort;
|
||||
private Integer rstcdStepSort;
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
package com.yfd.platform.qgc_base.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yfd.platform.qgc_base.domain.MsOperationLogDetail;
|
||||
|
||||
public interface MsOperationLogDetailMapper extends BaseMapper<MsOperationLogDetail> {
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package com.yfd.platform.qgc_base.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yfd.platform.qgc_base.domain.MsOperationLog;
|
||||
|
||||
public interface MsOperationLogMapper extends BaseMapper<MsOperationLog> {
|
||||
}
|
||||
@ -32,4 +32,6 @@ public interface SdRvcdDicMapper extends BaseMapper<SdRvcdDic> {
|
||||
* 注册场景下拉框查询,仅返回能被电站表 RVCD 命中的流域
|
||||
*/
|
||||
List<SdRvcdDic> selectRegDropdownWithEng(@Param("rvnm") String rvnm, @Param("rvcd") String rvcd);
|
||||
|
||||
List<SdRvcdDic> selectRvcdDropdown(@Param("rvnm") String rvnm,@Param("baseId") String baseId);
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
package com.yfd.platform.qgc_base.service;
|
||||
|
||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
||||
|
||||
public interface IMsOperationLogService {
|
||||
|
||||
void recordEngAddLog(SdEngInfoBH engInfo, String source);
|
||||
|
||||
void recordEngUpdateLog(SdEngInfoBH before, SdEngInfoBH changeSet, String source);
|
||||
}
|
||||
@ -8,6 +8,7 @@ import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBHRequest;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngBaseInfoVo;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngEiaapprovalVo;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngStInfoResultVo;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngVmsstbprptVo;
|
||||
|
||||
import java.util.List;
|
||||
@ -52,11 +53,15 @@ public interface ISdEngInfoBHService extends IService<SdEngInfoBH> {
|
||||
*/
|
||||
boolean addEngInfo(SdEngInfoBH engInfo);
|
||||
|
||||
boolean addEngInfo(SdEngInfoBH engInfo, String source);
|
||||
|
||||
/**
|
||||
* 修改电站
|
||||
*/
|
||||
boolean updateEngInfo(SdEngInfoBH engInfo);
|
||||
|
||||
boolean updateEngInfo(SdEngInfoBH engInfo, String source);
|
||||
|
||||
/**
|
||||
* 删除电站
|
||||
*/
|
||||
@ -66,6 +71,8 @@ public interface ISdEngInfoBHService extends IService<SdEngInfoBH> {
|
||||
|
||||
EngBaseInfoVo getStInfoByStcd(String stcd);
|
||||
|
||||
EngStInfoResultVo getStcdInfo(String stcd);
|
||||
|
||||
DataSourceResult<EngEiaapprovalVo> getEiaapprovalKendoList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<EngVmsstbprptVo> getVmsstbprptKendoList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
@ -55,5 +55,7 @@ public interface ISdRvcdDicService extends IService<SdRvcdDic> {
|
||||
|
||||
List<SdRvcdDic> selectForDropdown(String rvnm, String rvcd);
|
||||
|
||||
List<SdRvcdDic> selectRvcdDropdown(String rvnm,String baseId);
|
||||
|
||||
List<SdRvcdDic> regDropdown(String rvnm, String rvcd);
|
||||
}
|
||||
|
||||
@ -0,0 +1,213 @@
|
||||
package com.yfd.platform.qgc_base.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.yfd.platform.qgc_base.domain.MsOperationLog;
|
||||
import com.yfd.platform.qgc_base.domain.MsOperationLogDetail;
|
||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
||||
import com.yfd.platform.qgc_base.mapper.MsOperationLogDetailMapper;
|
||||
import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||
import com.yfd.platform.utils.SecurityUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class MsOperationLogServiceImpl implements IMsOperationLogService {
|
||||
|
||||
private static final String ENG_TABLE_NAME = "SD_ENGINFO_B_H";
|
||||
|
||||
private static final Map<String, String> ENG_FIELD_MEANING_MAP = new LinkedHashMap<>();
|
||||
|
||||
static {
|
||||
ENG_FIELD_MEANING_MAP.put("STCD", "电站编码");
|
||||
ENG_FIELD_MEANING_MAP.put("ENNM", "电站名称");
|
||||
ENG_FIELD_MEANING_MAP.put("BASE_ID", "所属基地编码");
|
||||
ENG_FIELD_MEANING_MAP.put("HBRVCD", "所属基地流域编码");
|
||||
ENG_FIELD_MEANING_MAP.put("RVCD", "所属流域编码");
|
||||
ENG_FIELD_MEANING_MAP.put("ADDVCD", "所属行政区编码");
|
||||
ENG_FIELD_MEANING_MAP.put("HYCD", "所属公司编码");
|
||||
ENG_FIELD_MEANING_MAP.put("BLPRD", "所属建设阶段");
|
||||
ENG_FIELD_MEANING_MAP.put("BLDSTT", "建设状态");
|
||||
ENG_FIELD_MEANING_MAP.put("BLDSTT_CODE", "建设状态分类");
|
||||
ENG_FIELD_MEANING_MAP.put("DVTP", "开发方式");
|
||||
ENG_FIELD_MEANING_MAP.put("DTIN", "数据是否接入");
|
||||
ENG_FIELD_MEANING_MAP.put("RGCP", "调节性能");
|
||||
ENG_FIELD_MEANING_MAP.put("LGTD", "经度");
|
||||
ENG_FIELD_MEANING_MAP.put("LTTD", "纬度");
|
||||
ENG_FIELD_MEANING_MAP.put("STLC", "站址");
|
||||
ENG_FIELD_MEANING_MAP.put("ORDER_INDEX", "排序");
|
||||
}
|
||||
|
||||
@Resource
|
||||
private MsOperationLogMapper msOperationLogMapper;
|
||||
|
||||
@Resource
|
||||
private MsOperationLogDetailMapper msOperationLogDetailMapper;
|
||||
|
||||
@Override
|
||||
public void recordEngAddLog(SdEngInfoBH engInfo, String source) {
|
||||
if (engInfo == null) {
|
||||
return;
|
||||
}
|
||||
MsOperationLog mainLog = buildMainLog("新增电站", source);
|
||||
msOperationLogMapper.insert(mainLog);
|
||||
|
||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||
for (Field field : SdEngInfoBH.class.getDeclaredFields()) {
|
||||
if (shouldSkipField(field)) {
|
||||
continue;
|
||||
}
|
||||
field.setAccessible(true);
|
||||
Object newValue = getFieldValue(field, engInfo);
|
||||
if (newValue == null) {
|
||||
continue;
|
||||
}
|
||||
details.add(buildDetail(mainLog.getId(), engInfo.getStcd(), resolveColumnName(field),
|
||||
null, newValue, "新增字段值"));
|
||||
}
|
||||
batchInsertDetails(details);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recordEngUpdateLog(SdEngInfoBH before, SdEngInfoBH changeSet, String source) {
|
||||
if (before == null || changeSet == null) {
|
||||
return;
|
||||
}
|
||||
SdEngInfoBH after = BeanUtil.copyProperties(before, SdEngInfoBH.class);
|
||||
BeanUtil.copyProperties(changeSet, after, CopyOptions.create().ignoreNullValue());
|
||||
|
||||
MsOperationLog mainLog = buildMainLog("修改电站", source);
|
||||
msOperationLogMapper.insert(mainLog);
|
||||
|
||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||
for (Field field : SdEngInfoBH.class.getDeclaredFields()) {
|
||||
if (shouldSkipField(field)) {
|
||||
continue;
|
||||
}
|
||||
field.setAccessible(true);
|
||||
Object oldValue = getFieldValue(field, before);
|
||||
Object newValue = getFieldValue(field, after);
|
||||
if (equalsValue(oldValue, newValue)) {
|
||||
continue;
|
||||
}
|
||||
details.add(buildDetail(mainLog.getId(), after.getStcd(), resolveColumnName(field),
|
||||
oldValue, newValue, "修改字段值"));
|
||||
}
|
||||
batchInsertDetails(details);
|
||||
}
|
||||
|
||||
private MsOperationLog buildMainLog(String remark, String source) {
|
||||
MsOperationLog log = new MsOperationLog();
|
||||
log.setOperator(resolveOperator());
|
||||
log.setOperateTime(new Date());
|
||||
log.setSource(StrUtil.trimToNull(source));
|
||||
log.setRemark(remark);
|
||||
return log;
|
||||
}
|
||||
|
||||
private MsOperationLogDetail buildDetail(String mainId,
|
||||
String stationCode,
|
||||
String fieldCode,
|
||||
Object oldValue,
|
||||
Object newValue,
|
||||
String remark) {
|
||||
MsOperationLogDetail detail = new MsOperationLogDetail();
|
||||
detail.setMainId(mainId);
|
||||
detail.setTableName(ENG_TABLE_NAME);
|
||||
detail.setStationCode(stationCode);
|
||||
detail.setFieldCode(fieldCode);
|
||||
detail.setFieldMeaning(ENG_FIELD_MEANING_MAP.getOrDefault(fieldCode, fieldCode));
|
||||
detail.setOldValueCode(formatValue(oldValue));
|
||||
detail.setOldValueName(formatValue(oldValue));
|
||||
detail.setNewValueCode(formatValue(newValue));
|
||||
detail.setNewValueName(formatValue(newValue));
|
||||
detail.setRemark(remark);
|
||||
return detail;
|
||||
}
|
||||
|
||||
private void batchInsertDetails(List<MsOperationLogDetail> details) {
|
||||
msOperationLogDetailMapper.insert(details);
|
||||
}
|
||||
|
||||
private boolean shouldSkipField(Field field) {
|
||||
if (Modifier.isStatic(field.getModifiers())) {
|
||||
return true;
|
||||
}
|
||||
TableField tableField = field.getAnnotation(TableField.class);
|
||||
if (tableField != null && !tableField.exist()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String resolveColumnName(Field field) {
|
||||
TableId tableId = field.getAnnotation(TableId.class);
|
||||
if (tableId != null) {
|
||||
return camelToUpperUnderline(field.getName());
|
||||
}
|
||||
TableField tableField = field.getAnnotation(TableField.class);
|
||||
if (tableField != null && StrUtil.isNotBlank(tableField.value())) {
|
||||
return tableField.value();
|
||||
}
|
||||
return camelToUpperUnderline(field.getName());
|
||||
}
|
||||
|
||||
private Object getFieldValue(Field field, Object target) {
|
||||
try {
|
||||
return field.get(target);
|
||||
} catch (IllegalAccessException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean equalsValue(Object oldValue, Object newValue) {
|
||||
return StrUtil.equals(formatValue(oldValue), formatValue(newValue));
|
||||
}
|
||||
|
||||
private String formatValue(Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (value instanceof Date date) {
|
||||
return DateUtil.formatDateTime(date);
|
||||
}
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
private String resolveOperator() {
|
||||
try {
|
||||
return SecurityUtils.getCurrentUsername();
|
||||
} catch (Exception ignored) {
|
||||
try {
|
||||
return SecurityUtils.getUserId();
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String camelToUpperUnderline(String text) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 0; i < text.length(); i++) {
|
||||
char ch = text.charAt(i);
|
||||
if (Character.isUpperCase(ch) && i > 0) {
|
||||
builder.append('_');
|
||||
}
|
||||
builder.append(Character.toUpperCase(ch));
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||
@ -19,13 +20,17 @@ import com.yfd.platform.qgc_base.domain.SdEngInfoBH;
|
||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBHRequest;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngBaseInfoVo;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngEiaapprovalVo;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngStBaseInfoVo;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngStInfoResultVo;
|
||||
import com.yfd.platform.qgc_base.domain.vo.EngVmsstbprptVo;
|
||||
import com.yfd.platform.qgc_base.mapper.SdEngInfoBHMapper;
|
||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||
import com.yfd.platform.qgc_base.service.ISdEngInfoBHService;
|
||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||
import com.yfd.platform.utils.SecurityUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -55,6 +60,9 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
@Resource
|
||||
private SysUserDataScopeMapper sysUserDataScopeMapper;
|
||||
|
||||
@Resource
|
||||
private IMsOperationLogService msOperationLogService;
|
||||
|
||||
@Override
|
||||
public Page<SdEngInfoBH> queryPageList(Page<SdEngInfoBH> page, String ennm, String rvcd, String baseId, String hycd) {
|
||||
LambdaQueryWrapper<SdEngInfoBH> wrapper = new LambdaQueryWrapper<>();
|
||||
@ -94,17 +102,20 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
String hbrvcd = sdEngInfoBHRequest.getHbrvcd();
|
||||
String ennm = sdEngInfoBHRequest.getEnnm();
|
||||
String rvcd = sdEngInfoBHRequest.getRvcd();
|
||||
String reachcd = sdEngInfoBHRequest.getReachcd();
|
||||
List<String> rvcds = sdEngInfoBHRequest.getRvcds();
|
||||
List<String> hbrvcds = sdEngInfoBHRequest.getHbrvcds();
|
||||
LambdaQueryWrapper<SdEngInfoBH> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(StringUtils.hasText(baseId), SdEngInfoBH::getBaseId, baseId)
|
||||
.eq(StringUtils.hasText(hbrvcd), SdEngInfoBH::getHbrvcd, hbrvcd)
|
||||
.eq(StrUtil.isNotBlank(reachcd), SdEngInfoBH::getRvcd, reachcd)
|
||||
.eq(StrUtil.isNotBlank(rvcd), SdEngInfoBH::getReachcd, rvcd)
|
||||
.eq(StrUtil.isNotBlank(rvcd), SdEngInfoBH::getReachcd, rvcd)
|
||||
.in(rvcds != null && !rvcds.isEmpty(), SdEngInfoBH::getReachcd, rvcds)
|
||||
.in(hbrvcds != null && !hbrvcds.isEmpty(), SdEngInfoBH::getHbrvcd, hbrvcds)
|
||||
.like(StringUtils.hasText(ennm), SdEngInfoBH::getEnnm, ennm)
|
||||
.select(SdEngInfoBH::getStcd, SdEngInfoBH::getEnnm, SdEngInfoBH::getBaseId)
|
||||
.orderByAsc(SdEngInfoBH::getOrderIndex);
|
||||
.select(SdEngInfoBH::getStcd, SdEngInfoBH::getEnnm, SdEngInfoBH::getReachcdName, SdEngInfoBH::getYrgeb, SdEngInfoBH::getBaseId)
|
||||
.orderByAsc(SdEngInfoBH::getBaseId,SdEngInfoBH::getOrderIndex);
|
||||
|
||||
if("admin".equals(SecurityUtils.getCurrentUsername())){
|
||||
return this.list(wrapper);
|
||||
@ -186,17 +197,39 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
|
||||
@Override
|
||||
public boolean addEngInfo(SdEngInfoBH engInfo) {
|
||||
return this.save(engInfo);
|
||||
return addEngInfo(engInfo, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addEngInfo(SdEngInfoBH engInfo, String source) {
|
||||
boolean result = this.save(engInfo);
|
||||
if (result) {
|
||||
msOperationLogService.recordEngAddLog(engInfo, source);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateEngInfo(SdEngInfoBH engInfo) {
|
||||
return this.updateById(engInfo);
|
||||
return updateEngInfo(engInfo, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean updateEngInfo(SdEngInfoBH engInfo, String source) {
|
||||
SdEngInfoBH before = engInfo == null ? null : this.getById(engInfo.getStcd());
|
||||
boolean result = this.updateById(engInfo);
|
||||
if (result && before != null) {
|
||||
msOperationLogService.recordEngUpdateLog(before, engInfo, source);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteEngInfo(String stcd) {
|
||||
return this.removeById(stcd);
|
||||
return this.update( new LambdaUpdateWrapper<SdEngInfoBH>().eq(SdEngInfoBH::getStcd, stcd).set(SdEngInfoBH::getIsDeleted, 1));
|
||||
// return this.removeById(stcd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -369,12 +402,13 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
// }
|
||||
// }
|
||||
|
||||
Page<?> page = null;
|
||||
if (dataSourceRequest.getTake() > 0) {
|
||||
page = new Page<>(dataSourceRequest.getSkip() / dataSourceRequest.getTake() + 1,
|
||||
dataSourceRequest.getTake());
|
||||
}
|
||||
|
||||
// Page<?> page = null;
|
||||
// if (dataSourceRequest.getTake() > 0) {
|
||||
// page = new Page<>(dataSourceRequest.getSkip() / dataSourceRequest.getTake() + 1,
|
||||
// dataSourceRequest.getTake());
|
||||
// }
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||
Page<?> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
StringBuilder sql = new StringBuilder(buildEiaapprovalBaseSql());
|
||||
@ -462,6 +496,34 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngStInfoResultVo getStcdInfo(String stcd) {
|
||||
EngBaseInfoVo baseInfo = getStInfoByStcd(stcd);
|
||||
if (baseInfo == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
EngStBaseInfoVo stBaseInfo = new EngStBaseInfoVo();
|
||||
stBaseInfo.setStcd(baseInfo.getStcd());
|
||||
stBaseInfo.setStnm(baseInfo.getStnm());
|
||||
stBaseInfo.setSttpCode(baseInfo.getSttpCode());
|
||||
stBaseInfo.setSttpName(baseInfo.getSttpName());
|
||||
stBaseInfo.setSttpFullPath(baseInfo.getSttpFullPath());
|
||||
stBaseInfo.setSttpTreeLevel(baseInfo.getSttpTreeLevel());
|
||||
stBaseInfo.setStCode(null);
|
||||
stBaseInfo.setStName(null);
|
||||
stBaseInfo.setBaseId(baseInfo.getBaseId());
|
||||
stBaseInfo.setBaseName(baseInfo.getBaseName());
|
||||
stBaseInfo.setHbrvcd(baseInfo.getHbrvcd());
|
||||
stBaseInfo.setHbrvcdName(baseInfo.getHbrvcdName());
|
||||
stBaseInfo.setRvcd(baseInfo.getRvcd());
|
||||
stBaseInfo.setRvcdName(baseInfo.getRvcdName());
|
||||
|
||||
EngStInfoResultVo result = new EngStInfoResultVo();
|
||||
result.setStBaseInfo(stBaseInfo);
|
||||
return result;
|
||||
}
|
||||
|
||||
private String buildVmsstbprptViewSql() {
|
||||
return "SELECT " +
|
||||
"eng.STCD AS id, " +
|
||||
@ -469,6 +531,7 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
"'电站' AS sttpName, " +
|
||||
"eng.STCD AS stcd, " +
|
||||
"eng.ENNM AS stnm, " +
|
||||
"eng.REACHCD_NAME AS reachcdName, " +
|
||||
"eng.ENNM AS ennm, " +
|
||||
"eng.BASE_ID AS baseId, " +
|
||||
"hb.BASENAME AS baseName, " +
|
||||
@ -485,6 +548,11 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
"eng.AIODT AS aiodt, " +
|
||||
"eng.BLDSTT AS bldstt, " +
|
||||
"eng.BLDSTT_CODE AS bldsttCcode, " +
|
||||
"CASE " +
|
||||
" WHEN eng.BLDSTT_CODE = 0 OR eng.BLDSTT_CODE IS NULL THEN '未建/规划' " +
|
||||
" WHEN eng.BLDSTT_CODE = 1 THEN '在建' " +
|
||||
" WHEN eng.BLDSTT_CODE = 2 THEN '已建' " +
|
||||
" ELSE NULL END AS bldsttCcodeName, " +
|
||||
"eng.NRUPAR AS nrupar, " +
|
||||
"eng.DSTCRVR AS dstcrvr, " +
|
||||
"eng.AVYRP AS avyrp, " +
|
||||
@ -531,6 +599,17 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
"CAST(NULL AS NUMBER) AS ddcp, " +
|
||||
"eng.CPSC AS cpsc, " +
|
||||
"eng.RGCP AS rgcp, " +
|
||||
"CASE eng.RGCP " +
|
||||
" WHEN '1' THEN '多年调节' " +
|
||||
" WHEN '2' THEN '年调节' " +
|
||||
" WHEN '3' THEN '不完全年调节' " +
|
||||
" WHEN '4' THEN '径流式(无调节)' " +
|
||||
" WHEN '5' THEN '季调节' " +
|
||||
" WHEN '6' THEN '月调节' " +
|
||||
" WHEN '7' THEN '周调节' " +
|
||||
" WHEN '8' THEN '日调节' " +
|
||||
" WHEN '9' THEN '其他' " +
|
||||
" ELSE NULL END AS rgcpName, " +
|
||||
"eng.DSMXQ AS dsflzmxq, " +
|
||||
"CAST(NULL AS NUMBER) AS dsflzxyz, " +
|
||||
"eng.CHMXQ AS ckflzmxq, " +
|
||||
@ -554,7 +633,16 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
"CAST(NULL AS NUMBER) AS unyge, " +
|
||||
"eng.GAP AS gap, " +
|
||||
"eng.DVTP AS dvtp, " +
|
||||
"CASE eng.DVTP " +
|
||||
" WHEN '1' THEN '堤坝式' " +
|
||||
" WHEN '2' THEN '引水式' " +
|
||||
" WHEN '3' THEN '混合式' " +
|
||||
" ELSE NULL END AS dvtpName, " +
|
||||
"eng.DTIN AS dtin, " +
|
||||
"CASE NVL(eng.DTIN, 0) " +
|
||||
" WHEN 0 THEN '否' " +
|
||||
" WHEN 1 THEN '是' " +
|
||||
" ELSE NULL END AS dtinName, " +
|
||||
"NVL(hb.ORDER_INDEX, 999999) AS baseStepSort, " +
|
||||
"NVL(along.ORDER_INDEX, 999999) AS rvcdStepSort, " +
|
||||
"NVL(rstSort.SORT, 999999) AS rstcdStepSort, " +
|
||||
@ -611,6 +699,7 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
columns.put("stnm", "t.stnm AS stnm");
|
||||
columns.put("ennm", "t.ennm AS ennm");
|
||||
columns.put("baseId", "t.baseId AS baseId");
|
||||
columns.put("reachcdName", "t.reachcdName AS reachcdName");
|
||||
columns.put("baseName", "t.baseName AS baseName");
|
||||
columns.put("hbrvcd", "t.hbrvcd AS hbrvcd");
|
||||
columns.put("hbrvcdName", "t.hbrvcdName AS hbrvcdName");
|
||||
@ -625,6 +714,7 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
columns.put("aiodt", "t.aiodt AS aiodt");
|
||||
columns.put("bldstt", "t.bldstt AS bldstt");
|
||||
columns.put("bldsttCcode", "t.bldsttCcode AS bldsttCcode");
|
||||
columns.put("bldsttCcodeName", "t.bldsttCcodeName AS bldsttCcodeName");
|
||||
columns.put("nrupar", "t.nrupar AS nrupar");
|
||||
columns.put("dstcrvr", "t.dstcrvr AS dstcrvr");
|
||||
columns.put("avyrp", "t.avyrp AS avyrp");
|
||||
@ -671,6 +761,7 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
columns.put("ddcp", "t.ddcp AS ddcp");
|
||||
columns.put("cpsc", "t.cpsc AS cpsc");
|
||||
columns.put("rgcp", "t.rgcp AS rgcp");
|
||||
columns.put("rgcpName", "t.rgcpName AS rgcpName");
|
||||
columns.put("dsflzmxq", "t.dsflzmxq AS dsflzmxq");
|
||||
columns.put("dsflzxyz", "t.dsflzxyz AS dsflzxyz");
|
||||
columns.put("ckflzmxq", "t.ckflzmxq AS ckflzmxq");
|
||||
@ -694,7 +785,9 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
||||
columns.put("unyge", "t.unyge AS unyge");
|
||||
columns.put("gap", "t.gap AS gap");
|
||||
columns.put("dvtp", "t.dvtp AS dvtp");
|
||||
columns.put("dvtpName", "t.dvtpName AS dvtpName");
|
||||
columns.put("dtin", "t.dtin AS dtin");
|
||||
columns.put("dtinName", "t.dtinName AS dtinName");
|
||||
columns.put("baseStepSort", "t.baseStepSort AS baseStepSort");
|
||||
columns.put("rvcdStepSort", "t.rvcdStepSort AS rvcdStepSort");
|
||||
columns.put("rstcdStepSort", "t.rstcdStepSort AS rstcdStepSort");
|
||||
|
||||
@ -149,6 +149,12 @@ public class SdRvcdDicServiceImpl extends ServiceImpl<SdRvcdDicMapper, SdRvcdDic
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SdRvcdDic> selectRvcdDropdown(String rvnm,String baseId) {
|
||||
List<SdRvcdDic> dropdownList = this.baseMapper.selectRvcdDropdown(rvnm,baseId);
|
||||
return dropdownList;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Set<String> getUserAuthorizedStationCodes() {
|
||||
|
||||
@ -4,8 +4,12 @@ import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqBaseMsstbprptVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqBaseVmsstbprptVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqDrtpDataVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqIntervalVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqLimitQueryVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqLimitVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqMsstbprptVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqRuleVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqVmsstbprptVo;
|
||||
@ -22,6 +26,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/eq")
|
||||
@Tag(name = "电站实时数据查询")
|
||||
@ -56,6 +62,12 @@ public class EngEqDataController {
|
||||
return ResponseResult.successData(engEqDataService.getIntervalKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/to/eq/GetKendoListCust")
|
||||
@Operation(summary = "电站生态流量统计查询(电站左连接)")
|
||||
public ResponseResult getToEqKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(engEqDataService.getIntervalKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/msstbprpt/GetKendoList")
|
||||
@Operation(summary = "电站基础信息查询")
|
||||
public ResponseResult getMsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
@ -63,6 +75,20 @@ public class EngEqDataController {
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/base/msstbprpt/GetKendoList")
|
||||
@Operation(summary = "生态流量泄放设施基础信息查询")
|
||||
public ResponseResult getBaseMsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
DataSourceResult<EngEqBaseMsstbprptVo> result = engEqDataService.getBaseMsstbprptList(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/base/vmsstbprpt/GetKendoList")
|
||||
@Operation(summary = "生态流量泄放设施统计查询")
|
||||
public ResponseResult getBaseVmsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
DataSourceResult<EngEqBaseVmsstbprptVo> result = engEqDataService.getBaseVmsstbprptList(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/interval/qgc/hour/GetKendoListCust")
|
||||
@Operation(summary = "生态流量达标率小时统计(二级页面)")
|
||||
public ResponseResult getQgcHourKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
@ -81,6 +107,13 @@ public class EngEqDataController {
|
||||
return ResponseResult.successData(engEqDataService.getQgcHourVAlongKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/engalong/statistics/qgc/getEngLimit")
|
||||
@Operation(summary = "沿程生态流量限值变化曲线")
|
||||
public ResponseResult getQgcEngLimit(@RequestBody EngEqLimitQueryVo queryVo) {
|
||||
List<EngEqLimitVo> result = engEqDataService.getQgcEngLimit(queryVo);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/fid/GetKendoListCust")
|
||||
@Operation(summary = "查询电站相关鱼类附件编码")
|
||||
public ResponseResult getFidKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
|
||||
@ -0,0 +1,77 @@
|
||||
package com.yfd.platform.qgc_eng.eq.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 EngEqBaseMsstbprptVo 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 sttpName;
|
||||
|
||||
@Schema(description = "所属电站编码")
|
||||
private String rstcd;
|
||||
|
||||
@Schema(description = "所属电站名称")
|
||||
private String rstcdName;
|
||||
|
||||
@Schema(description = "基地编码")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "基地名称")
|
||||
private String baseName;
|
||||
|
||||
@Schema(description = "基地流域编码")
|
||||
private String hbrvcd;
|
||||
|
||||
@Schema(description = "基地流域名称")
|
||||
private String hbrvcdName;
|
||||
|
||||
@Schema(description = "设施位置")
|
||||
private String stlc;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private Double lgtd;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private Double lttd;
|
||||
|
||||
@Schema(description = "高程")
|
||||
private Double elev;
|
||||
|
||||
@Schema(description = "建设状态分类编码")
|
||||
private Integer bldsttCode;
|
||||
|
||||
@Schema(description = "建设状态分类名称")
|
||||
private String bldsttCodeName;
|
||||
|
||||
@Schema(description = "数据接入状态")
|
||||
private Integer dtin;
|
||||
|
||||
@Schema(description = "数据接入状态中文")
|
||||
private String dtinName;
|
||||
|
||||
@Schema(description = "数据接入时间")
|
||||
private Date dtinTm;
|
||||
|
||||
@Schema(description = "数据时间")
|
||||
private Date tm;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer orderIndex;
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.yfd.platform.qgc_eng.eq.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "生态流量泄放设施统计查询")
|
||||
public class EngEqBaseVmsstbprptVo extends EngEqMsstbprptVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "所属电站编码")
|
||||
private String rstcd;
|
||||
|
||||
@Schema(description = "所属电站名称")
|
||||
private String rstcdName;
|
||||
|
||||
@Schema(description = "基地排序")
|
||||
private Integer baseStepSort;
|
||||
|
||||
@Schema(description = "流域排序")
|
||||
private Integer rvcdStepSort;
|
||||
|
||||
@Schema(description = "所属电站排序")
|
||||
private Integer rstcdStepSort;
|
||||
|
||||
@Schema(description = "设施排序")
|
||||
private Integer siteStepSort;
|
||||
|
||||
@Schema(description = "死水位时保证流量")
|
||||
private Double ddzgq;
|
||||
|
||||
@Schema(description = "最大泄放流量")
|
||||
private String flkq;
|
||||
|
||||
@Schema(description = "孔口尺寸")
|
||||
private String flksz;
|
||||
|
||||
@Schema(description = "结构形式")
|
||||
private String frntwlltyp;
|
||||
|
||||
@Schema(description = "进水口底版高程")
|
||||
private Double jskgc;
|
||||
|
||||
@Schema(description = "出水口底版高程")
|
||||
private Double outflrelev;
|
||||
|
||||
@Schema(description = "基荷发电工况")
|
||||
private Double jhfdgk;
|
||||
|
||||
@Schema(description = "发电流量")
|
||||
private Double fdll;
|
||||
|
||||
@Schema(description = "生态机组额定流量")
|
||||
private Double stjzysq;
|
||||
|
||||
@Schema(description = "装机容量")
|
||||
private Double ttpwr;
|
||||
|
||||
@Schema(description = "所属建设阶段名称")
|
||||
private String blprdName;
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.yfd.platform.qgc_eng.eq.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 EngEqLimitQueryVo {
|
||||
|
||||
@Schema(description = "查询日期,支持 yyyy-MM-dd、yyyy-MM-dd HH:mm、yyyy-MM-dd HH:mm:ss")
|
||||
private String date;
|
||||
|
||||
@Schema(description = "基地编码")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "流域编码")
|
||||
private String rvcd;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.yfd.platform.qgc_eng.eq.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(description = "沿程生态流量限值")
|
||||
public class EngEqLimitVo {
|
||||
|
||||
@Schema(description = "电站编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "电站名称")
|
||||
private String stnm;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(description = "查询日期")
|
||||
private Date date;
|
||||
|
||||
@Schema(description = "生态流量限值")
|
||||
private BigDecimal qecLimit;
|
||||
}
|
||||
@ -56,6 +56,9 @@ public class EngEqVmsstbprptVo implements Serializable {
|
||||
@Schema(description = "环保数据接入状态")
|
||||
private Integer dtinEnv;
|
||||
|
||||
@Schema(description = "接入状态")
|
||||
private Integer dtin;
|
||||
|
||||
@Schema(description = "基地排序")
|
||||
private Integer baseStepSort;
|
||||
|
||||
|
||||
@ -2,11 +2,15 @@ package com.yfd.platform.qgc_eng.eq.service;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqBaseMsstbprptVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqBaseVmsstbprptVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqDayDataVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqDrtpDataVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqDayIntervalVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqHourIntervalVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqIntervalVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqLimitQueryVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqLimitVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqMsstbprptVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngEqRuleVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.EngQecAlongVo;
|
||||
@ -16,6 +20,8 @@ import com.yfd.platform.qgc_eng.eq.entity.vo.QgcQecStaticVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.SdEqMonitorCountVo;
|
||||
import com.yfd.platform.qgc_eng.eq.entity.vo.WbsbVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface EngEqDataService {
|
||||
|
||||
DataSourceResult getKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
@ -28,12 +34,18 @@ public interface EngEqDataService {
|
||||
|
||||
DataSourceResult<EngEqMsstbprptVo> getMsstbprptList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<EngEqBaseMsstbprptVo> getBaseMsstbprptList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<EngEqBaseVmsstbprptVo> getBaseVmsstbprptList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<EngEqHourIntervalVo> getQgcHourKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<EngEqDayIntervalVo> getQgcDayKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<EngQecAlongVo> getQgcHourVAlongKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
List<EngEqLimitVo> getQgcEngLimit(EngEqLimitQueryVo queryVo);
|
||||
|
||||
DataSourceResult<String> getFidKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
EngEqRuleVo getEngLimit(DataSourceRequest dataSourceRequest);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +0,0 @@
|
||||
package com.yfd.platform.qgc_env.fb.controller;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
||||
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("/fb/bsmfr")
|
||||
@Tag(name = "亲鱼选配与培育-亲鱼信息")
|
||||
@Validated
|
||||
public class FbBsmfrController {
|
||||
|
||||
@Resource
|
||||
private FbStationService fbStationService;
|
||||
|
||||
@PostMapping("/qgc/GetKendoListCust")
|
||||
@Operation(summary = "(全过程)增殖站二级页面: 亲鱼选配与培育->亲鱼信息")
|
||||
public ResponseResult getQgcKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getQgcBsmfRKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/fish/GetKendoListCust")
|
||||
@Operation(summary = "(全过程)增殖站二级页面: 过程图-亲鱼")
|
||||
public ResponseResult getFishKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getBsmfRFishKendoListCust(dataSourceRequest));
|
||||
}
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
package com.yfd.platform.qgc_env.fb.controller;
|
||||
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fb/fbrdmr")
|
||||
@Tag(name = "鱼类增殖站年度鱼类标记数据")
|
||||
@Validated
|
||||
public class FbFbrdmrController {
|
||||
|
||||
@Resource
|
||||
private FbStationService fbStationService;
|
||||
|
||||
@GetMapping("/getFbRelatedYrByStcd")
|
||||
@Operation(summary = "根据增殖站编码查询相关业务年份")
|
||||
public ResponseResult getFbRelatedYrByStcd(@Parameter(description = "增殖站编码")
|
||||
@RequestParam("stcd") String stcd) {
|
||||
return ResponseResult.successData(fbStationService.getFbRelatedYrByStcd(stcd));
|
||||
}
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
package com.yfd.platform.qgc_env.fb.controller;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
||||
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("/fb/msfbrdm")
|
||||
@Tag(name = "鱼类增殖站增殖情况")
|
||||
@Validated
|
||||
public class FbMsfbrdmController {
|
||||
|
||||
@Resource
|
||||
private FbStationService fbStationService;
|
||||
|
||||
@PostMapping("/fbFlData/GetKendoListCust")
|
||||
@Operation(summary = "增殖站增殖情况(app)")
|
||||
public ResponseResult getFbFlData(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getFbFlDataKendoListCust(dataSourceRequest));
|
||||
}
|
||||
}
|
||||
@ -16,47 +16,120 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fb/station")
|
||||
@Tag(name = "鱼类增殖站概况")
|
||||
@RequestMapping("/fb")
|
||||
@Tag(name = "鱼类增殖站模块")
|
||||
@Validated
|
||||
public class FbStationController {
|
||||
|
||||
@Resource
|
||||
private FbStationService fbStationService;
|
||||
|
||||
@PostMapping("/qgcoverview/getOverviewSecond")
|
||||
@PostMapping("/station/qgcoverview/getOverviewSecond")
|
||||
@Operation(summary = "全流域增殖站概况二级页面")
|
||||
public ResponseResult getQgcOverviewSecond(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getQgcOverviewSecond(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/overview/getOverviewSecond")
|
||||
@PostMapping("/station/overview/getOverviewSecond")
|
||||
@Operation(summary = "增殖站概况二级页面")
|
||||
public ResponseResult getOverviewSecond(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getOverviewSecond(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/overview/GetKendoListCust")
|
||||
@PostMapping("/station/overview/GetKendoListCust")
|
||||
@Operation(summary = "全流域增殖站概况")
|
||||
public ResponseResult getOverviewKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getOverviewKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/qgc/getFbStaticsData")
|
||||
@PostMapping("/station/qgc/getFbStaticsData")
|
||||
@Operation(summary = "增殖站放流数据统计")
|
||||
public ResponseResult getQgcFbStaticsData(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getQgcFbStaticsData(dataSourceRequest));
|
||||
}
|
||||
|
||||
@GetMapping("/msstbprpt/getStInfoByStcd")
|
||||
@GetMapping("/station/msstbprpt/getStInfoByStcd")
|
||||
@Operation(summary = "增殖站单站基础信息")
|
||||
public ResponseResult getStInfoByStcd(@Parameter(description = "站点编码") @RequestParam("stcd") String stcd) {
|
||||
return ResponseResult.successData(fbStationService.getStInfoByStcd(stcd));
|
||||
}
|
||||
|
||||
@GetMapping("/rpimnr/qgc/year/GetYearRpStatistics")
|
||||
@GetMapping("/station/rpimnr/qgc/year/GetYearRpStatistics")
|
||||
@Operation(summary = "全过程放流统计总数,根据基地流域分组")
|
||||
public ResponseResult getYearRpStatistics(@Parameter(description = "年份") @RequestParam("year") String year) {
|
||||
return ResponseResult.successData(fbStationService.getYearRpStatistics(year));
|
||||
}
|
||||
|
||||
@PostMapping("/bsmfr/qgc/GetKendoListCust")
|
||||
@Operation(summary = "(全过程)增殖站二级页面: 亲鱼选配与培育->亲鱼信息")
|
||||
public ResponseResult getBsmfrQgcKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getQgcBsmfRKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/bsmfr/fish/GetKendoListCust")
|
||||
@Operation(summary = "(全过程)增殖站二级页面: 过程图-亲鱼")
|
||||
public ResponseResult getBsmfrFishKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getBsmfRFishKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@GetMapping("/fbrdmr/getFbRelatedYrByStcd")
|
||||
@Operation(summary = "根据增殖站编码查询相关业务年份")
|
||||
public ResponseResult getFbRelatedYrByStcd(@Parameter(description = "增殖站编码")
|
||||
@RequestParam("stcd") String stcd) {
|
||||
return ResponseResult.successData(fbStationService.getFbRelatedYrByStcd(stcd));
|
||||
}
|
||||
|
||||
@PostMapping("/msfbrdm/fbFlData/GetKendoListCust")
|
||||
@Operation(summary = "增殖站增殖情况(app)")
|
||||
public ResponseResult getFbFlData(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getFbFlDataKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/fishCount/GetKendoListCust")
|
||||
@Operation(summary = "增殖站鱼数量完成情况统计")
|
||||
public ResponseResult getFishCountKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getFishCountKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/fishrun/qgc/GetKendoListCust")
|
||||
@Operation(summary = "全过程鱼类放鱼数据")
|
||||
public ResponseResult getFishRunQgcKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getFishRunQgcKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/fishType/GetKendoListCust")
|
||||
@Operation(summary = "增殖站鱼种完成情况统计")
|
||||
public ResponseResult getFishTypeKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getFishTypeKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/fishType/getStcdList")
|
||||
@Operation(summary = "增殖放流完成情况获取有数据的测站下拉")
|
||||
public ResponseResult getFishTypeStcdList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getFishTypeStcdList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/msfbrdm/GetKendoListCust")
|
||||
@Operation(summary = "鱼类增殖站运行情况统计列表")
|
||||
public ResponseResult getMsfbrdmKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getMsfbrdmKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/msfbrdm/qgc/GetKendoListCust")
|
||||
@Operation(summary = "(全过程)增殖站二级页面: 增殖放流情况")
|
||||
public ResponseResult getMsfbrdmQgcKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getQgcMsfbrdmKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/msstbprpt/GetKendoList")
|
||||
@Operation(summary = "鱼类增殖站基础信息列表")
|
||||
public ResponseResult getMsstbprptKendoList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getMsstbprptList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/base/researchb/GetKendoList")
|
||||
@Operation(summary = "鱼类增殖站科研情况列表")
|
||||
public ResponseResult getResearchKendoList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fbStationService.getResearchKendoList(dataSourceRequest));
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class FbFishCountFinishVo {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private BigDecimal finished;
|
||||
|
||||
private BigDecimal unfinished;
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FbFishRunQgcVo {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private String stnm;
|
||||
|
||||
private String ftp;
|
||||
|
||||
private String ftpName;
|
||||
|
||||
private String baseId;
|
||||
|
||||
private String baseName;
|
||||
|
||||
private String flyr;
|
||||
|
||||
private Long fcnt;
|
||||
|
||||
private Long totalFcnt;
|
||||
|
||||
private String fid;
|
||||
|
||||
private String release;
|
||||
|
||||
private Integer baseStepSort;
|
||||
|
||||
private Integer siteStepSort;
|
||||
|
||||
private Integer rvcdStepSort;
|
||||
|
||||
private Integer rstcdStepSort;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FbFishTypeFinishVo {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private Integer finished;
|
||||
|
||||
private Integer unfinished;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class FbFishTypeStcdVo {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private String stnm;
|
||||
|
||||
private BigDecimal lgtd;
|
||||
|
||||
private BigDecimal lttd;
|
||||
|
||||
private String baseId;
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class FbMsfbrdmQgcVo {
|
||||
|
||||
private String stcd;
|
||||
|
||||
private String stnm;
|
||||
|
||||
private String baseId;
|
||||
|
||||
private String baseName;
|
||||
|
||||
private String rstcd;
|
||||
|
||||
private String ennm;
|
||||
|
||||
private Integer bldstt;
|
||||
|
||||
private Integer hydrodtin;
|
||||
|
||||
private Integer runState;
|
||||
|
||||
private String runStateName;
|
||||
|
||||
private String ftp;
|
||||
|
||||
private String ftpName;
|
||||
|
||||
private Long fcntjh;
|
||||
|
||||
private Long fcntjc;
|
||||
|
||||
private String flyr;
|
||||
|
||||
private String fsz;
|
||||
|
||||
private String fwet;
|
||||
|
||||
private String fid;
|
||||
|
||||
private List<FbReleaseDirectionVo> directionVoList;
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class FbReleaseDirectionVo {
|
||||
|
||||
private String flstcd;
|
||||
|
||||
private String flstnm;
|
||||
|
||||
private Long flfnct;
|
||||
|
||||
private String flyr;
|
||||
|
||||
private String ftp;
|
||||
|
||||
private String stcd;
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class FbResearchVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String stcd;
|
||||
|
||||
private Date dt;
|
||||
|
||||
private String ftp;
|
||||
|
||||
private String ftpName;
|
||||
|
||||
private String wco;
|
||||
|
||||
private String jd;
|
||||
|
||||
private String fid;
|
||||
|
||||
private String recordUser;
|
||||
|
||||
private Date recordTime;
|
||||
|
||||
private String modifyUser;
|
||||
|
||||
private Date modifyTime;
|
||||
|
||||
private Integer isDeleted;
|
||||
|
||||
private String deleteUser;
|
||||
|
||||
private Date deleteTime;
|
||||
|
||||
private String rstcd;
|
||||
|
||||
private String ennm;
|
||||
|
||||
private String baseId;
|
||||
|
||||
private String baseName;
|
||||
|
||||
private String hbrvcd;
|
||||
}
|
||||
@ -5,13 +5,20 @@ import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbBsmfRQgcVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbBsmfRFishTableVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFlDataVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishCountFinishVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishRunQgcVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishTypeStcdVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishTypeFinishVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbRelatedYrVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbMsfbrdmQgcVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbResearchVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStInfoResultVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationStaticsDataVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.YearRpStatisticsVo;
|
||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationOverviewSecondVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface FbStationService {
|
||||
|
||||
@ -19,12 +26,28 @@ public interface FbStationService {
|
||||
|
||||
DataSourceResult<FbStationOverviewSecondVo> getOverviewKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<Map<String, Object>> getMsstbprptList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbFlDataVo> getFbFlDataKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbFishCountFinishVo> getFishCountKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbFishRunQgcVo> getFishRunQgcKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbFishTypeFinishVo> getFishTypeKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbFishTypeStcdVo> getFishTypeStcdList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbMsfbrdmQgcVo> getMsfbrdmKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbMsfbrdmQgcVo> getQgcMsfbrdmKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbBsmfRQgcVo> getQgcBsmfRKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbBsmfRFishTableVo> getBsmfRFishKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbResearchVo> getResearchKendoList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FbRelatedYrVo> getFbRelatedYrByStcd(String stcd);
|
||||
|
||||
FbStInfoResultVo getStInfoByStcd(String stcd);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -96,10 +96,14 @@ public class FhHabitatServiceImpl implements FhHabitatService {
|
||||
}
|
||||
|
||||
sql.append(buildOrderBySql(dataSourceRequest.getSort()));
|
||||
Page<?> page = null;
|
||||
if (QgcQueryWrapperUtil.getPageInfo(loadOptions).getHasPageInfo()) {
|
||||
page = QgcQueryWrapperUtil.getPageInfo(loadOptions).getPage();
|
||||
}
|
||||
// Page<?> page = null;
|
||||
// if (QgcQueryWrapperUtil.getPageInfo(loadOptions).getHasPageInfo()) {
|
||||
// page = QgcQueryWrapperUtil.getPageInfo(loadOptions).getPage();
|
||||
// }
|
||||
|
||||
// DataSourceLoadOptionsBase loadOptions = dataSourceRequest.toDevRequest();
|
||||
Page<?> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
|
||||
|
||||
List<HabitatVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, HabitatVo.class);
|
||||
DataSourceResult<HabitatVo> result = new DataSourceResult<>();
|
||||
|
||||
@ -136,15 +136,15 @@ public class FpBuildServiceImpl implements FpBuildService {
|
||||
String sql = "SELECT DISTINCT " +
|
||||
" fish.ID AS id, " +
|
||||
" fish.NAME AS name " +
|
||||
"FROM SD_FPSS_B_H fp " +
|
||||
"INNER JOIN SD_ENGINFO_B_H eng ON eng.STCD = fp.RSTCD " +
|
||||
" AND NVL(eng.IS_DELETED, 0) = 0 " +
|
||||
"INNER JOIN SD_FISHDICTORY_RLTN_B rel ON rel.RVCD = eng.HBRVCD " +
|
||||
"FROM SD_FBRD_B_H fb " +
|
||||
// "INNER JOIN SD_ENGINFO_B_H eng ON eng.STCD = fb.RSTCD " +
|
||||
// " AND NVL(eng.IS_DELETED, 0) = 0 " +
|
||||
"INNER JOIN SD_FISHDICTORY_RLTN_B rel ON rel.BASE_ID = fb.BASE_ID " +
|
||||
" AND NVL(rel.IS_DELETED, 0) = 0 " +
|
||||
"INNER JOIN SD_FISHDICTORY_B fish ON fish.ID = NVL(rel.ZY_FISH_ID, rel.FISH_ID) " +
|
||||
" AND NVL(fish.IS_DELETED, 0) = 0 " +
|
||||
" AND NVL(fish.ENABLE, 1) = 1 " +
|
||||
"WHERE fp.STCD = #{map.stcd} " +
|
||||
"WHERE fb.STCD = #{map.stcd} " +
|
||||
"ORDER BY fish.NAME";
|
||||
|
||||
List<FpFishDicVo> list = microservicDynamicSQLMapper.getAllListWithResultType(
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.yfd.platform.qgc_env.fpr.controller;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.ao.FprdRunDataAo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprdDetailVo;
|
||||
import com.yfd.platform.qgc_eng.eq.service.EngEqDataService;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprFtpChangeInfoVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprdRunDataInfoVo;
|
||||
@ -38,6 +40,12 @@ public class FprMonitorController {
|
||||
return ResponseResult.successData(fprMonitorService.getMsstbprptList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/vmsstbprpt/GetKendoList")
|
||||
@Operation(summary = "鱼类调查装置统计查询")
|
||||
public ResponseResult getVmsstbprptList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(fprMonitorService.getVmsstbprptList(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/fishDic/GetKendoList")
|
||||
@Operation(summary = "鱼类字典列表")
|
||||
public ResponseResult getFishDicList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
@ -64,6 +72,20 @@ public class FprMonitorController {
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/sdFprdR/GetKendoListCust")
|
||||
@Operation(summary = "鱼类调查装置详情数据")
|
||||
public ResponseResult getFprdDetailList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
DataSourceResult<FprdDetailVo> result = fprMonitorService.getFprdDetailList(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/sdFprdR/getFishInfo")
|
||||
@Operation(summary = "获取鱼种类信息")
|
||||
public ResponseResult getFishInfo() {
|
||||
List<String> result = fprMonitorService.getFishInfo();
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/wbsb/GetKendoList")
|
||||
@Operation(summary = "查询基地/基地流域树数据")
|
||||
public ResponseResult getWbsbList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
|
||||
@ -45,4 +45,5 @@ public class FprZyFishDicVo {
|
||||
private String spawnMonth;
|
||||
private String orders;
|
||||
private String vlsr;
|
||||
private java.util.Date vlsrTm;
|
||||
}
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
package com.yfd.platform.qgc_env.fpr.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 FprdDetailVo {
|
||||
|
||||
@Schema(description = "调查鱼类装置编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "调查鱼类装置名称")
|
||||
private String stnm;
|
||||
|
||||
@Schema(description = "监测时间")
|
||||
private Date tm;
|
||||
|
||||
@Schema(description = "监测视频文件ID")
|
||||
private String fid;
|
||||
|
||||
@Schema(description = "鱼类名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "鱼类数量")
|
||||
private Long num;
|
||||
|
||||
@Schema(description = "鱼尺寸")
|
||||
private BigDecimal fsz;
|
||||
|
||||
@Schema(description = "鱼重量")
|
||||
private BigDecimal weight;
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.yfd.platform.qgc_env.fpr.entity.vo.FprFtpChangeInfoVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.ao.FprdRunDataAo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprFishDicVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprMsstbprptVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprdDetailVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprdRunDataInfoVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprZyFishDicVo;
|
||||
|
||||
@ -15,6 +16,8 @@ public interface FprMonitorService {
|
||||
|
||||
DataSourceResult<FprMsstbprptVo> getMsstbprptList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FprMsstbprptVo> getVmsstbprptList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FprFishDicVo> getFishDicList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<FprZyFishDicVo> getZyFishDicList(DataSourceRequest dataSourceRequest);
|
||||
@ -22,4 +25,8 @@ public interface FprMonitorService {
|
||||
FprdRunDataInfoVo getFprdRunDataInfo(FprdRunDataAo ao);
|
||||
|
||||
List<FprFtpChangeInfoVo> getFtpChangeInfo(FprdRunDataAo ao);
|
||||
|
||||
DataSourceResult<FprdDetailVo> getFprdDetailList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
List<String> getFishInfo();
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.yfd.platform.qgc_env.fpr.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||
@ -16,6 +17,7 @@ import com.yfd.platform.qgc_env.fpr.entity.ao.FprdRunDataAo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprFishDicVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprFtpChangeInfoVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprMsstbprptVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprdDetailVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprdRunDataInfoVo;
|
||||
import com.yfd.platform.qgc_env.fpr.entity.vo.FprZyFishDicVo;
|
||||
import com.yfd.platform.qgc_env.fpr.service.FprMonitorService;
|
||||
@ -25,6 +27,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@ -76,6 +79,53 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<FprdDetailVo> getFprdDetailList(DataSourceRequest dataSourceRequest) {
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
String filterSql = buildFprdDetailFilterCondition(
|
||||
dataSourceRequest == null ? null : dataSourceRequest.getFilter(),
|
||||
paramMap,
|
||||
new int[]{0}
|
||||
);
|
||||
|
||||
StringBuilder sql = new StringBuilder("SELECT ")
|
||||
.append(buildFprdDetailSelectSql(dataSourceRequest == null ? null : dataSourceRequest.getSelect()))
|
||||
.append(" FROM (")
|
||||
.append(buildFprdDetailBaseSql())
|
||||
.append(") t WHERE 1 = 1 ");
|
||||
if (StrUtil.isNotBlank(filterSql)) {
|
||||
sql.append(" AND ").append(filterSql).append(" ");
|
||||
}
|
||||
sql.append(buildFprdDetailOrderBySql(dataSourceRequest == null ? null : dataSourceRequest.getSort()));
|
||||
|
||||
Page<?> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
List<FprdDetailVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(
|
||||
page, sql.toString(), paramMap, FprdDetailVo.class
|
||||
);
|
||||
|
||||
DataSourceResult<FprdDetailVo> result = new DataSourceResult<>();
|
||||
result.setData(list);
|
||||
result.setTotal(page != null ? page.getTotal() : list.size());
|
||||
result.setAggregates(new HashMap<>());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getFishInfo() {
|
||||
List<Map<String, Object>> rows = microservicDynamicSQLMapper.getAllList(
|
||||
"SELECT DISTINCT NAME AS name FROM SD_FPRDFISH_R " +
|
||||
"WHERE NVL(IS_DELETED, 0) = 0 AND NAME IS NOT NULL " +
|
||||
"ORDER BY NAME",
|
||||
null
|
||||
);
|
||||
return rows.stream()
|
||||
.map(row -> row.get("NAME"))
|
||||
.filter(java.util.Objects::nonNull)
|
||||
.map(String::valueOf)
|
||||
.toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<FprMsstbprptVo> getMsstbprptList(DataSourceRequest dataSourceRequest) {
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
@ -130,6 +180,11 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<FprMsstbprptVo> getVmsstbprptList(DataSourceRequest dataSourceRequest) {
|
||||
return getMsstbprptList(dataSourceRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<FprFishDicVo> getFishDicList(DataSourceRequest dataSourceRequest) {
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
@ -195,87 +250,33 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
new int[]{0}
|
||||
);
|
||||
|
||||
String baseSql = StrUtil.isBlank(rvcd) ? buildZyFishDicSummarySql() : buildZyFishDicBaseSql();
|
||||
StringBuilder sql = new StringBuilder("SELECT * FROM (")
|
||||
.append(buildZyFishDicBaseSql())
|
||||
.append(baseSql)
|
||||
.append(") t WHERE 1 = 1 ");
|
||||
if (StrUtil.isNotBlank(filterSql)) {
|
||||
sql.append(" AND ").append(filterSql).append(" ");
|
||||
}
|
||||
// 增加排序
|
||||
if(dataSourceRequest.getSort() !=null && !dataSourceRequest.getSort().isEmpty()){
|
||||
List<DataSourceRequest.SortDescriptor> sortDescriptors = dataSourceRequest.getSort();
|
||||
StringBuilder orderSql = new StringBuilder();
|
||||
orderSql.append(" order by ");
|
||||
for (DataSourceRequest.SortDescriptor sort:sortDescriptors){
|
||||
orderSql.append(sort.getField()).append(" ").append(sort.getDir()).append(",");
|
||||
}
|
||||
sql.append(orderSql, 0, orderSql.length()-1);
|
||||
// String[] beans = SpringContextHolder.getApplicationContext().getBeanDefinitionNames();
|
||||
sql.append(" nulls last ");
|
||||
}else{
|
||||
sql.append(" order by rvcd nulls last ");
|
||||
}
|
||||
List<FprZyFishDicVo> list = microservicDynamicSQLMapper.getAllListWithResultType(
|
||||
sql.append(buildZyFishDicOrderBySql(dataSourceRequest == null ? null : dataSourceRequest.getSort()));
|
||||
Page<?> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
List<FprZyFishDicVo> resultList = microservicDynamicSQLMapper.pageAllListWithResultType(
|
||||
page,
|
||||
sql.toString(),
|
||||
paramMap,
|
||||
FprZyFishDicVo.class
|
||||
);
|
||||
List<Map<String, Object>> rvcdRows = microservicDynamicSQLMapper.getAllList(
|
||||
"SELECT RVCD AS rvcd, RVNM AS rvcdName FROM SD_RVCD_DIC",
|
||||
null
|
||||
);
|
||||
Map<String, String> rvcdNameMap = new HashMap<>();
|
||||
for (Map<String, Object> row : rvcdRows) {
|
||||
Object rvcdKey = row.get("RVCD");
|
||||
Object rvcdName = row.get("RVCDNAME");
|
||||
if (rvcdKey != null && rvcdName != null) {
|
||||
rvcdNameMap.put(String.valueOf(rvcdKey), String.valueOf(rvcdName));
|
||||
}
|
||||
}
|
||||
|
||||
List<FprZyFishDicVo> resultList;
|
||||
Map<String, List<String>> rvcdMap = new HashMap<>();
|
||||
if (StrUtil.isBlank(rvcd)) {
|
||||
rvcdMap = list.stream()
|
||||
.collect(Collectors.groupingBy(
|
||||
item -> StrUtil.blankToDefault(item.getZyFishId(), item.getId()),
|
||||
LinkedHashMap::new,
|
||||
Collectors.mapping(FprZyFishDicVo::getRvcd, Collectors.toList())
|
||||
));
|
||||
LinkedHashMap<String, FprZyFishDicVo> distinctMap = new LinkedHashMap<>();
|
||||
for (FprZyFishDicVo item : list) {
|
||||
distinctMap.putIfAbsent(StrUtil.blankToDefault(item.getZyFishId(), item.getId()), item);
|
||||
}
|
||||
resultList = new ArrayList<>(distinctMap.values());
|
||||
} else {
|
||||
resultList = new ArrayList<>(list);
|
||||
}
|
||||
|
||||
int startIndex = loadOptions == null || loadOptions.getSkip() == null ? 0 : Math.max(loadOptions.getSkip(), 0);
|
||||
fillZyFishRvcdNames(resultList, rvcd);
|
||||
for (int i = 0; i < resultList.size(); i++) {
|
||||
FprZyFishDicVo item = resultList.get(i);
|
||||
item.setIndex(i + 1);
|
||||
item.setIndex(startIndex + i + 1);
|
||||
item.setSpawnMonth(formatSpawnMonth(item.getSpawnMonth()));
|
||||
if (StrUtil.isBlank(rvcd)) {
|
||||
List<String> rvcdList = rvcdMap.getOrDefault(
|
||||
StrUtil.blankToDefault(item.getZyFishId(), item.getId()),
|
||||
new ArrayList<>()
|
||||
).stream().filter(StrUtil::isNotBlank).distinct().toList();
|
||||
List<String> rvcdNames = new ArrayList<>();
|
||||
for (String rvcdItem : rvcdList) {
|
||||
String rvcdName = rvcdNameMap.get(rvcdItem);
|
||||
if (StrUtil.isNotBlank(rvcdName)) {
|
||||
rvcdNames.add(rvcdName);
|
||||
}
|
||||
}
|
||||
item.setRvcdName(String.join(",", rvcdNames));
|
||||
} else {
|
||||
item.setRvcdName(rvcdNameMap.get(item.getRvcd()));
|
||||
}
|
||||
}
|
||||
|
||||
DataSourceResult<FprZyFishDicVo> result = new DataSourceResult<>();
|
||||
result.setTotal((long) resultList.size());
|
||||
result.setData(paginateZyFishDicList(resultList, loadOptions));
|
||||
result.setTotal(page != null ? page.getTotal() : resultList.size());
|
||||
result.setData(resultList);
|
||||
result.setAggregates(new HashMap<>());
|
||||
return result;
|
||||
}
|
||||
@ -335,7 +336,7 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
"NVL(alongBase.ORDER_INDEX, 999999) AS rvcdStepSort, " +
|
||||
"NVL(engSort.SORT, 999999) AS rstcdStepSort, " +
|
||||
"NVL(siteSort.SORT, NVL(src.ORDER_INDEX, 999999)) AS siteStepSort " +
|
||||
"FROM SD_FPRD_B_H src " +
|
||||
"FROM SD_AIMONITOR_B_H src " +
|
||||
"LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = src.RSTCD AND NVL(eng.IS_DELETED, 0) = 0 " +
|
||||
"LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = src.BASE_ID AND NVL(hb.IS_DELETED, 0) = 0 " +
|
||||
"LEFT JOIN SD_HBRV_DIC hbrv ON hbrv.HBRVCD = src.HBRVCD " +
|
||||
@ -371,13 +372,13 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
private String buildFprdRunDataInfoSql(FprdRunDataAo ao) {
|
||||
StringBuilder sql = new StringBuilder("SELECT ")
|
||||
.append("NVL((SELECT COUNT(1) ")
|
||||
.append(" FROM SD_FPRD_B_H baseCnt ")
|
||||
.append(" FROM SD_AIMONITOR_B_H baseCnt ")
|
||||
.append(" WHERE NVL(baseCnt.IS_DELETED, 0) = 0 ")
|
||||
.append(" AND baseCnt.STTP = 'FPRD' ")
|
||||
.append(" AND baseCnt.BASE_ID = #{map.baseId}), 0) AS fprdCount, ")
|
||||
.append("NVL((SELECT COUNT(DISTINCT fish.NAME) ")
|
||||
.append(" FROM SD_FPRD_R run ")
|
||||
.append(" INNER JOIN SD_FPRD_B_H base ON base.STCD = run.STCD ")
|
||||
.append(" INNER JOIN SD_AIMONITOR_B_H base ON base.STCD = run.STCD ")
|
||||
.append(" AND NVL(base.IS_DELETED, 0) = 0 ")
|
||||
.append(" AND base.STTP = 'FPRD' ")
|
||||
.append(" INNER JOIN SD_FPRDFISH_R fish ON fish.FPRDR_ID = run.ID ")
|
||||
@ -391,7 +392,7 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
sql.append("), 0) AS ftpCount, ")
|
||||
.append("NVL((SELECT COUNT(1) ")
|
||||
.append(" FROM SD_FPRD_R run ")
|
||||
.append(" INNER JOIN SD_FPRD_B_H base ON base.STCD = run.STCD ")
|
||||
.append(" INNER JOIN SD_AIMONITOR_B_H base ON base.STCD = run.STCD ")
|
||||
.append(" AND NVL(base.IS_DELETED, 0) = 0 ")
|
||||
.append(" AND base.STTP = 'FPRD' ")
|
||||
.append(" INNER JOIN SD_FPRDFISH_R fish ON fish.FPRDR_ID = run.ID ")
|
||||
@ -414,7 +415,7 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
.append("TO_NUMBER(TO_CHAR(run.TM, 'MM')) AS month, ")
|
||||
.append("TO_NUMBER(TO_CHAR(run.TM, 'YYYY')) AS year ")
|
||||
.append("FROM SD_FPRD_R run ")
|
||||
.append("INNER JOIN SD_FPRD_B_H base ON base.STCD = run.STCD ")
|
||||
.append("INNER JOIN SD_AIMONITOR_B_H base ON base.STCD = run.STCD ")
|
||||
.append(" AND NVL(base.IS_DELETED, 0) = 0 ")
|
||||
.append(" AND base.STTP = 'FPRD' ")
|
||||
.append("INNER JOIN SD_FPRDFISH_R fish ON fish.FPRDR_ID = run.ID ")
|
||||
@ -430,6 +431,171 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
return sql.toString();
|
||||
}
|
||||
|
||||
private String buildFprdDetailBaseSql() {
|
||||
return "SELECT " +
|
||||
"run.STCD AS stcd, " +
|
||||
"base.STNM AS stnm, " +
|
||||
"run.TM AS tm, " +
|
||||
"run.FLPTH AS fid, " +
|
||||
"fish.NAME AS name, " +
|
||||
"fish.NUM AS num, " +
|
||||
"fish.FSZ AS fsz, " +
|
||||
"fish.WEIGHT AS weight " +
|
||||
"FROM SD_FPRD_R run " +
|
||||
"INNER JOIN SD_AIMONITOR_B_H base ON run.STCD = base.STCD " +
|
||||
" AND base.STTP = 'FPRD' " +
|
||||
" AND NVL(base.IS_DELETED, 0) = 0 " +
|
||||
"INNER JOIN SD_FPRDFISH_R fish ON run.ID = fish.FPRDR_ID " +
|
||||
" AND NVL(fish.IS_DELETED, 0) = 0 " +
|
||||
"WHERE NVL(run.IS_DELETED, 0) = 0 ";
|
||||
}
|
||||
|
||||
private String buildFprdDetailSelectSql(List<String> selectFields) {
|
||||
LinkedHashMap<String, String> columnMap = new LinkedHashMap<>();
|
||||
columnMap.put("stcd", "t.stcd AS stcd");
|
||||
columnMap.put("stnm", "t.stnm AS stnm");
|
||||
columnMap.put("tm", "t.tm AS tm");
|
||||
columnMap.put("fid", "t.fid AS fid");
|
||||
columnMap.put("name", "t.name AS name");
|
||||
columnMap.put("num", "t.num AS num");
|
||||
columnMap.put("fsz", "t.fsz AS fsz");
|
||||
columnMap.put("weight", "t.weight AS weight");
|
||||
if (CollUtil.isEmpty(selectFields)) {
|
||||
return String.join(", ", columnMap.values());
|
||||
}
|
||||
List<String> columns = new ArrayList<>();
|
||||
for (String field : selectFields) {
|
||||
String column = columnMap.get(field);
|
||||
if (StrUtil.isNotBlank(column)) {
|
||||
columns.add(column);
|
||||
}
|
||||
}
|
||||
return columns.isEmpty() ? String.join(", ", columnMap.values()) : String.join(", ", columns);
|
||||
}
|
||||
|
||||
private String buildFprdDetailFilterCondition(DataSourceRequest.FilterDescriptor filter,
|
||||
Map<String, Object> paramMap,
|
||||
int[] indexHolder) {
|
||||
if (filter == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(filter.getField())) {
|
||||
return buildFprdDetailLeafCondition(filter, paramMap, indexHolder);
|
||||
}
|
||||
if (CollUtil.isEmpty(filter.getFilters())) {
|
||||
return "";
|
||||
}
|
||||
List<String> conditions = new ArrayList<>();
|
||||
for (DataSourceRequest.FilterDescriptor child : filter.getFilters()) {
|
||||
String childSql = buildFprdDetailFilterCondition(child, paramMap, indexHolder);
|
||||
if (StrUtil.isNotBlank(childSql)) {
|
||||
conditions.add("(" + childSql + ")");
|
||||
}
|
||||
}
|
||||
if (conditions.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
String logic = "or".equalsIgnoreCase(filter.getLogic()) ? " OR " : " AND ";
|
||||
return String.join(logic, conditions);
|
||||
}
|
||||
|
||||
private String buildFprdDetailLeafCondition(DataSourceRequest.FilterDescriptor filter,
|
||||
Map<String, Object> paramMap,
|
||||
int[] indexHolder) {
|
||||
String field = filter.getField();
|
||||
Object value = filter.getValue();
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
String key = "fprdDetailP" + indexHolder[0]++;
|
||||
return switch (field) {
|
||||
case "stcd" -> {
|
||||
paramMap.put(key, String.valueOf(value));
|
||||
yield "t.stcd = #{map." + key + "}";
|
||||
}
|
||||
case "name" -> {
|
||||
paramMap.put(key, "%" + value + "%");
|
||||
yield "t.name LIKE #{map." + key + "}";
|
||||
}
|
||||
case "startTime" -> {
|
||||
Date date = parseFprdDate(value);
|
||||
if (date == null) {
|
||||
yield "";
|
||||
}
|
||||
paramMap.put(key, date);
|
||||
yield "t.tm >= #{map." + key + "}";
|
||||
}
|
||||
case "endTime" -> {
|
||||
Date date = parseFprdDate(value);
|
||||
if (date == null) {
|
||||
yield "";
|
||||
}
|
||||
paramMap.put(key, date);
|
||||
yield "t.tm <= #{map." + key + "}";
|
||||
}
|
||||
case "tm" -> {
|
||||
Date date = parseFprdDate(value);
|
||||
if (date == null) {
|
||||
yield "";
|
||||
}
|
||||
paramMap.put(key, date);
|
||||
String operator = StrUtil.blankToDefault(filter.getOperator(), "eq").toLowerCase();
|
||||
yield switch (operator) {
|
||||
case "gte" -> "t.tm >= #{map." + key + "}";
|
||||
case "lte" -> "t.tm <= #{map." + key + "}";
|
||||
case "gt" -> "t.tm > #{map." + key + "}";
|
||||
case "lt" -> "t.tm < #{map." + key + "}";
|
||||
default -> "t.tm = #{map." + key + "}";
|
||||
};
|
||||
}
|
||||
default -> "";
|
||||
};
|
||||
}
|
||||
|
||||
private String buildFprdDetailOrderBySql(List<DataSourceRequest.SortDescriptor> sorts) {
|
||||
if (CollUtil.isEmpty(sorts)) {
|
||||
return " ORDER BY t.tm DESC";
|
||||
}
|
||||
List<String> orderParts = new ArrayList<>();
|
||||
for (DataSourceRequest.SortDescriptor sort : sorts) {
|
||||
String column = switch (sort.getField()) {
|
||||
case "stcd" -> "t.stcd";
|
||||
case "stnm" -> "t.stnm";
|
||||
case "tm" -> "t.tm";
|
||||
case "name" -> "t.name";
|
||||
case "num" -> "t.num";
|
||||
case "fsz" -> "t.fsz";
|
||||
case "weight" -> "t.weight";
|
||||
default -> "";
|
||||
};
|
||||
if (StrUtil.isBlank(column)) {
|
||||
continue;
|
||||
}
|
||||
orderParts.add(column + ("desc".equalsIgnoreCase(sort.getDir()) ? " DESC" : " ASC"));
|
||||
}
|
||||
return orderParts.isEmpty() ? " ORDER BY t.tm DESC" : " ORDER BY " + String.join(", ", orderParts);
|
||||
}
|
||||
|
||||
private Date parseFprdDate(Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (value instanceof Date date) {
|
||||
return date;
|
||||
}
|
||||
String text = String.valueOf(value);
|
||||
if (StrUtil.isBlank(text)) {
|
||||
return null;
|
||||
}
|
||||
if (text.length() == 10) {
|
||||
return DateUtil.parse(text, "yyyy-MM-dd");
|
||||
}
|
||||
if (text.length() == 16) {
|
||||
return DateUtil.parse(text, "yyyy-MM-dd HH:mm");
|
||||
}
|
||||
return DateUtil.parse(text, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
private void validateFprdRunDataAo(FprdRunDataAo ao) {
|
||||
if (ao == null) {
|
||||
throw new BizException("请求参数不能为空.");
|
||||
@ -519,6 +685,7 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
"NVL(src.IS_DELETED, 0) AS isDeleted, " +
|
||||
"CASE WHEN rel.ZY_FISH_ID IS NULL THEN src.ID ELSE rel.ZY_FISH_ID END AS zyFishId, " +
|
||||
"CASE WHEN rel.RVCD IS NULL THEN 'null' ELSE rel.RVCD END AS rvcd, " +
|
||||
"rv.RVNM AS rvcdName, " +
|
||||
"src.NAME AS name, " +
|
||||
"src.TYPE AS type, " +
|
||||
"src.FAMILY AS family, " +
|
||||
@ -549,15 +716,108 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
"src.LOGO AS logo, " +
|
||||
"src.INFFILE AS inffile, " +
|
||||
"src.ORDERS, \n" +
|
||||
"src.VLSR, \n"+
|
||||
"src.VLSR AS vlsr, \n" +
|
||||
"src.VLSR_TM AS vlsrTm, \n" +
|
||||
"src.SPAWN_MONTH AS spawnMonth " +
|
||||
"FROM SD_FISHDICTORY_B src " +
|
||||
"LEFT JOIN SD_FISHDICTORY_RLTN_B rel ON src.ID = rel.ZY_FISH_ID " +
|
||||
" AND rel.RVCD <> 'ZY' " +
|
||||
" AND NVL(rel.IS_DELETED, 0) = 0 " +
|
||||
"LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = rel.RVCD " +
|
||||
"WHERE NVL(src.IS_DELETED, 0) = 0 ";
|
||||
}
|
||||
|
||||
private String buildZyFishDicSummarySql() {
|
||||
return "SELECT " +
|
||||
"src.ID AS id, " +
|
||||
"NVL(src.IS_DELETED, 0) AS isDeleted, " +
|
||||
"src.ID AS zyFishId, " +
|
||||
"NVL(relAgg.rvcd, 'null') AS rvcd, " +
|
||||
"NVL(relAgg.rvcdName, '') AS rvcdName, " +
|
||||
"src.NAME AS name, " +
|
||||
"src.TYPE AS type, " +
|
||||
"src.FAMILY AS family, " +
|
||||
"src.GENUS AS genus, " +
|
||||
"src.SPECIES AS species, " +
|
||||
"src.NAME_EN AS nameEn, " +
|
||||
"src.ALIAS AS alias, " +
|
||||
"src.FSZ AS fsz, " +
|
||||
"src.SHAPEDESC AS shapedesc, " +
|
||||
"src.HABITATION AS habitation, " +
|
||||
"src.HABIT_MIGRAT AS habitMigrat, " +
|
||||
"src.FEEDING_HABIT AS feedingHabit, " +
|
||||
"src.FOOD AS food, " +
|
||||
"src.TIME_FEED AS timeFeed, " +
|
||||
"src.ORIGN_DATE AS orignDate, " +
|
||||
"CAST(NULL AS VARCHAR2(255)) AS filterContent, " +
|
||||
"src.PRETEMP AS pretemp, " +
|
||||
"src.FLOW_RATE AS flowRate, " +
|
||||
"src.DEPTH AS depth, " +
|
||||
"src.WQTQ AS wqtq, " +
|
||||
"src.SPAWN_CHARACT AS spawnCharact, " +
|
||||
"src.BOTM_MATER AS botmMater, " +
|
||||
"src.PTYPE AS ptype, " +
|
||||
"CASE src.PTYPE WHEN 1 THEN '濒危' WHEN 2 THEN '极危' WHEN 3 THEN '近危' WHEN 4 THEN '易危' WHEN 5 THEN '重点保护' WHEN 6 THEN '无危' WHEN 7 THEN '国家二级' WHEN 8 THEN '市二级保护' ELSE '未知' END AS ptypeName, " +
|
||||
"src.SPEC_ORIGIN AS specOrigin, " +
|
||||
"CASE WHEN src.SPEC_ORIGIN = 1 THEN '本土物种' WHEN src.SPEC_ORIGIN = 2 THEN '外来物种' ELSE NULL END AS specOriginName, " +
|
||||
"src.DESCRIPTION AS description, " +
|
||||
"src.LOGO AS logo, " +
|
||||
"src.INFFILE AS inffile, " +
|
||||
"src.ORDERS, " +
|
||||
"src.VLSR AS vlsr, " +
|
||||
"src.VLSR_TM AS vlsrTm, " +
|
||||
"src.SPAWN_MONTH AS spawnMonth " +
|
||||
"FROM SD_FISHDICTORY_B src " +
|
||||
"LEFT JOIN ( " +
|
||||
" SELECT relBase.ZY_FISH_ID AS zyFishId, " +
|
||||
" MIN(relBase.RVCD) AS rvcd, " +
|
||||
" LISTAGG(relBase.RVNM, ',') WITHIN GROUP (ORDER BY relBase.RVNM) AS rvcdName " +
|
||||
" FROM ( " +
|
||||
" SELECT DISTINCT rel.ZY_FISH_ID, rel.RVCD, rv.RVNM " +
|
||||
" FROM SD_FISHDICTORY_RLTN_B rel " +
|
||||
" LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = rel.RVCD " +
|
||||
" WHERE rel.RVCD <> 'ZY' " +
|
||||
" AND NVL(rel.IS_DELETED, 0) = 0 " +
|
||||
" AND rv.RVNM IS NOT NULL " +
|
||||
" ) relBase " +
|
||||
" GROUP BY relBase.ZY_FISH_ID " +
|
||||
") relAgg ON relAgg.zyFishId = src.ID " +
|
||||
"WHERE NVL(src.IS_DELETED, 0) = 0 ";
|
||||
}
|
||||
|
||||
private void fillZyFishRvcdNames(List<FprZyFishDicVo> list, String rvcdFilter) {
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
return;
|
||||
}
|
||||
if (StrUtil.isNotBlank(rvcdFilter)) {
|
||||
for (FprZyFishDicVo item : list) {
|
||||
if (item != null && StrUtil.isBlank(item.getRvcdName()) && StrUtil.isNotBlank(item.getRvcd()) && !"null".equalsIgnoreCase(item.getRvcd())) {
|
||||
item.setRvcdName(querySingleRvcdName(item.getRvcd()));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (FprZyFishDicVo item : list) {
|
||||
if (item != null && item.getRvcdName() == null) {
|
||||
item.setRvcdName("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String querySingleRvcdName(String rvcd) {
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("rvcd", rvcd);
|
||||
List<Map<String, Object>> rows = microservicDynamicSQLMapper.getAllList(
|
||||
"SELECT RVNM AS rvcdName FROM SD_RVCD_DIC WHERE RVCD = #{map.rvcd} AND ROWNUM = 1",
|
||||
paramMap
|
||||
);
|
||||
if (CollUtil.isEmpty(rows)) {
|
||||
return null;
|
||||
}
|
||||
Object value = rows.get(0).get("RVCDNAME");
|
||||
return value == null ? null : String.valueOf(value);
|
||||
}
|
||||
|
||||
private String buildMsstbprptDetailSelectSql(List<String> selectFields) {
|
||||
LinkedHashMap<String, String> columnMap = buildMsstbprptSelectColumnMap();
|
||||
if (CollUtil.isEmpty(selectFields)) {
|
||||
@ -1164,6 +1424,7 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
case "isDeleted" -> "t.isDeleted";
|
||||
case "zyFishId" -> "t.zyFishId";
|
||||
case "rvcd" -> "t.rvcd";
|
||||
case "rvcdName" -> "t.rvcdName";
|
||||
case "name" -> "t.name";
|
||||
case "type" -> "t.type";
|
||||
case "family" -> "t.family";
|
||||
@ -1192,26 +1453,33 @@ public class FprMonitorServiceImpl implements FprMonitorService {
|
||||
case "logo" -> "t.logo";
|
||||
case "inffile" -> "t.inffile";
|
||||
case "spawnMonth" -> "t.spawnMonth";
|
||||
case "orders" -> "t.orders";
|
||||
case "vlsr" -> "t.vlsr";
|
||||
case "vlsrTm" -> "t.vlsrTm";
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
private List<FprZyFishDicVo> paginateZyFishDicList(List<FprZyFishDicVo> resultList, DataSourceLoadOptionsBase loadOptions) {
|
||||
if (CollUtil.isEmpty(resultList) || loadOptions == null || loadOptions.getTake() == null || loadOptions.getTake() <= 0) {
|
||||
return resultList;
|
||||
private String buildZyFishDicOrderBySql(List<DataSourceRequest.SortDescriptor> sorts) {
|
||||
List<String> orderItems = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(sorts)) {
|
||||
for (DataSourceRequest.SortDescriptor sort : sorts) {
|
||||
if (sort == null || StrUtil.isBlank(sort.getField())) {
|
||||
continue;
|
||||
}
|
||||
int page = loadOptions.getSkip() == null ? 1 : loadOptions.getSkip(); // 页码从1开始,缺省为1
|
||||
// 如果页码 ≤ 0,强制设为1(避免负值)
|
||||
if (page < 1) {
|
||||
page = 1;
|
||||
String column = mapZyFishDicColumn(sort.getField());
|
||||
if (StrUtil.isBlank(column)) {
|
||||
continue;
|
||||
}
|
||||
int size = loadOptions.getTake();
|
||||
int start = (page - 1) * size;
|
||||
int end = Math.min(start + size, resultList.size());
|
||||
if (start >= resultList.size()) {
|
||||
return new ArrayList<>();
|
||||
String direction = "desc".equalsIgnoreCase(sort.getDir()) || "des".equalsIgnoreCase(sort.getDir())
|
||||
? "DESC" : "ASC";
|
||||
orderItems.add(column + " " + direction + " NULLS LAST");
|
||||
}
|
||||
return new ArrayList<>(resultList.subList(start, end));
|
||||
}
|
||||
if (orderItems.isEmpty()) {
|
||||
return " ORDER BY t.rvcd ASC NULLS LAST, t.name ASC";
|
||||
}
|
||||
return " ORDER BY " + String.join(", ", orderItems);
|
||||
}
|
||||
|
||||
private String formatSpawnMonth(String input) {
|
||||
|
||||
@ -47,6 +47,24 @@ public class VdMonitorController {
|
||||
return ResponseResult.successData(vdMonitorService.getKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/tree/GetKendoListCust")
|
||||
@Operation(summary = "视频站树级结构查询")
|
||||
public ResponseResult getVdTreeKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(vdMonitorService.getVdTreeKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/tree/GetKendoListCustSt")
|
||||
@Operation(summary = "视频站树级结构查询-站点维度")
|
||||
public ResponseResult getVdTreeKendoListCustSt(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(vdMonitorService.getVdTreeKendoListCustSt(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/vdpoint/GetKendoListCust")
|
||||
@Operation(summary = "视频站锚点接口")
|
||||
public ResponseResult getVdPointKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(vdMonitorService.getVdPointKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/runData/GetKendoListCust")
|
||||
@Operation(summary = "查询视频监控运行数据")
|
||||
public ResponseResult getRunDataKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
|
||||
@ -0,0 +1,86 @@
|
||||
package com.yfd.platform.qgc_env.vd.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Schema(description = "视频站锚点信息")
|
||||
public class VdPointVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "视频站子站类")
|
||||
private String sttp;
|
||||
|
||||
@Schema(description = "视频站编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private BigDecimal lgtd;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private BigDecimal lttd;
|
||||
|
||||
@Schema(description = "高程")
|
||||
private BigDecimal dtmel;
|
||||
|
||||
@Schema(description = "锚点状态")
|
||||
private String anchoPointState;
|
||||
|
||||
@Schema(description = "站类地图标识")
|
||||
private String sttpMap;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String titleName;
|
||||
|
||||
@Schema(description = "默认距离")
|
||||
private Integer distance;
|
||||
|
||||
@Schema(description = "流域编码")
|
||||
private String rvcd;
|
||||
|
||||
@Schema(description = "行政区编码")
|
||||
private String addvcd;
|
||||
|
||||
@Schema(description = "基地编码")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "所属电站编码")
|
||||
private String rstcds;
|
||||
|
||||
@Schema(description = "站类编码")
|
||||
private String sttpCode;
|
||||
|
||||
@Schema(description = "视频站名称")
|
||||
private String stnm;
|
||||
|
||||
@Schema(description = "流域名称")
|
||||
private String rvnm;
|
||||
|
||||
@Schema(description = "电站名称")
|
||||
private String ennm;
|
||||
|
||||
@Schema(description = "栖息地编码")
|
||||
private String fhstcd;
|
||||
|
||||
@Schema(description = "栖息地名称")
|
||||
private String fhstnm;
|
||||
|
||||
@Schema(description = "站类名称")
|
||||
private String sttpName;
|
||||
|
||||
@Schema(description = "站址")
|
||||
private String stlc;
|
||||
|
||||
@Schema(description = "播放方式")
|
||||
private String playWay;
|
||||
|
||||
@Schema(description = "站点排序")
|
||||
private Integer siteStepSort;
|
||||
|
||||
@Schema(description = "基地流域编码")
|
||||
private String hbrvcd;
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.yfd.platform.qgc_env.vd.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.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "视频站树节点")
|
||||
public class VdTreeNodeVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "节点ID")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "节点名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "节点类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "节点类型名称")
|
||||
private String typeName;
|
||||
|
||||
@Schema(description = "排序值")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "父节点ID")
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "父节点名称")
|
||||
private String parentName;
|
||||
|
||||
@Schema(description = "是否有子节点")
|
||||
private Integer hasChildren;
|
||||
|
||||
@Schema(description = "播放地址")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "播放方式")
|
||||
private String playWay;
|
||||
|
||||
@Schema(description = "设备序列号")
|
||||
private String deviceSerial;
|
||||
|
||||
@Schema(description = "接入方式")
|
||||
private String accessWay;
|
||||
|
||||
@Schema(description = "流协议")
|
||||
private String protocol;
|
||||
|
||||
@Schema(description = "清晰度")
|
||||
private String quality;
|
||||
|
||||
@Schema(description = "控制方式")
|
||||
private String controlMode;
|
||||
|
||||
@Schema(description = "设备状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "状态时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date statusTm;
|
||||
|
||||
@Schema(description = "子节点")
|
||||
private List<VdTreeNodeVo> children;
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.yfd.platform.qgc_env.vd.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class VdTreeRowVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String stcd;
|
||||
private String stCode;
|
||||
private String stName;
|
||||
private String stnm;
|
||||
private String sttpCode;
|
||||
private String sttpName;
|
||||
private String sttpFullPath;
|
||||
private String rstcd;
|
||||
private String ennm;
|
||||
private String baseId;
|
||||
private String baseName;
|
||||
private String url;
|
||||
private String playWay;
|
||||
private Integer baseSort;
|
||||
private Integer rstcdStepSort;
|
||||
private Integer siteStepSort;
|
||||
private String deviceSerial;
|
||||
private String accessWay;
|
||||
private String protocol;
|
||||
private String quality;
|
||||
private String controlMode;
|
||||
private Integer status;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date statusTm;
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.yfd.platform.qgc_env.vd.service;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdTreeNodeVo;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdRunDataVo;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdVmsstbprptVo;
|
||||
|
||||
@ -13,5 +14,11 @@ public interface VdMonitorService {
|
||||
|
||||
DataSourceResult<VdRunDataVo> getKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<VdTreeNodeVo> getVdTreeKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<VdTreeNodeVo> getVdTreeKendoListCustSt(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<?> getVdPointKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<VdRunDataVo> getRunDataKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
}
|
||||
|
||||
@ -9,7 +9,10 @@ import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.common.GroupHelper;
|
||||
import com.yfd.platform.common.GroupingInfo;
|
||||
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdPointVo;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdRunDataVo;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdTreeNodeVo;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdTreeRowVo;
|
||||
import com.yfd.platform.qgc_env.vd.entity.vo.VdVmsstbprptVo;
|
||||
import com.yfd.platform.qgc_env.vd.service.VdMonitorService;
|
||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||
@ -18,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@ -118,6 +122,113 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
return queryLatestRunDataGroupList(dataSourceRequest, loadOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<VdTreeNodeVo> getVdTreeKendoListCust(DataSourceRequest dataSourceRequest) {
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
String filterSql = buildVdTreeFilterCondition(dataSourceRequest == null ? null : dataSourceRequest.getFilter(), paramMap, new int[]{0});
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT ")
|
||||
.append("t.stcd AS stcd, ")
|
||||
.append("t.stCode AS stCode, ")
|
||||
.append("t.stName AS stName, ")
|
||||
.append("t.stnm AS stnm, ")
|
||||
.append("t.sttpCode AS sttpCode, ")
|
||||
.append("t.sttpName AS sttpName, ")
|
||||
.append("t.sttpFullPath AS sttpFullPath, ")
|
||||
.append("t.rstcd AS rstcd, ")
|
||||
.append("t.ennm AS ennm, ")
|
||||
.append("t.baseId AS baseId, ")
|
||||
.append("t.baseName AS baseName, ")
|
||||
.append("t.url AS url, ")
|
||||
.append("t.playWay AS playWay, ")
|
||||
.append("t.baseSort AS baseSort, ")
|
||||
.append("t.rstcdStepSort AS rstcdStepSort, ")
|
||||
.append("t.siteStepSort AS siteStepSort, ")
|
||||
.append("t.deviceSerial AS deviceSerial, ")
|
||||
.append("t.accessWay AS accessWay, ")
|
||||
.append("t.protocol AS protocol, ")
|
||||
.append("t.quality AS quality, ")
|
||||
.append("t.controlMode AS controlMode, ")
|
||||
.append("t.status AS status, ")
|
||||
.append("t.statusTm AS statusTm ")
|
||||
.append("FROM (")
|
||||
.append(buildVdTreeCoreSql())
|
||||
.append(") t WHERE 1 = 1 AND t.sttpCode != 'VD_FPRD'");
|
||||
if (StrUtil.isNotBlank(filterSql)) {
|
||||
sql.append(" AND ").append(filterSql).append(" ");
|
||||
}
|
||||
sql.append(" ORDER BY t.baseSort ASC NULLS LAST, t.rstcdStepSort ASC NULLS LAST, t.siteStepSort ASC NULLS LAST, t.stcd ASC");
|
||||
|
||||
List<VdTreeRowVo> rows = microservicDynamicSQLMapper.getAllListWithResultType(sql.toString(), paramMap, VdTreeRowVo.class);
|
||||
boolean baseScoped = containsNonBlankFilterValue(dataSourceRequest == null ? null : dataSourceRequest.getFilter(), "baseId");
|
||||
|
||||
DataSourceResult<VdTreeNodeVo> result = new DataSourceResult<>();
|
||||
List<VdTreeNodeVo> treeData = buildVdTreeNodes(rows, baseScoped);
|
||||
result.setData(treeData);
|
||||
result.setTotal((long) treeData.size());
|
||||
result.setAggregates(new HashMap<>());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<VdTreeNodeVo> getVdTreeKendoListCustSt(DataSourceRequest dataSourceRequest) {
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
String filterSql = buildVdTreeFilterCondition(dataSourceRequest == null ? null : dataSourceRequest.getFilter(), paramMap, new int[]{0});
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT ")
|
||||
.append("t.stcd AS stcd, ")
|
||||
.append("t.stCode AS stCode, ")
|
||||
.append("t.stName AS stName, ")
|
||||
.append("t.stnm AS stnm, ")
|
||||
.append("t.sttpCode AS sttpCode, ")
|
||||
.append("t.sttpName AS sttpName, ")
|
||||
.append("t.sttpFullPath AS sttpFullPath, ")
|
||||
.append("t.rstcd AS rstcd, ")
|
||||
.append("t.ennm AS ennm, ")
|
||||
.append("t.baseId AS baseId, ")
|
||||
.append("t.baseName AS baseName, ")
|
||||
.append("t.url AS url, ")
|
||||
.append("t.playWay AS playWay, ")
|
||||
.append("t.baseSort AS baseSort, ")
|
||||
.append("t.rstcdStepSort AS rstcdStepSort, ")
|
||||
.append("t.siteStepSort AS siteStepSort, ")
|
||||
.append("t.deviceSerial AS deviceSerial, ")
|
||||
.append("t.accessWay AS accessWay, ")
|
||||
.append("t.protocol AS protocol, ")
|
||||
.append("t.quality AS quality, ")
|
||||
.append("t.controlMode AS controlMode, ")
|
||||
.append("t.status AS status, ")
|
||||
.append("t.statusTm AS statusTm ")
|
||||
.append("FROM (")
|
||||
.append(buildVdTreeCoreSql())
|
||||
.append(") t WHERE 1 = 1 ");
|
||||
if (StrUtil.isNotBlank(filterSql)) {
|
||||
sql.append(" AND ").append(filterSql).append(" ");
|
||||
}
|
||||
sql.append(" ORDER BY t.baseSort ASC NULLS LAST, t.rstcdStepSort ASC NULLS LAST, t.siteStepSort ASC NULLS LAST, t.stcd ASC");
|
||||
|
||||
List<VdTreeRowVo> rows = microservicDynamicSQLMapper.getAllListWithResultType(sql.toString(), paramMap, VdTreeRowVo.class);
|
||||
boolean baseScoped = containsNonBlankFilterValue(dataSourceRequest == null ? null : dataSourceRequest.getFilter(), "baseId");
|
||||
|
||||
DataSourceResult<VdTreeNodeVo> result = new DataSourceResult<>();
|
||||
List<VdTreeNodeVo> treeData = buildVdTreeNodesByStation(rows, baseScoped);
|
||||
result.setData(treeData);
|
||||
result.setTotal((long) treeData.size());
|
||||
result.setAggregates(new HashMap<>());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<?> getVdPointKendoListCust(DataSourceRequest dataSourceRequest) {
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
if (CollUtil.isNotEmpty(dataSourceRequest == null ? null : dataSourceRequest.getGroup())) {
|
||||
return getKendoListCust(dataSourceRequest);
|
||||
}
|
||||
return queryVdPointDetailList(dataSourceRequest, loadOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<VdRunDataVo> getRunDataKendoListCust(DataSourceRequest dataSourceRequest) {
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
@ -131,8 +242,29 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
GroupingInfo[] groups,
|
||||
String filterSql,
|
||||
Map<String, Object> paramMap) {
|
||||
List<DataSourceRequest.GroupDescriptor> groupDescriptors = dataSourceRequest == null ? null : dataSourceRequest.getGroup();
|
||||
List<String> selectItems = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(groupDescriptors)) {
|
||||
for (DataSourceRequest.GroupDescriptor descriptor : groupDescriptors) {
|
||||
if (descriptor == null || StrUtil.isBlank(descriptor.getField())) {
|
||||
continue;
|
||||
}
|
||||
String column = mapColumn(descriptor.getField());
|
||||
if (StrUtil.isBlank(column)) {
|
||||
continue;
|
||||
}
|
||||
selectItems.add(column + " AS " + descriptor.getField());
|
||||
selectItems.add("COUNT(1) AS count_" + descriptor.getField());
|
||||
}
|
||||
}
|
||||
if (selectItems.isEmpty()) {
|
||||
selectItems.add("t.sttpCode AS sttpCode");
|
||||
selectItems.add("COUNT(1) AS count_sttpCode");
|
||||
}
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT t.sttpCode AS sttpCode, COUNT(1) AS count_sttpCode ")
|
||||
sql.append("SELECT ")
|
||||
.append(String.join(", ", selectItems))
|
||||
.append(" FROM (")
|
||||
.append(buildVmsstbprptViewSql())
|
||||
.append(") t ")
|
||||
@ -141,8 +273,24 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
sql.append(" AND ").append(filterSql).append(" ");
|
||||
}
|
||||
|
||||
List<String> groupByColumns = new ArrayList<>();
|
||||
if (CollUtil.isNotEmpty(groupDescriptors)) {
|
||||
for (DataSourceRequest.GroupDescriptor descriptor : groupDescriptors) {
|
||||
if (descriptor == null || StrUtil.isBlank(descriptor.getField())) {
|
||||
continue;
|
||||
}
|
||||
String column = mapColumn(descriptor.getField());
|
||||
if (StrUtil.isNotBlank(column)) {
|
||||
groupByColumns.add(column);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!groupByColumns.isEmpty()) {
|
||||
sql.append(" GROUP BY ").append(String.join(", ", groupByColumns));
|
||||
} else {
|
||||
sql.append(" GROUP BY t.sttpCode ");
|
||||
sql.append(buildOrderBySql(dataSourceRequest == null ? null : dataSourceRequest.getGroup()));
|
||||
}
|
||||
sql.append(buildOrderBySql(groupDescriptors));
|
||||
|
||||
List<Map<String, Object>> rows = microservicDynamicSQLMapper.pageAllList(null, sql.toString(), paramMap);
|
||||
DataSourceResult<VdVmsstbprptVo> result = new DataSourceResult<>();
|
||||
@ -294,6 +442,32 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
return queryRunDataGroupList(dataSourceRequest, loadOptions, buildLatestRunDataCoreSql());
|
||||
}
|
||||
|
||||
private DataSourceResult<VdPointVo> queryVdPointDetailList(DataSourceRequest dataSourceRequest,
|
||||
DataSourceLoadOptionsBase loadOptions) {
|
||||
Page<?> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("SELECT ")
|
||||
.append(buildVdPointSelectSql())
|
||||
.append("FROM (")
|
||||
.append(buildVdPointCoreSql())
|
||||
.append(") t WHERE 1 = 1 ");
|
||||
|
||||
Map<String, Object> paramMap = new HashMap<>();
|
||||
String filterSql = buildFilterCondition(dataSourceRequest == null ? null : dataSourceRequest.getFilter(), paramMap, new int[]{0});
|
||||
if (StrUtil.isNotBlank(filterSql)) {
|
||||
sql.append(" AND ").append(filterSql).append(" ");
|
||||
}
|
||||
sql.append(buildVdPointOrderBySql(dataSourceRequest == null ? null : dataSourceRequest.getSort()));
|
||||
|
||||
List<VdPointVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(
|
||||
page, sql.toString(), paramMap, VdPointVo.class);
|
||||
DataSourceResult<VdPointVo> result = new DataSourceResult<>();
|
||||
result.setData(list);
|
||||
result.setTotal(page != null ? page.getTotal() : list.size());
|
||||
result.setAggregates(new HashMap<>());
|
||||
return result;
|
||||
}
|
||||
|
||||
private DataSourceResult<VdRunDataVo> queryRunDataGroupList(DataSourceRequest dataSourceRequest,
|
||||
DataSourceLoadOptionsBase loadOptions,
|
||||
String coreSql) {
|
||||
@ -418,12 +592,57 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
" AND NVL(sttp.IS_DELETED, 0) = 0 AND NVL(sttp.ENABLE, 1) = 1 ";
|
||||
}
|
||||
|
||||
private String buildVdTreeCoreSql() {
|
||||
return "SELECT " +
|
||||
"base.STCD AS stcd, " +
|
||||
"base.STNM AS stnm, " +
|
||||
"base.CSTCD AS stCode, " +
|
||||
"cst.STNM AS stName, " +
|
||||
"base.STTP AS sttpCode, " +
|
||||
"sttp.STTP_NAME AS sttpName, " +
|
||||
"sttp.FULL_PATH AS sttpFullPath, " +
|
||||
"base.RSTCD AS rstcd, " +
|
||||
"eng.ENNM AS ennm, " +
|
||||
"NVL(eng.BASE_ID, base.BASE_ID) AS baseId, " +
|
||||
"hb.BASENAME AS baseName, " +
|
||||
"base.URL AS url, " +
|
||||
"CASE WHEN base.URL IS NULL THEN NULL WHEN INSTR(base.URL, 'm3u8') > 0 THEN '1' ELSE '0' END AS playWay, " +
|
||||
"NVL(hb.ORDER_INDEX, 999999) AS baseSort, " +
|
||||
"NVL(eng.ORDER_INDEX, 999999) AS rstcdStepSort, " +
|
||||
"NVL(base.ORDER_INDEX, 999999) AS siteStepSort, " +
|
||||
"base.DEVICE_SERIAL AS deviceSerial, " +
|
||||
"base.ACCESS_WAY AS accessWay, " +
|
||||
"base.PROTOCOL AS protocol, " +
|
||||
"base.QUALITY AS quality, " +
|
||||
"base.CONTROL_MODE AS controlMode, " +
|
||||
"status.STATUS AS status, " +
|
||||
"status.TM AS statusTm " +
|
||||
"FROM (" + buildVdDeviceBaseSql() + ") base " +
|
||||
"LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = base.RSTCD AND NVL(eng.IS_DELETED, 0) = 0 " +
|
||||
"LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = NVL(eng.BASE_ID, base.BASE_ID) " +
|
||||
" AND NVL(hb.IS_DELETED, 0) = 0 AND NVL(hb.ENABLED, 1) = 1 " +
|
||||
"LEFT JOIN (" + buildStationBaseSql() + ") cst ON cst.STCD = base.CSTCD " +
|
||||
"LEFT JOIN SD_STTP_B sttp ON sttp.STTP_CODE = base.STTP " +
|
||||
" AND NVL(sttp.IS_DELETED, 0) = 0 AND NVL(sttp.ENABLE, 1) = 1 " +
|
||||
"LEFT JOIN ( " +
|
||||
"SELECT detail.STCD, detail.TM, detail.STATUS " +
|
||||
"FROM MS_SBGZSTAT_B detail " +
|
||||
"INNER JOIN ( " +
|
||||
"SELECT STCD, MAX(TM) AS MAX_TM FROM MS_SBGZSTAT_B " +
|
||||
"WHERE NVL(IS_DELETED, 0) = 0 GROUP BY STCD " +
|
||||
") latest ON detail.STCD = latest.STCD AND detail.TM = latest.MAX_TM " +
|
||||
"WHERE NVL(detail.IS_DELETED, 0) = 0 " +
|
||||
") status ON status.STCD = base.STCD " +
|
||||
"WHERE base.STTP LIKE 'VD_%' ";
|
||||
}
|
||||
|
||||
private String buildVdDeviceBaseSql() {
|
||||
return "SELECT vd.STCD, vd.STNM, vd.MNTP, vd.STTP, vd.LGTD, vd.LTTD, vd.ELEV, vd.STLC, " +
|
||||
" vd.JCDT, vd.WDDT, vd.BLDSTT_CODE, vd.USFL, vd.DTIN, vd.STINDX, vd.RSTCD, vd.BASE_ID, " +
|
||||
" vd.HBRVCD, vd.RVCD, vd.ADDVCD, vd.CSTCD, vd.FHSTCD, CAST(NULL AS VARCHAR2(3000)) AS INTRODUCE, " +
|
||||
" CAST(NULL AS VARCHAR2(255)) AS LOGO, CAST(NULL AS VARCHAR2(1000)) AS INFFILE, " +
|
||||
" vd.DTFRQCY, vd.REMARK, vd.VLSR, vd.VLSR_TM, vd.URL AS URL, CAST(NULL AS NUMBER(8,0)) AS ORDER_INDEX, " +
|
||||
" vd.DTFRQCY, vd.REMARK, vd.VLSR, vd.VLSR_TM, vd.URL AS URL, vd.DEVICE_SERIAL, vd.ACCESS_WAY, " +
|
||||
" vd.PROTOCOL, vd.QUALITY, vd.CONTROL_MODE, CAST(NULL AS NUMBER(8,0)) AS ORDER_INDEX, " +
|
||||
" 'SD_VDINFO_B' AS SOURCE_TABLE " +
|
||||
"FROM SD_VDINFO_B vd WHERE 1=1 " +
|
||||
// " AND vd.STTP = 'VD_FP' "+
|
||||
@ -431,11 +650,59 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
"SELECT sonar.STCD, sonar.STNM, sonar.MNTP, sonar.STTP, sonar.LGTD, sonar.LTTD, sonar.ELEV, sonar.STLC, " +
|
||||
" sonar.JCDT, sonar.WDDT, sonar.BLDSTT_CODE, sonar.USFL, sonar.DTIN, sonar.STINDX, sonar.RSTCD, sonar.BASE_ID, " +
|
||||
" sonar.HBRVCD, sonar.RVCD, sonar.ADDVCD, CAST(NULL AS VARCHAR2(36)) AS CSTCD, CAST(NULL AS VARCHAR2(36)) AS FHSTCD, " +
|
||||
" sonar.INTRODUCE, sonar.LOGO, sonar.INFFILE, sonar.DTFRQCY, sonar.REMARK, sonar.VLSR, sonar.VLSR_TM, CAST(NULL AS VARCHAR2(512)) AS URL, sonar.ORDER_INDEX, " +
|
||||
" sonar.INTRODUCE, sonar.LOGO, sonar.INFFILE, sonar.DTFRQCY, sonar.REMARK, sonar.VLSR, sonar.VLSR_TM, CAST(NULL AS VARCHAR2(512)) AS URL, " +
|
||||
" CAST(NULL AS VARCHAR2(255)) AS DEVICE_SERIAL, CAST(NULL AS VARCHAR2(10)) AS ACCESS_WAY, " +
|
||||
" CAST(NULL AS VARCHAR2(50)) AS PROTOCOL, CAST(NULL AS VARCHAR2(50)) AS QUALITY, CAST(NULL AS VARCHAR2(2048)) AS CONTROL_MODE, sonar.ORDER_INDEX, " +
|
||||
" 'SD_SONAR_B_H' AS SOURCE_TABLE " +
|
||||
"FROM SD_SONAR_B_H sonar WHERE NVL(sonar.IS_DELETED, 0) = 0 AND sonar.STTP IN ('VD_WVD', 'VD_SN') ";
|
||||
}
|
||||
|
||||
private String buildVdPointCoreSql() {
|
||||
return "SELECT " +
|
||||
"src.STTP AS sttp, " +
|
||||
"src.STCD AS stcd, " +
|
||||
"src.LGTD AS lgtd, " +
|
||||
"src.LTTD AS lttd, " +
|
||||
"CAST(NULL AS NUMBER(10, 6)) AS dtmel, " +
|
||||
"CASE " +
|
||||
" WHEN NVL(eng.HBRVCD, src.HBRVCD) = 'SJLY126' THEN CASE src.STTP " +
|
||||
" WHEN 'VD_FBFM' THEN 'fbfm_spjk' " +
|
||||
" WHEN 'VD_EQS' THEN 'eqs_spjk' " +
|
||||
" WHEN 'VD_FB' THEN 'fb_spjk' " +
|
||||
" WHEN 'VD_FP' THEN 'fp_spjk' " +
|
||||
" WHEN 'VD_FH' THEN 'fh_spjk' " +
|
||||
" WHEN 'VD_VA' THEN 'va_spjk' " +
|
||||
" WHEN 'VD_VP' THEN 'vp_spjk' " +
|
||||
" WHEN 'VD_DW' THEN 'dw_spjk' " +
|
||||
" WHEN 'VD_WQ' THEN 'wq_spjk' " +
|
||||
" ELSE 'spjk' END " +
|
||||
" ELSE 'spjk' END AS anchoPointState, " +
|
||||
"'VD' AS sttpMap, " +
|
||||
"src.STNM AS titleName, " +
|
||||
"400000 AS distance, " +
|
||||
"NVL(eng.RVCD, src.RVCD) AS rvcd, " +
|
||||
"NVL(eng.ADDVCD, src.ADDVCD) AS addvcd, " +
|
||||
"NVL(eng.BASE_ID, src.BASE_ID) AS baseId, " +
|
||||
"src.RSTCD AS rstcds, " +
|
||||
"'VD' AS sttpCode, " +
|
||||
"src.STNM AS stnm, " +
|
||||
"rv.RVNM AS rvnm, " +
|
||||
"eng.ENNM AS ennm, " +
|
||||
"src.FHSTCD AS fhstcd, " +
|
||||
"fh.STNM AS fhstnm, " +
|
||||
"sttp.STTP_NAME AS sttpName, " +
|
||||
"src.STLC AS stlc, " +
|
||||
"CASE WHEN src.URL IS NULL THEN NULL WHEN INSTR(src.URL, 'm3u8') > 0 THEN '1' ELSE '0' END AS playWay, " +
|
||||
"src.ORDER_INDEX AS siteStepSort, " +
|
||||
"NVL(eng.HBRVCD, src.HBRVCD) AS hbrvcd " +
|
||||
"FROM (" + buildVdDeviceBaseSql() + ") src " +
|
||||
"LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = src.RSTCD AND NVL(eng.IS_DELETED, 0) = 0 " +
|
||||
"LEFT JOIN SD_FHBT_B_H fh ON fh.STCD = src.FHSTCD AND NVL(fh.IS_DELETED, 0) = 0 " +
|
||||
"LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = NVL(eng.RVCD, src.RVCD) " +
|
||||
"LEFT JOIN SD_STTP_B sttp ON sttp.STTP_CODE = src.STTP " +
|
||||
" AND NVL(sttp.IS_DELETED, 0) = 0 AND NVL(sttp.ENABLE, 1) = 1 ";
|
||||
}
|
||||
|
||||
private String buildRunDataCoreSql() {
|
||||
return "SELECT " +
|
||||
"run.ID AS id, " +
|
||||
@ -591,6 +858,33 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
return String.join(", ", actualColumns);
|
||||
}
|
||||
|
||||
private String buildVdPointSelectSql() {
|
||||
return "t.sttp AS sttp, " +
|
||||
"t.stcd AS stcd, " +
|
||||
"t.lgtd AS lgtd, " +
|
||||
"t.lttd AS lttd, " +
|
||||
"t.dtmel AS dtmel, " +
|
||||
"t.anchoPointState AS anchoPointState, " +
|
||||
"t.sttpMap AS sttpMap, " +
|
||||
"t.titleName AS titleName, " +
|
||||
"t.distance AS distance, " +
|
||||
"t.rvcd AS rvcd, " +
|
||||
"t.addvcd AS addvcd, " +
|
||||
"t.baseId AS baseId, " +
|
||||
"t.rstcds AS rstcds, " +
|
||||
"t.sttpCode AS sttpCode, " +
|
||||
"t.stnm AS stnm, " +
|
||||
"t.rvnm AS rvnm, " +
|
||||
"t.ennm AS ennm, " +
|
||||
"t.fhstcd AS fhstcd, " +
|
||||
"t.fhstnm AS fhstnm, " +
|
||||
"t.sttpName AS sttpName, " +
|
||||
"t.stlc AS stlc, " +
|
||||
"t.playWay AS playWay, " +
|
||||
"t.siteStepSort AS siteStepSort, " +
|
||||
"t.hbrvcd AS hbrvcd ";
|
||||
}
|
||||
|
||||
private String buildRunDataOrderBySql(List<DataSourceRequest.SortDescriptor> sortList) {
|
||||
if (CollUtil.isEmpty(sortList)) {
|
||||
return " ORDER BY t.baseStepSort ASC, t.rvcdStepSort ASC, t.rstcdStepSort ASC, t.siteStepSort ASC, t.stcd ASC, t.tm DESC";
|
||||
@ -613,6 +907,28 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
return " ORDER BY " + String.join(", ", orderItems);
|
||||
}
|
||||
|
||||
private String buildVdPointOrderBySql(List<DataSourceRequest.SortDescriptor> sortList) {
|
||||
if (CollUtil.isEmpty(sortList)) {
|
||||
return " ORDER BY t.siteStepSort ASC NULLS LAST, t.stcd ASC";
|
||||
}
|
||||
List<String> orderItems = new ArrayList<>();
|
||||
for (DataSourceRequest.SortDescriptor sort : sortList) {
|
||||
if (sort == null || StrUtil.isBlank(sort.getField())) {
|
||||
continue;
|
||||
}
|
||||
String column = mapColumn(sort.getField());
|
||||
if (StrUtil.isBlank(column)) {
|
||||
continue;
|
||||
}
|
||||
String direction = "desc".equalsIgnoreCase(sort.getDir()) || "des".equalsIgnoreCase(sort.getDir()) ? "DESC" : "ASC";
|
||||
orderItems.add(column + " " + direction + " NULLS LAST");
|
||||
}
|
||||
if (orderItems.isEmpty()) {
|
||||
return " ORDER BY t.siteStepSort ASC NULLS LAST, t.stcd ASC";
|
||||
}
|
||||
return " ORDER BY " + String.join(", ", orderItems);
|
||||
}
|
||||
|
||||
private String buildRunDataGroupOrderBySql(List<DataSourceRequest.GroupDescriptor> groups) {
|
||||
if (CollUtil.isEmpty(groups)) {
|
||||
return "";
|
||||
@ -641,6 +957,42 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
};
|
||||
}
|
||||
|
||||
private String buildVdTreeFilterCondition(DataSourceRequest.FilterDescriptor filter,
|
||||
Map<String, Object> paramMap,
|
||||
int[] indexHolder) {
|
||||
if (filter == null) {
|
||||
return "";
|
||||
}
|
||||
if (StrUtil.isNotBlank(filter.getField())) {
|
||||
return buildVdTreeLeafCondition(filter, paramMap, indexHolder);
|
||||
}
|
||||
if (CollUtil.isEmpty(filter.getFilters())) {
|
||||
return "";
|
||||
}
|
||||
List<String> conditions = new ArrayList<>();
|
||||
for (DataSourceRequest.FilterDescriptor child : filter.getFilters()) {
|
||||
String childSql = buildVdTreeFilterCondition(child, paramMap, indexHolder);
|
||||
if (StrUtil.isNotBlank(childSql)) {
|
||||
conditions.add("(" + childSql + ")");
|
||||
}
|
||||
}
|
||||
if (conditions.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
String logic = "or".equalsIgnoreCase(filter.getLogic()) ? " OR " : " AND ";
|
||||
return String.join(logic, conditions);
|
||||
}
|
||||
|
||||
private String buildVdTreeLeafCondition(DataSourceRequest.FilterDescriptor filter,
|
||||
Map<String, Object> paramMap,
|
||||
int[] indexHolder) {
|
||||
String column = mapVdTreeColumn(filter.getField());
|
||||
if (StrUtil.isBlank(column)) {
|
||||
return "";
|
||||
}
|
||||
return buildSimpleCondition(column, "vdTreeParam", filter, paramMap, indexHolder, isVdTreeDateField(filter));
|
||||
}
|
||||
|
||||
private String buildFilterCondition(DataSourceRequest.FilterDescriptor filter,
|
||||
Map<String, Object> paramMap,
|
||||
int[] indexHolder) {
|
||||
@ -804,6 +1156,16 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
return "date".equalsIgnoreCase(filter.getDataType());
|
||||
}
|
||||
|
||||
private boolean isVdTreeDateField(DataSourceRequest.FilterDescriptor filter) {
|
||||
if (filter == null || StrUtil.isBlank(filter.getField())) {
|
||||
return false;
|
||||
}
|
||||
if ("statusTm".equalsIgnoreCase(filter.getField())) {
|
||||
return true;
|
||||
}
|
||||
return "date".equalsIgnoreCase(filter.getDataType());
|
||||
}
|
||||
|
||||
private String buildValueExpr(String paramKey, boolean dateField, Object value) {
|
||||
if (!dateField || value == null) {
|
||||
return "#{map." + paramKey + "}";
|
||||
@ -839,11 +1201,41 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
return values;
|
||||
}
|
||||
|
||||
private String mapVdTreeColumn(String field) {
|
||||
if (StrUtil.isBlank(field)) {
|
||||
return null;
|
||||
}
|
||||
return switch (field) {
|
||||
case "stcd" -> "t.stcd";
|
||||
case "stCode" -> "t.stCode";
|
||||
case "stName" -> "t.stName";
|
||||
case "stnm" -> "t.stnm";
|
||||
case "sttpCode" -> "t.sttpCode";
|
||||
case "sttpName" -> "t.sttpName";
|
||||
case "sttpFullPath" -> "t.sttpFullPath";
|
||||
case "rstcd" -> "t.rstcd";
|
||||
case "ennm" -> "t.ennm";
|
||||
case "baseId" -> "t.baseId";
|
||||
case "baseName" -> "t.baseName";
|
||||
case "url" -> "t.url";
|
||||
case "playWay" -> "t.playWay";
|
||||
case "deviceSerial" -> "t.deviceSerial";
|
||||
case "accessWay" -> "t.accessWay";
|
||||
case "protocol" -> "t.protocol";
|
||||
case "quality" -> "t.quality";
|
||||
case "controlMode" -> "t.controlMode";
|
||||
case "status" -> "NVL(t.status, 0)";
|
||||
case "statusTm" -> "t.statusTm";
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
private String mapColumn(String field) {
|
||||
if (StrUtil.isBlank(field)) {
|
||||
return null;
|
||||
}
|
||||
return switch (field) {
|
||||
case "sttp" -> "t.sttp";
|
||||
case "sttpCode" -> "t.sttpCode";
|
||||
case "sttpName" -> "t.sttpName";
|
||||
case "sttpFullPath" -> "t.sttpFullPath";
|
||||
@ -878,11 +1270,15 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
case "vlsr" -> "t.vlsr";
|
||||
case "vlsrTm" -> "t.vlsrTm";
|
||||
case "rvcd" -> "t.rvcd";
|
||||
case "rvnm" -> "t.rvnm";
|
||||
case "addvcd" -> "t.addvcd";
|
||||
case "dtin" -> "t.dtin";
|
||||
case "usfl" -> "t.usfl";
|
||||
case "url" -> "t.url";
|
||||
case "playWay" -> "t.playWay";
|
||||
case "titleName" -> "t.titleName";
|
||||
case "rstcds" -> "t.rstcds";
|
||||
case "anchoPointState" -> "t.anchoPointState";
|
||||
case "sourceTable" -> "t.sourceTable";
|
||||
case "baseStepSort" -> "t.baseStepSort";
|
||||
case "rstcdStepSort" -> "t.rstcdStepSort";
|
||||
@ -971,4 +1367,265 @@ public class VdMonitorServiceImpl implements VdMonitorService {
|
||||
}
|
||||
return " ORDER BY " + String.join(", ", orderItems);
|
||||
}
|
||||
|
||||
private boolean containsNonBlankFilterValue(DataSourceRequest.FilterDescriptor filter, String fieldName) {
|
||||
if (filter == null || StrUtil.isBlank(fieldName)) {
|
||||
return false;
|
||||
}
|
||||
if (fieldName.equalsIgnoreCase(filter.getField())) {
|
||||
if (filter.getValue() instanceof List<?> list) {
|
||||
return CollUtil.isNotEmpty(list);
|
||||
}
|
||||
return StrUtil.isNotBlank(filter.getValue() == null ? null : String.valueOf(filter.getValue()));
|
||||
}
|
||||
if (CollUtil.isEmpty(filter.getFilters())) {
|
||||
return false;
|
||||
}
|
||||
for (DataSourceRequest.FilterDescriptor child : filter.getFilters()) {
|
||||
if (containsNonBlankFilterValue(child, fieldName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private List<VdTreeNodeVo> buildVdTreeNodes(List<VdTreeRowVo> rows, boolean baseScoped) {
|
||||
List<VdTreeNodeVo> stationNodes = buildStationTreeNodes(rows, baseScoped);
|
||||
if (baseScoped) {
|
||||
return sortTreeNodes(stationNodes);
|
||||
}
|
||||
|
||||
LinkedHashMap<String, VdTreeNodeVo> baseNodeMap = new LinkedHashMap<>();
|
||||
List<VdTreeNodeVo> topLevelWithoutBase = new ArrayList<>();
|
||||
for (VdTreeRowVo row : rows) {
|
||||
if (row == null) {
|
||||
continue;
|
||||
}
|
||||
if (StrUtil.isBlank(row.getBaseId())) {
|
||||
continue;
|
||||
}
|
||||
baseNodeMap.computeIfAbsent(row.getBaseId(), key -> {
|
||||
VdTreeNodeVo node = new VdTreeNodeVo();
|
||||
node.setId(key);
|
||||
node.setName(StrUtil.blankToDefault(row.getBaseName(), key));
|
||||
node.setType("PSB");
|
||||
node.setTypeName("基地");
|
||||
node.setSort(defaultSort(row.getBaseSort()));
|
||||
node.setHasChildren(1);
|
||||
node.setParentId(null);
|
||||
node.setParentName(null);
|
||||
return node;
|
||||
});
|
||||
}
|
||||
|
||||
Map<String, List<VdTreeNodeVo>> stationByBase = new LinkedHashMap<>();
|
||||
for (VdTreeNodeVo stationNode : stationNodes) {
|
||||
if (StrUtil.isBlank(stationNode.getParentId())) {
|
||||
topLevelWithoutBase.add(stationNode);
|
||||
continue;
|
||||
}
|
||||
stationByBase.computeIfAbsent(stationNode.getParentId(), key -> new ArrayList<>()).add(stationNode);
|
||||
}
|
||||
|
||||
List<VdTreeNodeVo> result = new ArrayList<>();
|
||||
for (Map.Entry<String, VdTreeNodeVo> entry : baseNodeMap.entrySet()) {
|
||||
VdTreeNodeVo baseNode = entry.getValue();
|
||||
baseNode.setChildren(sortTreeNodes(stationByBase.get(entry.getKey())));
|
||||
result.add(baseNode);
|
||||
}
|
||||
result.addAll(topLevelWithoutBase);
|
||||
return sortTreeNodes(result);
|
||||
}
|
||||
|
||||
private List<VdTreeNodeVo> buildVdTreeNodesByStation(List<VdTreeRowVo> rows, boolean baseScoped) {
|
||||
List<VdTreeNodeVo> stationNodes = buildStationCodeTreeNodes(rows, baseScoped);
|
||||
if (baseScoped) {
|
||||
return sortTreeNodes(stationNodes);
|
||||
}
|
||||
|
||||
LinkedHashMap<String, VdTreeNodeVo> baseNodeMap = new LinkedHashMap<>();
|
||||
List<VdTreeNodeVo> topLevelWithoutBase = new ArrayList<>();
|
||||
for (VdTreeRowVo row : rows) {
|
||||
if (row == null || StrUtil.isBlank(row.getBaseId())) {
|
||||
continue;
|
||||
}
|
||||
baseNodeMap.computeIfAbsent(row.getBaseId(), key -> {
|
||||
VdTreeNodeVo node = new VdTreeNodeVo();
|
||||
node.setId(key);
|
||||
node.setName(StrUtil.blankToDefault(row.getBaseName(), key));
|
||||
node.setType("PSB");
|
||||
node.setTypeName("基地");
|
||||
node.setSort(defaultSort(row.getBaseSort()));
|
||||
node.setHasChildren(1);
|
||||
node.setParentId(null);
|
||||
node.setParentName(null);
|
||||
return node;
|
||||
});
|
||||
}
|
||||
|
||||
Map<String, List<VdTreeNodeVo>> stationByBase = new LinkedHashMap<>();
|
||||
for (VdTreeNodeVo stationNode : stationNodes) {
|
||||
if (StrUtil.isBlank(stationNode.getParentId())) {
|
||||
topLevelWithoutBase.add(stationNode);
|
||||
continue;
|
||||
}
|
||||
stationByBase.computeIfAbsent(stationNode.getParentId(), key -> new ArrayList<>()).add(stationNode);
|
||||
}
|
||||
|
||||
List<VdTreeNodeVo> result = new ArrayList<>();
|
||||
for (Map.Entry<String, VdTreeNodeVo> entry : baseNodeMap.entrySet()) {
|
||||
VdTreeNodeVo baseNode = entry.getValue();
|
||||
baseNode.setChildren(sortTreeNodes(stationByBase.get(entry.getKey())));
|
||||
result.add(baseNode);
|
||||
}
|
||||
result.addAll(topLevelWithoutBase);
|
||||
return sortTreeNodes(result);
|
||||
}
|
||||
|
||||
private List<VdTreeNodeVo> buildStationTreeNodes(List<VdTreeRowVo> rows, boolean baseScoped) {
|
||||
LinkedHashMap<String, List<VdTreeRowVo>> stationRowMap = new LinkedHashMap<>();
|
||||
for (VdTreeRowVo row : rows) {
|
||||
if (row == null || StrUtil.isBlank(row.getRstcd())) {
|
||||
continue;
|
||||
}
|
||||
stationRowMap.computeIfAbsent(row.getRstcd(), key -> new ArrayList<>()).add(row);
|
||||
}
|
||||
|
||||
List<VdTreeNodeVo> stationNodes = new ArrayList<>();
|
||||
for (Map.Entry<String, List<VdTreeRowVo>> entry : stationRowMap.entrySet()) {
|
||||
List<VdTreeRowVo> stationRows = entry.getValue();
|
||||
if (CollUtil.isEmpty(stationRows)) {
|
||||
continue;
|
||||
}
|
||||
VdTreeRowVo sample = stationRows.get(0);
|
||||
VdTreeNodeVo stationNode = new VdTreeNodeVo();
|
||||
stationNode.setId(entry.getKey());
|
||||
stationNode.setName(StrUtil.blankToDefault(sample.getEnnm(), entry.getKey()));
|
||||
stationNode.setType("ENG");
|
||||
stationNode.setTypeName("电站");
|
||||
stationNode.setSort(defaultSort(sample.getRstcdStepSort()));
|
||||
stationNode.setHasChildren(1);
|
||||
if (baseScoped) {
|
||||
stationNode.setParentId(null);
|
||||
stationNode.setParentName(null);
|
||||
} else {
|
||||
stationNode.setParentId(sample.getBaseId());
|
||||
stationNode.setParentName(sample.getBaseName());
|
||||
}
|
||||
stationNode.setChildren(buildSiteTreeNodes(stationRows));
|
||||
stationNodes.add(stationNode);
|
||||
}
|
||||
return sortTreeNodes(stationNodes);
|
||||
}
|
||||
|
||||
private List<VdTreeNodeVo> buildSiteTreeNodes(List<VdTreeRowVo> rows) {
|
||||
LinkedHashMap<String, VdTreeNodeVo> siteNodeMap = new LinkedHashMap<>();
|
||||
for (VdTreeRowVo row : rows) {
|
||||
if (row == null || StrUtil.isBlank(row.getStcd()) || siteNodeMap.containsKey(row.getStcd())) {
|
||||
continue;
|
||||
}
|
||||
VdTreeNodeVo node = new VdTreeNodeVo();
|
||||
node.setId(row.getStcd());
|
||||
node.setName(StrUtil.blankToDefault(row.getStnm(), row.getStcd()));
|
||||
node.setType(row.getSttpCode());
|
||||
node.setTypeName(row.getSttpName());
|
||||
node.setSort(defaultSort(row.getSiteStepSort()));
|
||||
node.setHasChildren(0);
|
||||
node.setParentId(row.getRstcd());
|
||||
node.setParentName(row.getEnnm());
|
||||
node.setUrl(row.getUrl());
|
||||
node.setPlayWay(row.getPlayWay());
|
||||
node.setDeviceSerial(row.getDeviceSerial());
|
||||
node.setAccessWay(row.getAccessWay());
|
||||
node.setProtocol(row.getProtocol());
|
||||
node.setQuality(row.getQuality());
|
||||
node.setControlMode(row.getControlMode());
|
||||
node.setStatus(row.getStatus());
|
||||
node.setStatusTm(row.getStatusTm());
|
||||
siteNodeMap.put(row.getStcd(), node);
|
||||
}
|
||||
return sortTreeNodes(new ArrayList<>(siteNodeMap.values()));
|
||||
}
|
||||
|
||||
private List<VdTreeNodeVo> buildStationCodeTreeNodes(List<VdTreeRowVo> rows, boolean baseScoped) {
|
||||
LinkedHashMap<String, List<VdTreeRowVo>> stationRowMap = new LinkedHashMap<>();
|
||||
for (VdTreeRowVo row : rows) {
|
||||
if (row == null || StrUtil.isBlank(row.getStCode())) {
|
||||
continue;
|
||||
}
|
||||
stationRowMap.computeIfAbsent(row.getStCode(), key -> new ArrayList<>()).add(row);
|
||||
}
|
||||
|
||||
List<VdTreeNodeVo> stationNodes = new ArrayList<>();
|
||||
for (Map.Entry<String, List<VdTreeRowVo>> entry : stationRowMap.entrySet()) {
|
||||
List<VdTreeRowVo> stationRows = entry.getValue();
|
||||
if (CollUtil.isEmpty(stationRows)) {
|
||||
continue;
|
||||
}
|
||||
VdTreeRowVo sample = stationRows.get(0);
|
||||
VdTreeNodeVo stationNode = new VdTreeNodeVo();
|
||||
stationNode.setId(entry.getKey());
|
||||
stationNode.setName(StrUtil.blankToDefault(sample.getStName(), entry.getKey()));
|
||||
stationNode.setType("VD_FB");
|
||||
stationNode.setTypeName("鱼类增殖站");
|
||||
stationNode.setSort(defaultSort(sample.getRstcdStepSort()));
|
||||
stationNode.setHasChildren(1);
|
||||
if (baseScoped) {
|
||||
stationNode.setParentId(null);
|
||||
stationNode.setParentName(null);
|
||||
} else {
|
||||
stationNode.setParentId(sample.getBaseId());
|
||||
stationNode.setParentName(sample.getBaseName());
|
||||
}
|
||||
stationNode.setChildren(buildSiteTreeNodesByStation(stationRows));
|
||||
stationNodes.add(stationNode);
|
||||
}
|
||||
return sortTreeNodes(stationNodes);
|
||||
}
|
||||
|
||||
private List<VdTreeNodeVo> buildSiteTreeNodesByStation(List<VdTreeRowVo> rows) {
|
||||
LinkedHashMap<String, VdTreeNodeVo> siteNodeMap = new LinkedHashMap<>();
|
||||
for (VdTreeRowVo row : rows) {
|
||||
if (row == null || StrUtil.isBlank(row.getStcd()) || siteNodeMap.containsKey(row.getStcd())) {
|
||||
continue;
|
||||
}
|
||||
VdTreeNodeVo node = new VdTreeNodeVo();
|
||||
node.setId(row.getStcd());
|
||||
node.setName(StrUtil.blankToDefault(row.getStnm(), row.getStcd()));
|
||||
node.setType(row.getSttpCode());
|
||||
node.setTypeName(row.getSttpName());
|
||||
node.setSort(defaultSort(row.getSiteStepSort()));
|
||||
node.setHasChildren(0);
|
||||
node.setParentId(row.getStCode());
|
||||
node.setParentName(row.getStName());
|
||||
node.setUrl(row.getUrl());
|
||||
node.setPlayWay(row.getPlayWay());
|
||||
node.setDeviceSerial(row.getDeviceSerial());
|
||||
node.setAccessWay(row.getAccessWay());
|
||||
node.setProtocol(row.getProtocol());
|
||||
node.setQuality(row.getQuality());
|
||||
node.setControlMode(row.getControlMode());
|
||||
node.setStatus(row.getStatus());
|
||||
node.setStatusTm(row.getStatusTm());
|
||||
siteNodeMap.put(row.getStcd(), node);
|
||||
}
|
||||
return sortTreeNodes(new ArrayList<>(siteNodeMap.values()));
|
||||
}
|
||||
|
||||
private List<VdTreeNodeVo> sortTreeNodes(List<VdTreeNodeVo> nodes) {
|
||||
if (CollUtil.isEmpty(nodes)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
nodes.sort(Comparator.comparing(VdMonitorServiceImpl::sortValue)
|
||||
.thenComparing(node -> StrUtil.blankToDefault(node.getId(), "")));
|
||||
return nodes;
|
||||
}
|
||||
|
||||
private static Integer sortValue(VdTreeNodeVo node) {
|
||||
return node == null ? 999999 : defaultSort(node.getSort());
|
||||
}
|
||||
|
||||
private static Integer defaultSort(Integer sort) {
|
||||
return sort == null ? 999999 : sort;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,77 @@
|
||||
package com.yfd.platform.qgc_env.warn.controller;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_env.warn.service.WarnDataService;
|
||||
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("/warn")
|
||||
@Tag(name = "告警状态模块")
|
||||
@Validated
|
||||
public class WarnDataController {
|
||||
|
||||
@Resource
|
||||
private WarnDataService warnDataService;
|
||||
|
||||
@PostMapping("/stcd/eng/GetKendoListCust")
|
||||
@Operation(summary = "电站水位、生态流量告警状态统计")
|
||||
public ResponseResult getEngWarnCount(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getEngWarnCount(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/ai/com/qgcDmRun/GetKendoListCust")
|
||||
@Operation(summary = "全过程AI识别大坝运行")
|
||||
public ResponseResult getAiDmRunCount(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getAiDmRunCount(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/ai/com/qgcProtect/GetKendoListCust")
|
||||
@Operation(summary = "全过程AI识别动植物保护")
|
||||
public ResponseResult getAiProtectCount(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getAiProtectCount(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/ai/com/GetKendoListCust")
|
||||
@Operation(summary = "AI常规业务列表")
|
||||
public ResponseResult getAiComKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getAiComKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/ai/com/qgc/aiRstcd/GetKendoListCust")
|
||||
@Operation(summary = "全过程AI识别有数据的电站下拉")
|
||||
public ResponseResult getAiRstcdListKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getAiRstcdListKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/ai/com/qgc/aiPfwRecord/GetKendoListCust")
|
||||
@Operation(summary = "全过程AI识别监测日历表(漂浮物+清漂合并)")
|
||||
public ResponseResult getAiPfwRecordKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getAiPfwRecordKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/ai/com/qgc/aiRecord/GetKendoListCust")
|
||||
@Operation(summary = "全过程AI识别监测日历表")
|
||||
public ResponseResult getAiRecordKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getAiRecordKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/alarmPoint/GetKendoListCust")
|
||||
@Operation(summary = "电站告警描点列表")
|
||||
public ResponseResult getAlarmPointKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getAlarmPointKendoListCust(dataSourceRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/stcd/GetKendoListCust")
|
||||
@Operation(summary = "监测设备告警情况列表")
|
||||
public ResponseResult getWarnStcdKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
return ResponseResult.successData(warnDataService.getWarnStcdKendoListCust(dataSourceRequest));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Schema(description = "AI常规业务列表")
|
||||
public class AiComListVo {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "类型编码")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
@Schema(description = "AI测站编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "AI测站名称")
|
||||
private String stnm;
|
||||
|
||||
@Schema(description = "所属电站编码")
|
||||
private String rstcd;
|
||||
|
||||
@Schema(description = "所属电站名称")
|
||||
private String ennm;
|
||||
|
||||
@Schema(description = "所属基地编码")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "所属基地流域编码")
|
||||
private String hbrvcd;
|
||||
|
||||
@Schema(description = "所属流域编码")
|
||||
private String rvcd;
|
||||
|
||||
@Schema(description = "数据时间")
|
||||
private Date tm;
|
||||
|
||||
@Schema(description = "结束时间")
|
||||
private Date endTm;
|
||||
|
||||
@Schema(description = "AI识别值")
|
||||
private String aiVal;
|
||||
|
||||
@Schema(description = "附件ID")
|
||||
private String fid;
|
||||
|
||||
@Schema(description = "是否填报")
|
||||
private Integer isFsf;
|
||||
|
||||
@Schema(description = "是否大面积漂浮物")
|
||||
private Integer isBigDebrisArea;
|
||||
|
||||
@Schema(description = "是否已清漂")
|
||||
private Integer isClearDrift;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Date recordTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Date modifyTime;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "全过程AI识别大坝运行")
|
||||
public class AiDmRunVo {
|
||||
|
||||
@Schema(description = "漂浮物监测次数")
|
||||
private Integer pfwCnt;
|
||||
|
||||
@Schema(description = "漂浮物清理次数")
|
||||
private Integer pfwqlCnt;
|
||||
|
||||
@Schema(description = "叠梁门运行次数")
|
||||
private Integer dlmCnt;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "全过程AI识别动植物保护")
|
||||
public class AiProtectVo {
|
||||
|
||||
@Schema(description = "运鱼船进出港次数")
|
||||
private Integer fpYycCnt;
|
||||
|
||||
@Schema(description = "赶鱼栅运行次数")
|
||||
private Integer fpGysCnt;
|
||||
|
||||
@Schema(description = "升鱼机运行次数")
|
||||
private Integer fpSyjCnt;
|
||||
|
||||
@Schema(description = "AGV小车次数")
|
||||
private Integer fpAgvCnt;
|
||||
|
||||
@Schema(description = "运鱼车运行次数")
|
||||
private Integer fpYychCnt;
|
||||
|
||||
@Schema(description = "鱼道放流次数")
|
||||
private Integer fpYdhCnt;
|
||||
|
||||
@Schema(description = "植物园养护次数")
|
||||
private Integer vpYhCnt;
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(description = "全过程AI识别监测日历记录")
|
||||
public class AiRecordVo {
|
||||
|
||||
@Schema(description = "AI类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "日期")
|
||||
private String dt;
|
||||
|
||||
@Schema(description = "是否大面积漂浮物")
|
||||
private Integer isBigDebrisArea;
|
||||
|
||||
@Schema(description = "AI数据数")
|
||||
private Integer aiCnt;
|
||||
|
||||
@Schema(description = "统计数")
|
||||
private Integer cnt;
|
||||
|
||||
@Schema(description = "是否已清漂")
|
||||
private Integer isClearDrift;
|
||||
|
||||
@Schema(description = "漂浮物状态")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "漂浮物状态名称")
|
||||
private String statusName;
|
||||
|
||||
@Schema(description = "清漂状态")
|
||||
private Integer qpStatus;
|
||||
|
||||
@Schema(description = "清漂状态名称")
|
||||
private String qpStatusName;
|
||||
|
||||
@Schema(description = "附件ID")
|
||||
private String fid;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "全过程AI识别电站下拉")
|
||||
public class AiRstcdVo {
|
||||
|
||||
@Schema(description = "电站编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "电站名称")
|
||||
private String stnm;
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(description = "电站告警描点")
|
||||
public class AlarmPointVo {
|
||||
|
||||
@Schema(description = "站点类型")
|
||||
private String sttp;
|
||||
|
||||
@Schema(description = "站点编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "经度")
|
||||
private BigDecimal lgtd;
|
||||
|
||||
@Schema(description = "纬度")
|
||||
private BigDecimal lttd;
|
||||
|
||||
@Schema(description = "高程")
|
||||
private BigDecimal dtmel;
|
||||
|
||||
@Schema(description = "描点状态")
|
||||
private String anchoPointState;
|
||||
|
||||
@Schema(description = "锚点类型")
|
||||
private String sttpMap;
|
||||
|
||||
@Schema(description = "弹框站点名称")
|
||||
private String titleName;
|
||||
|
||||
@Schema(description = "地图避让")
|
||||
private Integer distance;
|
||||
|
||||
@Schema(description = "流域编码")
|
||||
private String rvcd;
|
||||
|
||||
@Schema(description = "行政编码")
|
||||
private String addvcd;
|
||||
|
||||
@Schema(description = "基地编码")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "关联电站编码")
|
||||
private String rstcds;
|
||||
|
||||
@Schema(description = "设施类型")
|
||||
private String sttpCode;
|
||||
|
||||
@Schema(description = "电站名称")
|
||||
private String ennm;
|
||||
|
||||
@Schema(description = "流域名称")
|
||||
private String rvnm;
|
||||
|
||||
@Schema(description = "电站装机类型")
|
||||
private Integer endInstalledType;
|
||||
|
||||
@Schema(description = "生态流量告警数")
|
||||
private Integer stqCount;
|
||||
|
||||
@Schema(description = "水质告警数")
|
||||
private Integer wqCount;
|
||||
|
||||
@Schema(description = "水位告警数")
|
||||
private Integer zCount;
|
||||
|
||||
@Schema(description = "水温告警数")
|
||||
private Integer wtCount;
|
||||
|
||||
@Schema(description = "年份")
|
||||
private String yyyy;
|
||||
|
||||
@Schema(description = "告警区间范围")
|
||||
private String range;
|
||||
|
||||
@Schema(description = "装机容量")
|
||||
private BigDecimal ttpwr;
|
||||
|
||||
@Schema(description = "基地名称")
|
||||
private String baseName;
|
||||
|
||||
@Schema(description = "电站编码")
|
||||
private String rstcd;
|
||||
|
||||
@Schema(description = "流域沿程")
|
||||
private Integer rvcdStepSort;
|
||||
|
||||
@Schema(description = "电站沿程")
|
||||
private Integer rstcdStepSort;
|
||||
|
||||
@Schema(description = "站点沿程")
|
||||
private Integer siteStepSort;
|
||||
|
||||
@Schema(description = "电站图片")
|
||||
private String logo;
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Schema(description = "电站告警状态统计")
|
||||
public class EngWarnCountVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "告警状态")
|
||||
private Integer warnState;
|
||||
|
||||
@Schema(description = "告警状态名称")
|
||||
private String warnStateName;
|
||||
|
||||
@Schema(description = "数量")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "告警类型")
|
||||
private String warnType;
|
||||
|
||||
@Schema(description = "告警类型名称")
|
||||
private String warnTypeName;
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.yfd.platform.qgc_env.warn.entity.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Schema(description = "监测设备告警情况")
|
||||
public class StcdWarnStateVo {
|
||||
|
||||
@Schema(description = "测站编码")
|
||||
private String stcd;
|
||||
|
||||
@Schema(description = "测站名称")
|
||||
private String stnm;
|
||||
|
||||
@Schema(description = "电站编码")
|
||||
private String rstcd;
|
||||
|
||||
@Schema(description = "电站名称")
|
||||
private String ennm;
|
||||
|
||||
@Schema(description = "监测方式")
|
||||
private Integer mway;
|
||||
|
||||
@Schema(description = "测站类型编码")
|
||||
private String sttpCode;
|
||||
|
||||
@Schema(description = "测站类型名称")
|
||||
private String sttpName;
|
||||
|
||||
@Schema(description = "基地编码")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "基地名称")
|
||||
private String baseName;
|
||||
|
||||
@Schema(description = "流域编码")
|
||||
private String rvcd;
|
||||
|
||||
@Schema(description = "告警状态")
|
||||
private Integer warnState;
|
||||
|
||||
@Schema(description = "告警状态名称")
|
||||
private String warnstateName;
|
||||
|
||||
@Schema(description = "告警时间")
|
||||
private Date warnTm;
|
||||
|
||||
@Schema(description = "基础排序")
|
||||
private Integer baseStepSort;
|
||||
|
||||
@Schema(description = "电站排序")
|
||||
private Integer rstcdStepSort;
|
||||
|
||||
@Schema(description = "数据接入类型")
|
||||
private Integer dtinType;
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.yfd.platform.qgc_env.warn.service;
|
||||
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.AlarmPointVo;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.AiRecordVo;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.AiProtectVo;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.AiDmRunVo;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.AiComListVo;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.AiRstcdVo;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.EngWarnCountVo;
|
||||
import com.yfd.platform.qgc_env.warn.entity.vo.StcdWarnStateVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WarnDataService {
|
||||
|
||||
DataSourceResult<EngWarnCountVo> getEngWarnCount(DataSourceRequest dataSourceRequest);
|
||||
|
||||
AiDmRunVo getAiDmRunCount(DataSourceRequest dataSourceRequest);
|
||||
|
||||
AiProtectVo getAiProtectCount(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<AiComListVo> getAiComKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<AiRstcdVo> getAiRstcdListKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
List<AiRecordVo> getAiPfwRecordKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
List<AiRecordVo> getAiRecordKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<AlarmPointVo> getAlarmPointKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
|
||||
DataSourceResult<StcdWarnStateVo> getWarnStcdKendoListCust(DataSourceRequest dataSourceRequest);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,15 +3,7 @@ package com.yfd.platform.qgc_env.wq.service.impl;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yfd.platform.common.CommonConstant;
|
||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.common.Group;
|
||||
import com.yfd.platform.common.GroupHelper;
|
||||
import com.yfd.platform.common.GroupingInfo;
|
||||
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||
import com.yfd.platform.common.PageInfo;
|
||||
import com.yfd.platform.common.*;
|
||||
import com.yfd.platform.common.exception.BizException;
|
||||
import com.yfd.platform.qgc_base.entity.vo.BatchDeleteAo;
|
||||
import com.yfd.platform.qgc_base.entity.vo.DataParam;
|
||||
@ -694,6 +686,7 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
||||
baseSql.append("SELECT ")
|
||||
.append("NVL(t.IS_DELETED, 0) AS isDeleted, ")
|
||||
.append("t.STTP AS sttpCode, ")
|
||||
.append("t.WARN_STATE AS warnState, ")
|
||||
.append("t.MWAY AS mway, ")
|
||||
.append("t.DTIN_TYPE AS dtinType, ")
|
||||
.append("t.STCD AS stcd, ")
|
||||
@ -731,6 +724,8 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
||||
DataSourceResult result = new DataSourceResult();
|
||||
if (Boolean.TRUE.equals(dataSourceRequest.getGroupResultFlat())) {
|
||||
result.setData(new GroupHelper().faltGroup(rows, Arrays.asList(groupInfos)));
|
||||
} else if (groupInfos != null && groupInfos.length == 1 && groupInfos[0] != null && StrUtil.isNotBlank(groupInfos[0].getSelector())) {
|
||||
result.setData(toMsstbprptLegacyGroups(rows, groupInfos[0].getSelector()));
|
||||
} else {
|
||||
result.setData(toLegacyGroupResult(new GroupHelper().group(rows, Arrays.asList(groupInfos)), 0));
|
||||
}
|
||||
@ -3181,14 +3176,17 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
||||
return result;
|
||||
}
|
||||
String upperField = groupField == null ? "DTINTYPE" : groupField.toUpperCase();
|
||||
String countField = "COUNT_" + upperField;
|
||||
String aggregateKey = "count_" + groupField;
|
||||
for (Map<String, Object> row : rows) {
|
||||
Object key = row.get(upperField);
|
||||
if (key == null) {
|
||||
key = row.get(groupField);
|
||||
}
|
||||
String countField = row.containsKey("COUNT_STCD") ? "COUNT_STCD" : "COUNT_" + upperField;
|
||||
String aggregateKey = "COUNT_STCD".equals(countField) ? "count_stcd" : "count_" + groupField;
|
||||
Object countValue = row.get(countField);
|
||||
if (countValue == null) {
|
||||
countValue = row.get("count_stcd");
|
||||
}
|
||||
if (countValue == null) {
|
||||
countValue = row.get("count_" + upperField);
|
||||
}
|
||||
@ -3208,7 +3206,7 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
||||
detail.put(upperField, key);
|
||||
detail.put(countField, count);
|
||||
item.put("items", List.of(detail));
|
||||
item.put("count", count);
|
||||
item.put("count", 0);
|
||||
item.put("summary", new Object[0]);
|
||||
|
||||
Map<String, Object> aggregates = new LinkedHashMap<>();
|
||||
@ -3224,23 +3222,48 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
||||
return baseSql;
|
||||
}
|
||||
List<String> groupFields = new ArrayList<>();
|
||||
List<String> selectItems = new ArrayList<>();
|
||||
List<String> orderByItems = new ArrayList<>();
|
||||
for (GroupingInfo item : groupInfos) {
|
||||
if (item == null || StrUtil.isBlank(item.getSelector())) {
|
||||
continue;
|
||||
}
|
||||
groupFields.add(item.getSelector());
|
||||
String selector = item.getSelector();
|
||||
groupFields.add(selector);
|
||||
selectItems.add(selector + " AS " + selector.toUpperCase());
|
||||
String dir = Boolean.TRUE.equals(item.getDesc()) ? "DESC" : "ASC";
|
||||
orderByItems.add(item.getSelector() + " " + dir);
|
||||
orderByItems.add(selector + " " + dir);
|
||||
boolean hasCountStcd = false;
|
||||
if (CollUtil.isNotEmpty(item.getSummaryInfos())) {
|
||||
for (SummaryInfo summaryInfo : item.getSummaryInfos()) {
|
||||
if (summaryInfo == null || StrUtil.isBlank(summaryInfo.getSelector()) || StrUtil.isBlank(summaryInfo.getSummaryType())) {
|
||||
continue;
|
||||
}
|
||||
String summaryType = summaryInfo.getSummaryType().toUpperCase();
|
||||
String summarySelector = summaryInfo.getSelector().toUpperCase();
|
||||
if ("count".equalsIgnoreCase(summaryInfo.getSummaryType()) && "stcd".equalsIgnoreCase(summaryInfo.getSelector())) {
|
||||
hasCountStcd = true;
|
||||
}
|
||||
switch (summaryInfo.getSummaryType().toLowerCase()) {
|
||||
case "count" -> selectItems.add("COUNT(" + summaryInfo.getSelector() + ") AS " + summaryType + "_" + summarySelector);
|
||||
case "sum" -> selectItems.add("SUM(" + summaryInfo.getSelector() + ") AS " + summaryType + "_" + summarySelector);
|
||||
case "avg", "average" -> selectItems.add("AVG(" + summaryInfo.getSelector() + ") AS AVG_" + summarySelector);
|
||||
case "min" -> selectItems.add("MIN(" + summaryInfo.getSelector() + ") AS " + summaryType + "_" + summarySelector);
|
||||
case "max" -> selectItems.add("MAX(" + summaryInfo.getSelector() + ") AS " + summaryType + "_" + summarySelector);
|
||||
default -> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasCountStcd) {
|
||||
selectItems.add("COUNT(*) AS COUNT_STCD");
|
||||
}
|
||||
}
|
||||
if (groupFields.isEmpty()) {
|
||||
return baseSql;
|
||||
}
|
||||
StringBuilder sql = new StringBuilder("SELECT ");
|
||||
sql.append(String.join(", ", groupFields));
|
||||
for (String groupField : groupFields) {
|
||||
sql.append(", COUNT(*) AS count_").append(groupField).append(" ");
|
||||
}
|
||||
sql.append(String.join(", ", selectItems));
|
||||
sql.append(" FROM (").append(baseSql).append(") T ")
|
||||
.append(" GROUP BY ").append(String.join(", ", groupFields)).append(" ");
|
||||
if (!orderByItems.isEmpty()) {
|
||||
|
||||
@ -66,11 +66,11 @@ public class ZqMonitorServiceImpl implements ZqMonitorService {
|
||||
.append("LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = eng.BASE_ID AND NVL(hb.IS_DELETED, 0) = 0 ")
|
||||
.append("LEFT JOIN SD_HBRV_DIC hbrv ON hbrv.HBRVCD = eng.HBRVCD ")
|
||||
.append(" AND hbrv.BASEID = eng.BASE_ID ")
|
||||
.append(" AND NVL(hbrv.IS_DELETED, 0) = 0 ")
|
||||
.append(" AND NVL(hbrv.ENABLED, 1) = 1 ")
|
||||
.append(" AND hbrv.IS_DELETED = 0 ")
|
||||
.append(" AND hbrv.ENABLED = 1 ")
|
||||
.append("LEFT JOIN SD_RVCD_DIC rv ON rv.RVCD = eng.RVCD ")
|
||||
.append("LEFT JOIN SD_ADDVCD_DIC addv ON addv.ADDVCD = eng.ADDVCD ")
|
||||
.append("WHERE NVL(t.IS_DELETED, 0) = 0 ");
|
||||
.append("WHERE t.IS_DELETED = 0 ");
|
||||
if (onlyZq) {
|
||||
sql.append("AND t.STTP = 'ZQ' ");
|
||||
}
|
||||
@ -1844,7 +1844,7 @@ public class ZqMonitorServiceImpl implements ZqMonitorService {
|
||||
}
|
||||
return switch (field) {
|
||||
case "isDeleted" -> "NVL(t.IS_DELETED, 0)";
|
||||
case "sttpFullPath" -> null;
|
||||
case "sttpFullPath" -> "t.STTP";
|
||||
case "sttpCode" -> "t.STTP";
|
||||
case "mway" -> "t.MWAY";
|
||||
case "dtinType" -> "t.DTIN_TYPE";
|
||||
|
||||
@ -212,5 +212,30 @@
|
||||
</if>
|
||||
ORDER BY t.ORDER_PATH ASC, t.RVCD ASC
|
||||
</select>
|
||||
<select id="selectRvcdDropdown" resultType="com.yfd.platform.qgc_base.domain.SdRvcdDic">
|
||||
SELECT
|
||||
RVCD,
|
||||
RVNM,
|
||||
PRVCD,
|
||||
GRD,
|
||||
PATH,
|
||||
ORDER_INDEX,
|
||||
SHORTNAME,
|
||||
SHEPRANGE,
|
||||
BASEID
|
||||
|
||||
FROM SD_RVCD_DIC
|
||||
WHERE NVL(ENABLED, 1) = 1
|
||||
AND NVL(IS_DELETED, 0) = 0
|
||||
AND (PRVCD IS NULL OR PRVCD = '' OR PRVCD = '0')
|
||||
<if test="baseId != null and baseId != ''">
|
||||
AND BASEID = #{baseId}
|
||||
</if>
|
||||
|
||||
<if test="rvnm != null and rvnm != ''">
|
||||
AND RVNM LIKE '%' || #{rvnm} || '%'
|
||||
</if>
|
||||
ORDER BY ORDER_INDEX ASC, RVCD ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -7,14 +7,26 @@ VITE_APP_TITLE = '水电水利建设项目全过程环境管理信息平台'
|
||||
VITE_APP_PORT = 3000
|
||||
VITE_APP_BASE_API = '/dev-api'
|
||||
# 本地环境
|
||||
VITE_APP_BASE_URL = 'http://10.84.121.127:8093'
|
||||
VITE_APP_BASE_URL = 'http://localhost:8093'
|
||||
# 测试环境
|
||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8096'
|
||||
# 汤伟
|
||||
<<<<<<< Updated upstream
|
||||
<<<<<<< HEAD
|
||||
# VITE_APP_BASE_URL = 'http://10.84.121.21:8093'
|
||||
# 李林
|
||||
VITE_APP_BASE_URL = 'http://10.84.121.43:8093'
|
||||
=======
|
||||
VITE_APP_BASE_URL = 'http://10.84.121.127:8093'
|
||||
# VITE_APP_BASE_URL = 'http://192.168.1.162:8093'
|
||||
>>>>>>> fa4e1bc194446adb8adfd7f6404be1fbb50b31c3
|
||||
=======
|
||||
# VITE_APP_BASE_URL = 'http://10.84.121.127:8093'
|
||||
VITE_APP_BASE_URL = 'http://192.168.1.168:8093'
|
||||
# 李林
|
||||
# VITE_APP_BASE_URL = 'http://10.84.121.43:8093'
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
# 测试环境线上10.84.121.122:
|
||||
VITE_APP_TEST_ONLINE_URL = 'https://211.99.26.225:12122'
|
||||
|
||||
@ -8,6 +8,7 @@ module.exports = {
|
||||
defineProps: 'readonly',
|
||||
defineEmits: 'readonly',
|
||||
defineExpose: 'readonly',
|
||||
withDefaults: 'readonly',
|
||||
DialogType: "readonly",
|
||||
OptionType: "readonly",
|
||||
},
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
"echarts": "^5.2.2",
|
||||
"element-plus": "^2.2.27",
|
||||
"esri-leaflet": "^3.0.19",
|
||||
"exceljs": "^4.4.0",
|
||||
"js-base64": "^3.7.5",
|
||||
"js-cookie": "^3.0.1",
|
||||
"jsencrypt": "^3.3.2",
|
||||
@ -49,7 +50,8 @@
|
||||
"vuedraggable": "^2.24.3",
|
||||
"wujie": "^1.0.24",
|
||||
"wujie-vue3": "^1.0.24",
|
||||
"xlsx": "^0.18.5"
|
||||
"xlsx": "^0.18.5",
|
||||
"xlsx-js-style": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^16.2.3",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { ElConfigProvider } from 'element-plus';
|
||||
import { useAppStore, usetTheme } from '@/store/modules/app';
|
||||
import locale from "ant-design-vue/es/locale/zh_CN";
|
||||
import locale from 'ant-design-vue/es/locale/zh_CN';
|
||||
|
||||
const appStore = useAppStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 1. 数据查询 电站信息 编辑删除 自定义筛选列 没做-->
|
||||
<el-config-provider :locale="appStore.locale" :size="appStore.size">
|
||||
<a-config-provider :theme="usetTheme" :locale="locale">
|
||||
<router-view />
|
||||
|
||||
@ -1,5 +1,40 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 基础信息 集团/公司
|
||||
export function getCompanyList(data) {
|
||||
return request({
|
||||
url: '/env/hycd/selectForDropdown',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
}
|
||||
// 基础信息 表格
|
||||
export function getPowerTableList(data) {
|
||||
return request({
|
||||
url: '/env/engInfo/vmsstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 基础信息 编辑
|
||||
export function updatePowerInfo(data) {
|
||||
return request({
|
||||
url: '/env/engInfo/update',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 基础信息 删除
|
||||
export function deletePowerInfo(data) {
|
||||
return request({
|
||||
url: '/env/engInfo/delete',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 鱼类基础信息 科
|
||||
export function getFishResourceList(data) {
|
||||
return request({
|
||||
url: '/fpr/fishDic/GetKendoList',
|
||||
@ -8,6 +43,7 @@ export function getFishResourceList(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 鱼类基础信息 表格
|
||||
export function getFishResourceZYList(data) {
|
||||
return request({
|
||||
url: '/fpr/fishDic/zy/GetKendoList',
|
||||
@ -15,3 +51,169 @@ export function getFishResourceZYList(data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 批复文件
|
||||
export function getApprovalStatusList(data) {
|
||||
return request({
|
||||
url: '/eng/base/eiaapproval/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 生态流量运行数据 - 小时
|
||||
|
||||
export function getFlowDataList(data) {
|
||||
return request({
|
||||
url: '/eq/data/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 生态流量运行数据 - 日
|
||||
|
||||
export function getFlowDataDayList(data) {
|
||||
return request({
|
||||
url: '/eq/data/day/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 生态流量运行数据 - 月
|
||||
|
||||
export function getFlowDataMonthList(data) {
|
||||
return request({
|
||||
url: '/eq/data/drtp/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 水质监测数据 - 断面
|
||||
export function getWaterDataSectionList(data) {
|
||||
return request({
|
||||
url: '/wq/msstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 水质监测数据 - 小时
|
||||
export function getWaterDataList(data) {
|
||||
return request({
|
||||
url: '/wq/data/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 水质监测数据 - 日
|
||||
export function getWaterDataDayList(data) {
|
||||
return request({
|
||||
url: '/wq/data/day/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 水质监测数据 - 月
|
||||
export function getWaterDataMonthList(data) {
|
||||
return request({
|
||||
url: '/wq/data/drtp/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 垂向 - 列表
|
||||
export function getVerticalList(data) {
|
||||
return request({
|
||||
url: '/wt/cxDetail/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 表层水温 - 断面
|
||||
export function getSurfaceTempSectionList(data) {
|
||||
return request({
|
||||
url: '/wt/msstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 表层水温 - 小时
|
||||
export function getSurfaceTempList(data) {
|
||||
return request({
|
||||
url: '/wt/alongDetail/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 表层水温 - 日
|
||||
export function getSurfaceTempDayList(data) {
|
||||
return request({
|
||||
url: '/wt/alongDetail/day/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 表层水温 - 月
|
||||
export function getSurfaceTempMonthList(data) {
|
||||
return request({
|
||||
url: '/wt/alongDetail/drtp/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 过鱼设施名称 - 断面
|
||||
export function getFishReleaseMonitorSectionList(data) {
|
||||
return request({
|
||||
url: '/fp/msstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 过鱼监测数据
|
||||
export function getFishReleaseMonitorList(data) {
|
||||
return request({
|
||||
url: '/fp/query/qgc/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 鱼类 放鱼
|
||||
export function getFishReleaseList(data) {
|
||||
return request({
|
||||
url: '/fb/fishrun/qgc/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 流量站 - 断面
|
||||
export function getFlowStationSectionList(data) {
|
||||
return request({
|
||||
url: '/zq/msstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 流量站 - 小时
|
||||
export function getFlowStationList(data) {
|
||||
return request({
|
||||
url: '/zq/river/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 流量站 - 日
|
||||
export function getFlowStationDayList(data) {
|
||||
return request({
|
||||
url: '/zq/river/day/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 流量站 - 月
|
||||
export function getFlowStationMonthList(data) {
|
||||
return request({
|
||||
url: '/zq/river/drtp/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
@ -11,7 +11,8 @@ export function getBaseDropdown(data: any) {
|
||||
// 流域下拉列表
|
||||
export function getSelectForDropdown(data: any) {
|
||||
return request({
|
||||
url: '/env/rvcd/selectForDropdown',
|
||||
// url: '/env/rvcd/selectForDropdown',
|
||||
url: '/env/rvcd/selectRvcdDropdown',
|
||||
method: 'get',
|
||||
data
|
||||
});
|
||||
|
||||
@ -34,7 +34,7 @@ export function evnmAutoMonitorGetKendoListCust(queryParams: any) {
|
||||
//获取电站
|
||||
export function vmsstbprptGetKendoList(queryParams: any) {
|
||||
return request({
|
||||
url: '/eq/vmsstbprpt/GetKendoList',
|
||||
url: '/eq/base/vmsstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data: queryParams
|
||||
});
|
||||
@ -58,7 +58,7 @@ export function intervalGetKendoListCust(queryParams: any) {
|
||||
// 获取生态流量达标率按性能
|
||||
export function eqGetKendoListCust(queryParams: any) {
|
||||
return request({
|
||||
url: '/api/wmp-eng-server/eng/to/eq/GetKendoListCust',
|
||||
url: '/eq/to/eq/GetKendoListCust',
|
||||
method: 'post',
|
||||
data: queryParams
|
||||
});
|
||||
@ -82,7 +82,7 @@ export function wbsbGetKendoList(queryParams: any) {
|
||||
//生态流量泄放方式
|
||||
export function msstbprptGetKendoList(queryParams: any) {
|
||||
return request({
|
||||
url: '/eq/msstbprpt/GetKendoList',
|
||||
url: '/eq/base/msstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data: queryParams
|
||||
});
|
||||
@ -90,7 +90,7 @@ export function msstbprptGetKendoList(queryParams: any) {
|
||||
//根据流域获取电站
|
||||
export function qgcgetEngLimit(queryParams: any) {
|
||||
return request({
|
||||
url: '/api/wmp-eng-server/eng/engalong/statistics/qgc/getEngLimit',
|
||||
url: '/eq/engalong/statistics/qgc/getEngLimit',
|
||||
method: 'post',
|
||||
data: queryParams
|
||||
});
|
||||
|
||||
@ -3,15 +3,40 @@ import request from '@/utils/request';
|
||||
// 获取所有地图 图例树
|
||||
export function getAllMapLegendTree(data: any) {
|
||||
return request({
|
||||
url: '/api/wmp-sys-server/mapLegend/GetKendoList',
|
||||
url: '/mapLegend/GetKendoList',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 选中配置 列表
|
||||
export function getAllMapLegendModuleTree(data: any) {
|
||||
return request({
|
||||
url: '/mapmodule/GetKendoList',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 选中配置 新增
|
||||
export function saveMapLegendModule(data: any) {
|
||||
return request({
|
||||
url: '/mapmodule/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
// 选中配置 删除
|
||||
export function deleteMapLegendModule(data: any) {
|
||||
return request({
|
||||
url: '/mapmodule/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 保存地图 图例
|
||||
export function saveMapLegend(data: any) {
|
||||
return request({
|
||||
url: '/api/wmp-sys-server/mapLegend/save',
|
||||
url: '/mapLegend/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -19,7 +44,7 @@ export function saveMapLegend(data: any) {
|
||||
// 删除地图 图例
|
||||
export function deleteMapLegend(data: any) {
|
||||
return request({
|
||||
url: '/api/wmp-sys-server/mapLegend/delete',
|
||||
url: '/mapLegend/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
@ -28,7 +53,7 @@ export function deleteMapLegend(data: any) {
|
||||
// 获取所有地图 图例树
|
||||
export function getAllMapLegendParentIdTree(data: any) {
|
||||
return request({
|
||||
url: '/api/wmp-sys-server/mapLegend/getAllMapLegendTree',
|
||||
url: '/mapLegend/getAllMapLegendTree',
|
||||
method: 'get',
|
||||
params: data
|
||||
});
|
||||
|
||||
64
frontend/src/api/yldc/index.ts
Normal file
64
frontend/src/api/yldc/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import request from '@/utils/request';
|
||||
//获取有数据的流域
|
||||
export function wbsbGetKendoList(data: any) {
|
||||
return request({
|
||||
url: '/fpr/wbsb/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//获取鱼类调查装置
|
||||
export function msstbprptGetKendoList(data: any) {
|
||||
return request({
|
||||
url: '/fpr/msstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//获取鱼类介绍
|
||||
export function fishDicGetKendoList(data: any) {
|
||||
return request({
|
||||
url: '/fpr/fishDic/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//获取鱼类调查统计数据
|
||||
export function getFprdDataInfo(data: any) {
|
||||
return request({
|
||||
url: '/fpr/sdFprdR/getFprdDataInfo',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//
|
||||
export function sdFprdRGetKendoListCust(data: any) {
|
||||
return request({
|
||||
url: '/fpr/sdFprdR/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//装置名称 /api/dec-lygk-base-server/base/vmsstbprpt/GetKendoList
|
||||
export function vmsstbprptGetKendoList(data: any) {
|
||||
return request({
|
||||
url: '/fpr/vmsstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//鱼种类 /api/wmp-env-server/sdFprdR/getFishInfo
|
||||
export function sdFprdRgetFishInfo() {
|
||||
return request({
|
||||
url: '/fpr/sdFprdR/getFishInfo',
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
//获取鱼类变化信息
|
||||
export function sdFprdRGetFtpChangeInfo(data: { baseId: string; year: string }) {
|
||||
return request({
|
||||
url: '/fpr/sdFprdR/getFtpChangeInfo',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
35
frontend/src/api/zxdzw/index.ts
Normal file
35
frontend/src/api/zxdzw/index.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
|
||||
export function vpcGetKendoListCust(data: any) {
|
||||
return request({
|
||||
url: '/vap/vpc/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 植物园建设及接入情况 - 表格数据
|
||||
export function vmsstbprptGetKendoList(data: any) {
|
||||
return request({
|
||||
url: '/vap/vmsstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 动物救助情况
|
||||
export function wvaGetKendoListCust(data: any) {
|
||||
return request({
|
||||
url: '/vap/wva/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//植物园情况介绍
|
||||
// export function vpcGetKendoListCust(data: any) {
|
||||
// return request({
|
||||
// url: '/api/wmp-env-server/env/vpc/GetKendoListCust',
|
||||
// method: 'post',
|
||||
// data
|
||||
// });
|
||||
// }
|
||||
76
frontend/src/api/zzfl/index.ts
Normal file
76
frontend/src/api/zzfl/index.ts
Normal file
@ -0,0 +1,76 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 增殖站建设运行情况 - 概览统计
|
||||
export function overviewGetKendoListCust(data: any) {
|
||||
return request({
|
||||
url: '/fb/station/overview/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 增殖站概况详情 - 全国概览接口(all=true时使用)
|
||||
export function qgcoverviewGetOverviewSecond(data: any) {
|
||||
return request({
|
||||
url: '/fb/station/qgcoverview/getOverviewSecond',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 增殖站概况详情 - 普通接口(all=false时使用)
|
||||
export function overviewGetOverviewSecond(data: any) {
|
||||
return request({
|
||||
url: '/fb/station/overview/getOverviewSecond',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//增殖站介绍 /api/dec-lygk-base-server/base/msstbprpt/GetKendoList
|
||||
export function msstbprptGetKendoList(data: any) {
|
||||
return request({
|
||||
url: '/fb/msstbprpt/GetKendoList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 增殖站运行数据统计
|
||||
export function qgcgetFbStaticsData(data: any) {
|
||||
return request({
|
||||
url: '/fb/station/qgc/getFbStaticsData',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 增殖计划完成情况,下拉框 ///////
|
||||
export function fishTypegetStcdList(data: any) {
|
||||
return request({
|
||||
url: '/fb/fishType/getStcdList',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//增殖计划完成情况-数量完成情况//////////////
|
||||
export function fishCountGetKendoListCust(data: any) {
|
||||
return request({
|
||||
url: '/fb/fishCount/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
//增殖计划完成情况-种类完成情况///////////
|
||||
export function fishTypeGetKendoListCust(data: any) {
|
||||
return request({
|
||||
url: '/fb/fishType/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 增殖站运行情况统计列表 (TwoLayers 弹窗表格) ///////////////
|
||||
export function msfbrdmGetKendoListCust(data: any) {
|
||||
return request({
|
||||
url: '/fb/msfbrdm/qgc/GetKendoListCust',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
BIN
frontend/src/assets/images/fish_survey_liang.png
Normal file
BIN
frontend/src/assets/images/fish_survey_liang.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
BIN
frontend/src/assets/images/fish_survey_shu.png
Normal file
BIN
frontend/src/assets/images/fish_survey_shu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
BIN
frontend/src/assets/images/fish_survey_zhong.png
Normal file
BIN
frontend/src/assets/images/fish_survey_zhong.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.9 KiB |
@ -13,7 +13,11 @@
|
||||
<div class="form-content-wrapper">
|
||||
<!-- 1. 搜索项 + 查询/重置按钮 (栅格布局) -->
|
||||
<a-row :gutter="[16, 0]" class="search-row" wrap>
|
||||
<a-col v-for="item in validSearchList" :key="item.name">
|
||||
<a-col
|
||||
v-for="item in validSearchList"
|
||||
:key="item.name"
|
||||
:span="item.col"
|
||||
>
|
||||
<a-form-item
|
||||
:label="item.label"
|
||||
:name="item.name"
|
||||
@ -110,8 +114,7 @@
|
||||
style="width: 135px"
|
||||
:dropdown-style="{
|
||||
maxHeight: '400px',
|
||||
overflow: 'auto',
|
||||
minWidth: '360px'
|
||||
overflow: 'auto'
|
||||
}"
|
||||
>
|
||||
<a-select-option
|
||||
@ -134,14 +137,21 @@
|
||||
:loading="shuJuTianBaoStore.engLoading"
|
||||
:filter-option="filterOption"
|
||||
style="width: 135px"
|
||||
:dropdown-style="{
|
||||
maxHeight: '400px',
|
||||
overflow: 'auto',
|
||||
minWidth: '300px'
|
||||
}"
|
||||
>
|
||||
<a-select-option
|
||||
v-for="opt in shuJuTianBaoStore.engOption"
|
||||
:key="opt.stcd"
|
||||
:value="opt.stcd"
|
||||
:label="opt.ennm"
|
||||
:title="opt.ennm + ',' + opt.reachcdName"
|
||||
:reachcdName="opt.reachcdName"
|
||||
>
|
||||
{{ opt.ennm }}
|
||||
{{ opt.ennm }},{{ opt.reachcdName }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<!-- 电站下拉框 -->
|
||||
@ -322,8 +332,11 @@ const formData = reactive<any>({});
|
||||
const rules = reactive<Record<string, any>>({});
|
||||
|
||||
const filterOption = (inputValue: string, option: any) => {
|
||||
if (!option.label) return false;
|
||||
return option.label.indexOf(inputValue) !== -1;
|
||||
const label = option.label || '';
|
||||
const reachcdName = option.reachcdName || '';
|
||||
const keyword = inputValue || '';
|
||||
|
||||
return label.indexOf(keyword) !== -1 || reachcdName.indexOf(keyword) !== -1;
|
||||
};
|
||||
// 2. 创建计算属性,自动过滤掉 false/null/undefined 的项
|
||||
const validSearchList = computed(() => {
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
:scroll="scrollConfig"
|
||||
:row-key="rowKey"
|
||||
:customRow="customRow"
|
||||
:row-class-name="rowClassName"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<!-- 合计行插槽 -->
|
||||
@ -37,7 +38,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, watch, nextTick, h, useSlots } from 'vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { calcTableScrollY } from '@/utils/index';
|
||||
import { exportTable as exportTableUtil } from '@/utils/exportExcel';
|
||||
|
||||
// --- Types ---
|
||||
interface Props {
|
||||
@ -47,6 +50,7 @@ interface Props {
|
||||
listUrl?: (params: any) => Promise<any>;
|
||||
data?: any[];
|
||||
enableRowSelection?: boolean;
|
||||
enableRowHighlight?: boolean; // 是否启用行点击高亮
|
||||
rowKey?: string;
|
||||
searchParams?: Record<string, any>;
|
||||
defaultPageSize?: number;
|
||||
@ -63,6 +67,7 @@ interface Props {
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
enableRowSelection: false,
|
||||
enableRowHighlight: false,
|
||||
rowKey: 'id',
|
||||
isPage: true,
|
||||
data: () => [],
|
||||
@ -100,6 +105,13 @@ const selectedRows = ref<any[]>([]);
|
||||
const lastFilter = ref<Record<string, any> | undefined>(undefined);
|
||||
const tableContainerRef = ref<any>(null);
|
||||
const tableScrollY = ref<number>(0); // ✅ 新增:存储容器高度
|
||||
const clickedRowKey = ref<string | number | null>(null); // 新增:记录点击行 key
|
||||
|
||||
// --- 内部排序状态 ---
|
||||
const internalSort = ref<{
|
||||
field: string;
|
||||
order: 'ascend' | 'descend' | null;
|
||||
}>({ field: '', order: null });
|
||||
|
||||
// --- Computed Scroll Config ---
|
||||
const scrollConfig = computed(() => {
|
||||
@ -130,14 +142,15 @@ const rowSelection = computed(() => ({
|
||||
selectedRowKeys: selectedRowKeys.value,
|
||||
onChange: (keys: string[], rows: any[]) => {
|
||||
// 至少保留 minSelectionCount 条勾选,如果取消后低于最小值则恢复默认第一条
|
||||
const currentData = props.data.length > 0 ? props.data : tableData.value;
|
||||
if (
|
||||
props.minSelectionCount > 0 &&
|
||||
keys.length < props.minSelectionCount &&
|
||||
props.data.length > 0
|
||||
currentData.length > 0
|
||||
) {
|
||||
const firstKey = props.data[0][props.rowKey];
|
||||
const firstKey = currentData[0][props.rowKey];
|
||||
keys = [firstKey];
|
||||
rows = [props.data[0]];
|
||||
rows = [currentData[0]];
|
||||
}
|
||||
selectedRowKeys.value = keys;
|
||||
selectedRows.value = rows;
|
||||
@ -177,10 +190,23 @@ const getList = async (filter?: Record<string, any>) => {
|
||||
if (filter !== undefined) {
|
||||
lastFilter.value = filter;
|
||||
}
|
||||
console.log(props.searchParams);
|
||||
try {
|
||||
// 合并排序参数:优先使用用户手动排序,否则使用 searchParams 中的默认排序
|
||||
let sort = undefined;
|
||||
if (internalSort.value.field && internalSort.value.order) {
|
||||
sort = [
|
||||
{
|
||||
field: internalSort.value.field,
|
||||
dir: internalSort.value.order === 'ascend' ? 'asc' : 'desc'
|
||||
}
|
||||
];
|
||||
} else if (props.searchParams?.sort) {
|
||||
sort = props.searchParams.sort;
|
||||
}
|
||||
|
||||
const params = {
|
||||
...props.searchParams,
|
||||
...(sort !== undefined ? { sort } : {}),
|
||||
skip: page.value,
|
||||
take: size.value,
|
||||
filter: lastFilter.value
|
||||
@ -191,13 +217,12 @@ const getList = async (filter?: Record<string, any>) => {
|
||||
}
|
||||
|
||||
const res = await props.listUrl(params);
|
||||
console.log(res);
|
||||
|
||||
let finalRecords: any[] = [];
|
||||
let finalTotal = 0;
|
||||
|
||||
if (props.transformData) {
|
||||
const result = props.transformData(res);
|
||||
const result:any = props.transformData(res);
|
||||
finalRecords = result.records || result.data || [];
|
||||
finalTotal = result.total || 0;
|
||||
} else {
|
||||
@ -206,7 +231,18 @@ const getList = async (filter?: Record<string, any>) => {
|
||||
}
|
||||
|
||||
tableData.value = processData(finalRecords);
|
||||
// tableData.value = finalRecords;
|
||||
total.value = finalTotal;
|
||||
|
||||
// 数据加载完成后,默认高亮第一条数据(仅在启用行高亮时)
|
||||
if (props.enableRowHighlight) {
|
||||
if (tableData.value.length > 0) {
|
||||
clickedRowKey.value = tableData.value[0][props.rowKey];
|
||||
} else {
|
||||
clickedRowKey.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
emit('data-loaded', params, { records: finalRecords, total: finalTotal });
|
||||
} catch (error) {
|
||||
console.error('Fetch table data error:', error);
|
||||
@ -220,17 +256,21 @@ const getList = async (filter?: Record<string, any>) => {
|
||||
const handleTableChange = (pag: any, filters: any, sorter: any) => {
|
||||
page.value = pag.current;
|
||||
size.value = pag.pageSize;
|
||||
if (props.enableSort) {
|
||||
if (sorter && sorter.field) {
|
||||
internalSort.value = { field: sorter.field, order: sorter.order };
|
||||
page.value = 1; // 排序时重置到第一页
|
||||
getList();
|
||||
emit('sort-change', { field: sorter.field, order: sorter.order });
|
||||
} else {
|
||||
emit('sort-change', { field: '', order: null });
|
||||
}
|
||||
} else {
|
||||
// 清除排序
|
||||
internalSort.value = { field: '', order: null };
|
||||
page.value = 1;
|
||||
getList();
|
||||
emit('sort-change', { field: '', order: null });
|
||||
}
|
||||
};
|
||||
const handleRowClick = (record: any) => {
|
||||
clickedRowKey.value = record[props.rowKey];
|
||||
emit('row-click', record);
|
||||
};
|
||||
|
||||
@ -242,6 +282,10 @@ const customRow = (record: any) => {
|
||||
};
|
||||
};
|
||||
|
||||
const rowClassName = (record: any) => {
|
||||
return record[props.rowKey] === clickedRowKey.value ? 'row-clicked' : '';
|
||||
};
|
||||
|
||||
const reset = () => {
|
||||
page.value = 1;
|
||||
size.value = props.defaultPageSize;
|
||||
@ -258,6 +302,140 @@ const clearSelection = () => {
|
||||
selectedRowKeys.value = [];
|
||||
selectedRows.value = [];
|
||||
};
|
||||
|
||||
const setSelectedRowKeys = (keys: string[]) => {
|
||||
selectedRowKeys.value = keys;
|
||||
selectedRows.value = tableData.value.filter(row =>
|
||||
keys.includes(row[props.rowKey])
|
||||
);
|
||||
emit('selection-change', selectedRowKeys.value, selectedRows.value);
|
||||
};
|
||||
|
||||
const setClickedRowKey = (key: string | number | null) => {
|
||||
clickedRowKey.value = key;
|
||||
};
|
||||
|
||||
// --- 导出方法 ---
|
||||
interface ExportTableParams {
|
||||
fileName: string;
|
||||
callback?: (message: string | boolean) => void;
|
||||
tbtitle?: string;
|
||||
tbsub?: string;
|
||||
}
|
||||
|
||||
const defaultExportCallback = (result: string | boolean) => {
|
||||
if (result === true) {
|
||||
message.success('导出成功');
|
||||
} else if (typeof result === 'string') {
|
||||
message.warning(result);
|
||||
} else {
|
||||
message.error('导出失败');
|
||||
}
|
||||
};
|
||||
|
||||
const exportTable = async (params: ExportTableParams): Promise<void> => {
|
||||
const { fileName, callback, tbtitle, tbsub } = params;
|
||||
const cb = callback || defaultExportCallback;
|
||||
|
||||
// 如果没有 listUrl 且没有内部数据,则无法导出
|
||||
if (!props.listUrl && (!props.data || props.data.length === 0)) {
|
||||
cb('没有可导出的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
let records: any[] = [];
|
||||
|
||||
if (props.data && props.data.length > 0) {
|
||||
// 使用传入的数据
|
||||
records = props.data;
|
||||
} else if (props.listUrl) {
|
||||
// 通过 listUrl 分页获取所有数据
|
||||
try {
|
||||
const allRecords: any[] = [];
|
||||
const pageSize = 3000;
|
||||
let skip = 1;
|
||||
let total = 0;
|
||||
|
||||
// 显示 loading
|
||||
const loadingMsg = message.loading({
|
||||
content: '正在获取导出数据...',
|
||||
duration: 0
|
||||
});
|
||||
|
||||
do {
|
||||
const requestParams = {
|
||||
...props.searchParams,
|
||||
skip,
|
||||
take: pageSize,
|
||||
groupResultFlat: false,
|
||||
filter: lastFilter.value
|
||||
};
|
||||
|
||||
const res = await props.listUrl(requestParams);
|
||||
|
||||
let pageRecords: any[] = [];
|
||||
let pageTotal = 0;
|
||||
|
||||
if (props.transformData) {
|
||||
const result = props.transformData(res);
|
||||
pageRecords = result.records || result.data || [];
|
||||
pageTotal = result.total || 0;
|
||||
} else {
|
||||
pageRecords =
|
||||
res?.data?.records || res?.data?.data || res?.data || [];
|
||||
pageTotal =
|
||||
res?.data?.data?.total || res?.data?.total || res?.total || 0;
|
||||
}
|
||||
|
||||
if (skip === 1) {
|
||||
total = pageTotal;
|
||||
}
|
||||
|
||||
allRecords.push(...pageRecords);
|
||||
|
||||
// 更新 loading 提示
|
||||
loadingMsg();
|
||||
message.loading({
|
||||
content: `正在获取导出数据... (${allRecords.length}/${total})`,
|
||||
duration: 0
|
||||
});
|
||||
|
||||
skip++;
|
||||
} while (allRecords.length < total);
|
||||
|
||||
// 关闭 loading
|
||||
message.destroy();
|
||||
|
||||
records = allRecords;
|
||||
} catch (error) {
|
||||
message.destroy();
|
||||
console.error('导出数据获取失败:', error);
|
||||
cb('导出数据获取失败');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!records || records.length === 0) {
|
||||
cb('没有可导出的数据');
|
||||
return;
|
||||
}
|
||||
|
||||
// 返回 Promise,等待导出完成(直接使用原始数据,不使用 customRender)
|
||||
return new Promise<void>(resolve => {
|
||||
exportTableUtil({
|
||||
data: records,
|
||||
columns: props.columns,
|
||||
fileName,
|
||||
callback: result => {
|
||||
cb(result);
|
||||
resolve();
|
||||
},
|
||||
tbtitle,
|
||||
tbsub
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
loading,
|
||||
getList,
|
||||
@ -265,6 +443,12 @@ defineExpose({
|
||||
refresh,
|
||||
tableData,
|
||||
clearSelection,
|
||||
clearSort: () => {
|
||||
internalSort.value = { field: '', order: null };
|
||||
},
|
||||
setSelectedRowKeys,
|
||||
setClickedRowKey,
|
||||
exportTable,
|
||||
getSelected: () => ({
|
||||
keys: selectedRowKeys.value,
|
||||
rows: selectedRows.value
|
||||
@ -305,25 +489,32 @@ watch(
|
||||
const processData = (records: any[]) => {
|
||||
if (!props.processEmptyValues || !Array.isArray(records)) return records;
|
||||
|
||||
// 提取需要处理的字段(columns 中的 dataIndex)
|
||||
const displayFields = new Set(
|
||||
props.columns.map(col => col.dataIndex).filter(Boolean)
|
||||
);
|
||||
|
||||
return records.map(record => {
|
||||
const processedRecord: any = { ...record };
|
||||
for (const key in processedRecord) {
|
||||
if (Object.prototype.hasOwnProperty.call(processedRecord, key)) {
|
||||
if (!displayFields.has(key)) continue; // 不在 columns 中的字段不处理
|
||||
if (key === 'children') continue; // children 永远不处理
|
||||
|
||||
const val = processedRecord[key];
|
||||
// children 字段不处理,保持原值(包括 null)
|
||||
if (key === 'children') continue;
|
||||
// 空数组不替换,只替换 null、undefined、空字符串
|
||||
// 只处理 columns 中定义的字段,替换 null/undefined/空字符串
|
||||
if (val === null || val === undefined || val === '') {
|
||||
processedRecord[key] = props.emptyPlaceholder;
|
||||
}
|
||||
}
|
||||
}
|
||||
return processedRecord;
|
||||
});
|
||||
};
|
||||
|
||||
// --- 处理自定义单元格(用于行合并)---
|
||||
const createMergeCellHandler = (dataIndex: string) => {
|
||||
const createMergeCellHandler = (col: any) => {
|
||||
const dataIndex = col.dataIndex;
|
||||
const mergeDeps = col.mergeDeps || []; // 依赖列,依赖列变化时重新开始合并
|
||||
|
||||
return (record: any, index: number) => {
|
||||
const currentValue = record[dataIndex];
|
||||
|
||||
@ -332,9 +523,18 @@ const createMergeCellHandler = (dataIndex: string) => {
|
||||
if (index > 0) {
|
||||
const previousValue = tableData.value[index - 1]?.[dataIndex];
|
||||
if (previousValue === currentValue) {
|
||||
// 当前值相同,但需要检查依赖列是否一致
|
||||
const depsChanged = mergeDeps.some(
|
||||
dep =>
|
||||
tableData.value[index - 1]?.[dep] !== tableData.value[index]?.[dep]
|
||||
);
|
||||
if (depsChanged) {
|
||||
isStartRow = true; // 依赖列变化,重新开始合并
|
||||
} else {
|
||||
isStartRow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isStartRow) {
|
||||
// 不是起始行,设置 rowSpan 为 0(隐藏该单元格)
|
||||
@ -344,7 +544,15 @@ const createMergeCellHandler = (dataIndex: string) => {
|
||||
let rowSpan = 1;
|
||||
for (let i = index + 1; i < tableData.value.length; i++) {
|
||||
if (tableData.value[i][dataIndex] === currentValue) {
|
||||
// 检查依赖列是否一致
|
||||
const depsConsistent = mergeDeps.every(
|
||||
dep => tableData.value[i][dep] === tableData.value[index][dep]
|
||||
);
|
||||
if (depsConsistent) {
|
||||
rowSpan++;
|
||||
} else {
|
||||
break; // 依赖列不一致,停止合并
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
@ -355,19 +563,31 @@ const createMergeCellHandler = (dataIndex: string) => {
|
||||
};
|
||||
};
|
||||
|
||||
// --- 列配置增强(超出隐藏 + Tooltip + 插槽兼容 + 行合并)---
|
||||
// --- 列配置增强(超出隐藏 + Tooltip + 插槽兼容 + 行合并 + 排序)---
|
||||
const enhancedColumns = computed(() => {
|
||||
return props.columns.map(col => {
|
||||
const enhancedCol: any = { ...col };
|
||||
|
||||
// 处理 sort 或 sorter: true,统一转为 sorter 并绑定 sortOrder
|
||||
const isSortable = enhancedCol.sort === true || enhancedCol.sorter === true;
|
||||
if (isSortable) {
|
||||
enhancedCol.sorter = true;
|
||||
enhancedCol.sortOrder =
|
||||
internalSort.value.field === enhancedCol.dataIndex
|
||||
? internalSort.value.order
|
||||
: false;
|
||||
}
|
||||
|
||||
// 处理 merge 配置
|
||||
if (col.merge && col.dataIndex) {
|
||||
const baseCol = {
|
||||
...col,
|
||||
customCell: createMergeCellHandler(col.dataIndex)
|
||||
customCell: createMergeCellHandler(col)
|
||||
};
|
||||
|
||||
// 如果有 slots.customRender,移除 slots
|
||||
if (baseCol.slots?.customRender) {
|
||||
const { slots, ...restCol } = baseCol;
|
||||
if (enhancedCol.slots?.customRender) {
|
||||
const { slots, ...restCol } = enhancedCol;
|
||||
return {
|
||||
...restCol,
|
||||
_slotName: slots.customRender,
|
||||
@ -375,12 +595,12 @@ const enhancedColumns = computed(() => {
|
||||
};
|
||||
}
|
||||
|
||||
return baseCol;
|
||||
return enhancedCol;
|
||||
}
|
||||
|
||||
// 如果有 slots.customRender,移除 slots(由 bodyCell 处理),保留 dataIndex 用于匹配
|
||||
if (col.slots?.customRender) {
|
||||
const { slots, ...restCol } = col;
|
||||
if (enhancedCol.slots?.customRender) {
|
||||
const { slots, ...restCol } = enhancedCol;
|
||||
return {
|
||||
...restCol,
|
||||
// 保留 slotName 供 bodyCell 模板匹配使用
|
||||
@ -390,18 +610,18 @@ const enhancedColumns = computed(() => {
|
||||
}
|
||||
|
||||
// 如果已有 customRender 函数,直接返回
|
||||
if (col.customRender) {
|
||||
if (enhancedCol.customRender) {
|
||||
return {
|
||||
...col,
|
||||
...(props.enableEllipsis && !col.ellipsis ? { ellipsis: true } : {})
|
||||
...enhancedCol,
|
||||
...(props.enableEllipsis && !enhancedCol.ellipsis ? { ellipsis: true } : {})
|
||||
};
|
||||
}
|
||||
|
||||
// 普通列,添加 ellipsis
|
||||
if (!props.enableEllipsis) return col;
|
||||
if (!props.enableEllipsis) return enhancedCol;
|
||||
|
||||
return {
|
||||
...col,
|
||||
...enhancedCol,
|
||||
ellipsis: true
|
||||
};
|
||||
});
|
||||
@ -427,9 +647,14 @@ watch(
|
||||
if (newData && newData.length > 0) {
|
||||
tableData.value = processData(newData);
|
||||
total.value = newData.length;
|
||||
// 数据更新后,默认高亮第一条数据(仅在启用行高亮时)
|
||||
if (props.enableRowHighlight) {
|
||||
clickedRowKey.value = tableData.value[0][props.rowKey];
|
||||
}
|
||||
} else {
|
||||
tableData.value = [];
|
||||
total.value = 0;
|
||||
clickedRowKey.value = null;
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
@ -445,6 +670,14 @@ watch(
|
||||
::v-deep(.ant-table-tbody > tr > td) {
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
// 行点击高亮样式(仅当 enableRowHighlight 为 true 时生效)
|
||||
::v-deep(.ant-table-tbody > tr.row-clicked > td) {
|
||||
background-color: v-bind(
|
||||
'props.enableRowHighlight ? "#e6f7ff" : "transparent"'
|
||||
) !important;
|
||||
}
|
||||
|
||||
:deep(.ant-pagination) {
|
||||
.ant-select {
|
||||
width: 100px;
|
||||
|
||||
@ -341,9 +341,11 @@ const recordBtn = () => {
|
||||
const getData = async () => {
|
||||
if (hasLoaded.value) return;
|
||||
loading.value = true;
|
||||
try {
|
||||
if (props.url && modelStore.params.stcd) {
|
||||
let res: any = await getStcdDetail(props.url, modelStore.params.stcd);
|
||||
if (res.success) {
|
||||
console.log(res);
|
||||
if (res && res.success) {
|
||||
let data = res.data;
|
||||
data2.value = data;
|
||||
|
||||
@ -426,6 +428,11 @@ const getData = async () => {
|
||||
} else {
|
||||
isLogo.value = false;
|
||||
}
|
||||
} else {
|
||||
loading.value = false;
|
||||
}
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -27,7 +27,12 @@
|
||||
</div>
|
||||
|
||||
<div v-else-if="selectedFile.fileType === 'video'" class="video-viewer">
|
||||
<video :src="selectedFile.url" controls class="video-player"></video>
|
||||
<!-- <video :src="selectedFile.url" controls class="video-player"></video> -->
|
||||
<LiveVideoBox
|
||||
:videoData="{ url: selectedFile.url }"
|
||||
height="100%"
|
||||
:showTitle="false"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-else-if="selectedFile.fileType === 'pdf'" class="pdf-viewer">
|
||||
@ -52,7 +57,7 @@
|
||||
import { ref, watch } from 'vue';
|
||||
import { getIdUrl } from '@/api/mapModal';
|
||||
import PdfView from '@/components/pdf/pdfView.vue';
|
||||
|
||||
import LiveVideoBox from '@/views/shiPinJianKong/components/LiveVideoBox.vue';
|
||||
interface AttachmentFileItem {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
:columns="currentColumns"
|
||||
:list-url="fetchTableData"
|
||||
:search-params="searchParams"
|
||||
:enable-sort="true"
|
||||
/>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
v-model:value="dateRange"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 100%"
|
||||
style="width: 300px"
|
||||
@change="handleDateChange"
|
||||
/>
|
||||
<a-button type="primary" class="ml-2" @click="handleSearch">
|
||||
@ -281,7 +281,9 @@ watch(
|
||||
|
||||
.video-mode {
|
||||
display: flex;
|
||||
height: 600px;
|
||||
height: 60vh;
|
||||
min-height: 400px;
|
||||
max-height: 800px;
|
||||
gap: 12px;
|
||||
|
||||
.video-main {
|
||||
@ -309,16 +311,24 @@ watch(
|
||||
flex-direction: column;
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 4px;
|
||||
min-width: 0;
|
||||
|
||||
.sidebar-search {
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
|
||||
:deep(.ant-picker) {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-list {
|
||||
height: 600px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
@ -339,13 +349,13 @@ watch(
|
||||
}
|
||||
|
||||
&.active {
|
||||
border-color: #1890ff;
|
||||
background: #e6f7ff;
|
||||
// border-color: #1890ff;
|
||||
// background: #e6f7ff;
|
||||
}
|
||||
|
||||
.item-thumb {
|
||||
width: 100%;
|
||||
height: 105px;
|
||||
height: 143px;
|
||||
background: #1a1a1a;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
@ -375,8 +385,8 @@ watch(
|
||||
|
||||
.item-time {
|
||||
padding: 4px;
|
||||
font-size: 11px;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
color: #000000D9;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
@ -393,4 +403,78 @@ watch(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 响应式适配
|
||||
@media screen and (max-width: 1400px) {
|
||||
.no-live-video {
|
||||
.video-mode {
|
||||
height: 55vh;
|
||||
gap: 10px;
|
||||
|
||||
.video-main {
|
||||
flex: 0 0 65%;
|
||||
}
|
||||
|
||||
.video-sidebar {
|
||||
flex: 0 0 35%;
|
||||
|
||||
.sidebar-list {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1200px) {
|
||||
.no-live-video {
|
||||
.video-mode {
|
||||
height: 50vh;
|
||||
gap: 8px;
|
||||
|
||||
.video-main {
|
||||
flex: 0 0 70%;
|
||||
}
|
||||
|
||||
.video-sidebar {
|
||||
flex: 0 0 30%;
|
||||
|
||||
.sidebar-list {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.sidebar-search {
|
||||
:deep(.ant-picker-range) {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.no-live-video {
|
||||
.video-mode {
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
|
||||
.video-main {
|
||||
flex: none;
|
||||
height: 50vh;
|
||||
}
|
||||
|
||||
.video-sidebar {
|
||||
flex: none;
|
||||
height: 40vh;
|
||||
|
||||
.sidebar-list {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -295,7 +295,14 @@ watch(
|
||||
() => props.isActive,
|
||||
active => {
|
||||
if (active && !hasLoaded.value) {
|
||||
console.log('isActive', modelStore.filter.year);
|
||||
if (modelStore.filter.year) {
|
||||
searchParams.value.tm = modelStore.filter.year;
|
||||
getFtpOptions();
|
||||
} else {
|
||||
getYearList();
|
||||
}
|
||||
|
||||
hasLoaded.value = true;
|
||||
}
|
||||
},
|
||||
|
||||
@ -150,7 +150,13 @@ watch(
|
||||
() => props.isActive,
|
||||
active => {
|
||||
if (active && !hasLoaded.value) {
|
||||
// getYearList();
|
||||
if (modelStore.filter.year) {
|
||||
searchParams.value.tm = modelStore.filter.year;
|
||||
refreshTable();
|
||||
} else {
|
||||
getYearList();
|
||||
}
|
||||
hasLoaded.value = true;
|
||||
}
|
||||
},
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
12.水生调查断面 - 监测数据 不知道电导率 ,性腺发育期,早期资源量和种类 ✅️
|
||||
13.水电告警情况 生态流量 不知道字段 ✅️ 接口传参有问题
|
||||
14. 地图抽吸 碰撞检测 放大到具体层级锚点抽吸了但是popup弹框还在显示;
|
||||
15.地图比如积石峡 放大到层级被公伯峡隐藏掉了,然后在放大才显示 抽吸的问题
|
||||
15.运行情况 计划开始运行时间 接口没接
|
||||
|
||||
|
||||
@ -209,7 +210,7 @@
|
||||
v-show="currentActiveKey === 'ProcessDiagram'"
|
||||
:is-active="currentActiveKey === 'ProcessDiagram'"
|
||||
/>
|
||||
<!-- 增值放流情况 -->
|
||||
<!-- 增殖放流情况 -->
|
||||
<NormalAddedSituation
|
||||
v-show="currentActiveKey === 'NormalAddedSituation'"
|
||||
:is-active="currentActiveKey === 'NormalAddedSituation'"
|
||||
@ -405,63 +406,6 @@ const isLCJ = env?.startsWith('lcj');
|
||||
const sttpList = ['ENG', 'WT', 'WQ', 'FP', 'FB', 'VP', 'DW', 'EQ', 'VA'];
|
||||
|
||||
// ==================== 异步 Tab 过滤逻辑 ====================
|
||||
|
||||
// 功能6: 垂向水温与 AI 识别动态过滤
|
||||
const checkVerticalWaterAndAI = async (stcd: string) => {
|
||||
try {
|
||||
const res = await getStInfoByStcd({ stcd });
|
||||
const data = res?.data || res;
|
||||
if (data && data.relList) {
|
||||
const jianCei = data.relList.find(
|
||||
(item: any) => item.sttpCode === 'WTVT'
|
||||
);
|
||||
const aiShiBie = data.relList.filter((item: any) =>
|
||||
item?.sttpCode?.startsWith('AI')
|
||||
);
|
||||
|
||||
if (!jianCei) {
|
||||
// 无垂向水温子站点,过滤掉垂向水温 Tab
|
||||
tabsConfig.value = tabsConfig.value.filter(
|
||||
(item: any) => item.type !== 'VerticalWaterTemperature'
|
||||
);
|
||||
} else {
|
||||
modelStore.verticalWaterStcd = jianCei.stcd;
|
||||
}
|
||||
|
||||
if (!aiShiBie.length) {
|
||||
// 无 AI 识别子站点,过滤掉 AI 识别 Tab
|
||||
tabsConfig.value = tabsConfig.value.filter(
|
||||
(item: any) => item.type !== 'AIYXSB'
|
||||
);
|
||||
} else {
|
||||
modelStore.aiSites = aiShiBie;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('垂向水温/AI 检查失败:', error);
|
||||
}
|
||||
};
|
||||
|
||||
// 功能7: 视频存在性检查
|
||||
const checkVideoExists = async (stcd: string) => {
|
||||
try {
|
||||
const res = await getVideoList({
|
||||
filter: {
|
||||
logic: 'and',
|
||||
filters: [{ field: 'stcd', operator: 'eq', value: stcd }]
|
||||
}
|
||||
});
|
||||
if (!res?.data?.data?.length && !res?.data?.records?.length) {
|
||||
// 无视频数据,过滤掉视频 Tab
|
||||
tabsConfig.value = tabsConfig.value.filter(
|
||||
(item: any) => item.type !== 'video'
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('视频检查失败:', error);
|
||||
}
|
||||
};
|
||||
|
||||
// 功能8: 鱼类栖息地数据类型检查 (React: isLCJ && sttpCode === 'WE')
|
||||
const checkFishTab = async (stcd: string) => {
|
||||
try {
|
||||
@ -604,7 +548,7 @@ const setQGCTabList = async (_tabs: any, stcd: string) => {
|
||||
// 2. 垂向水温 & AI 识别检查(对所有类型执行,与 React 一致)
|
||||
const res4 = await getStInfoByStcd({ stcd });
|
||||
let newTabs = [...tabs];
|
||||
|
||||
// debugger
|
||||
if (res4 && res4.data && res4.data.relList) {
|
||||
const relList = res4.data.relList;
|
||||
const jianCei = relList.find((item: any) => item.sttpCode === 'WTVT');
|
||||
@ -677,7 +621,7 @@ const setQGCTabList = async (_tabs: any, stcd: string) => {
|
||||
};
|
||||
const res2 = await getVideoList(params);
|
||||
console.log('', modelStore.params.sttp);
|
||||
// debugger
|
||||
//
|
||||
if (
|
||||
res2?.data?.data?.length > 0 ||
|
||||
res2?.data?.records?.length > 0 ||
|
||||
@ -722,14 +666,14 @@ const applyTabFilters = async (params: any) => {
|
||||
// LCJ 鱼类栖息地数据类型检查
|
||||
await checkFishTab(stcd);
|
||||
} else if (
|
||||
((baseId === '07' || baseId === '02') && sttpCode === 'WQ') ||
|
||||
( sttpCode === 'WQ') ||
|
||||
sttpCode === 'WQFB' ||
|
||||
sttpCode === 'wq'
|
||||
) {
|
||||
// 水质 AI 预测检查(React 逻辑:WQ 需要条件,WQFB/wq 无条件)
|
||||
await checkAnalysisAvailability(stcd);
|
||||
} else if (
|
||||
((baseId === '07' || baseId === '02') && sttpCode === 'WT') ||
|
||||
( sttpCode === 'WT') ||
|
||||
sttpCode === 'wt'
|
||||
) {
|
||||
// 水温站特殊处理(React 逻辑:WT 需要条件,wt 无条件)
|
||||
|
||||
@ -310,7 +310,9 @@ const FPTabs1: Array<any> = [
|
||||
name: '基础信息',
|
||||
key: 'basicInfo',
|
||||
type: 'basic',
|
||||
url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo'
|
||||
default: true, // 默认显示
|
||||
url: '/api/dec-lygk-base-server/base/msstbprpt/getStcdInfo',
|
||||
|
||||
},
|
||||
{
|
||||
name: '实时视频',
|
||||
@ -396,14 +398,14 @@ const FBTabs: Array<any> = [
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '实时视频',
|
||||
key: 'videoInfo',
|
||||
type: 'video',
|
||||
url: '/video/dataStcdFrame/getVideoMonitorList'
|
||||
}
|
||||
// {
|
||||
// name: '实时视频',
|
||||
// key: 'videoInfo',
|
||||
// type: 'video',
|
||||
// url: '/video/dataStcdFrame/getVideoMonitorList'
|
||||
// }
|
||||
// {
|
||||
// name: "全景影像",
|
||||
// key: "panoramaInfo",
|
||||
// type: "panorama"
|
||||
@ -873,7 +875,7 @@ const noLiveVideoTabs: Array<any> = [
|
||||
},
|
||||
{
|
||||
name: '录像视频',
|
||||
key: 'videoInfo',
|
||||
key: 'noLiveVideo',
|
||||
type: 'noLiveVideo',
|
||||
url: '/video/dataStcdFrame/getVideoMonitorList'
|
||||
}
|
||||
|
||||
@ -53,12 +53,18 @@
|
||||
show-search
|
||||
placeholder="请选择"
|
||||
:size="'small'"
|
||||
style="width: 120px"
|
||||
:style="{ width: select.width || '80px' }"
|
||||
:dropdown-style="{
|
||||
maxHeight: '400px',
|
||||
overflow: 'auto',
|
||||
minWidth: '200px'
|
||||
}"
|
||||
:options="select.options"
|
||||
:filter-option="filterOption"
|
||||
@focus="handleFocus"
|
||||
@blur="handleBlur"
|
||||
@change="handleChange"
|
||||
@select="handleTreeSelect1"
|
||||
></a-select>
|
||||
</div>
|
||||
<div v-if="shrink" class="title_shrink" @click="isExpand = !isExpand">
|
||||
@ -84,7 +90,7 @@
|
||||
value: 'value',
|
||||
children: 'children'
|
||||
}"
|
||||
tree-node-filter-prop="label"
|
||||
tree-node-filter-prop="title"
|
||||
popup-class-name="no-wrap-tree-select"
|
||||
@select="handleTreeSelect"
|
||||
@expand="handleTreeExpand"
|
||||
@ -177,11 +183,12 @@ interface PromptConfig {
|
||||
}
|
||||
|
||||
interface SelectConfig {
|
||||
picker: any;
|
||||
format: any;
|
||||
show: boolean;
|
||||
value: string | undefined;
|
||||
options: SelectProps['options'];
|
||||
picker?: any;
|
||||
format?: any;
|
||||
show?: boolean;
|
||||
value?: string | undefined;
|
||||
options?: SelectProps['options'];
|
||||
width?: string;
|
||||
}
|
||||
|
||||
// 定义组件名(便于调试和递归)
|
||||
@ -239,7 +246,8 @@ const props = defineProps({
|
||||
default: () => ({
|
||||
show: false,
|
||||
value: undefined,
|
||||
options: []
|
||||
options: [],
|
||||
width: ''
|
||||
})
|
||||
},
|
||||
moreSelect: {
|
||||
@ -652,7 +660,17 @@ const handleTreeSelect = (selectedKeys: string | string[], info: any) => {
|
||||
}
|
||||
|
||||
moreSelectValue.value = selectedValue;
|
||||
|
||||
//
|
||||
// 保存选中节点的额外属性(如 lgtd、lttd 等)
|
||||
if (info && typeof info === 'object') {
|
||||
selectedNodeExtra.value = {
|
||||
lgtd: info.lgtd,
|
||||
lttd: info.lttd
|
||||
};
|
||||
}
|
||||
};
|
||||
const handleTreeSelect1 = (selectedKeys: string | string[], info: any) => {
|
||||
// debugger
|
||||
// 保存选中节点的额外属性(如 lgtd、lttd 等)
|
||||
if (info && typeof info === 'object') {
|
||||
selectedNodeExtra.value = {
|
||||
@ -661,7 +679,6 @@ const handleTreeSelect = (selectedKeys: string | string[], info: any) => {
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 处理树节点展开/收起事件
|
||||
* @param keys 展开的节点键值数组
|
||||
@ -672,6 +689,7 @@ const handleTreeExpand = (keys: string[]) => {
|
||||
|
||||
// 下拉选择框事件处理
|
||||
const handleChange = (value: string) => {
|
||||
|
||||
// Handle change
|
||||
};
|
||||
|
||||
@ -683,11 +701,16 @@ const handleFocus = () => {
|
||||
// Handle focus
|
||||
};
|
||||
|
||||
const filterOption = (input: string, option?: { label: string; value: string }) => {
|
||||
const filterOption = (
|
||||
input: string,
|
||||
option?: { label: string; value: string }
|
||||
) => {
|
||||
if (!option) return false;
|
||||
const label = option.label?.toLowerCase() || '';
|
||||
const value = option.value?.toLowerCase() || '';
|
||||
return label.includes(input.toLowerCase()) || value.includes(input.toLowerCase());
|
||||
return (
|
||||
label.includes(input.toLowerCase()) || value.includes(input.toLowerCase())
|
||||
);
|
||||
};
|
||||
|
||||
// 文字提示容器
|
||||
@ -759,7 +782,6 @@ const emitAllValues = () => {
|
||||
} else {
|
||||
payload.scopeDate = [];
|
||||
}
|
||||
|
||||
emit('update-values', payload);
|
||||
};
|
||||
|
||||
|
||||
@ -1,12 +1,26 @@
|
||||
<!-- SidePanelItem.vue -->
|
||||
<template>
|
||||
<SidePanelItem title="植物园情况介绍">
|
||||
<div class="container" @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave">
|
||||
<a-spin :spinning="loading">
|
||||
<template v-if="originalMediaData.length > 0">
|
||||
<div
|
||||
class="container"
|
||||
@mouseenter="handleMouseEnter"
|
||||
@mouseleave="handleMouseLeave"
|
||||
>
|
||||
<!-- 跑马灯轨道容器 -->
|
||||
<div class="carousel-track" :class="{ 'no-transition': isTransitioning }"
|
||||
:style="{ transform: `translateX(-${currentIndex * 100}%)` }">
|
||||
<div
|
||||
class="carousel-track"
|
||||
:class="{ 'no-transition': isTransitioning }"
|
||||
:style="{ transform: `translateX(-${currentIndex * 100}%)` }"
|
||||
>
|
||||
<!-- 遍历所有媒体项(包含克隆项) -->
|
||||
<div v-for="(item, index) in renderMediaData" :key="index" class="carousel-item">
|
||||
<div
|
||||
v-for="(item, index) in renderMediaData"
|
||||
:key="index"
|
||||
class="carousel-item"
|
||||
@click="handleItemClick"
|
||||
>
|
||||
<!-- 图片 -->
|
||||
<img :src="item.url" alt="" />
|
||||
<!-- 说明文字(随媒体项移动) -->
|
||||
@ -27,15 +41,28 @@
|
||||
</div>
|
||||
|
||||
<!-- 独立的文字说明区域(随跑马灯切换而变化) -->
|
||||
<div class="description-text">
|
||||
<div class="description-text" @click="handleItemClick">
|
||||
{{ currentDescription }}
|
||||
</div>
|
||||
</template>
|
||||
<a-empty v-else description="暂无数据" />
|
||||
</a-spin>
|
||||
|
||||
<!-- 设施详情弹框 -->
|
||||
<a-modal v-model:open="modalVisible" :title="'植物园详情'" width="1536px" :footer="null">
|
||||
<div v-if="currentItem">
|
||||
<ArtsDetail :dataSource="currentItem" :index="getCurrentRealIndex()" />
|
||||
</div>
|
||||
</a-modal>
|
||||
</SidePanelItem>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onUnmounted, computed } from 'vue';
|
||||
import { ref, onMounted, onUnmounted, computed, watch } from 'vue';
|
||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
|
||||
import { vpcGetKendoListCust } from '@/api/zxdzw';
|
||||
import ArtsDetail from '@/components/carouselIntroduce/ArtsDetail.vue';
|
||||
|
||||
// 定义组件名(便于调试和递归)
|
||||
defineOptions({
|
||||
@ -49,28 +76,19 @@ interface MediaItem {
|
||||
text: string;
|
||||
description: string;
|
||||
}
|
||||
const baseUrl = import.meta.env.VITE_APP_ATTACHMENT_URL;
|
||||
const JidiSelectEventStore = useJidiSelectEventStore();
|
||||
const baseid = ref('');
|
||||
|
||||
// 原始媒体数据(3条测试数据)
|
||||
const originalMediaData = ref<MediaItem[]>([
|
||||
{
|
||||
type: 'image',
|
||||
url: 'https://211.99.26.225:12125/?20230814205611342377136845462200&view=jpg&token=bearer c2e76c28-14db-4a0f-9ff2-10cc3f835920',
|
||||
text: '松岗鱼类增殖站',
|
||||
description: '松岗鱼类增殖放流站位于四川省阿坝藏族羌族自治州马尔康市松岗镇,主要服务于大渡河上游的双江口和金川两座水电站,同时还承担多种珍稀特有鱼类的救护和科研任务,实现工程建设与生态环境共同推进、相互促进。'
|
||||
},
|
||||
{
|
||||
type: 'video',
|
||||
url: 'https://211.99.26.225:12125/?20230805205848575430105387253710&view=jpg&token=bearer c2e76c28-14db-4a0f-9ff2-10cc3f835920', // 视频URL示例,您可替换为真实地址
|
||||
text: '猴子岩鱼类增殖站',
|
||||
description: '猴子岩水电站鱼类增殖放流站位于猴子岩水电站坝址下游约7.0km(业主营地下游约1.5km),大渡河左岸桃花渣场顶部平台上,紧邻枢纽桃花大桥下游侧,占地面积47.3亩,其中一期工程27.0亩,预留二期工程用地20.3亩(二期工程目前为丹巴、巴底水电站预留工程)增殖放流站工作流程为:亲鱼收集购买、亲鱼驯养培育、人工催产和授精、人工孵化、苗种培育和放流。 猴子岩鱼类增殖放流站近期放流对象中齐口裂腹鱼、重口裂腹鱼、大渡软刺裸裂尻鱼增殖放流技术水平已趋于熟化,中期放流对象大渡软刺裸裂尻鱼人工繁殖技术逐渐趋于熟化'
|
||||
},
|
||||
{
|
||||
type: 'image',
|
||||
url: 'https://211.99.26.225:12125/?20230805205924378504010675106305&view=jpg&token=bearer c2e76c28-14db-4a0f-9ff2-10cc3f835920',
|
||||
text: '黑马鱼类增殖站',
|
||||
description: '大渡河黑马鱼类增殖放流站位于四川省甘洛县黑马乡黑马业主营地内,距离甘洛县城45km,区域交通路况较好。主要承担瀑布沟、深溪沟、大岗山、枕头坝一级、沙坪二级等五座水电站鱼类增殖放流的重任。放流鱼类包含:齐口裂腹鱼、重口裂腹鱼、鲈鲤、长薄鳅、白甲鱼、中华倒刺?、长吻脆、稀有鮊鲫、华鲮、侧沟爬岩鳅等10个种类,共计约918.07万尾珍稀特有鱼苗。'
|
||||
}
|
||||
]);
|
||||
// 弹框控制
|
||||
const modalVisible = ref(false);
|
||||
const currentItem = ref<any>(null);
|
||||
|
||||
// 加载状态
|
||||
const loading = ref(false);
|
||||
|
||||
// 原始媒体数据
|
||||
const originalMediaData = ref<MediaItem[]>([]);
|
||||
|
||||
// 克隆首尾项后的渲染数组(用于无缝循环)
|
||||
// 结构:[最后一项克隆, 原始数据..., 第一项克隆]
|
||||
@ -157,17 +175,6 @@ const currentDescription = computed(() => {
|
||||
return originalMediaData.value[realIndex]?.description || '';
|
||||
});
|
||||
|
||||
// 页面加载时执行
|
||||
onMounted(() => {
|
||||
initRenderData();
|
||||
startAutoPlay();
|
||||
});
|
||||
|
||||
// 组件卸载时清理
|
||||
onUnmounted(() => {
|
||||
if (timer) clearInterval(timer);
|
||||
});
|
||||
|
||||
// 获取当前真实的索引(排除克隆项的影响)
|
||||
const getCurrentRealIndex = () => {
|
||||
const realLength = originalMediaData.value.length;
|
||||
@ -187,6 +194,75 @@ const goToSlide = (targetIndex: number) => {
|
||||
// 计算目标索引(考虑克隆项偏移)
|
||||
currentIndex.value = targetIndex + 1;
|
||||
};
|
||||
|
||||
// 处理项目点击事件
|
||||
const handleItemClick = () => {
|
||||
currentItem.value = originalMediaData.value.map((item: any) => ({
|
||||
url: item.url || '',
|
||||
description: item.description || '',
|
||||
title: item.text || ''
|
||||
}));
|
||||
modalVisible.value = true;
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
let params = {
|
||||
filter: {
|
||||
logic: 'and',
|
||||
filters: [
|
||||
{
|
||||
field: 'baseId',
|
||||
operator: 'eq',
|
||||
dataType: 'string',
|
||||
value: baseid.value
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
let res = await vpcGetKendoListCust(params);
|
||||
let data = res?.data?.data;
|
||||
if (data && data.length > 0) {
|
||||
originalMediaData.value = data.map((item: any) => {
|
||||
return {
|
||||
type: 'image',
|
||||
url: baseUrl + '?' + item.logo + '&view=jpg',
|
||||
text: item.stnm,
|
||||
description: item.introduce
|
||||
};
|
||||
});
|
||||
} else {
|
||||
originalMediaData.value = [];
|
||||
}
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => JidiSelectEventStore.selectedItem,
|
||||
async newVal => {
|
||||
if (newVal && newVal.wbsCode) {
|
||||
baseid.value = newVal.wbsCode;
|
||||
await getData();
|
||||
initRenderData();
|
||||
startAutoPlay();
|
||||
}
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
);
|
||||
|
||||
// 页面加载时执行
|
||||
onMounted(() => {
|
||||
initRenderData();
|
||||
startAutoPlay();
|
||||
});
|
||||
|
||||
// 组件卸载时清理
|
||||
onUnmounted(() => {
|
||||
if (timer) clearInterval(timer);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -216,6 +292,7 @@ const goToSlide = (targetIndex: number) => {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
flex-shrink: 0; // 防止被压缩
|
||||
cursor: pointer;
|
||||
|
||||
img,
|
||||
video {
|
||||
@ -251,7 +328,7 @@ const goToSlide = (targetIndex: number) => {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background-color: #D8D8D8;
|
||||
background-color: #d8d8d8;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
|
||||
@ -274,6 +351,7 @@ const goToSlide = (targetIndex: number) => {
|
||||
// min-height: 40px;
|
||||
transition: all 0.3s ease;
|
||||
margin-bottom: 20px;
|
||||
cursor: pointer;
|
||||
|
||||
// 多行文本溢出省略
|
||||
display: -webkit-box;
|
||||
|
||||
@ -596,7 +596,7 @@ const handleSearch = () => {
|
||||
// console.log( typeOne.value )
|
||||
// console.log( formState.dtinType )
|
||||
// console.log(typeOne.value == 'all' && formState.dtinType !='')
|
||||
// debugger
|
||||
//
|
||||
const filters: any[] = [
|
||||
formState.dataDimensionVal != 'all' ? {
|
||||
field: 'baseId',
|
||||
@ -660,7 +660,7 @@ const handleSearch = () => {
|
||||
// 刷新表格
|
||||
tableRef.value?.getList(filter)
|
||||
if (kong.value) {
|
||||
// debugger
|
||||
//
|
||||
fetchPieData()
|
||||
}
|
||||
kong.value = true
|
||||
@ -781,7 +781,7 @@ watch(
|
||||
() => props.typeOne,
|
||||
(newVal) => {
|
||||
typeOne.value = newVal
|
||||
// debugger
|
||||
//
|
||||
}
|
||||
)
|
||||
|
||||
@ -798,7 +798,7 @@ watch(
|
||||
() => formState.types,
|
||||
(newType, oldType) => {
|
||||
if (!formState.dateValues || newType === oldType) return
|
||||
// debugger
|
||||
//
|
||||
const currentValue: any = formState.dateValues
|
||||
|
||||
if (newType === 'year') {
|
||||
|
||||
@ -564,7 +564,7 @@ watch(
|
||||
if (!stcd) {
|
||||
return;
|
||||
}
|
||||
// debugger
|
||||
//
|
||||
tableRef.value.tableData = [];
|
||||
getCol({ stcd, startTime, endTime });
|
||||
},
|
||||
|
||||
@ -319,7 +319,7 @@ const initChart = (): Promise<void> => {
|
||||
const getEchartsData = async () => {
|
||||
// 1. 格式验证
|
||||
const currentValue = datetimePicker.value.value;
|
||||
// debugger
|
||||
//
|
||||
if (select.value.value === 'year') {
|
||||
// 年度模式:验证是否为 YYYY 格式(4位数字)
|
||||
if (!/^\d{4}$/.test(currentValue)) {
|
||||
@ -361,7 +361,7 @@ const getEchartsData = async () => {
|
||||
if( ! baseid.value){
|
||||
return
|
||||
}
|
||||
// debugger
|
||||
//
|
||||
let params = {
|
||||
"filter": {
|
||||
"logic": "and",
|
||||
@ -439,7 +439,7 @@ const getEchartsData = async () => {
|
||||
]
|
||||
};
|
||||
console.log('请求参数:', params);
|
||||
// debugger
|
||||
//
|
||||
// 4. 调用API并处理数据
|
||||
loading.value = true;
|
||||
try {
|
||||
@ -687,7 +687,7 @@ const updateChartData = (currentLabel: string, lastYearLabel: string) => {
|
||||
if (barData) {
|
||||
// 新增:获取对应的 baseid 或 rstcd
|
||||
const selectedId = chartDataIdMap.value[dataIndex] || '';
|
||||
// debugger
|
||||
//
|
||||
clickedBarData.value = {
|
||||
name: barData.name.replace('\n', ''), // 去除换行符
|
||||
current: barData.current,
|
||||
|
||||
@ -714,7 +714,7 @@ const getechartsdata = async (yearOne: string) => {
|
||||
stopAutoPlay();
|
||||
return;
|
||||
}
|
||||
// debugger
|
||||
//
|
||||
// 缓存全量数据
|
||||
cachedApiData.value = responseData;
|
||||
currentYear.value = yearOne;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user