From 4fe7ea4fbdc0c45f14d1d8de77e3424f826ba909 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期五, 28 六月 2024 21:39:12 +0800 Subject: [PATCH] 1、靳总协议上行数据处理修改完善; 2、上行数据处理任务修改完善. --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/webUtil/QueryResultVo.java | 38 +++++++++++++++++++++----------------- 1 files changed, 21 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..16d5841 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 = 1 ; } - pageTotal = (int)Math.ceil((double)itemTotal/pageSize); + if(this.pageSize == null || this.pageSize <= 0){ + /** + * 鏈卞疂姘� 2024-01-30 淇敼 + * 鏈紶鍏ュ垎椤靛弬鏁版椂锛屽彇鍏ㄩ儴璁板綍 + */ + //this.pageSize = 1 ;//渚涗笅闈綔涓洪櫎鏁� + this.pageSize = 10000 ;//渚涗笅闈綔涓洪櫎鏁� + } + + 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,8 @@ this.queryStart = (this.pageCurr - 1) * this.pageSize ; this.queryCount = this.pageSize ; - params.put("queryStart", this.queryStart) ; - params.put("queryCount", this.queryCount) ; + params.put("start", this.queryStart) ; + params.put("count", this.queryCount) ; } } -- Gitblit v1.8.0