feat: 增加环保设施建设预警
This commit is contained in:
parent
1af20ffc8b
commit
9cace820e8
@ -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<MeasureImplementVo> result = sdChgWarningRService.getMeasureImplementInfo(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
@PostMapping("/hbssjs/GetKendoListCust")
|
||||
@Operation(summary = "环保设施建设预警")
|
||||
public ResponseResult getSsjsKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
DataSourceResult<DeviceCompositionVo> result = sdChgWarningRService.getDeviceCompositionInfo(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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<SdChgWarningR> {
|
||||
* 施工期环保措施落实预警
|
||||
*/
|
||||
DataSourceResult<MeasureImplementVo> getMeasureImplementInfo(DataSourceRequest dataSourceRequest);
|
||||
|
||||
/**
|
||||
* 环保设施建设预警
|
||||
*/
|
||||
DataSourceResult<DeviceCompositionVo> getDeviceCompositionInfo(DataSourceRequest dataSourceRequest);
|
||||
}
|
||||
@ -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<SdChgWarningRMapper, S
|
||||
dataSourceResult.setAggregates(new HashMap<>());
|
||||
return dataSourceResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<DeviceCompositionVo> 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<String, Object> paramMap = new HashMap<>();
|
||||
paramMap.put("stcd", stcd);
|
||||
|
||||
// 3. 分页处理
|
||||
Page<?> page = loadOptions == null ? null
|
||||
: QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
|
||||
// 4. 执行查询
|
||||
List<DeviceCompositionVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(
|
||||
page, sql.toString(), paramMap, DeviceCompositionVo.class);
|
||||
|
||||
// 5. 构建结果
|
||||
DataSourceResult<DeviceCompositionVo> dataSourceResult = new DataSourceResult<>();
|
||||
dataSourceResult.setData(list);
|
||||
dataSourceResult.setTotal(page != null ? page.getTotal() : (long) list.size());
|
||||
dataSourceResult.setAggregates(new HashMap<>());
|
||||
return dataSourceResult;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user