实体类非空判断修改, 水库基本信息,水库库容曲线,水库泄流曲线,月生态流量新增删除修改接口测试修改
parent
a435775ffc
commit
a2795cad3a
|
|
@ -45,7 +45,7 @@ public class AttDamBaseController {
|
|||
@PostMapping("/update")
|
||||
public R<AttDamBase> update(@Validated(Update.class) @RequestBody AttDamBase dto) {
|
||||
if (Objects.isNull(service.getById(dto.getDamCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
|
|
@ -55,7 +55,7 @@ public class AttDamBaseController {
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ public class AttDamProfileController extends AbstractCommonFileController{
|
|||
@PostMapping("/insert")
|
||||
public R<AttDamProfile> insert(@Validated(Insert.class) @RequestBody AttDamProfile dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getProfileCode()))) {
|
||||
throw new RuntimeException("当前编号已存在");
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
if (StringUtils.isNotBlank(dto.getProfileName())){
|
||||
if (service.lambdaQuery().eq(AttDamProfile::getProfileName,dto.getProfileName()).count() > 0) {
|
||||
throw new RuntimeException("当前名称已存在");
|
||||
throw new IllegalArgumentException("当前名称已存在");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -62,14 +62,14 @@ public class AttDamProfileController extends AbstractCommonFileController{
|
|||
@PostMapping("/update")
|
||||
public R<AttDamProfile> update(@Validated(Update.class) @RequestBody AttDamProfile dto) {
|
||||
if (Objects.isNull(service.getById(dto.getProfileCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(dto.getProfileName())){
|
||||
if (service.lambdaQuery().eq(AttDamProfile::getProfileName,dto.getProfileName())
|
||||
.ne(AttDamProfile::getProfileCode,dto.getProfileCode())
|
||||
.count() > 0) {
|
||||
throw new RuntimeException("当前名称已存在");
|
||||
throw new IllegalArgumentException("当前名称已存在");
|
||||
}
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
|
|
@ -83,7 +83,7 @@ public class AttDamProfileController extends AbstractCommonFileController{
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class AttGateValveController {
|
|||
@PostMapping("/update")
|
||||
public R<AttGateValve> update(@Validated(Update.class) @RequestBody AttGateValve dto) {
|
||||
if (Objects.isNull(service.getById(dto.getValveCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
|
|
@ -55,7 +55,7 @@ public class AttGateValveController {
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class AttMeaWeirController {
|
|||
@PostMapping("/update")
|
||||
public R<AttMeaWeir> update(@Validated(Update.class) @RequestBody AttMeaWeir dto) {
|
||||
if (Objects.isNull(service.getById(dto.getWeirCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
|
|
@ -55,7 +55,7 @@ public class AttMeaWeirController {
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ public class AttResBaseController extends AbstractCommonFileController {
|
|||
@PostMapping("/insert")
|
||||
public R<AttResBase> insert(@Validated(Insert.class) @RequestBody AttResBase dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getResCode()))) {
|
||||
throw new RuntimeException("当前编号已存在");
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
if (StringUtils.isNotBlank(dto.getResName())){
|
||||
if (service.lambdaQuery().eq(AttResBase::getResName,dto.getResName()).count() > 0) {
|
||||
throw new RuntimeException("当前名称已存在");
|
||||
throw new IllegalArgumentException("当前名称已存在");
|
||||
}
|
||||
}
|
||||
boolean result = service.save(dto);
|
||||
|
|
@ -57,7 +57,7 @@ public class AttResBaseController extends AbstractCommonFileController {
|
|||
@PostMapping("/update")
|
||||
public R<AttResBase> update(@Validated(Update.class) @RequestBody AttResBase dto) {
|
||||
if (Objects.isNull(service.getById(dto.getResCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(dto.getResName())){
|
||||
|
|
@ -65,7 +65,7 @@ public class AttResBaseController extends AbstractCommonFileController {
|
|||
.eq(AttResBase::getResName,dto.getResName())
|
||||
.ne(AttResBase::getResCode,dto.getResCode())
|
||||
.count() > 0) {
|
||||
throw new RuntimeException("当前名称已存在");
|
||||
throw new IllegalArgumentException("当前名称已存在");
|
||||
}
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
|
|
@ -79,7 +79,7 @@ public class AttResBaseController extends AbstractCommonFileController {
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean data = service.removeById(id);
|
||||
if (data){
|
||||
|
|
@ -98,8 +98,8 @@ public class AttResBaseController extends AbstractCommonFileController {
|
|||
return R.ok(list);
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<AttResBase>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class AttSpillwayBaseController {
|
|||
@PostMapping("/update")
|
||||
public R<AttSpillwayBase> update(@Validated(Update.class) @RequestBody AttSpillwayBase dto) {
|
||||
if (Objects.isNull(service.getById(dto.getCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
|
|
@ -55,7 +55,7 @@ public class AttSpillwayBaseController {
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ public class AttWaterItemController {
|
|||
return R.ok(service.list(wrapper));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<AttWaterItem>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ public class CctvBMenuController {
|
|||
return R.ok(service.tree());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<CctvBMenu>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class FileAssociationsController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<FileAssociations>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public class GateValveCctvRelController {
|
|||
.eq(GateValveCctvRel::getValveCode,dto.getValveCode())
|
||||
.eq(GateValveCctvRel::getIndexCode,dto.getIndexCode())
|
||||
.count() > 0) {
|
||||
throw new RuntimeException("当前编号已关联");
|
||||
throw new IllegalArgumentException("当前编号已关联");
|
||||
}
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
|
|
@ -50,14 +50,14 @@ public class GateValveCctvRelController {
|
|||
@PostMapping("/update")
|
||||
public R<GateValveCctvRel> update(@Validated(Update.class) @RequestBody GateValveCctvRel dto) {
|
||||
if (Objects.isNull(service.getById(dto.getId()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
if (service.lambdaQuery()
|
||||
.eq(GateValveCctvRel::getValveCode,dto.getValveCode())
|
||||
.eq(GateValveCctvRel::getIndexCode,dto.getIndexCode())
|
||||
.ne(GateValveCctvRel::getId,dto.getId())
|
||||
.count() > 0) {
|
||||
throw new RuntimeException("当前编号已关联");
|
||||
throw new IllegalArgumentException("当前编号已关联");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
|
|
@ -67,7 +67,7 @@ public class GateValveCctvRelController {
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ public class GateValveRealController {
|
|||
return R.ok(service.realQ(valveCode));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<GateValveReal>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@ public class IaCBsnssinfoController extends AbstractCommonFileController{
|
|||
@PostMapping("/insert")
|
||||
public R<IaCBsnssinfo> insert(@Validated(Insert.class) @RequestBody IaCBsnssinfo dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getEicd()))) {
|
||||
throw new RuntimeException("当前编号已存在");
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
if (StringUtils.isNotBlank(dto.getName())){
|
||||
if (service.lambdaQuery().eq(IaCBsnssinfo::getName,dto.getName()).count() > 0) {
|
||||
throw new RuntimeException("当前名称已存在");
|
||||
throw new IllegalArgumentException("当前名称已存在");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ public class IaCBsnssinfoController extends AbstractCommonFileController{
|
|||
@PostMapping("/update")
|
||||
public R<IaCBsnssinfo> update(@Validated(Update.class) @RequestBody IaCBsnssinfo dto) {
|
||||
if (Objects.isNull(service.getById(dto.getEicd()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
if (result){
|
||||
|
|
@ -72,7 +72,7 @@ public class IaCBsnssinfoController extends AbstractCommonFileController{
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean data = service.removeById(id);
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ public class IaCBsnssinfoController extends AbstractCommonFileController{
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<IaCBsnssinfo>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ public class IaCDanadController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<IaCDanad>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ public class IaCFlrvvlgController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<IaCFlrvvlg>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class OsmoticFlowDeviceController extends AbstractCommonFileController{
|
|||
@PostMapping("/insert")
|
||||
public R<OsmoticFlowDevice> insert(@Validated(Insert.class) @RequestBody OsmoticFlowDevice dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getStationCode()))) {
|
||||
throw new RuntimeException("当前编号已存在");
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ public class OsmoticFlowDeviceController extends AbstractCommonFileController{
|
|||
@PostMapping("/update")
|
||||
public R<OsmoticFlowDevice> update(@Validated(Update.class) @RequestBody OsmoticFlowDevice dto) {
|
||||
if (Objects.isNull(service.getById(dto.getStationCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
|
||||
boolean result = service.updateById(dto);
|
||||
|
|
@ -72,7 +72,7 @@ public class OsmoticFlowDeviceController extends AbstractCommonFileController{
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class OsmoticPressDeviceController extends AbstractCommonFileController{
|
|||
@PostMapping("/insert")
|
||||
public R<OsmoticPressDevice> insert(@Validated(Insert.class) @RequestBody OsmoticPressDevice dto) {
|
||||
if (Objects.nonNull(service.getById(dto.getStationCode()))) {
|
||||
throw new RuntimeException("当前编号已存在");
|
||||
throw new IllegalArgumentException("当前编号已存在");
|
||||
}
|
||||
|
||||
boolean result = service.save(dto);
|
||||
|
|
@ -56,7 +56,7 @@ public class OsmoticPressDeviceController extends AbstractCommonFileController{
|
|||
@PostMapping("/update")
|
||||
public R<OsmoticPressDevice> update(@Validated(Update.class) @RequestBody OsmoticPressDevice dto) {
|
||||
if (Objects.isNull(service.getById(dto.getProfileCode()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
if (result){
|
||||
|
|
@ -69,7 +69,7 @@ public class OsmoticPressDeviceController extends AbstractCommonFileController{
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ public class OsmoticShiftDeviceController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<OsmoticShiftDevice>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class OsmoticWaterRuleController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<OsmoticWaterRule>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ public class ResMangUnitController {
|
|||
return R.ok(service.lambdaQuery().eq(ResMangUnit::getResCode,so.getResCode()).list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<ResMangUnit>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,10 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 描述: 水库月核定生态流量表
|
||||
* author: xusan
|
||||
|
|
@ -29,10 +32,10 @@ public class ResMonthEcoFlowController {
|
|||
@Autowired
|
||||
private ResMonthEcoFlowService service;
|
||||
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<ResMonthEcoFlow> insert(@Validated(Insert.class) @RequestBody ResMonthEcoFlow dto) {
|
||||
dto.setModitime(new Date());
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
|
@ -40,6 +43,10 @@ public class ResMonthEcoFlowController {
|
|||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<ResMonthEcoFlow> update(@Validated(Update.class) @RequestBody ResMonthEcoFlow dto) {
|
||||
if (Objects.isNull(service.getById(dto.getId()))){
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
dto.setModitime(null);
|
||||
boolean result = service.updateById(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
|
@ -47,6 +54,9 @@ public class ResMonthEcoFlowController {
|
|||
@Operation(summary = "删除")
|
||||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))){
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
||||
|
|
@ -58,8 +68,8 @@ public class ResMonthEcoFlowController {
|
|||
return R.ok(service.lambdaQuery().between(ResMonthEcoFlow::getModitime,stm,etm).orderByAsc(ResMonthEcoFlow::getMonth).list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<ResMonthEcoFlow>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class ResPlanBController extends AbstractCommonFileController{
|
|||
@PostMapping("/update")
|
||||
public R<ResPlanB> update(@Validated(Update.class) @RequestBody ResPlanB dto) {
|
||||
if (Objects.isNull(service.getById(dto.getId()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ public class ResPlanBController extends AbstractCommonFileController{
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean data = service.removeById(id);
|
||||
|
||||
|
|
@ -89,8 +89,8 @@ public class ResPlanBController extends AbstractCommonFileController{
|
|||
|
||||
return R.ok(list);
|
||||
}
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<ResPlanB>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class ResProjectImgController extends AbstractCommonFileController{
|
|||
@PostMapping("/update")
|
||||
public R<ResProjectImg> update(@Validated(Update.class) @RequestBody ResProjectImg dto) {
|
||||
if (Objects.isNull(service.getById(dto.getId()))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
if (result) {
|
||||
|
|
@ -63,7 +63,7 @@ public class ResProjectImgController extends AbstractCommonFileController{
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
boolean data = service.removeById(id);
|
||||
|
||||
|
|
@ -83,8 +83,8 @@ public class ResProjectImgController extends AbstractCommonFileController{
|
|||
}
|
||||
return R.ok(list);
|
||||
}
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<ResProjectImg>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ public class ResSafePersonBController {
|
|||
return R.ok(service.lambdaQuery().eq(ResSafePersonB::getResCode,so.getResCode()).list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<ResSafePersonB>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ public class ShpPlacementController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<ShpPlacement>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StAddvcdDController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StAddvcdD>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StImgRController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StImgR>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StImgRRealController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StImgRReal>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StPptnRController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StPptnR>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StPptnRDController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StPptnRD>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StPptnRRealController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StPptnRReal>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ public class StQxWarnRController {
|
|||
.ge(StQxWarnR::getTm,dateTimeRangeSo.getStart()).lt(StQxWarnR::getTm,dateTimeRangeSo.getEnd()).list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StQxWarnR>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StRsvrRController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StRsvrR>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StRsvrRRealController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StRsvrRReal>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ public class StStbprpBElemController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StStbprpBElem>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ public class StWaterRRealController {
|
|||
return R.ok(service.lambdaQuery().list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StWaterRReal>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,26 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.xyt.model.StZqrlB;
|
||||
import com.gunshi.project.xyt.service.StStbprpBService;
|
||||
import com.gunshi.project.xyt.service.StZqrlBService;
|
||||
import com.gunshi.project.xyt.validate.markers.Delete;
|
||||
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 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.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 描述: 水位流量关系曲线表
|
||||
* author: xusan
|
||||
|
|
@ -27,10 +34,25 @@ public class StZqrlBController {
|
|||
@Autowired
|
||||
private StZqrlBService service;
|
||||
|
||||
@Autowired
|
||||
private StStbprpBService stStbprpBService;
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<StZqrlB> insert(@Validated(Insert.class) @RequestBody StZqrlB dto) {
|
||||
if (StringUtils.isNotBlank(dto.getStcd()) && Objects.isNull(stStbprpBService.getById(dto.getStcd()))){
|
||||
throw new IllegalArgumentException("测站编码不存在");
|
||||
}
|
||||
|
||||
if (service.lambdaQuery()
|
||||
.eq(StZqrlB::getStcd, dto.getStcd())
|
||||
.eq(StZqrlB::getLnnm, dto.getLnnm())
|
||||
.eq(StZqrlB::getBgtm, dto.getBgtm())
|
||||
.eq(StZqrlB::getPtno, dto.getPtno())
|
||||
.count() > 0) {
|
||||
throw new IllegalArgumentException("当前数据已存在");
|
||||
}
|
||||
dto.setModitime(new Date());
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
|
@ -38,14 +60,42 @@ public class StZqrlBController {
|
|||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<StZqrlB> update(@Validated(Update.class) @RequestBody StZqrlB dto) {
|
||||
if (StringUtils.isNotBlank(dto.getStcd()) && Objects.isNull(stStbprpBService.getById(dto.getStcd()))){
|
||||
throw new IllegalArgumentException("测站编码不存在");
|
||||
}
|
||||
|
||||
if (service.lambdaQuery()
|
||||
.eq(StZqrlB::getStcd, dto.getStcd())
|
||||
.eq(StZqrlB::getLnnm, dto.getLnnm())
|
||||
.eq(StZqrlB::getBgtm, dto.getBgtm())
|
||||
.eq(StZqrlB::getPtno, dto.getPtno())
|
||||
.count() > 0) {
|
||||
throw new IllegalArgumentException("当前数据已存在");
|
||||
}
|
||||
|
||||
dto.setModitime(null);
|
||||
|
||||
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));
|
||||
@PostMapping("/del")
|
||||
public R<Boolean> del(@Validated(Delete.class) @RequestBody StZqrlB dto) {
|
||||
if (service.lambdaQuery()
|
||||
.eq(StZqrlB::getStcd, dto.getStcd())
|
||||
.eq(StZqrlB::getLnnm, dto.getLnnm())
|
||||
.eq(StZqrlB::getBgtm, dto.getBgtm())
|
||||
.eq(StZqrlB::getPtno, dto.getPtno())
|
||||
.count() != 1) {
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.lambdaUpdate()
|
||||
.eq(StZqrlB::getStcd, dto.getStcd())
|
||||
.eq(StZqrlB::getLnnm, dto.getLnnm())
|
||||
.eq(StZqrlB::getBgtm, dto.getBgtm())
|
||||
.eq(StZqrlB::getPtno, dto.getPtno())
|
||||
.remove() );
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
|
|
@ -54,8 +104,8 @@ public class StZqrlBController {
|
|||
return R.ok(service.lambdaQuery().orderByDesc(StZqrlB::getModitime).list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StZqrlB>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,26 @@
|
|||
package com.gunshi.project.xyt.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.gunshi.core.result.R;
|
||||
import com.gunshi.project.xyt.model.StZvarlB;
|
||||
import com.gunshi.project.xyt.service.StStbprpBService;
|
||||
import com.gunshi.project.xyt.service.StZvarlBService;
|
||||
import com.gunshi.project.xyt.validate.markers.Delete;
|
||||
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 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.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 描述: 库( 湖)容曲线表
|
||||
* author: xusan
|
||||
|
|
@ -27,10 +34,24 @@ public class StZvarlBController {
|
|||
@Autowired
|
||||
private StZvarlBService service;
|
||||
|
||||
@Autowired
|
||||
private StStbprpBService stStbprpBService;
|
||||
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/insert")
|
||||
public R<StZvarlB> insert(@Validated(Insert.class) @RequestBody StZvarlB dto) {
|
||||
if (StringUtils.isNotBlank(dto.getStcd()) && Objects.isNull(stStbprpBService.getById(dto.getStcd()))){
|
||||
throw new IllegalArgumentException("测站编码不存在");
|
||||
}
|
||||
|
||||
if (service.lambdaQuery()
|
||||
.eq(StZvarlB::getStcd, dto.getStcd())
|
||||
.eq(StZvarlB::getMstm, dto.getMstm())
|
||||
.eq(StZvarlB::getPtno, dto.getPtno())
|
||||
.count() > 0) {
|
||||
throw new IllegalArgumentException("当前数据已存在");
|
||||
}
|
||||
dto.setModitime(new Date());
|
||||
boolean result = service.save(dto);
|
||||
return R.ok(result ? dto : null);
|
||||
}
|
||||
|
|
@ -38,14 +59,37 @@ public class StZvarlBController {
|
|||
@Operation(summary = "修改")
|
||||
@PostMapping("/update")
|
||||
public R<StZvarlB> update(@Validated(Update.class) @RequestBody StZvarlB dto) {
|
||||
if (StringUtils.isNotBlank(dto.getStcd()) && Objects.isNull(stStbprpBService.getById(dto.getStcd()))){
|
||||
throw new IllegalArgumentException("测站编码不存在");
|
||||
}
|
||||
|
||||
if (service.lambdaQuery()
|
||||
.eq(StZvarlB::getStcd, dto.getStcd())
|
||||
.eq(StZvarlB::getMstm, dto.getMstm())
|
||||
.eq(StZvarlB::getPtno, dto.getPtno())
|
||||
.count() > 0) {
|
||||
throw new IllegalArgumentException("当前数据已存在");
|
||||
}
|
||||
dto.setModitime(null);
|
||||
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));
|
||||
@PostMapping("/del")
|
||||
public R<Boolean> del(@Validated(Delete.class) @RequestBody StZvarlB dto) {
|
||||
if (service.lambdaQuery()
|
||||
.eq(StZvarlB::getStcd, dto.getStcd())
|
||||
.eq(StZvarlB::getMstm, dto.getMstm())
|
||||
.eq(StZvarlB::getPtno, dto.getPtno())
|
||||
.count() != 1) {
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.lambdaUpdate()
|
||||
.eq(StZvarlB::getStcd, dto.getStcd())
|
||||
.eq(StZvarlB::getMstm, dto.getMstm())
|
||||
.eq(StZvarlB::getPtno, dto.getPtno())
|
||||
.remove() );
|
||||
}
|
||||
|
||||
@Operation(summary = "列表")
|
||||
|
|
@ -54,8 +98,8 @@ public class StZvarlBController {
|
|||
return R.ok(service.lambdaQuery().orderByDesc(StZvarlB::getMstm).list());
|
||||
}
|
||||
|
||||
@Operation(summary = "分页")
|
||||
@PostMapping("/page")
|
||||
// @Operation(summary = "分页")
|
||||
// @PostMapping("/page")
|
||||
public R<List<StZvarlB>> page() {
|
||||
return R.ok(service.page(null,null));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ public class SysDictBController {
|
|||
if (StringUtils.isNotBlank(dto.getDictNm())){
|
||||
if (service.lambdaQuery().eq(SysDictB::getDictNm,dto.getDictNm())
|
||||
.count() > 0) {
|
||||
throw new RuntimeException("当前名称已存在");
|
||||
throw new IllegalArgumentException("当前名称已存在");
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(dto.getPid())){
|
||||
if (service.lambdaQuery().eq(SysDictB::getId,dto.getPid())
|
||||
.count() == 0) {
|
||||
throw new RuntimeException("当父级不存在");
|
||||
throw new IllegalArgumentException("当父级不存在");
|
||||
}
|
||||
}
|
||||
boolean result = service.save(dto);
|
||||
|
|
@ -61,13 +61,13 @@ public class SysDictBController {
|
|||
if (StringUtils.isNotBlank(dto.getDictNm())){
|
||||
if (service.lambdaQuery().eq(SysDictB::getDictNm,dto.getDictNm())
|
||||
.count() > 0) {
|
||||
throw new RuntimeException("当前名称已存在");
|
||||
throw new IllegalArgumentException("当前名称已存在");
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(dto.getPid())){
|
||||
if (service.lambdaQuery().eq(SysDictB::getId,dto.getPid())
|
||||
.count() == 0) {
|
||||
throw new RuntimeException("当父级不存在");
|
||||
throw new IllegalArgumentException("当父级不存在");
|
||||
}
|
||||
}
|
||||
boolean result = service.updateById(dto);
|
||||
|
|
@ -78,7 +78,7 @@ public class SysDictBController {
|
|||
@GetMapping("/del/{id}")
|
||||
public R<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||
if (Objects.isNull(service.getById(id))) {
|
||||
throw new RuntimeException("当前数据不存在");
|
||||
throw new IllegalArgumentException("当前数据不存在");
|
||||
}
|
||||
return R.ok(service.removeById(id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,10 +25,4 @@ public class HomeStStbprpBVo extends StStbprpB {
|
|||
@Schema(description="数据")
|
||||
private BigDecimal v;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
@Schema(description="水库编码")
|
||||
private String resCode;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ public class AttCctvBase implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="id")
|
||||
@NotBlank(message = "id不能为空")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -31,7 +32,7 @@ public class CctvBMenu implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="id")
|
||||
@NotBlank(message = "id不能为空")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -88,8 +88,7 @@ public class FileAssociations implements Serializable {
|
|||
|
||||
|
||||
@TableField(value = "type")
|
||||
@Schema(description = "业务文件类型 /n 0:水库基本信息-工程基础信息-工程特性表," +
|
||||
"/n 1:水库基本信息-设计图纸和资料")
|
||||
@Schema(description = "业务文件类型 0:水库基本信息-工程基础信息-工程特性表,1:水库基本信息-设计图纸和资料")
|
||||
private String type;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.gunshi.project.xyt.validate.markers.Insert;
|
|||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -32,7 +33,7 @@ public class GateValveCctvRel implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="id")
|
||||
@NotBlank(message = "id不能为空", groups = {Update.class})
|
||||
@NotNull(message = "id不能为空", groups = {Update.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ public class GateValveR implements Serializable {
|
|||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="id")
|
||||
// @Size(max = 0,message = "id最大长度要小于 0")
|
||||
@NotBlank(message = "id不能为空")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ public class GateValveReal implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="id")
|
||||
@NotBlank(message = "id不能为空")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ public class OsmoticWarnR implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ public class OsmoticWarnRule implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ public class ResMangUnit implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7,12 +7,16 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -33,7 +37,7 @@ public class ResMonthEcoFlow implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空",groups = {Update.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
@ -41,8 +45,8 @@ public class ResMonthEcoFlow implements Serializable {
|
|||
*/
|
||||
@TableField(value="res_code")
|
||||
@Schema(description="水库代码")
|
||||
@Size(max = 32,message = "水库代码最大长度要小于 32")
|
||||
@NotBlank(message = "水库代码不能为空")
|
||||
@Size(max = 32,message = "水库代码最大长度要小于 32",groups = {Update.class, Insert.class})
|
||||
@NotBlank(message = "水库代码不能为空",groups = {Update.class, Insert.class})
|
||||
private String resCode;
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +63,7 @@ public class ResMonthEcoFlow implements Serializable {
|
|||
@TableField(value="value")
|
||||
@Schema(description="流量")
|
||||
// @Size(max = 0,message = "流量最大长度要小于 0")
|
||||
private String value;
|
||||
private BigDecimal value;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ public class ResPlanB implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ public class ResProjectImg implements Serializable {
|
|||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
// @Size(max = 0,message = "主键最大长度要小于 0")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ public class ResSafePersonB implements Serializable {
|
|||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
// @Size(max = 0,message = "主键最大长度要小于 0")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.gunshi.file.model.FileDescriptor;
|
|||
import com.gunshi.project.xyt.service.AbstractModelWithAttachService;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -39,7 +40,7 @@ public class RescueTeamB implements Serializable, AbstractModelWithAttachService
|
|||
*/
|
||||
@TableId(value="team_id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long teamId;
|
||||
|
||||
|
|
@ -126,7 +127,7 @@ public class RescueTeamB implements Serializable, AbstractModelWithAttachService
|
|||
*/
|
||||
@TableField(value="tm")
|
||||
@Schema(description="时间戳")
|
||||
@NotBlank(message = "时间戳不能为空")
|
||||
@NotNull(message = "时间戳不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ public class RescueTeamDetail implements Serializable {
|
|||
*/
|
||||
@TableId(value="detail_id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long detailId;
|
||||
|
||||
|
|
@ -99,7 +100,7 @@ public class RescueTeamDetail implements Serializable {
|
|||
*/
|
||||
@TableField(value="tm")
|
||||
@Schema(description="时间戳")
|
||||
@NotBlank(message = "时间戳不能为空")
|
||||
@NotNull(message = "时间戳不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -34,7 +34,7 @@ public class RescueTeamFile implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="主键")
|
||||
@NotBlank(message = "主键不能为空")
|
||||
@NotNull(message = "主键不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ public class RescueTeamFile implements Serializable {
|
|||
*/
|
||||
@TableField(value="tm")
|
||||
@Schema(description="时间戳")
|
||||
@NotBlank(message = "时间戳不能为空")
|
||||
@NotNull(message = "时间戳不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ public class ShpPlacement implements Serializable {
|
|||
@TableId(value="gid", type= IdType.AUTO)
|
||||
@Schema(description="gid")
|
||||
// @Size(max = 0,message = "gid最大长度要小于 0")
|
||||
@NotBlank(message = "gid不能为空")
|
||||
@NotNull(message = "gid不能为空")
|
||||
private Integer gid;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ public class StAddvcdD implements Serializable {
|
|||
@TableId(value="adcd", type= IdType.AUTO)
|
||||
@Schema(description="行政区划编码")
|
||||
@Size(max = 15,message = "行政区划编码最大长度要小于 15")
|
||||
@NotBlank(message = "行政区划编码不能为空")
|
||||
@NotNull(message = "行政区划编码不能为空")
|
||||
private String adcd;
|
||||
|
||||
/**
|
||||
|
|
@ -84,7 +85,7 @@ public class StAddvcdD implements Serializable {
|
|||
@TableField(value="tm")
|
||||
@Schema(description="时间戳")
|
||||
// @Size(max = 0,message = "时间戳最大长度要小于 0")
|
||||
@NotBlank(message = "时间戳不能为空")
|
||||
@NotNull(message = "时间戳不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@ import java.util.Date;
|
|||
public class StImgR implements Serializable {
|
||||
@TableField(value = "stcd")
|
||||
@MppMultiId
|
||||
@Schema(description="")
|
||||
@Size(max = 20,message = "最大长度要小于 20")
|
||||
@NotBlank(message = "不能为空")
|
||||
@Schema(description="测站编码")
|
||||
@Size(max = 20,message = "测站编码最大长度要小于 20")
|
||||
@NotBlank(message = "测站编码不能为空")
|
||||
private String stcd;
|
||||
|
||||
@MppMultiId
|
||||
@TableField(value = "tm")
|
||||
@Schema(description="")
|
||||
@NotNull(message = "不能为null")
|
||||
@Schema(description="时间")
|
||||
@NotNull(message = "时间不能为为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
@ -38,9 +38,9 @@ public class StImgR implements Serializable {
|
|||
private Date chtm;
|
||||
|
||||
@TableField(value = "img_path")
|
||||
@Schema(description="")
|
||||
@Size(max = 256,message = "最大长度要小于 256")
|
||||
@NotBlank(message = "不能为空")
|
||||
@Schema(description="图片路径")
|
||||
@Size(max = 256,message = "图片路径最大长度要小于 256")
|
||||
@NotBlank(message = "图片路径不能为空")
|
||||
private String imgPath;
|
||||
|
||||
@TableField(value = "chid")
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ import java.util.Date;
|
|||
public class StImgRReal implements Serializable {
|
||||
@TableField(value = "stcd")
|
||||
@MppMultiId
|
||||
@Schema(description="")
|
||||
@Size(max = 20,message = "最大长度要小于 20")
|
||||
@NotBlank(message = "不能为空")
|
||||
@Schema(description="测站编码")
|
||||
@Size(max = 20,message = "测站编码最大长度要小于 20")
|
||||
@NotBlank(message = "测站编码不能为空")
|
||||
private String stcd;
|
||||
|
||||
@TableField(value = "tm")
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ public class StImgWarnR implements Serializable {
|
|||
@MppMultiId
|
||||
@TableField(value="tm")
|
||||
@Schema(description="tm")
|
||||
@NotBlank(message = "tm不能为空")
|
||||
@NotNull(message = "tm不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ public class StPptnR implements Serializable {
|
|||
*/
|
||||
@TableField(value="tm")
|
||||
@Schema(description="时间")
|
||||
@NotBlank(message = "时间不能为空")
|
||||
@NotNull(message = "时间不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ public class StPptnRD implements Serializable {
|
|||
@TableField(value="tm")
|
||||
@Schema(description="时间")
|
||||
// @Size(max = 0,message = "时间最大长度要小于 0")
|
||||
@NotBlank(message = "时间不能为空")
|
||||
@NotNull(message = "时间不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ public class StPptnRD implements Serializable {
|
|||
*/
|
||||
@TableField(value="year")
|
||||
@Schema(description="year")
|
||||
@NotBlank(message = "year不能为空")
|
||||
@NotNull(message = "year不能为空")
|
||||
private Integer year;
|
||||
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -132,7 +133,7 @@ public class StPptnRReal implements Serializable {
|
|||
@TableField(value="chtm")
|
||||
@Schema(description="chtm")
|
||||
// @Size(max = 0,message = "chtm最大长度要小于 0")
|
||||
@NotBlank(message = "chtm不能为空")
|
||||
@NotNull(message = "chtm不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date chtm;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ public class StQxWarnR implements Serializable {
|
|||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="id")
|
||||
// @Size(max = 0,message = "id最大长度要小于 0")
|
||||
@NotBlank(message = "id不能为空")
|
||||
@NotNull(message = "id不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +43,7 @@ public class StQxWarnR implements Serializable {
|
|||
@TableField(value="tm")
|
||||
@Schema(description="tm")
|
||||
// @Size(max = 0,message = "tm最大长度要小于 0")
|
||||
@NotBlank(message = "tm不能为空")
|
||||
@NotNull(message = "tm不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ public class StRsvrR implements Serializable {
|
|||
*/
|
||||
@TableField(value="tm")
|
||||
@Schema(description="tm")
|
||||
@NotBlank(message = "tm不能为空")
|
||||
@NotNull(message = "tm不能为空")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date tm;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,17 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.xyt.validate.markers.Delete;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -33,8 +38,8 @@ public class StZqrlB implements Serializable {
|
|||
*/
|
||||
@TableId(value="stcd", type= IdType.AUTO)
|
||||
@Schema(description="测站编码")
|
||||
@Size(max = 8,message = "测站编码最大长度要小于 8")
|
||||
@NotBlank(message = "测站编码不能为空")
|
||||
@Size(max = 20,message = "测站编码最大长度要小于 8")
|
||||
@NotBlank(message = "测站编码不能为空",groups = {Insert.class, Update.class, Delete.class})
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +48,7 @@ public class StZqrlB implements Serializable {
|
|||
@TableField(value="lnnm")
|
||||
@Schema(description="曲线名称")
|
||||
@Size(max = 30,message = "曲线名称最大长度要小于 30")
|
||||
@NotBlank(message = "曲线名称不能为空")
|
||||
@NotBlank(message = "曲线名称不能为空",groups = {Insert.class, Update.class, Delete.class})
|
||||
private String lnnm;
|
||||
|
||||
/**
|
||||
|
|
@ -52,7 +57,7 @@ public class StZqrlB implements Serializable {
|
|||
@TableField(value="bgtm")
|
||||
@Schema(description="启用时间")
|
||||
// @Size(max = 0,message = "启用时间最大长度要小于 0")
|
||||
@NotBlank(message = "启用时间不能为空")
|
||||
@NotNull(message = "启用时间不能为空",groups = {Insert.class, Update.class, Delete.class})
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date bgtm;
|
||||
|
||||
|
|
@ -62,7 +67,7 @@ public class StZqrlB implements Serializable {
|
|||
@TableField(value="ptno")
|
||||
@Schema(description="点序号")
|
||||
// @Size(max = 0,message = "点序号最大长度要小于 0")
|
||||
@NotBlank(message = "点序号不能为空")
|
||||
@NotNull(message = "点序号不能为空",groups = {Insert.class, Update.class, Delete.class})
|
||||
private Integer ptno;
|
||||
|
||||
/**
|
||||
|
|
@ -71,8 +76,8 @@ public class StZqrlB implements Serializable {
|
|||
@TableField(value="z")
|
||||
@Schema(description="水位")
|
||||
// @Size(max = 0,message = "水位最大长度要小于 0")
|
||||
@NotBlank(message = "水位不能为空")
|
||||
private String z;
|
||||
@NotNull(message = "水位不能为空",groups = {Insert.class, Update.class})
|
||||
private BigDecimal z;
|
||||
|
||||
/**
|
||||
* 流量
|
||||
|
|
@ -80,8 +85,8 @@ public class StZqrlB implements Serializable {
|
|||
@TableField(value="q")
|
||||
@Schema(description="流量")
|
||||
// @Size(max = 0,message = "流量最大长度要小于 0")
|
||||
@NotBlank(message = "流量不能为空")
|
||||
private String q;
|
||||
@NotNull(message = "流量不能为空",groups = {Insert.class, Update.class})
|
||||
private BigDecimal q;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.xyt.validate.markers.Delete;
|
||||
import com.gunshi.project.xyt.validate.markers.Insert;
|
||||
import com.gunshi.project.xyt.validate.markers.Update;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -33,8 +36,8 @@ public class StZvarlB implements Serializable {
|
|||
*/
|
||||
@TableId(value="stcd")
|
||||
@Schema(description="测站编码")
|
||||
@Size(max = 8,message = "测站编码最大长度要小于 8")
|
||||
@NotBlank(message = "测站编码不能为空")
|
||||
@Size(max = 20,message = "测站编码最大长度要小于 8",groups = {Insert.class, Update.class, Delete.class})
|
||||
@NotNull(message = "测站编码不能为空",groups = {Insert.class, Update.class, Delete.class})
|
||||
private String stcd;
|
||||
|
||||
/**
|
||||
|
|
@ -43,7 +46,7 @@ public class StZvarlB implements Serializable {
|
|||
@TableField(value="mstm")
|
||||
@Schema(description="施测时间")
|
||||
// @Size(max = 0,message = "施测时间最大长度要小于 0")
|
||||
@NotBlank(message = "施测时间不能为空")
|
||||
@NotNull(message = "施测时间不能为空",groups = {Insert.class, Update.class, Delete.class})
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date mstm;
|
||||
|
||||
|
|
@ -53,7 +56,7 @@ public class StZvarlB implements Serializable {
|
|||
@TableField(value="ptno")
|
||||
@Schema(description="点序号")
|
||||
// @Size(max = 0,message = "点序号最大长度要小于 0")
|
||||
@NotBlank(message = "点序号不能为空")
|
||||
@NotNull(message = "点序号不能为空",groups = {Insert.class, Update.class, Delete.class})
|
||||
private Integer ptno;
|
||||
|
||||
/**
|
||||
|
|
@ -61,7 +64,7 @@ public class StZvarlB implements Serializable {
|
|||
*/
|
||||
@TableField(value="rz")
|
||||
@Schema(description="库水位")
|
||||
@NotBlank(message = "库水位不能为空")
|
||||
@NotNull(message = "库水位不能为空",groups = {Insert.class, Update.class})
|
||||
private BigDecimal rz;
|
||||
|
||||
/**
|
||||
|
|
@ -69,7 +72,7 @@ public class StZvarlB implements Serializable {
|
|||
*/
|
||||
@TableField(value="w")
|
||||
@Schema(description="蓄水量")
|
||||
@NotBlank(message = "蓄水量不能为空")
|
||||
@NotNull(message = "蓄水量不能为空",groups = {Insert.class, Update.class})
|
||||
private BigDecimal w;
|
||||
|
||||
/**
|
||||
|
|
@ -78,7 +81,7 @@ public class StZvarlB implements Serializable {
|
|||
@TableField(value="wsfa")
|
||||
@Schema(description="水面面积")
|
||||
// @Size(max = 0,message = "水面面积最大长度要小于 0")
|
||||
private String wsfa;
|
||||
private BigDecimal wsfa;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
|
|
@ -95,6 +98,6 @@ public class StZvarlB implements Serializable {
|
|||
@TableField(value="tot_cap")
|
||||
@Schema(description="库容(万m³)")
|
||||
// @Size(max = 0,message = "库容(万m³)最大长度要小于 0")
|
||||
private String totCap;
|
||||
private BigDecimal totCap;
|
||||
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
|||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -32,7 +33,7 @@ public class TyYearRainfall implements Serializable {
|
|||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@Schema(description="id")
|
||||
@NotBlank(message = "id不能为空")
|
||||
@NotNull(message = "id不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue