2024-07-08 17:47:02 +08:00
|
|
|
package com.gunshi.project.xyt.controller;
|
|
|
|
|
|
|
|
|
|
import com.gunshi.core.result.R;
|
|
|
|
|
import com.gunshi.project.xyt.model.AttResBase;
|
|
|
|
|
import com.gunshi.project.xyt.service.AttResBaseService;
|
|
|
|
|
import com.gunshi.project.xyt.validate.markers.Insert;
|
|
|
|
|
import com.gunshi.project.xyt.validate.markers.Update;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
/**
|
|
|
|
|
* 描述: 水库基本信息表
|
|
|
|
|
* author: xusan
|
|
|
|
|
* date: 2024-07-08 17:40:37
|
|
|
|
|
*/
|
|
|
|
|
@Tag(name = "水库基本信息表")
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping(value="/attResBase")
|
水库基本信息新增,主要特征参数新增,水库库容曲线新增,列表查询,水库泄流曲线新增,列表查询, 月生态流量查询, 管理单位新增,查询责任体系新增,列表查询防汛预案调度规程,新增,列表查询接口新增
2024-07-15 17:38:51 +08:00
|
|
|
public class AttResBaseController extends AbstractCommonFileController {
|
2024-07-08 17:47:02 +08:00
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private AttResBaseService service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "新增")
|
|
|
|
|
@PostMapping("/insert")
|
|
|
|
|
public R<AttResBase> insert(@Validated(Insert.class) @RequestBody AttResBase dto) {
|
|
|
|
|
boolean result = service.save(dto);
|
|
|
|
|
return R.ok(result ? dto : null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "修改")
|
|
|
|
|
@PostMapping("/update")
|
|
|
|
|
public R<AttResBase> update(@Validated(Update.class) @RequestBody AttResBase dto) {
|
|
|
|
|
boolean result = service.updateById(dto);
|
|
|
|
|
return R.ok(result ? dto : null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "删除")
|
|
|
|
|
@GetMapping("/del/{id}")
|
|
|
|
|
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
|
|
|
|
return R.ok(service.removeById(id));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "列表")
|
|
|
|
|
@PostMapping("/list")
|
|
|
|
|
public R<List<AttResBase>> list() {
|
|
|
|
|
return R.ok(service.lambdaQuery().list());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Operation(summary = "分页")
|
|
|
|
|
@PostMapping("/page")
|
|
|
|
|
public R<List<AttResBase>> page() {
|
|
|
|
|
return R.ok(service.page(null,null));
|
|
|
|
|
}
|
|
|
|
|
|
水库基本信息新增,主要特征参数新增,水库库容曲线新增,列表查询,水库泄流曲线新增,列表查询, 月生态流量查询, 管理单位新增,查询责任体系新增,列表查询防汛预案调度规程,新增,列表查询接口新增
2024-07-15 17:38:51 +08:00
|
|
|
@Override
|
|
|
|
|
public String getGroupId() {
|
|
|
|
|
return "attResBase";
|
|
|
|
|
}
|
2024-07-08 17:47:02 +08:00
|
|
|
}
|