From fcc7014423582af194de3ae04ac366a1e7595a1a Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 18 十一月 2024 15:02:51 +0800
Subject: [PATCH] pom.xml中增加配置项<packaging>jar</packaging>
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java | 66 ++++++++++++++++++++++-----------
1 files changed, 44 insertions(+), 22 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 16fcc9f..3398f3a 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
@@ -122,6 +122,23 @@
vo.softBytesCalculate = ppo.programCalculateBytes ;
vo.softByteSrc16 = ppo.programCrc16 ;
}
+ /**
+ * 鐩戣锛�
+ * 閲嶇疆锛屾紨绀虹殑閲嶇疆
+ * @return 鎿嶄綔缁撴灉
+ */
+ @GetMapping(path = "/demoReset")
+ @SsoAop()
+ public BaseResponse<Boolean> demoReset(){
+ if(RtuUpgradeStateReceiverCtrl.cache != null){
+ //return BaseResponseUtils.buildError("褰撳墠娌℃湁鍗囩骇浠诲姟") ;
+ //姝e紡杩愯鏃讹紝涓嬮潰涓よ鍘绘帀锛屼笂闈竴琛屾墦寮�
+ RtuUpgradeStateReceiverCtrl ctrl = SpringContextUtil.getBean(RtuUpgradeStateReceiverCtrl.class);
+ ctrl.resetDemo();
+ ctrl.demo();
+ }
+ return BaseResponseUtils.buildSuccess(true) ;
+ }
/**
* 鐩戣锛�
@@ -134,7 +151,7 @@
responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
description = "杩斿洖鎿嶄綔鎴愬姛涓庡惁鏁版嵁锛圔aseResponse.content:Boolean锛�",
content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
- schema = @Schema(implementation = Boolean.class))}
+ schema = @Schema(implementation = VoWatch.class))}
)
})
@GetMapping(path = "/curUpgradeState")
@@ -142,6 +159,8 @@
public BaseResponse<QueryResultVo<VoWatch> > curUpgradeState(QueryVo qvo){
if(qvo == null){
qvo = new QueryVo();
+ qvo.pageCurr = 1 ;
+ qvo.pageSize = 50 ;
}
if(RtuUpgradeStateReceiverCtrl.cache == null){
//return BaseResponseUtils.buildError("褰撳墠娌℃湁鍗囩骇浠诲姟") ;
@@ -152,32 +171,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