feat: 增加施工期环保措施落实预警
This commit is contained in:
parent
a2156ecc15
commit
1af20ffc8b
@ -5,6 +5,7 @@ import com.yfd.platform.common.DataSourceResult;
|
|||||||
import com.yfd.platform.common.utils.UserNameFillHelper;
|
import com.yfd.platform.common.utils.UserNameFillHelper;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR;
|
import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR;
|
||||||
|
import com.yfd.platform.qgc_lygk.along.domain.vo.MeasureImplementVo;
|
||||||
import com.yfd.platform.qgc_lygk.along.service.ISdChgWarningRService;
|
import com.yfd.platform.qgc_lygk.along.service.ISdChgWarningRService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -37,4 +38,11 @@ public class SdChgWarningRController {
|
|||||||
userNameFillHelper.fillUserNames(result.getData());
|
userNameFillHelper.fillUserNames(result.getData());
|
||||||
return ResponseResult.successData(result);
|
return ResponseResult.successData(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sgqhbss/GetKendoListCust")
|
||||||
|
@Operation(summary = "施工期环保措施落实预警")
|
||||||
|
public ResponseResult getSgKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
DataSourceResult<MeasureImplementVo> result = sdChgWarningRService.getMeasureImplementInfo(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 MeasureImplementVo 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 cnenvftp;
|
||||||
|
|
||||||
|
/** 支撑材料 */
|
||||||
|
@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.DataSourceRequest;
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR;
|
import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR;
|
||||||
|
import com.yfd.platform.qgc_lygk.along.domain.vo.MeasureImplementVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重大变动事前事中事后预警表 Service 接口
|
* 重大变动事前事中事后预警表 Service 接口
|
||||||
@ -16,4 +17,9 @@ public interface ISdChgWarningRService extends IService<SdChgWarningR> {
|
|||||||
* 条件过滤数据列表(Kendo 数据源)
|
* 条件过滤数据列表(Kendo 数据源)
|
||||||
*/
|
*/
|
||||||
DataSourceResult<SdChgWarningR> getKendoList(DataSourceRequest dataSourceRequest);
|
DataSourceResult<SdChgWarningR> getKendoList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 施工期环保措施落实预警
|
||||||
|
*/
|
||||||
|
DataSourceResult<MeasureImplementVo> getMeasureImplementInfo(DataSourceRequest dataSourceRequest);
|
||||||
}
|
}
|
||||||
@ -1,19 +1,26 @@
|
|||||||
package com.yfd.platform.qgc_lygk.along.service.impl;
|
package com.yfd.platform.qgc_lygk.along.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
|
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||||
|
import com.yfd.platform.common.exception.BizException;
|
||||||
import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR;
|
import com.yfd.platform.qgc_lygk.along.domain.SdChgWarningR;
|
||||||
|
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.mapper.SdChgWarningRMapper;
|
||||||
import com.yfd.platform.qgc_lygk.along.service.ISdChgWarningRService;
|
import com.yfd.platform.qgc_lygk.along.service.ISdChgWarningRService;
|
||||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重大变动事前事中事后预警表 Service 实现类
|
* 重大变动事前事中事后预警表 Service 实现类
|
||||||
@ -23,6 +30,9 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class SdChgWarningRServiceImpl extends ServiceImpl<SdChgWarningRMapper, SdChgWarningR> implements ISdChgWarningRService {
|
public class SdChgWarningRServiceImpl extends ServiceImpl<SdChgWarningRMapper, SdChgWarningR> implements ISdChgWarningRService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MicroservicDynamicSQLMapper microservicDynamicSQLMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DataSourceResult<SdChgWarningR> getKendoList(DataSourceRequest dataSourceRequest) {
|
public DataSourceResult<SdChgWarningR> getKendoList(DataSourceRequest dataSourceRequest) {
|
||||||
// 1. 构建查询条件
|
// 1. 构建查询条件
|
||||||
@ -52,4 +62,48 @@ public class SdChgWarningRServiceImpl extends ServiceImpl<SdChgWarningRMapper, S
|
|||||||
dataSourceResult.setAggregates(new java.util.HashMap<>());
|
dataSourceResult.setAggregates(new java.util.HashMap<>());
|
||||||
return dataSourceResult;
|
return dataSourceResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult<MeasureImplementVo> getMeasureImplementInfo(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 cnenvftp, stnm, addvnm, rvnm, kyhzhb, PRDSGN, EIARQST, zxsjhb, ISBUILD, FID\n" +
|
||||||
|
"from (select s.CNENVFTP cnenvftp, s.nm stnm,\n" +
|
||||||
|
" b.ADDVNM addvnm,\n" +
|
||||||
|
" b.RVCD_NAME 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 else (case when s.CONSTRIMPL is not null then s.CONSTRIMPL else s.BDSIMLP end) end) as zxsjhb,\n" +
|
||||||
|
" s.ISBUILD,\n" +
|
||||||
|
" s.FID from SD_ENGCONSTGENVF_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" +
|
||||||
|
" )\n" +
|
||||||
|
"where kyhzhb = 1 or PRDSGN = 1 or EIARQST = 1 or zxsjhb = 1 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<MeasureImplementVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(
|
||||||
|
page, sql.toString(), paramMap, MeasureImplementVo.class);
|
||||||
|
|
||||||
|
// 5. 构建结果
|
||||||
|
DataSourceResult<MeasureImplementVo> 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