4 changed files with 266 additions and 266 deletions
@ -1,57 +1,57 @@ |
|||
//package com.kms.yg.sk.controller;
|
|||
//
|
|||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
//import com.kms.yg.sk.domain.AttResBase;
|
|||
//import com.kms.yg.sk.service.AttResBaseService;
|
|||
//import com.kms.yg.sk.service.AttResCodeService;
|
|||
//import com.shuili.common.core.controller.BaseController;
|
|||
//import com.shuili.common.core.domain.AjaxResult;
|
|||
//import com.shuili.common.core.domain.SearchParam;
|
|||
//import io.swagger.annotations.Api;
|
|||
//import io.swagger.annotations.ApiOperation;
|
|||
//import org.springframework.beans.factory.annotation.Autowired;
|
|||
//import org.springframework.web.bind.annotation.*;
|
|||
//
|
|||
//
|
|||
///**
|
|||
// * 水库基础信息Controller
|
|||
// *
|
|||
// * @author kms
|
|||
// * @date 2024-04-24
|
|||
// */
|
|||
//@RestController
|
|||
//@RequestMapping("/sk/base")
|
|||
//@Api(tags = "水库基础信息")
|
|||
//public class AttResBaseController extends BaseController {
|
|||
// @Autowired
|
|||
// private AttResBaseService attResBaseService;
|
|||
// @Autowired
|
|||
// private AttResCodeService attResCodeService;
|
|||
//
|
|||
// @PostMapping("/list")
|
|||
// @ApiOperation("水库基础信息列表")
|
|||
// public IPage<AttResBase> list(@RequestBody SearchParam<AttResBase> sp) {
|
|||
// AttResBase body = sp.getData();
|
|||
// if (body == null) {
|
|||
// return new Page<>();
|
|||
// }
|
|||
// body.setPageNum(sp.getPageNum());
|
|||
// body.setPageSize(sp.getPageSize());
|
|||
// return attResBaseService.selectPageV2(body);
|
|||
// }
|
|||
//
|
|||
//
|
|||
// @ApiOperation("水库基础信息详情")
|
|||
// @GetMapping(value = "/{id}")
|
|||
// public AjaxResult getInfo(@PathVariable("id") String id) {
|
|||
// return AjaxResult.success(attResBaseService.getById(id));
|
|||
// }
|
|||
//
|
|||
// @ApiOperation("水库主测站编码")
|
|||
// @GetMapping(value = "/stcd/{id}")
|
|||
// public AjaxResult getStcd(@PathVariable("id") String id) {
|
|||
// return AjaxResult.success(attResCodeService.getById(id));
|
|||
// }
|
|||
//
|
|||
//}
|
|||
package com.kms.yg.sk.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.kms.yg.sk.domain.AttResBase; |
|||
import com.kms.yg.sk.service.AttResBaseService; |
|||
import com.kms.yg.sk.service.AttResCodeService; |
|||
import com.shuili.common.core.controller.BaseController; |
|||
import com.shuili.common.core.domain.AjaxResult; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
/** |
|||
* 水库基础信息Controller |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/sk/base") |
|||
@Api(tags = "水库基础信息") |
|||
public class AttResBaseController extends BaseController { |
|||
@Autowired |
|||
private AttResBaseService attResBaseService; |
|||
@Autowired |
|||
private AttResCodeService attResCodeService; |
|||
|
|||
@PostMapping("/list") |
|||
@ApiOperation("水库基础信息列表") |
|||
public IPage<AttResBase> list(@RequestBody SearchParam<AttResBase> sp) { |
|||
AttResBase body = sp.getData(); |
|||
if (body == null) { |
|||
return new Page<>(); |
|||
} |
|||
body.setPageNum(sp.getPageNum()); |
|||
body.setPageSize(sp.getPageSize()); |
|||
return attResBaseService.selectPageV2(body); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("水库基础信息详情") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") String id) { |
|||
return AjaxResult.success(attResBaseService.getById(id)); |
|||
} |
|||
|
|||
@ApiOperation("水库主测站编码") |
|||
@GetMapping(value = "/stcd/{id}") |
|||
public AjaxResult getStcd(@PathVariable("id") String id) { |
|||
return AjaxResult.success(attResCodeService.getById(id)); |
|||
} |
|||
|
|||
} |
|||
|
@ -1,162 +1,162 @@ |
|||
//package com.kms.yg.sk.domain;
|
|||
//
|
|||
//import com.baomidou.mybatisplus.annotation.TableName;
|
|||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
//import com.kms.yxgh.common.dto.IAdcd;
|
|||
//import com.shuili.common.annotation.Excel;
|
|||
//import com.shuili.common.core.domain.BaseEntity;
|
|||
//import io.swagger.annotations.ApiModel;
|
|||
//import io.swagger.annotations.ApiModelProperty;
|
|||
//import lombok.Data;
|
|||
//
|
|||
//import java.util.Date;
|
|||
//
|
|||
//
|
|||
///**
|
|||
// * 【请填写功能名称】对象 att_res_base
|
|||
// *
|
|||
// * @author kms
|
|||
// * @date 2024-04-24
|
|||
// */
|
|||
//@TableName("att_res_base")
|
|||
//@Data
|
|||
//@ApiModel("水库基础信息")
|
|||
//public class AttResBase extends BaseEntity implements IAdcd {
|
|||
// private static final long serialVersionUID = 1L;
|
|||
//
|
|||
// /**
|
|||
// * 水库代码
|
|||
// */
|
|||
// @ApiModelProperty("水库编码")
|
|||
// private String resCode;
|
|||
//
|
|||
// /**
|
|||
// * 水库名称
|
|||
// */
|
|||
// @Excel(name = "水库名称")
|
|||
// @ApiModelProperty("水库名称")
|
|||
// private String resName;
|
|||
//
|
|||
// /**
|
|||
// * 水库中心经度
|
|||
// */
|
|||
// @Excel(name = "水库中心经度")
|
|||
// @ApiModelProperty("水库中心经度")
|
|||
// private String resCenLong;
|
|||
//
|
|||
// /**
|
|||
// * 水库中心纬度
|
|||
// */
|
|||
// @Excel(name = "水库中心纬度")
|
|||
// @ApiModelProperty("水库中心纬度")
|
|||
// private String resCenLat;
|
|||
//
|
|||
// /**
|
|||
// * 水库所在位置
|
|||
// */
|
|||
// @Excel(name = "水库所在位置")
|
|||
// @ApiModelProperty("水库所在位置")
|
|||
// private String resLoc;
|
|||
//
|
|||
// /**
|
|||
// * 水库类型
|
|||
// */
|
|||
// @Excel(name = "水库类型")
|
|||
// @ApiModelProperty("水库类型")
|
|||
// private String resType;
|
|||
//
|
|||
// /**
|
|||
// * 管理单位
|
|||
// */
|
|||
// @Excel(name = "管理单位")
|
|||
// @ApiModelProperty("管理单位")
|
|||
// private String mnun;
|
|||
//
|
|||
// /**
|
|||
// * 主管单位
|
|||
// */
|
|||
// @Excel(name = "主管单位")
|
|||
// @ApiModelProperty("主管单位")
|
|||
// private String cmun;
|
|||
//
|
|||
// /**
|
|||
// * 工程等别
|
|||
// */
|
|||
// @Excel(name = "工程等别")
|
|||
// @ApiModelProperty("工程等别")
|
|||
// private String engGrad;
|
|||
//
|
|||
// /**
|
|||
// * 工程规模
|
|||
// */
|
|||
// @Excel(name = "工程规模")
|
|||
// @ApiModelProperty("工程规模")
|
|||
// private String engScal;
|
|||
//
|
|||
// /**
|
|||
// * 坝址控制流域面积
|
|||
// */
|
|||
// @Excel(name = "坝址控制流域面积")
|
|||
// @ApiModelProperty("坝址控制流域面积")
|
|||
// private Double watShedArea;
|
|||
//
|
|||
// /**
|
|||
// * 工程状况
|
|||
// */
|
|||
// @Excel(name = "工程状况")
|
|||
// @ApiModelProperty("工程状况")
|
|||
// private String engStat;
|
|||
//
|
|||
// /**
|
|||
// * 开工时间
|
|||
// */
|
|||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
|||
// @Excel(name = "开工时间", width = 30, dateFormat = "yyyy-MM-dd")
|
|||
// @ApiModelProperty("开工时间")
|
|||
// private Date startDate;
|
|||
//
|
|||
// /**
|
|||
// * 建成时间
|
|||
// */
|
|||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
|||
// @Excel(name = "建成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
|||
// @ApiModelProperty("建成时间")
|
|||
// private Date compDate;
|
|||
//
|
|||
// /**
|
|||
// * 归口管理部门
|
|||
// */
|
|||
// @Excel(name = "归口管理部门")
|
|||
// @ApiModelProperty("归口管理部门")
|
|||
// private String admDep;
|
|||
//
|
|||
// /**
|
|||
// * 水库概况
|
|||
// */
|
|||
// @Excel(name = "水库概况")
|
|||
// @ApiModelProperty("水库概况")
|
|||
// private String resOv;
|
|||
//
|
|||
// /**
|
|||
// * 记录生效时间
|
|||
// */
|
|||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
|||
// @Excel(name = "记录生效时间", width = 30, dateFormat = "yyyy-MM-dd")
|
|||
// @ApiModelProperty("记录生效时间")
|
|||
// private Date effDate;
|
|||
//
|
|||
// /**
|
|||
// * $column.columnComment
|
|||
// */
|
|||
// @Excel(name = "记录生效时间")
|
|||
// @ApiModelProperty("记录生效时间")
|
|||
// private String note;
|
|||
//
|
|||
// /**
|
|||
// * 行政区划
|
|||
// */
|
|||
// @Excel(name = "行政区划")
|
|||
// @ApiModelProperty("行政区划")
|
|||
// private String adcd;
|
|||
//
|
|||
//}
|
|||
package com.kms.yg.sk.domain; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.common.dto.IAdcd; |
|||
import com.shuili.common.annotation.Excel; |
|||
import com.shuili.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】对象 att_res_base |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@TableName("att_res_base") |
|||
@Data |
|||
@ApiModel("水库基础信息") |
|||
public class AttResBase extends BaseEntity implements IAdcd { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 水库代码 |
|||
*/ |
|||
@ApiModelProperty("水库编码") |
|||
private String resCode; |
|||
|
|||
/** |
|||
* 水库名称 |
|||
*/ |
|||
@Excel(name = "水库名称") |
|||
@ApiModelProperty("水库名称") |
|||
private String resName; |
|||
|
|||
/** |
|||
* 水库中心经度 |
|||
*/ |
|||
@Excel(name = "水库中心经度") |
|||
@ApiModelProperty("水库中心经度") |
|||
private String resCenLong; |
|||
|
|||
/** |
|||
* 水库中心纬度 |
|||
*/ |
|||
@Excel(name = "水库中心纬度") |
|||
@ApiModelProperty("水库中心纬度") |
|||
private String resCenLat; |
|||
|
|||
/** |
|||
* 水库所在位置 |
|||
*/ |
|||
@Excel(name = "水库所在位置") |
|||
@ApiModelProperty("水库所在位置") |
|||
private String resLoc; |
|||
|
|||
/** |
|||
* 水库类型 |
|||
*/ |
|||
@Excel(name = "水库类型") |
|||
@ApiModelProperty("水库类型") |
|||
private String resType; |
|||
|
|||
/** |
|||
* 管理单位 |
|||
*/ |
|||
@Excel(name = "管理单位") |
|||
@ApiModelProperty("管理单位") |
|||
private String mnun; |
|||
|
|||
/** |
|||
* 主管单位 |
|||
*/ |
|||
@Excel(name = "主管单位") |
|||
@ApiModelProperty("主管单位") |
|||
private String cmun; |
|||
|
|||
/** |
|||
* 工程等别 |
|||
*/ |
|||
@Excel(name = "工程等别") |
|||
@ApiModelProperty("工程等别") |
|||
private String engGrad; |
|||
|
|||
/** |
|||
* 工程规模 |
|||
*/ |
|||
@Excel(name = "工程规模") |
|||
@ApiModelProperty("工程规模") |
|||
private String engScal; |
|||
|
|||
/** |
|||
* 坝址控制流域面积 |
|||
*/ |
|||
@Excel(name = "坝址控制流域面积") |
|||
@ApiModelProperty("坝址控制流域面积") |
|||
private Double watShedArea; |
|||
|
|||
/** |
|||
* 工程状况 |
|||
*/ |
|||
@Excel(name = "工程状况") |
|||
@ApiModelProperty("工程状况") |
|||
private String engStat; |
|||
|
|||
/** |
|||
* 开工时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "开工时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
@ApiModelProperty("开工时间") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 建成时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "建成时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
@ApiModelProperty("建成时间") |
|||
private Date compDate; |
|||
|
|||
/** |
|||
* 归口管理部门 |
|||
*/ |
|||
@Excel(name = "归口管理部门") |
|||
@ApiModelProperty("归口管理部门") |
|||
private String admDep; |
|||
|
|||
/** |
|||
* 水库概况 |
|||
*/ |
|||
@Excel(name = "水库概况") |
|||
@ApiModelProperty("水库概况") |
|||
private String resOv; |
|||
|
|||
/** |
|||
* 记录生效时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd") |
|||
@Excel(name = "记录生效时间", width = 30, dateFormat = "yyyy-MM-dd") |
|||
@ApiModelProperty("记录生效时间") |
|||
private Date effDate; |
|||
|
|||
/** |
|||
* $column.columnComment |
|||
*/ |
|||
@Excel(name = "记录生效时间") |
|||
@ApiModelProperty("记录生效时间") |
|||
private String note; |
|||
|
|||
/** |
|||
* 行政区划 |
|||
*/ |
|||
@Excel(name = "行政区划") |
|||
@ApiModelProperty("行政区划") |
|||
private String adcd; |
|||
|
|||
} |
|||
|
@ -1,17 +1,17 @@ |
|||
//package com.kms.yg.sk.mapper;
|
|||
//
|
|||
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
//import com.kms.yg.sk.domain.AttResBase;
|
|||
//import org.springframework.stereotype.Repository;
|
|||
//
|
|||
//
|
|||
///**
|
|||
// * 【请填写功能名称】Mapper接口
|
|||
// *
|
|||
// * @author kms
|
|||
// * @date 2024-04-24
|
|||
// */
|
|||
//@Repository
|
|||
//public interface AttResBaseMapper extends BaseMapper<AttResBase> {
|
|||
//
|
|||
//}
|
|||
package com.kms.yg.sk.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.kms.yg.sk.domain.AttResBase; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Mapper接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Repository |
|||
public interface AttResBaseMapper extends BaseMapper<AttResBase> { |
|||
|
|||
} |
|||
|
@ -1,30 +1,30 @@ |
|||
//package com.kms.yg.sk.service;
|
|||
//
|
|||
//import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|||
//import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
//import com.kms.yg.sk.domain.AttResBase;
|
|||
//import com.kms.yg.sk.mapper.AttResBaseMapper;
|
|||
//import com.shuili.common.core.service.BaseService;
|
|||
//import org.springframework.stereotype.Service;
|
|||
//
|
|||
//
|
|||
///**
|
|||
// * 【请填写功能名称】Service接口
|
|||
// *
|
|||
// * @author kms
|
|||
// * @date 2024-04-24
|
|||
// */
|
|||
//@Service
|
|||
//public class AttResBaseService extends BaseService<AttResBaseMapper, AttResBase> {
|
|||
//
|
|||
// public IPage<AttResBase> selectPageV2(AttResBase body) {
|
|||
// Wrapper<AttResBase> wrapper = Wrappers.<AttResBase>lambdaQuery()
|
|||
// .likeLeft(AttResBase::getAdcd, body.getAdcdQx());
|
|||
// IPage<AttResBase> page = new Page<>();
|
|||
// page.setCurrent(body.getPageNum());
|
|||
// page.setSize(body.getPageSize());
|
|||
// return baseMapper.selectPage(page, wrapper);
|
|||
// }
|
|||
//}
|
|||
package com.kms.yg.sk.service; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.kms.yg.sk.domain.AttResBase; |
|||
import com.kms.yg.sk.mapper.AttResBaseMapper; |
|||
import com.shuili.common.core.service.BaseService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
|
|||
/** |
|||
* 【请填写功能名称】Service接口 |
|||
* |
|||
* @author kms |
|||
* @date 2024-04-24 |
|||
*/ |
|||
@Service |
|||
public class AttResBaseService extends BaseService<AttResBaseMapper, AttResBase> { |
|||
|
|||
public IPage<AttResBase> selectPageV2(AttResBase body) { |
|||
Wrapper<AttResBase> wrapper = Wrappers.<AttResBase>lambdaQuery() |
|||
.likeLeft(AttResBase::getAdcd, body.getAdcdQx()); |
|||
IPage<AttResBase> page = new Page<>(); |
|||
page.setCurrent(body.getPageNum()); |
|||
page.setSize(body.getPageSize()); |
|||
return baseMapper.selectPage(page, wrapper); |
|||
} |
|||
} |
|||
|
Loading…
Reference in new issue