From b1384c4959a4486d391369c4e7a58c4b4b0e9b9c Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期三, 13 十一月 2024 17:41:23 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
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