From 7a05e0cd475e2d084d9ecade98763aeb14ca1507 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 14 十一月 2024 15:05:49 +0800
Subject: [PATCH] xyz
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java | 45 ++++++++++++++++++++++++---------------------
1 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
index 3646149..1308504 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
@@ -169,32 +169,35 @@
QueryResultVo<VoWatch> rsVo = new QueryResultVo();
VoWatch vo = new VoWatch() ;
- vo.upgrade = this.sv.selectTaskDetail(RtuUpgradeStateReceiverCtrl.cache.ugTaskId);
- vo.overall = RtuUpgradeStateReceiverCtrl.cache.ugOverallState ;
- vo.rtus = new ArrayList<>() ;
List<UpgradeRtu> listFiltered = null ;
- if(RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList != null && RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList.size() > 0) {
- listFiltered = filterByQuery(qvo) ;
- if (listFiltered.size() > 0) {
- if(qvo.pageCurr < 1){
- qvo.pageCurr = 1 ;
- }
- int start = (qvo.pageCurr - 1) * qvo.pageSize ;
- if(start >= listFiltered.size()){
- if(listFiltered.size()%qvo.pageSize > 0){
- start = listFiltered.size() - listFiltered.size()%qvo.pageSize ;
- }else{
- start = listFiltered.size() - qvo.pageSize ;
+ if(RtuUpgradeStateReceiverCtrl.cache != null && RtuUpgradeStateReceiverCtrl.cache.ugTaskId != null){
+ vo.upgrade = this.sv.selectTaskDetail(RtuUpgradeStateReceiverCtrl.cache.ugTaskId);
+ vo.overall = RtuUpgradeStateReceiverCtrl.cache.ugOverallState ;
+ vo.rtus = new ArrayList<>() ;
+ if(RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList != null && RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList.size() > 0) {
+ listFiltered = filterByQuery(qvo) ;
+ if (listFiltered.size() > 0) {
+ if(qvo.pageCurr < 1){
+ qvo.pageCurr = 1 ;
}
- }
- for(int i = start; i < (start + qvo.pageSize) && i < listFiltered.size(); i++){
- UpgradeRtu ugRtu = listFiltered.get(i) ;
- VoWatch.VoWatchRtu rtu = new VoWatch.VoWatchRtu() ;
- rtu.fromCache(ugRtu) ;
- vo.rtus.add(rtu) ;
+ int start = (qvo.pageCurr - 1) * qvo.pageSize ;
+ if(start >= listFiltered.size()){
+ if(listFiltered.size()%qvo.pageSize > 0){
+ start = listFiltered.size() - listFiltered.size()%qvo.pageSize ;
+ }else{
+ start = listFiltered.size() - qvo.pageSize ;
+ }
+ }
+ for(int i = start; i < (start + qvo.pageSize) && i < listFiltered.size(); i++){
+ UpgradeRtu ugRtu = listFiltered.get(i) ;
+ VoWatch.VoWatchRtu rtu = new VoWatch.VoWatchRtu() ;
+ rtu.fromCache(ugRtu) ;
+ vo.rtus.add(rtu) ;
+ }
}
}
}
+
rsVo.obj = vo ;
rsVo.pageSize = qvo.pageSize ;
rsVo.pageCurr = qvo.pageCurr ;
--
Gitblit v1.8.0