Merge branch 'main' of http://121.37.111.42:3000/zhengsl/WholeProcessPlatform into main_hzz
This commit is contained in:
commit
09b02e791e
@ -80,6 +80,8 @@ public class SecurityConfig {
|
||||
.requestMatchers("/mapLayer/**").permitAll()
|
||||
.requestMatchers("/mapmodule/**").permitAll()
|
||||
.requestMatchers("/mapLegend/**").permitAll()
|
||||
.requestMatchers("/base/msalongb/**").permitAll()
|
||||
.requestMatchers("/base/msalongdetb/**").permitAll()
|
||||
.requestMatchers("/sms/**").permitAll()
|
||||
.requestMatchers(HttpMethod.GET, "/").permitAll()
|
||||
.requestMatchers(HttpMethod.GET,
|
||||
|
||||
@ -197,4 +197,12 @@ public class SwaggerConfig {
|
||||
.packagesToScan("com.yfd.platform.qgc_sys.mapcfg.controller")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi groupLygkApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("6. 沿程配置管理")
|
||||
.packagesToScan("com.yfd.platform.qgc_lygk.along.controller")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@ -146,4 +146,10 @@ public class FbStationController {
|
||||
public ResponseResult getFishbreedrFishKendoListCust(@RequestBody DataSourceRequest 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.YearRpStatisticsVo;
|
||||
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 java.util.List;
|
||||
@ -62,4 +63,6 @@ public interface FbStationService {
|
||||
DataSourceResult<TableVo> getFishhatchrecrFishKendoListCust(Integer type, 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.FbStationStaticsDataVo;
|
||||
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.FishhatchrecRVo;
|
||||
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.YearRpStatisticsVo;
|
||||
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 jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -4572,4 +4574,131 @@ public class FbStationServiceImpl implements FbStationService {
|
||||
tableVo.setTotal(total);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
package com.yfd.platform.qgc_lygk.along.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.common.exception.BizException;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongB;
|
||||
import com.yfd.platform.qgc_lygk.along.service.IMsAlongBService;
|
||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 沿程配置表控制器
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/msalongb")
|
||||
@Tag(name = "沿程配置表控制器")
|
||||
public class MsAlongBController {
|
||||
|
||||
@Resource
|
||||
private IMsAlongBService msAlongBService;
|
||||
/**
|
||||
* 条件过滤数据列表
|
||||
*/
|
||||
@Operation(summary = "条件过滤数据列表")
|
||||
@PostMapping("/GetKendoList")
|
||||
public ResponseResult getKendoList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
DataSourceResult<MsAlongB> result = msAlongBService.getKendoList(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或修改
|
||||
*/
|
||||
@Operation(summary = "保存或修改")
|
||||
@PostMapping("/save")
|
||||
public ResponseResult save(@RequestBody MsAlongB msAlongB) {
|
||||
if (msAlongB == null) {
|
||||
return ResponseResult.error("沿程配置信息不能为空.");
|
||||
}
|
||||
if (StrUtil.isBlank(msAlongB.getName())) {
|
||||
throw new BizException("沿程配置名称(name)不能为空.");
|
||||
}
|
||||
if (StrUtil.isBlank(msAlongB.getCode())) {
|
||||
throw new BizException("沿程配置编码(code)不能为空.");
|
||||
}
|
||||
msAlongBService.saveOrUpdate(msAlongB);
|
||||
return ResponseResult.success("保存成功.");
|
||||
}
|
||||
|
||||
// @Operation(summary = "沿程配置删除")
|
||||
// @PostMapping("/delete")
|
||||
// public ResponseResult deleteData(@RequestBody List<String> ids) {
|
||||
// mapmoduleBService.delelteByIds(ids);
|
||||
// return ResponseResult.success("删除成功.");
|
||||
// }
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.yfd.platform.qgc_lygk.along.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.common.exception.BizException;
|
||||
import com.yfd.platform.config.ResponseResult;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongB;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongDetB;
|
||||
import com.yfd.platform.qgc_lygk.along.service.IMsAlongDetBService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 沿程配置明细表控制器
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/msalongdetb")
|
||||
@Tag(name = "沿程配置明细表控制器")
|
||||
public class MsAlongDetBController {
|
||||
|
||||
@Resource
|
||||
private IMsAlongDetBService msAlongDetBService;
|
||||
|
||||
/**
|
||||
* 条件过滤数据列表
|
||||
*/
|
||||
@Operation(summary = "条件过滤数据列表")
|
||||
@PostMapping("/GetKendoList")
|
||||
public ResponseResult getKendoList(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||
DataSourceResult<MsAlongDetB> result = msAlongDetBService.getKendoList(dataSourceRequest);
|
||||
return ResponseResult.successData(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或修改
|
||||
*/
|
||||
@Operation(summary = "保存或修改")
|
||||
@PostMapping("/save")
|
||||
public ResponseResult save(@RequestBody MsAlongDetB msAlongDetB) {
|
||||
if (msAlongDetB == null) {
|
||||
return ResponseResult.error("沿程配置明细信息不能为空.");
|
||||
}
|
||||
msAlongDetBService.saveOrUpdate(msAlongDetB);
|
||||
return ResponseResult.success("保存成功.");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.yfd.platform.qgc_lygk.along.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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 沿程配置表
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@Data
|
||||
@TableName("MS_ALONG_B")
|
||||
@Schema(description = "沿程配置表")
|
||||
public class MsAlongB implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 沿程配置名称 */
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
|
||||
/** 沿程配置编码 */
|
||||
@TableField("CODE")
|
||||
private String code;
|
||||
|
||||
/** 沿程配置所属流域 */
|
||||
@TableField("RVCD")
|
||||
private String rvcd;
|
||||
|
||||
/** 河流名称(非数据库字段) */
|
||||
@TableField(exist = false)
|
||||
private String rvnm;
|
||||
|
||||
/** 备注 */
|
||||
@TableField("REMARK")
|
||||
private String remark;
|
||||
|
||||
/** 创建人 */
|
||||
@TableField("RECORD_USER")
|
||||
private String recordUser;
|
||||
|
||||
/** 创建人名称(非数据库字段) */
|
||||
@TableField(exist = false)
|
||||
private String recordUserName;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField("RECORD_TIME")
|
||||
private Date recordTime;
|
||||
|
||||
/** 更新人 */
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
|
||||
/** 更新人名称(非数据库字段) */
|
||||
@TableField(exist = false)
|
||||
private String modifyUserName;
|
||||
|
||||
/** 更新时间 */
|
||||
@TableField("MODIFY_TIME")
|
||||
private Date modifyTime;
|
||||
|
||||
/** 是否已删除:0=未删除 1=已删除 */
|
||||
@TableField("IS_DELETED")
|
||||
private Integer isDeleted;
|
||||
|
||||
/** 删除人 */
|
||||
@TableField("DELETE_USER")
|
||||
private String deleteUser;
|
||||
|
||||
/** 删除时间 */
|
||||
@TableField("DELETE_TIME")
|
||||
private Date deleteTime;
|
||||
|
||||
/** 排序 */
|
||||
@TableField("ORDER_INDEX")
|
||||
private Integer orderIndex;
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package com.yfd.platform.qgc_lygk.along.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 io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 沿程配置明细表
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@Data
|
||||
@TableName("MS_ALONGDET_B")
|
||||
@Schema(description = "沿程配置明细表")
|
||||
@Accessors(chain = true)
|
||||
public class MsAlongDetB implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/** 站点编码 */
|
||||
@TableField("STCD")
|
||||
private String stcd;
|
||||
|
||||
/** 站点名称(非数据库字段) */
|
||||
@TableField(exist = false)
|
||||
private String stnm;
|
||||
|
||||
/** 所属电站编码 */
|
||||
@TableField("RSTCD")
|
||||
private String rstcd;
|
||||
|
||||
/** 排序序号 */
|
||||
@TableField("SORT")
|
||||
private String sort;
|
||||
|
||||
/** 沿程配置表ID */
|
||||
@TableField("ALONG_ID")
|
||||
private String alongId;
|
||||
|
||||
/** 站类 */
|
||||
@TableField("STTP")
|
||||
private String sttp;
|
||||
|
||||
/** 站类名称(非数据库字段) */
|
||||
@TableField(exist = false)
|
||||
private String sttpName;
|
||||
|
||||
/** 创建人 */
|
||||
@TableField("RECORD_USER")
|
||||
private String recordUser;
|
||||
|
||||
/** 创建时间 */
|
||||
@TableField("RECORD_TIME")
|
||||
private Date recordTime;
|
||||
|
||||
/** 更新人 */
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
|
||||
/** 更新时间 */
|
||||
@TableField("MODIFY_TIME")
|
||||
private Date modifyTime;
|
||||
|
||||
/** 是否已删除:0=未删除 1=已删除 */
|
||||
@TableField("IS_DELETED")
|
||||
private Integer isDeleted;
|
||||
|
||||
/** 删除人 */
|
||||
@TableField("DELETE_USER")
|
||||
private String deleteUser;
|
||||
|
||||
/** 删除时间 */
|
||||
@TableField("DELETE_TIME")
|
||||
private Date deleteTime;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.yfd.platform.qgc_lygk.along.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 沿程配置表 Mapper 接口
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@Mapper
|
||||
public interface MsAlongBMapper extends BaseMapper<MsAlongB> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.yfd.platform.qgc_lygk.along.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongDetB;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 沿程配置明细表 Mapper 接口
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@Mapper
|
||||
public interface MsAlongDetBMapper extends BaseMapper<MsAlongDetB> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.yfd.platform.qgc_lygk.along.service;
|
||||
|
||||
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.MsAlongB;
|
||||
|
||||
/**
|
||||
* 沿程配置表 Service 接口
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
public interface IMsAlongBService extends IService<MsAlongB> {
|
||||
/**
|
||||
* 条件过滤数据列表(Kendo 数据源)
|
||||
*
|
||||
* @param dataSourceRequest 数据源请求
|
||||
* @return 数据源结果
|
||||
*/
|
||||
DataSourceResult<MsAlongB> getKendoList(DataSourceRequest dataSourceRequest);
|
||||
|
||||
// /**
|
||||
// * 保存或更新沿程配置
|
||||
// *
|
||||
// * @param msAlongB 沿程配置实体
|
||||
// */
|
||||
// void saveOrUpdate(MsAlongB msAlongB);
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.yfd.platform.qgc_lygk.along.service;
|
||||
|
||||
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.MsAlongDetB;
|
||||
|
||||
/**
|
||||
* 沿程配置明细表 Service 接口
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
public interface IMsAlongDetBService extends IService<MsAlongDetB> {
|
||||
|
||||
/**
|
||||
* 条件过滤数据列表(Kendo 数据源)
|
||||
*
|
||||
* @param dataSourceRequest 数据源请求
|
||||
* @return 数据源结果
|
||||
*/
|
||||
DataSourceResult<MsAlongDetB> getKendoList(DataSourceRequest dataSourceRequest);
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package com.yfd.platform.qgc_lygk.along.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongB;
|
||||
import com.yfd.platform.qgc_lygk.along.mapper.MsAlongBMapper;
|
||||
import com.yfd.platform.qgc_lygk.along.service.IMsAlongBService;
|
||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 沿程配置表 Service 实现类
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@Service
|
||||
public class MsAlongBServiceImpl extends ServiceImpl<MsAlongBMapper, MsAlongB> implements IMsAlongBService {
|
||||
|
||||
@Override
|
||||
public DataSourceResult<MsAlongB> getKendoList(DataSourceRequest dataSourceRequest) {
|
||||
// 1. 构建查询条件
|
||||
QueryWrapper<MsAlongB> wrapper = DataSourceRequestUtil.buildQueryWrapper(
|
||||
dataSourceRequest, MsAlongB.class);
|
||||
|
||||
// 2. 分页参数处理
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
Page<MsAlongB> page = loadOptions == null ? null
|
||||
: (Page<MsAlongB>) QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
|
||||
// 3. 执行查询
|
||||
Page<MsAlongB> resultPage;
|
||||
if (page != null) {
|
||||
resultPage = this.page(page, wrapper);
|
||||
} else {
|
||||
List<MsAlongB> list = this.list(wrapper);
|
||||
resultPage = new Page<>();
|
||||
resultPage.setRecords(list);
|
||||
resultPage.setTotal(list.size());
|
||||
}
|
||||
|
||||
// 4. 构建结果
|
||||
DataSourceResult<MsAlongB> dataSourceResult = new DataSourceResult<>();
|
||||
dataSourceResult.setData(resultPage.getRecords());
|
||||
dataSourceResult.setTotal(resultPage.getTotal());
|
||||
return dataSourceResult;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean saveOrUpdate(MsAlongB msAlongB) {
|
||||
// super.saveOrUpdate(msAlongB);
|
||||
// return super.saveOrUpdate(msAlongB);
|
||||
// }
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.yfd.platform.qgc_lygk.along.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||
import com.yfd.platform.common.DataSourceRequest;
|
||||
import com.yfd.platform.common.DataSourceResult;
|
||||
import com.yfd.platform.qgc_lygk.along.domain.MsAlongDetB;
|
||||
import com.yfd.platform.qgc_lygk.along.mapper.MsAlongDetBMapper;
|
||||
import com.yfd.platform.qgc_lygk.along.service.IMsAlongDetBService;
|
||||
import com.yfd.platform.utils.CodeToNameMetadataBo;
|
||||
import com.yfd.platform.utils.DataSourceRequestUtil;
|
||||
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 沿程配置明细表 Service 实现类
|
||||
*
|
||||
* @author migration
|
||||
*/
|
||||
@Service
|
||||
public class MsAlongDetBServiceImpl extends ServiceImpl<MsAlongDetBMapper, MsAlongDetB> implements IMsAlongDetBService {
|
||||
|
||||
@Resource
|
||||
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||
|
||||
private static final List<CodeToNameMetadataBo> CODE_TO_NAME_META_LIST = new ArrayList<>();
|
||||
|
||||
static {
|
||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("stcd").modifyProperty("stnm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataSourceResult<MsAlongDetB> getKendoList(DataSourceRequest dataSourceRequest) {
|
||||
// 1. 构建查询条件
|
||||
QueryWrapper<MsAlongDetB> wrapper = DataSourceRequestUtil.buildQueryWrapper(
|
||||
dataSourceRequest, MsAlongDetB.class);
|
||||
|
||||
// 2. 分页参数处理
|
||||
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||
Page<MsAlongDetB> page = loadOptions == null ? null
|
||||
: (Page<MsAlongDetB>) QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||
|
||||
// 3. 执行查询
|
||||
Page<MsAlongDetB> resultPage;
|
||||
if (page != null) {
|
||||
resultPage = this.page(page, wrapper);
|
||||
dictCodeToNameConverter.convertCodeToName(resultPage,CODE_TO_NAME_META_LIST);
|
||||
} else {
|
||||
List<MsAlongDetB> list = this.list(wrapper);
|
||||
dictCodeToNameConverter.convertCodeToName(list,CODE_TO_NAME_META_LIST);
|
||||
resultPage = new Page<>();
|
||||
resultPage.setRecords(list);
|
||||
resultPage.setTotal(list.size());
|
||||
}
|
||||
|
||||
// 4. 构建结果
|
||||
DataSourceResult<MsAlongDetB> dataSourceResult = new DataSourceResult<>();
|
||||
dataSourceResult.setData(resultPage.getRecords());
|
||||
dataSourceResult.setTotal(resultPage.getTotal());
|
||||
return dataSourceResult;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user