feat: 增殖站地图描点
This commit is contained in:
parent
cf2885f8e2
commit
da09eeb836
@ -146,4 +146,10 @@ public class FbStationController {
|
|||||||
public ResponseResult getFishbreedrFishKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getFishbreedrFishKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
return ResponseResult.successData(fbStationService.getFishbreedrFishKendoListCust(dataSourceRequest));
|
return ResponseResult.successData(fbStationService.getFishbreedrFishKendoListCust(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/point/GetKendoListCust")
|
||||||
|
@Operation(summary = "增殖站地图描点")
|
||||||
|
public ResponseResult getFbPointKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFbPointKendoListCust(dataSourceRequest));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,107 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "增殖站描点VO")
|
||||||
|
public class FbTracingPointVo {
|
||||||
|
|
||||||
|
@Schema(description = "站点编码")
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
@Schema(description = "站名")
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
@Schema(description = "站点类型 - 用于锚点弹框显示")
|
||||||
|
private String sttp;
|
||||||
|
|
||||||
|
@Schema(description = "锚点类型 - 用于锚点浮框显示")
|
||||||
|
private String sttpMap;
|
||||||
|
|
||||||
|
@Schema(description = "设施类型 用于下拉选构建树级结构")
|
||||||
|
private String sttpCode;
|
||||||
|
|
||||||
|
@Schema(description = "经度")
|
||||||
|
private BigDecimal lgtd;
|
||||||
|
|
||||||
|
@Schema(description = "纬度")
|
||||||
|
private BigDecimal lttd;
|
||||||
|
|
||||||
|
@Schema(description = "高程")
|
||||||
|
private BigDecimal dtmel;
|
||||||
|
|
||||||
|
@Schema(description = "描点状态 - 用于图例")
|
||||||
|
private String anchoPointState;
|
||||||
|
|
||||||
|
@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 rstcd;
|
||||||
|
|
||||||
|
@Schema(description = "设施、断面关联电站编码(冗余)")
|
||||||
|
private String rstcds;
|
||||||
|
|
||||||
|
@Schema(description = "关联电站名称")
|
||||||
|
private String ennm;
|
||||||
|
|
||||||
|
@Schema(description = "建设状态:0=规划&1=在建&2=已建")
|
||||||
|
private Integer bldstt;
|
||||||
|
|
||||||
|
@Schema(description = "运行状态:0=未运行&1=运行")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "运行状态名称")
|
||||||
|
private String statusName;
|
||||||
|
|
||||||
|
@Schema(description = "计划完成总数(万尾)")
|
||||||
|
private Long jhCnt;
|
||||||
|
|
||||||
|
@Schema(description = "已完成总数(万尾)")
|
||||||
|
private Long fished;
|
||||||
|
|
||||||
|
@Schema(description = "未完成总数(万尾)")
|
||||||
|
private Long unfished;
|
||||||
|
|
||||||
|
@Schema(description = "计划年度")
|
||||||
|
private String yr;
|
||||||
|
|
||||||
|
@Schema(description = "是否接入:0=未接入 1=已接入")
|
||||||
|
private Integer dtin;
|
||||||
|
|
||||||
|
@Schema(description = "是否接入名称")
|
||||||
|
private String dtinName;
|
||||||
|
|
||||||
|
@Schema(description = "达标状态子类型(1=正常运行,2=暂无数据,3=未正常运行)")
|
||||||
|
private Integer stdSstate;
|
||||||
|
|
||||||
|
@Schema(description = "达标状态子类型名称")
|
||||||
|
private String stdSstateName;
|
||||||
|
|
||||||
|
@Schema(description = "澜沧江运行状态(特殊处理:1=正常运行,2=暂无数据)")
|
||||||
|
private Integer lcjStatus;
|
||||||
|
|
||||||
|
@Schema(description = "澜沧江运行状态名称")
|
||||||
|
private String lcjStatusName;
|
||||||
|
|
||||||
|
@Schema(description = "沿程排序")
|
||||||
|
private Integer siteStepSort;
|
||||||
|
|
||||||
|
@Schema(description = "站点图片")
|
||||||
|
private String logo;
|
||||||
|
}
|
||||||
@ -16,6 +16,7 @@ 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.FbStationStaticsDataVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.YearRpStatisticsVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.YearRpStatisticsVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationOverviewSecondVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationOverviewSecondVo;
|
||||||
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbTracingPointVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.TableVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.TableVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -62,4 +63,6 @@ public interface FbStationService {
|
|||||||
DataSourceResult<TableVo> getFishhatchrecrFishKendoListCust(Integer type, DataSourceRequest dataSourceRequest);
|
DataSourceResult<TableVo> getFishhatchrecrFishKendoListCust(Integer type, DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
DataSourceResult<TableVo> getFishbreedrFishKendoListCust(DataSourceRequest dataSourceRequest);
|
DataSourceResult<TableVo> getFishbreedrFishKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
DataSourceResult<FbTracingPointVo> getFbPointKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,12 +30,14 @@ import com.yfd.platform.qgc_env.fb.entity.vo.FbStInfoResultVo;
|
|||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationOverviewSecondVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationOverviewSecondVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationStaticsDataVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationStaticsDataVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationStaticsRawVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationStaticsRawVo;
|
||||||
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbTracingPointVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FishbreedRVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.FishbreedRVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FishhatchrecRVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.FishhatchrecRVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.HeadColunmsVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.HeadColunmsVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.TableVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.TableVo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.YearRpStatisticsVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.YearRpStatisticsVo;
|
||||||
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
||||||
|
import com.yfd.platform.qgc_env.wt.utils.SiteAvoidanceUtils;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -4572,4 +4574,131 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
tableVo.setTotal(total);
|
tableVo.setTotal(total);
|
||||||
return tableVo;
|
return tableVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult<FbTracingPointVo> getFbPointKendoListCust(DataSourceRequest dataSourceRequest) {
|
||||||
|
DataSourceResult<FbTracingPointVo> dataSourceResult = new DataSourceResult<>();
|
||||||
|
dataSourceResult.setAggregates(new HashMap<>());
|
||||||
|
|
||||||
|
if (dataSourceRequest == null) {
|
||||||
|
dataSourceResult.setData(new ArrayList<>());
|
||||||
|
dataSourceResult.setTotal(0L);
|
||||||
|
return dataSourceResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
DataSourceLoadOptionsBase devRequest = dataSourceRequest.toDevRequest();
|
||||||
|
String rstcd = QgcQueryWrapperUtil.getFilterFieldValue(devRequest, "rstcd");
|
||||||
|
String sttp = QgcQueryWrapperUtil.getFilterFieldValue(devRequest, "sttp");
|
||||||
|
String bldsttCcode = QgcQueryWrapperUtil.getFilterFieldValue(devRequest, "bldsttCcode");
|
||||||
|
|
||||||
|
if (StrUtil.isEmpty(sttp)) {
|
||||||
|
dataSourceResult.setData(new ArrayList<>());
|
||||||
|
dataSourceResult.setTotal(0L);
|
||||||
|
return dataSourceResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("SELECT ")
|
||||||
|
.append("a.STCD AS stcd, ")
|
||||||
|
.append("a.STNM AS stnm, ")
|
||||||
|
.append("a.LOGO AS logo, ")
|
||||||
|
.append("a.STNM AS titleName, ")
|
||||||
|
.append("a.STTP AS sttp, ")
|
||||||
|
.append("a.STTP AS sttpMap, ")
|
||||||
|
.append("a.STTP AS sttpCode, ")
|
||||||
|
.append("a.LGTD AS lgtd, ")
|
||||||
|
.append("a.LTTD AS lttd, ")
|
||||||
|
.append("a.ELEV AS dtmel, ")
|
||||||
|
.append("a.BLDSTT_CODE AS bldstt, ")
|
||||||
|
.append("a.RSTCD AS rstcd, ")
|
||||||
|
.append("a.RSTCD AS rstcds, ")
|
||||||
|
.append("a.BASE_ID AS baseId, ")
|
||||||
|
.append("a.DTIN AS dtin, ")
|
||||||
|
.append("eng.ENNM AS ennm, ")
|
||||||
|
.append("eng.RVCD AS rvcd, ")
|
||||||
|
.append("eng.ADDVCD AS addvcd, ")
|
||||||
|
.append("NVL(siteSort.SORT, 999999) AS siteStepSort, ")
|
||||||
|
.append("NVL(along.ORDER_INDEX, 999999) AS rvcdStepSort, ")
|
||||||
|
.append("NVL(rstSort.SORT, 999999) AS rstcdStepSort, ")
|
||||||
|
.append("NVL(hb.ORDER_INDEX, 999999) AS baseStepSort, ")
|
||||||
|
.append("'" + sttp + "' AS anchoPointState, ")
|
||||||
|
.append("CASE WHEN b.lcjStatus IS NOT NULL THEN 1 ELSE 2 END AS lcjStatus ")
|
||||||
|
.append("FROM SD_FBRD_B_H a ")
|
||||||
|
.append("LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = a.RSTCD AND NVL(eng.IS_DELETED, 0) = 0 ")
|
||||||
|
.append("LEFT JOIN SD_HYDROBASE hb ON hb.BASEID = a.BASE_ID AND NVL(hb.IS_DELETED, 0) = 0 ")
|
||||||
|
.append("LEFT JOIN MS_ALONG_B along ON along.RVCD = eng.HBRVCD AND along.CODE = 'common' AND NVL(along.IS_DELETED, 0) = 0 ")
|
||||||
|
.append("LEFT JOIN ( ")
|
||||||
|
.append(" SELECT det.SORT, cfg.RVCD, det.STCD ")
|
||||||
|
.append(" FROM MS_ALONGDET_B det ")
|
||||||
|
.append(" INNER JOIN MS_ALONG_B cfg ON det.ALONG_ID = cfg.ID ")
|
||||||
|
.append(" WHERE NVL(det.IS_DELETED, 0) = 0 AND NVL(cfg.IS_DELETED, 0) = 0 AND cfg.CODE = 'common' ")
|
||||||
|
.append(") rstSort ON rstSort.RVCD = eng.HBRVCD AND rstSort.STCD = a.RSTCD ")
|
||||||
|
.append("LEFT JOIN ( ")
|
||||||
|
.append(" SELECT det.SORT, cfg.RVCD, det.STCD ")
|
||||||
|
.append(" FROM MS_ALONGDET_B det ")
|
||||||
|
.append(" INNER JOIN MS_ALONG_B cfg ON det.ALONG_ID = cfg.ID ")
|
||||||
|
.append(" WHERE NVL(det.IS_DELETED, 0) = 0 AND NVL(cfg.IS_DELETED, 0) = 0 AND cfg.CODE = 'common' ")
|
||||||
|
.append(") siteSort ON siteSort.RVCD = eng.HBRVCD AND siteSort.STCD = a.STCD ")
|
||||||
|
.append("LEFT JOIN ( ")
|
||||||
|
.append(" SELECT t.RSTCD AS stcd, COUNT(1) AS lcjStatus ")
|
||||||
|
.append(" FROM SD_ENGFR_R t ")
|
||||||
|
.append(" INNER JOIN SD_RPIMNFISH_R t1 ON t.ID = t1.RPIMN_ID ")
|
||||||
|
.append(" WHERE (t.TASK_STATUS IS NULL OR t.TASK_STATUS = 'Approved') ")
|
||||||
|
.append(" AND NVL(t.IS_DELETED, 0) = 0 AND NVL(t1.IS_DELETED, 0) = 0 ")
|
||||||
|
.append(" AND t.TM BETWEEN ADD_MONTHS(SYSDATE, -12) AND SYSDATE ")
|
||||||
|
.append(" GROUP BY t.RSTCD ")
|
||||||
|
.append(") b ON a.STCD = b.stcd ")
|
||||||
|
.append("WHERE NVL(a.USFL, 1) = 1 ")
|
||||||
|
.append("AND a.LGTD IS NOT NULL ")
|
||||||
|
.append("AND a.LTTD IS NOT NULL ");
|
||||||
|
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
|
||||||
|
if (StrUtil.isNotEmpty(sttp)) {
|
||||||
|
sql.append(" AND a.STTP = :sttp ");
|
||||||
|
paramMap.put("sttp", sttp);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(rstcd)) {
|
||||||
|
sql.append(" AND a.RSTCD LIKE '%' || :rstcd || '%' ");
|
||||||
|
paramMap.put("rstcd", rstcd);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(bldsttCcode)) {
|
||||||
|
sql.append(" AND a.BLDSTT_CODE = :bldsttCcode ");
|
||||||
|
paramMap.put("bldsttCcode", Integer.parseInt(bldsttCcode));
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.append(" ORDER BY NVL(siteSort.SORT, 999999) ASC ");
|
||||||
|
|
||||||
|
Page<?> page = devRequest == null ? null : QgcQueryWrapperUtil.buildPage(devRequest, devRequest.getSkip(), devRequest.getTake());
|
||||||
|
List<FbTracingPointVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(page, sql.toString(), paramMap, FbTracingPointVo.class);
|
||||||
|
|
||||||
|
list = getPointLegend(list);
|
||||||
|
|
||||||
|
SiteAvoidanceUtils.calcSiteMapLev(list,
|
||||||
|
FbTracingPointVo::getStcd,
|
||||||
|
FbTracingPointVo::getLgtd,
|
||||||
|
FbTracingPointVo::getLttd,
|
||||||
|
FbTracingPointVo::getAnchoPointState,
|
||||||
|
FbTracingPointVo::setDistance);
|
||||||
|
|
||||||
|
dataSourceResult.setData(list);
|
||||||
|
dataSourceResult.setTotal(page == null ? list.size() : page.getTotal());
|
||||||
|
return dataSourceResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<FbTracingPointVo> getPointLegend(List<FbTracingPointVo> voList) {
|
||||||
|
for (FbTracingPointVo pointVo : voList) {
|
||||||
|
Integer bldstt = pointVo.getBldstt();
|
||||||
|
String sttp = pointVo.getSttp();
|
||||||
|
if (bldstt == null || bldstt != 2) {
|
||||||
|
if ("FB".equals(sttp)) {
|
||||||
|
pointVo.setAnchoPointState("fb_incomplete");
|
||||||
|
}
|
||||||
|
if ("SG".equals(sttp)) {
|
||||||
|
pointVo.setAnchoPointState("sg_incomplete");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user