From 29dbf6ba6409e3139e5f2e36588106945dd0cec2 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 13 十一月 2024 17:29:29 +0800
Subject: [PATCH] 实现查询RTU远程升级任务执行结果功能
---
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java
index 66872cd..33993ce 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/program/UgRtuProgramCtrl.java
@@ -151,6 +151,10 @@
if(vo.file == null){
return BaseResponseUtils.buildFail("RTU绋嬪簭鏂囦欢蹇呴』涓婁紶") ;
}
+ String fileName = vo.file.getOriginalFilename() ;
+ if(this.sv.existFileName(fileName)){
+ return BaseResponseUtils.buildFail("RTU绋嬪簭鏂囦欢鍚嶅凡瀛樺湪") ;
+ }
HexFileVo fileVo = null ;
byte[] fileBytes = null ;
@@ -166,7 +170,7 @@
}
if(fileVo != null){
UgRtuProgram po = new UgRtuProgram();
- po.hexFileName = vo.file.getOriginalFilename() ;
+ po.hexFileName = fileName ;
po.programCalculateBytes = (int)fileVo.calculateBytes ;
po.programCrc16 = fileVo.bytesCrc16 ;
po.programBytes = fileVo.bytes;
--
Gitblit v1.8.0