From 24bbe7a75c85816524c097caacb141cc6846acb9 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 11 十二月 2024 15:21:21 +0800
Subject: [PATCH] 增加删除取水口水量月统计年统计重复数据功能,增加删除农户用水量月统计年统计重复数据功能,
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java | 40 +++++++++++++++++++++++-----------------
1 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java
index 8af19e3..41344a3 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java
@@ -19,30 +19,25 @@
* 姣忛〉鏄剧ず鐨勮褰曟暟
*/
@Schema(description = "姣忛〉璁板綍鏁�")
- @Builder.Default
- public Integer pageSize = 0 ;
+ public Integer pageSize ;
/**
* 璁板綍鎬绘暟
*/
@Schema(description = "璁板綍鎬绘暟")
- @Builder.Default
- public Long itemTotal = 0L;
+ public Long itemTotal ;
/**
* 褰撳墠椤�
*/
@Schema(description = "褰撳墠椤�")
- @Builder.Default
- public Integer pageCurr = 0;
+ public Integer pageCurr ;
/**
* 鎬婚〉鏁�
*/
@Schema(description = "鎬婚〉鏁�")
- @Builder.Default
- public Integer pageTotal = 0;
+ public Integer pageTotal ;
@Schema(description = "鏁版嵁")
- @Builder.Default
- public T content = null;
+ public T obj;
/**
* 鏌ヨ寮�濮嬭褰�
@@ -62,18 +57,27 @@
public void calculateAndSet(Long itemTotal, Map<String, Object> params) {
this.itemTotal = itemTotal ;
if(this.itemTotal == null){
- itemTotal = 0L ;
+ this.itemTotal = 0L ;
}
- if (pageSize < 1) {
- pageSize = 1;
+ if(this.itemTotal == 0){
+ this.pageSize = 10 ;
}
- pageTotal = (int)Math.ceil((double)itemTotal/pageSize);
+ if(this.pageSize == null || this.pageSize <= 0){
+ /**
+ * 鏈卞疂姘� 2024-01-30 淇敼
+ * 鏈紶鍏ュ垎椤靛弬鏁版椂锛屽彇鍏ㄩ儴璁板綍
+ */
+ //this.pageSize = 1 ;//渚涗笅闈綔涓洪櫎鏁�
+ this.pageSize = 10 ;//渚涗笅闈綔涓洪櫎鏁�
+ }
+
+ pageTotal = (int)Math.ceil((itemTotal==null?0.0D:itemTotal.doubleValue())/pageSize);
if (pageTotal == 0) {
pageTotal = 1;
}
- if (pageCurr < 1) {
+ if (pageCurr == null || pageCurr < 1) {
pageCurr = 1;
}
if (pageCurr > pageTotal) {
@@ -84,8 +88,10 @@
this.queryStart = (this.pageCurr - 1) * this.pageSize ;
this.queryCount = this.pageSize ;
- params.put("queryStart", this.queryStart) ;
- params.put("queryCount", this.queryCount) ;
+ if(params != null){
+ params.put("start", this.queryStart) ;
+ params.put("count", this.queryCount) ;
+ }
}
}
--
Gitblit v1.8.0