From 9cace820e80688332bc3e47cec9654dbd937ba5d Mon Sep 17 00:00:00 2001 From: tangwei Date: Thu, 3 Sep 2026 11:27:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=8E=AF=E4=BF=9D?= =?UTF-8?q?=E8=AE=BE=E6=96=BD=E5=BB=BA=E8=AE=BE=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SdChgWarningRController.java | 8 +++ .../along/domain/vo/DeviceCompositionVo.java | 70 +++++++++++++++++++ .../along/service/ISdChgWarningRService.java | 6 ++ .../impl/SdChgWarningRServiceImpl.java | 51 ++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 backend/src/main/java/com/yfd/platform/qgc_lygk/along/domain/vo/DeviceCompositionVo.java diff --git a/backend/src/main/java/com/yfd/platform/qgc_lygk/along/controller/SdChgWarningRController.java b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/controller/SdChgWarningRController.java index b2bb83fc..544a8eaf 100644 --- a/backend/src/main/java/com/yfd/platform/qgc_lygk/along/controller/SdChgWarningRController.java +++ b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/controller/SdChgWarningRController.java @@ -5,6 +5,7 @@ import com.yfd.platform.common.DataSourceResult; import com.yfd.platform.common.utils.UserNameFillHelper; import com.yfd.platform.config.ResponseResult; import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR; +import com.yfd.platform.qgc_lygk.along.domain.vo.DeviceCompositionVo; import com.yfd.platform.qgc_lygk.along.domain.vo.MeasureImplementVo; import com.yfd.platform.qgc_lygk.along.service.ISdChgWarningRService; import io.swagger.v3.oas.annotations.Operation; @@ -45,4 +46,11 @@ public class SdChgWarningRController { DataSourceResult result = sdChgWarningRService.getMeasureImplementInfo(dataSourceRequest); return ResponseResult.successData(result); } + + @PostMapping("/hbssjs/GetKendoListCust") + @Operation(summary = "环保设施建设预警") + public ResponseResult getSsjsKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) { + DataSourceResult result = sdChgWarningRService.getDeviceCompositionInfo(dataSourceRequest); + return ResponseResult.successData(result); + } } \ No newline at end of file diff --git a/backend/src/main/java/com/yfd/platform/qgc_lygk/along/domain/vo/DeviceCompositionVo.java b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/domain/vo/DeviceCompositionVo.java new file mode 100644 index 00000000..5aacb8fe --- /dev/null +++ b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/domain/vo/DeviceCompositionVo.java @@ -0,0 +1,70 @@ +package com.yfd.platform.qgc_lygk.along.domain.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.io.Serializable; + +/** + * 环保设施建设预警实体 + * + * @author migration + */ +@Data +@Schema(description = "环保设施建设预警实体") +public class DeviceCompositionVo implements Serializable { + + private static final long serialVersionUID = 1L; + + /** 电站编号 */ + @Schema(description = "电站编号") + private String stcd; + + /** 电站名称 */ + @Schema(description = "电站名称") + private String ennm; + + /** 行政区名称 */ + @Schema(description = "行政区名称") + private String addvnm; + + /** 流域名称 */ + @Schema(description = "流域名称") + private String rvnm; + + /** 设施名称 */ + @Schema(description = "设施名称") + private String stnm; + + /** 可研(核准) */ + @Schema(description = "可研(核准)") + private String kyhzhb; + + /** 预可是否设计 */ + @Schema(description = "预可是否设计") + private String prdsgn; + + /** 环评是否有要求 */ + @Schema(description = "环评是否有要求") + private String eiarqst; + + /** 专项设计 */ + @Schema(description = "专项设计") + private String zxsjhb; + + /** 建设情况 */ + @Schema(description = "建设情况") + private String isbuild; + + /** 验收 */ + @Schema(description = "验收") + private String iscompletion; + + /** 环保设施类型 */ + @Schema(description = "环保设施类型") + private String prenvftp; + + /** 支撑材料 */ + @Schema(description = "支撑材料") + private String fileid; +} \ No newline at end of file diff --git a/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/ISdChgWarningRService.java b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/ISdChgWarningRService.java index 5b3f151d..a47944fe 100644 --- a/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/ISdChgWarningRService.java +++ b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/ISdChgWarningRService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.yfd.platform.common.DataSourceRequest; import com.yfd.platform.common.DataSourceResult; import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR; +import com.yfd.platform.qgc_lygk.along.domain.vo.DeviceCompositionVo; import com.yfd.platform.qgc_lygk.along.domain.vo.MeasureImplementVo; /** @@ -22,4 +23,9 @@ public interface ISdChgWarningRService extends IService { * 施工期环保措施落实预警 */ DataSourceResult getMeasureImplementInfo(DataSourceRequest dataSourceRequest); + + /** + * 环保设施建设预警 + */ + DataSourceResult getDeviceCompositionInfo(DataSourceRequest dataSourceRequest); } \ No newline at end of file diff --git a/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/impl/SdChgWarningRServiceImpl.java b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/impl/SdChgWarningRServiceImpl.java index 7571b578..c994d91f 100644 --- a/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/impl/SdChgWarningRServiceImpl.java +++ b/backend/src/main/java/com/yfd/platform/qgc_lygk/along/service/impl/SdChgWarningRServiceImpl.java @@ -10,6 +10,7 @@ import com.yfd.platform.common.DataSourceResult; import com.yfd.platform.common.MicroservicDynamicSQLMapper; import com.yfd.platform.common.exception.BizException; import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR; +import com.yfd.platform.qgc_lygk.along.domain.vo.DeviceCompositionVo; import com.yfd.platform.qgc_lygk.along.domain.vo.MeasureImplementVo; import com.yfd.platform.qgc_lygk.along.mapper.SdChgWarningRMapper; import com.yfd.platform.qgc_lygk.along.service.ISdChgWarningRService; @@ -106,4 +107,54 @@ public class SdChgWarningRServiceImpl extends ServiceImpl()); return dataSourceResult; } + + @Override + public DataSourceResult getDeviceCompositionInfo(DataSourceRequest dataSourceRequest) { + // 1. 解析过滤条件中的 stcd + DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest(); + String stcd = loadOptions == null ? null : QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd"); + if (StrUtil.isBlank(stcd)) { + throw new BizException("设施编码(stcd)不能为空."); + } + + // 2. 构建 SQL(按新库表结构:永久环保设施设计和落实情况表 + 电站沿程视图) + StringBuilder sql = new StringBuilder("select stnm, PRENVFTP, addvnm, rvnm, kyhzhb, PRDSGN, EIARQST, zxsjhb, ISBUILD, FID\n" + + "from (select s.nm stnm,\n" + + " s.PRENVFTP,\n" + + " b.ADDVNM addvnm,\n" + + " b.RVCD_NAME as rvnm,\n" + + " (case when s.EXMDSGN is not null then s.EXMDSGN else s.FSBLDSGN end) as kyhzhb,\n" + + " s.PRDSGN,\n" + + " s.EIARQST,\n" + + " (case when s.SPECIALDESIG is not null then s.SPECIALDESIG\n" + + " else (case when s.CONSTRIMPL is not null then s.CONSTRIMPL else s.BDSIMLP end) end) as zxsjhb,\n" + + " s.ISBUILD,\n" + + " s.FID\n" + + " from SD_PRNNTENVF_B s\n" + + " left join V_MS_STBPRP_T b on b.STCD = s.STCD\n" + + " where b.STCD = #{map.stcd}\n" + + " and b.USFL = 1)\n" + + "where kyhzhb = 1\n" + + " or PRDSGN = 1\n" + + " or EIARQST = 1\n" + + " or zxsjhb = 1\n" + + " or ISBUILD = 1 "); + Map paramMap = new HashMap<>(); + paramMap.put("stcd", stcd); + + // 3. 分页处理 + Page page = loadOptions == null ? null + : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake()); + + // 4. 执行查询 + List list = microservicDynamicSQLMapper.pageAllListWithResultType( + page, sql.toString(), paramMap, DeviceCompositionVo.class); + + // 5. 构建结果 + DataSourceResult dataSourceResult = new DataSourceResult<>(); + dataSourceResult.setData(list); + dataSourceResult.setTotal(page != null ? page.getTotal() : (long) list.size()); + dataSourceResult.setAggregates(new HashMap<>()); + return dataSourceResult; + } } \ No newline at end of file